Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
st: Dropping Observations
From
momo <[email protected]>
To
[email protected]
Subject
st: Dropping Observations
Date
Tue, 9 Nov 2010 08:58:58 -0800 (PST)
Dear Colleagues
I have a dataset with the following shape:
var1.......var5......var10(which sum obs in var11)... var11
co. N......1203.........................3........ ........................
.................................................. .....................1450
..................................................
......................1203
..................................................
......................1620
co.N......etc
so, I need to drop the observations in var11 which equal the unique value in
var5. in the example above I want to drop the observations in var11=1203
that =1203 in var5 for each var1(company).
I tries
drop var11 if (var11=var5) but doesn't work and gives me, var11=var5 invalid
name
or type mismatch if I put ==
in addition how can I change the value of var10 to be 2 in the example above
instead of 3 after dropping the observation that =1203 in var11. I.e to
change the summation of var11, which var10=number of observations in var11.
Thanks in advanced
--
View this message in context: http://statalist.1588530.n2.nabble.com/Dropping-Observations-tp5721657p5721657.html
Sent from the Statalist mailing list archive at Nabble.com.
*
* 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/