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: id-level predictions in panel data after regression

From   "Hoffman, George" <>
To   "" <>
Subject   st: id-level predictions in panel data after regression
Date   Sun, 1 May 2011 13:55:08 -0500

On a related topic to my graphing query (which was answered so expertly and expeditiously by eric booth): 
I have panel data, multiple observations per id, and wish to generate within-id linear fits.
	xtreg y x, fe  
will produce an average within-id regression, and following it by 
	predict p, xb
will generate the average within-id predictor. But I want an id-specific predictor for each id.

	xtmixed y x || id:, cov(unstruc)
will produce a multilevel id-level regression, and
	predict ypred, fit level(id)
will produce fits within id's, but each fir has the same slope.

There must be a way to get a set of id-specific predictors based on independent id-level regression (?)

Many thanks in advance.

*   For searches and help try:

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