Bookmark and Share

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


[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" <[email protected]>
To   "[email protected]" <[email protected]>
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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index