Skip to content

Instantly share code, notes, and snippets.

View hargi12's full-sized avatar

Haron Gichuhi hargi12

View GitHub Profile

How to write programs (also called commands or functions) in Stata

This is an introduction to how to write programs in Stata. To try this out yourself, download this Gist by clicking Download Zip. Unpack the .zip file and edit the path global in the runfile.do. Then follow these instructions and run the corresponding section of the run file.

If you have any questions or want us to add another examples on how you can expand myhist.ado as us in the comment section below.

Hello World

It is common in computer science that the first function/command you write is a simple command that just display the message Hello World!. That is what the program in hello_world.ado does.