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 on April 23, and its replacement, 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 <>
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


On Thu, May 5, 2011 at 9:27 AM, Dorothy Bridges <> 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:

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