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, 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

To   statalist <>
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

 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

gen coin1=1 if fechaalta== fechabaja
drop if coin1==1
(300 observations deleted)
drop coin1
*   For searches and help try:

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