Using Stata With Your Own Campus Machine

If you have your own campus machine where you can permanently write to the C: drive, you may still want to consider using the mystata procedure.  That way, if you are in a different campus location (or at any location where you have access to the N: drive), you will still have access to all your programs.  Of course, you then have to count on the network working properly and the N: drive being available.  As an alternative, you might consider copying your C:\ado directory onto your N: drive, and then using the mystata command as necessary. 

Customizing Stata with profile.do

(This is an easier alternative to mystata.do when you have your own machine.) There may be some commands that you want to have run every time you start Stata.  Rather than continually retyping them, you can place them in a file called profile.do.  Within Stata, you can create and edit this file by clicking on the Window menu and then choosing the do-file editor. (Alternatively, you could use Notepad or any other editor that can save files in plain text ASCII format.) 

The profile.do file contains commands you want Stata to always run at startup.  For example, Stata sets aside 1 megabyte of memory by default.  If you routinely work with large data sets, you may find that that isn't enough.  Hence, your profile.do file might include the line

set memory 32m

Also, I like to have Stata keep logs of the commands and output from when I am running Stata.  You can use the log and cmdlog commands for this.  First, create a folder called C:\statalogs.  (or use whatever other drive you want, either local or network..) Then, your profile.do might look like

log using C:\statalogs\mylog.txt, replace text
cmdlog using C:\statalogs\mycmd.txt, replace
set memory 32m

Note that these log files get overwritten each time you start a new session, so you should rename them immediately if they contain material you want to save.  You can view and edit these files with a program like Notepad.