MKPROFILE
Create or edit your profile.do file or just see where Stata searches for a profile.do file
If you want to use mkprofile, then feel free to use Stata's command ssc install to download and install mkprofile:
ssc install mkprofile , replaceDisclaimer: There is no warranty on this software either expressed or implied. This program is released under the terms and conditions of GNU General Public License.
About mkprofile
Programmer: Dan Blanchette (dan_blanchette@unc.edu)
The Carolina Population Center
The University of North Carolina
Chapel Hill, NC USA
Date: 06Feb2005
Last updated: 22Apr2010
Create or edit your
The Carolina Population Center
The University of North Carolina
Chapel Hill, NC USA
Date: 06Feb2005
Last updated: 22Apr2010
Create or edit your
profile.do file or just see where Stata searches for
profile.dofile
mkprofile [,
memory( integer value for number of megabytes of memory )
vlabel( integer between 8 and 32 ) list all nthdir edit cwd ]
mkprofile with no options specified is equivalent to:
. mkprofile , memory(40) vlabel(12)
Description
mkprofile creates or edits your
profile.do file. Your
profile.do file contains the settings you would like Stata to have every time
you start a Stata session. By default, mkprofile creates your
profile.do file to set your variable label position to 12 and set your memory
to 40m.
Options
memory( integer ) sets Stata's memory to that number of megabytes. Be
careful not to set it too low or too high as you will get an error message when your
profile.do
file is run.
vlabel( integer ) sets the variable label position in the variable label
window. If you tend not to have variable names longer than 8 or so characters, set it to 10 to allow you to easily
see the variable label associated to the variable.
list specifies mkprofile only to list the directories that your
profile.do file will be attempted to be created in rather than attempt to create
or edit your profile.do file. The order of the directories listed will be
the reverse order of directories that Stata will search for your profile.do file
so that the top listed directories are more likely the directories you have permission to create your
profile.do file. Also specifying the all option
will make the order be the order of all the directories that Stata searches for your
profile.do file.
all specifies mkprofile to list all the directories that Stata will
look in for your
profile.do file and attempt to create your
profile.do file in the first of these directories in which it can create it.
NOTE: These directories may require administrator directory permissions. By default
mkprofile only tries to attempt to create your profile.do
file in a directory you most likely have permission to create the file.
nthdir( integer ) species in which of the directories listed
by mkprofile you prefer mkprofile to create your
profile.do file. If not specified, mkprofile will
create your profile.do file in the first directory it can create it in.
NOTE: The all option affects the order of the directories so the nth
directory will be different if all is specified or not specified when using the
nthdir() option.
edit will allow you to open your current
profile.do file in
the do-file editor.
cwd tells Stata to change to the directory you are currently in when you invoke
mkprofile at the beginning of each Stata session. Note: "cwd"
means "current working directory." To use this option, first
cd to the directory you normally use, then
use the cwd option in mkprofile. The next time you start Stata,
you will be in this directory. To start Stata in a different directory in the future, edit your
profile.do file.
NOTE: An example of how to set-up F keys (eg. F4,
F5) on your keyboard to be used to change to set directories is implemented in the
profile.do file using the current directory in the example. Use
macro list to see what F
keys are already being used.
Remarks
Since Stata only runs the first
profile.do file that it finds in its search
path, there is no guarantee that the profile.do file created by
mkprofile is always going to be found and run by Stata. Read more about
profile. mkprofile
can be set to have a default location in which to create the profile.do file.
For Windows "C:\ado\" is suggested. For UNIX/Linux and Macintosh
"~/ado/" is suggested. A preferred directory can be set to
a specific directory along Stata's search path for the profile.do file by editing
the mkprofile.ado file. If a preferred directory is set, then this directory
will be the only directory mkprofile will see as an option to try to create the
profile.do file even if the all option is specified.
Examples
. mkprofile . mkprofile, vlabel(10) . mkprofile, list . mkprofile, mem(100) vl(10) cwd nthdir(3) . mkprofile, edit memory(100) vlab(10) cwd
Also see


