Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

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

st: xbu option in xtreg postestimation

From   Dorothy Bridges <>
Subject   st: xbu option in xtreg postestimation
Date   Thu, 5 May 2011 07:27:55 -0700

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.

I am therefore making the following substitution for (2): xi: reg y
year  I think this is what I'm looking for.  But how could I
make a similar substitution for random effects?  I did read the Stata
Journal article "Fixed Effects Estimation in Stata," but it did not
answer my question.

Thanks very much.

*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index