Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | Syed Basher <syed.basher@yahoo.com> |
To | statalist@hsphsun2.harvard.edu |
Subject | Re: st: Estimating pairwise regression in a panel setting |
Date | Mon, 21 Mar 2011 12:37:05 -0700 (PDT) |
Hi Statalisters, The following problem has been solved! The trick was to use -reshape- to convert data from wide into long format. How clumsy of me to not have picking it up in the first place. Syed Basher Doha, Qatar. Syed Basher <syed.basher@yahoo.com> wrote: Hello Statalisters, With reference to my inquiry below, here are the commands I have used to obtain 45 pairs of time series regression: *-------- begin ---------------- local rhs "canrgdppc usrgdppc" local i=1 local j=1 while `i' <=45 { newey y`i' x`j' `rhs', lag(3) local ++i local ++j } *-------- end ---------------- Now I want to re-estimate the above in a panel setting using Stata's -xtreg-. One challenge is to define -tsset- for panel since my data are not stacked, nor I have any cross-sectional identifier. The above time series regressions use year as -tsset-. Any help/hint on how to run the above pairwise regression in a panel setting would be very helpful. Thanks. Syed Basher Doha, Qatar. Syed Basher <syed.basher@yahoo.com> wrote: I have recently estimated 45 pairs of time series regressions in Stata (thus I have 10 countries). Now I would like to reestimate these 45 regressions in a panel dimension (say using Stata's "xtreg") so that I am able to capture the time variation for each regression pair. Could you advice (or provide hints) how to perform this in Stata? Thank you. Syed Basher Doha, Qatar. * * 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/