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: method to automate saving row-level estimates after estimation in panel data


From   "Hoffman, George" <ghoffman@mcw.edu>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   st: method to automate saving row-level estimates after estimation in panel data
Date   Mon, 7 Nov 2011 11:09:52 -0600

Dear statalisters:
I work with panel data sets (individual and time)  extensively and wish to perform the following sorts of analyses:
1. regress (various models but start with linear) y vs x for each individual in the panel
2. save slope (or other estimate result) from each individual-level regression in the data set
3. examine individual slope vs. another independent measure z in the panel

I can:
   xtreg y i.id#c.x
   mat b = e(b)

and get a matrix of estimates, but the matrix does not include z, and I can't figure out how to get the matrix values back into the dataset on a individual level. I could have cut and paste to and from excel already, but there must be a better way.
Help is appreciated; thank you
George Hoffman



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