bumbuminc wrote:
Hi, there
I want to drop some Observations in Stata, who are out of a certain range.
For example: I have 2 variables, the first one is an identnumber and
the second one are the earnings.
Now I want Stata to drop all the Observation who are under a minimum
earning and all who are over a maximum earning and save this under a
new variable.
In the moment i can't figure it out by myself.
Hopefully someone can help me.
Boris
An example using the auto dataset...
sysuse auto
gen restrictedprice = price if(price >4000 & price < 11000)
Neil
***********************************************************************
This message may contain confidential and privileged information.
If you are not the intended recipient you should not disclose, copy
or distribute information in this e-mail or take any action in reliance
on its contents. To do so is strictly prohibited and may be unlawful.
Please inform the sender that this message has gone astray before
deleting it. Thank you.
2008 marks the 60th anniversary of the NHS. It's an opportunity to pay
tribute to the NHS staff and volunteers who help shape the service, and
celebrate their achievements.
If you work for the NHS and would like an NHSmail email account, go
to: www.connectingforhealth.nhs.uk/nhsmail
***********************************************************************
*
* 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/