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 on April 23, and its replacement, statalist.org is already up and running.


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

st: RE: xtreg - saving transformed variables


From   "Schaffer, Mark E" <M.E.Schaffer@hw.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: xtreg - saving transformed variables
Date   Thu, 5 Jan 2012 20:35:46 -0000

BL,

Have a look at Ben Jann's -center-, available from ssc in the usual way.
It will demean and quasi-demean variables.

Cheers,
Mark

> -----Original Message-----
> From: owner-statalist@hsphsun2.harvard.edu 
> [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Bert Lloyd
> Sent: 05 January 2012 14:32
> To: statalist@hsphsun2.harvard.edu
> Subject: st: xtreg - saving transformed variables
> 
> Hi Statalist,
> 
> I would like to know if there is a simple way to keep the 
> variables transformed by xtreg in memory and save them to the 
> current dta-dataset.
> 
> For example, for fixed effects estimation, I would like to 
> save the de-meaned independent and dependent variables as, 
> for example, y_demeaned, x1_demeaned, x2_demeaned, etc.
> 
> Of course, this is not too hard to do manually but it would 
> be convenient to ensure that it is done on the same sample, etc.
> 
> A similar technique for other estimators that use transformed 
> data, e.g. xtregar, would also be helpful.
> 
> Many thanks in advance.
> 
>  - BL
> *
> *   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/
> 


-- 
Heriot-Watt University is a Scottish charity
registered under charity number SC000278.

Heriot-Watt University is the Sunday Times
Scottish University of the Year 2011-2012



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