Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

[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 <[email protected]>
To   [email protected]
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 See: It's easy to set
up a   filter to search only ".do" or ".log"  files


Steven Samuels
[email protected]
18 Cantine's Island
Saugerties NY 12477
Voice: 845-246-0774
Fax:    206-202-4783

On Thu, Jun 17, 2010 at 1:29 PM, G. Dai <[email protected]> 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:
> *
> *
> *

*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index