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]
Re: st: Importing a variable from another STATA file and an "xtregar" question
From
Maarten Buis <[email protected]>
To
[email protected]
Subject
Re: st: Importing a variable from another STATA file and an "xtregar" question
Date
Tue, 7 Jun 2011 17:17:15 +0200
On Tue, Jun 7, 2011 at 4:45 PM, Jason Hecht wrote:
> 1. I created a smaller panel STATA datafile from a larger panel
> datafile by discarding unneeded variables. I now want to bring in a
> single variable from the larger datafile into the smaller panel
> datafile. Is there an easy way to do this.
You can cure the problem with -help merge-, but better yet is to
prevent the problem: If you had done your datapreparation in a .do
file you easily change that .do file and re-run it. The kind of
changes you report happen during every research project, so doing your
data preparation in a .do file will almost always save you huge
amounts of time. This is also a good strategy as that way you
automatically keep a record of exactly how you "tortured" your data.
> 2. I am running the following model:
>
> xtregar capexppenet salesppenet if totalassets>1000, re rhotype(theil) twostep
>
> However, instead of using "totalassets>1000," I now want to run the
> model on the upper 5% of the distribution of total assets.
sum totalassests, detail
xtregar ... if totalassest > r(p95), ...
Hope this helps,
Maarten
--------------------------
Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen
Germany
http://www.maartenbuis.nl
--------------------------
*
* 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/