In Stata, you can have personal ado file that have user written programs that can be loaded at each time, Stata is started.
On the latest Stata 18, the following commends worked for me.
Start Stata and find the personal ado path
ADO Files
ADO files are custom programs that become available in Stata.
adopath
personal dir
Create one file per program.
To create the program, navigate to the personal Ado directory Path
cd "~/Library/Application Support/Stata/ado/personal" "
Code language: JavaScript (javascript)
Now create the ado files
doe ssSurvey.ado
Code language: CSS (css)
In Stata 18, the path has been updated to “~/Documents/ado” but at least in my case, the old path is the now being used.
my current personal ados look like this
. personal dir
your personal ado-directory is /Users/vivekgupta/Library/Application Support/Stata/ado/personal/
eq5d5l_indsco.ado scheme-_GRSTYLE_.scheme
logisticResults.ado ssSurvey.ado
PROFILE.DO Files
This is a DO file that gets executed every time Stata is launched. It is recommended to put profile.do in the home directory.
cd ~
doe profile.do
Code language: CSS (css)