Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

 In your university OneDrive account, create a folder that is dedicated only to saving Stata command files. To do this, open up OneDrive, right-click, then go to New, then Folder. Give it a name. I used “Owen_Stata_commands”. It looks like this:

...

You just need to put #1 and #2 together (separated by a backslash) to get the path name. Mine is:

 “C:\Users\ogallupeacocoop4\OneDrive - University of Waterloo\Owen_Stata_commands”

 Next, you need to tell Stata to include that folder in the places that it looks. Customise Customize and run (either in the command box or from a do file) the following using your own path name:

 sysdir set PERSONAL “C:\Users\

...

acocoop4\OneDrive - University of Waterloo\Owen_Stata_commands”

A few points:

  • “PERSONAL” needs to be in caps

  • this should all be on one line

  • make sure you put quotations around the path name

Finally, you need to tell Stata to save any commands that you download from the internet to that location. This does it:

net set ado PERSONAL

Do not alter that command in any way. It works as is.

Take home message

...

Once you set up the OneDrive folder, just get in the habit of running the two commands below every time you log onto Stata (the first one will be slightly different for each person):

sysdir set PERSONAL “C:\Users\

...

acocoop4\OneDrive - University of Waterloo\Owen_Stata_commands”

net set ado PERSONAL

Video Tutorial

...