| |
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: AW: RE: RE: dropping all years of id
Thanks for the suggestion.
I still sometimes fail in combining basic Stata functions in an obvious
way..
- Tom
-----Urspr�ngliche Nachricht-----
Von: [email protected]
[mailto:[email protected]] Im Auftrag von Nick Cox
Gesendet: Mittwoch, 17. Januar 2007 23:09
An: [email protected]
Betreff: st: RE: RE: dropping all years of id
The first one should be -max(freefloat)-. That
is, all values are below 0.2 if the maximum is.
Nick
[email protected]
Nick Cox
> Suppose you
>
> tsset id year
>
> then one solution might resemble
>
> by id : egen minfreefloat = min(freefloat)
> by id : drop if minfreefloat < 0.2
> drop minfreefloat
>
> An alternative would be
>
> drop if missing(freefloat)
> bysort id (freefloat) : drop if freefloat[_N] < 0.2
Thomas Erdmann
> > I have tsset my data (15 years). For one indicator
> > (independence) I have
> > only data for the last 4 years. I'd like to drop each company
> > where the
> > indicator is below some bound (e.g. 0.2) in the fours years I
> > have data
> > available.
> >
> > But
> > Drop if freefloat<=0.2 & year==2005
> >
> > Doesn't work because if the condition is true for all of the
> > four years I'd
> > like to remove the company completely from the data (for ALL years).
*
* 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/
*
* 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/