Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: xbu option in xtreg postestimation


From   Scott Merryman <scott.merryman@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: xbu option in xtreg postestimation
Date   Fri, 6 May 2011 07:25:35 -0500

Since the intercepts do not change can't you get just carry the u
values forward:

webuse grunfeld,clear
xtreg invest mval if year <1947, fe
predict xb,xb
predict u, u
replace u = l.u if u == .
gen xbu = xb+u


Scott

On Thu, May 5, 2011 at 9:27 AM, Dorothy Bridges <dbstata@gmail.com> wrote:
> Good morning,
>
> I am trying to fit the following three models to panel data:
>
> (1) y_it = a + Bt + e_it, by OLS
> (2) y_it = a_i +Bt + e_it, with fixed effects
> (3) y_it = a_i +Bt + e_it, with random effects
>
> The xtreg,fe and xtreg,re commands aren't working for me because (a)
> as indicated above, I want to display the group-specific intercepts
> rather than average them into one intercept, and (b) I need to make an
> out-of-sample prediction that incorporates the group-specific means
> (u_i, or a_i here), but the xbu option with "predict" does not allow
> for out-of-sample predictions.
>
>
*
*   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/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index