Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: how to delete some observations


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: how to delete some observations
Date   Mon, 7 Feb 2005 17:58:49 -0000

Is this more complicated than 

. drop if price == . 

? 

Nick 
[email protected] 

Tumur Gunchinmaa
 
> I had a data on market participation of households. The number of
> times each household participates in the different markets varies
> between the households. When I have reshape the data into a long
> format the data became as follows:
> 
> ID		market		choice		price
> 1		a1			0			.
> 1		f1			0               .
> 1         s1              1               x
> 1         u1              0               .
> 
> 1        a2               0               .
> 1         f2               0               .
> 1         s2              0               .
> 1         u2              0               .
> 
> 2		a1			1			x
> 2		f1			0               .
> 2         s1              0               .
> 2         u1              0               .
> 
> 2        a2               0               .
> 2         f2               0               .
> 2         s2              0               .
> 2         u2              1               x
> 
> So from the sample, household 1 traded only one time and
> household 2 traded twice. What I would like to is hence household
> 1 traded only once, I need to delete the second set of observations
> for this household making no changes to the observations of
> household  2.
> 
> I have tried to do various options, but they did not work. I would
> appreciate any help.

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index