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 at the end of May, and its replacement, statalist.org is already up and running.


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

st: strange error with stata10 and 9 using by


From   nicostat@gmail.com
To   statalist <statalist@hsphsun2.harvard.edu>
Subject   st: strange error with stata10 and 9 using by
Date   Mon, 23 May 2011 04:24:39 +0200

Dear statalist ,
I have a very strange error when I run the do file with stata 10 and 9
 for example see the code below . The first variable is generate the
second one not, if I eliminate" by codind"
still to work. I don't understand what happen.
thanks in advance
best
Nico

 sort codind fechalta fechabaja
by codind : gen coin=1 if fechalta>fechabaja
drop if coin==1
(64329 observations deleted)
by codind : gen coin1=1 if fechalta==fechabaja
drop if coin1==1
coin1 not found
r(111);

gen coin1=1 if fechaalta== fechabaja
drop if coin1==1
(300 observations deleted)
drop coin1
*
*   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