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]

st: id-level predictions in panel data after regression


From   "Hoffman, George" <ghoffman@mcw.edu>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
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.
gh

*
*   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