Statalist The Stata Listserver

[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: ado file location in Macintosh OS X

From   Michael Hanson <>
Subject   Re: st: ado file location in Macintosh OS X
Date   Sat, 3 Feb 2007 08:30:32 -0500

On Feb 2, 2007, at 8:54 PM, Michael McCulloch wrote:

I've migrated to the Mac, and located my ado file location.
Congrats! Apologies if the discuss below is more basic than you require; hopefully it will set you on the path (small pun intended) to solving your current problem.

Within directory <ado> are two subdirectories:
These are in the Stata folder that is located in the Applications folder, correct? In typical Unix fashion (since Mac OS X is a BSD- Unix variant), this folder (aka directory) is /Applications/Stata/. That is what is listed as your "STATA" directory by -sysdir-.

[Aside: in Mac OS X, / is the "root" directory on your Mac, which typically is represented in the Finder by your hard drive icon. (If you are switching from Windows, it is roughly analogous to the C:\ directory.) Typical subdirectories are /Applications, /Library, / Users, and /System. Stata (the program) in installed in Stata (the folder), which is located in Applications (another folder). Programs like Stata are typically installed in /Applications so that they are available to all users of your Mac.]

Within /Users, there are at least two subdirectories: /Shared and your personal user directory, which for the sake of argument I'll presume is named "michael". In Unix parlance, your personal user directory is your home directory, which is denoted as ~. Hence, any directory that begins with a tilde is actually a subdirectory of / Users/michael. For example, -sysdir- indicates that your PLUS directory is located in ~/ado/plus/ -- that is, /Users/michael/ado/ plus/.

When I ask Stata to examine the directories, I see:

. sysdir
STATA: /Applications/Stata/
UPDATES: /Applications/Stata/ado/updates/
BASE: /Applications/Stata/ado/base/
SITE: /Applications/Stata/ado/site/
PLUS: ~/ado/plus/
PERSONAL: ~/ado/personal/
OLDPLACE: ~/ado/

However, there is no <plus>, where ado files which I've downloaded, for example -metan-.
I'm not sure I follow. If you use -ssc install- or -net install-, these files will be placed in your PLUS directory: ~/ado/plus/, or equivalently, /Users/michael/ado/plus/. Does that work for you?

Notice there are two different "ado" folders: one in /Applications/ Stata/, and a second in ~/ado/. This set-up mirrors the arrangement on the standard installation on a PC (IIRC), which places one ado folder (for BASE and UPDATES) at C:\Program Files\Stata9\ and another (where your PLUS and PERSONAL ado files reside) at C:\ado\.

And, if I copy the <plus> directory from my PC to the Mac under <plus>, none of the ado files which I've downloaded are visible.
Hmm, I'm puzzled: in the previous sentence you said there was no PLUS directory, but now you say you have copied your PC files your Mac under the PLUS directory. Without a better idea of exactly what you have done, I am going to guess that one of the following has happened:

1. You copied your PC "plus" folder into /Applications/Stata/ado/ -- beside the /Applications/Stata/ado/base/ and /Applications/Stata/ado/ updates/ folders. That won't work, because Stata is not looking there for its PLUS directory.

2. You copied your PC "plus" folder into /Users/michael/ado/ (the correct location according to -sysdir-), but the line endings are PC (CR/LF) instead of Mac (CR) or Unix (LF). However, that would probably result in an execution error rather than a "not found" error.

3. You copied your PC "plus" folder into /Users/michael/ado/, but permissions somehow were not set correctly. If you know something about working with Unix permissions, you can fix this easily with Otherwise, you should be able to fix it by selecting the "plus" folder and selecting "Get Info..." from the contextual menu (right-click or control-click on the folder icon), then selecting "Read & Write" for your "Ownership & Permission" settings at the bottom of the "plus Info" window.

Based on what you've written, I would put a very high prior possibility on #1 being the source of your problem, and a vanishingly small probability on #3. It is not clear to me whether #2 is going to be a problem or not, because I have never attempted to move ado files across platforms. While it may not seem efficient, I would recommend using -adoupdate- to get a list of ado files installed on your PC, then installing fresh copies on your Mac. It's a bit of a pain to do that set-up the first time, but subsequently you can keep both machines up-to-date (if desired) with regular use of - adoupdate-. In my opinion, that is a lot easier than copying .ado and .hlp files back and forth across machines.

Hope this helps.

-- Mike
* For searches and help try:

© Copyright 1996–2017 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index