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

st: RE: Re: Change the time period when estimating in Panel Data


From   Joly.Patrick@ic.gc.ca
To   statalist@hsphsun2.harvard.edu
Subject   st: RE: Re: Change the time period when estimating in Panel Data
Date   Fri, 14 Feb 2003 16:46:02 -0500

Scott Merryman [mailto:smerryman@kc.rr.com] wrote
> Sent: Friday, February 14, 2003 4:28 PM
> To: statalist@hsphsun2.harvard.edu
> Subject: st: Re: Change the time period when estimating in Panel Data
> 
> 
> How about using the -if- condition.
> 
> For example:
> . webuse grunfeld
> 
> . xtreg inv mva if year < 1950 & year >1939, fe
> 
> would restrict the sample to the 1940s out of the data set 
> that ranges from 1935 to 1954.

which is equivalent to

. webuse grunfeld

. tsset firm year, yearly

. xtreg inv mva if tin(1940,1949), fe


Patrick Joly
joly.patrick@ic.gc.ca
pat.joly@utoronto.ca
*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index