Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: where STATA on MAC always complains that some variable already existed?


From   Steve Samuels <sjsamuels@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: where STATA on MAC always complains that some variable already existed?
Date   Fri, 18 Jun 2010 11:05:37 -0400

If your do file starts from a plain text file and defines all
variables, then there is indeed a mystery.  If, however, the statement
occurs after a -use- statement, then  run "des r4pnhmln" after that
-use- statement. If the variable is there, then in making and testing
your path conversions,  possibly you  unintentionally saved  and
re-used the same data set at some point.  In any case,  run all your
do files in sequence from the start (the raw data) and check for the
presence of the problem variable after each run.

To search multiple do files on the Mac, I recommend BBEdit, or the
free TextWrangler ( both barebones.com). See:
http://fmwww.bc.edu/repec/bocode/t/texteditors.html. It's easy to set
up a   filter to search only ".do" or ".log"  files


Steve

-- 
Steven Samuels
sjsamuels@gmail.com
18 Cantine's Island
Saugerties NY 12477
USA
Voice: 845-246-0774
Fax:    206-202-4783



On Thu, Jun 17, 2010 at 1:29 PM, G. Dai <dgecon@gmail.com> wrote:
> hi all
> I just moved from WINDOWS to MAC. One problem with the switch is the
> old do files
> seem have a lot of troubles in MAC though I have corrected the working
> path etc.
> Among them is the STATA always complain that one variable have already defined.
> This is wired since I have double checked the do file (using find) and
> find no word was even
> spoken about the variable before. Also, the do files work well in WINDOWS.
> So, can any one give me some hints on what is going on?
> The do file is too big and a short excerpt is following
> ***************************************************************************
> . gen r4pnhmln=ln(r4pnhm5y+1)/ln(101);
> r4pnhmln already defined
> ****************************************************************************
> thanks,
> Guang
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/
>

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index