Skip to content

Instantly share code, notes, and snippets.

@larsvilhuber
Last active September 10, 2018 12:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save larsvilhuber/8ead0ba85119e4085e71ab3062760190 to your computer and use it in GitHub Desktop.
Save larsvilhuber/8ead0ba85119e4085e71ab3062760190 to your computer and use it in GitHub Desktop.
Setup file for Stata
/* 00_setup.do */
/* Suggested by Lars Vilhuber */
/* Create a reproducible Stata sequence by running this file as the first part of the program sequence */
/* Get it at https://gist.github.com/larsvilhuber/8ead0ba85119e4085e71ab3062760190 */
/* install any packages locally */
// Make a path local to the project
// Also see my related config.do at https://gist.github.com/larsvilhuber/6bcf4ff820285a1f1b9cfff2c81ca02b
local pwd "/c/path/to/project"
capture mkdir `pwd'/ado
sysdir set PERSONAL `pwd'/ado/personal
sysdir set PLUS `pwd'/ado/plus
sysdir set SITE `pwd'/ado/site
/* Now install them */
/*--- SSC packages ---*/
foreach pkg in outreg esttab someprog {
ssc install `pkg'
}
/*--- other packages ---*/
/* list the install lines here */
net install rdrobust, from(https://sites.google.com/site/rdpackages/rdrobust/stata) replace
net install this_great_command, from(https://this_great_command.com/stata)
/* in some cases, it may make sense to fix it to a specific version, if possible */
/* for instance, rdrobust has multiple versions. This is the earlier one */
net install st0366.pkg, from("http://www.stata-journal.com/software/sj14-4/")
/* in some cases, you may want to use github or similar to install it */
/* see https://github.com/haghish/github for one way to do it */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment