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: RE: decomposition with fixed effects model


From   "Schaffer, Mark E" <[email protected]>
To   "[email protected]" <[email protected]>
Subject   st: RE: decomposition with fixed effects model
Date   Fri, 7 Feb 2014 14:22:52 +0000

Megan,

> -----Original Message-----
> From: [email protected] [mailto:owner-
> [email protected]] On Behalf Of Megan Sheahan
> Sent: 06 February 2014 20:03
> To: [email protected]
> Subject: st: decomposition with fixed effects model
> 
> Hello,
> 
> I am interested to know if any Stata or user-written command allows me to
> decompose r-squared when using a fixed effects regression model.
> 
> Here is the simple model I run: xtreg y x1 x2 x3, fe
> 
> I would like to know the contribution of each of the variables -- x1, x2, and x3 --
> in explaining the expected variance of y.
> 
> With a standard OLS regression, I've been able to use the use-written command
> "rego," which calculates Shapley values.
> 
> A simple model like this: reg y x1 x2 x3
> 
> Can be decomposed like this: rego y x1 \ x2 \ x3
> 
> This command does not seem compatible with fixed effects estimation.
> Any suggestions for doing something similar with a fixed effects model would
> be most useful.

Do you need to know the contribution of the fixed effects?

If the answer is yes, then presumably you can just include them by hand as dummy variables.

If the answer is no, then you can partial out the fixed effects by demeaning all your variables (i.e., demean them - Ben Jann's -center- is a handy way of doing this).  Then use rego on the demeaned variables.

HTH,
Mark

> 
> Many thanks in advance,
> Megan
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/faqs/resources/statalist-faq/
> *   http://www.ats.ucla.edu/stat/stata/


----- 
Sunday Times Scottish University of the Year 2011-2013
Top in the UK for student experience
Fourth university in the UK and top in Scotland (National Student Survey 2012)


We invite research leaders and ambitious early career researchers to 
join us in leading and driving research in key inter-disciplinary themes. 
Please see www.hw.ac.uk/researchleaders for further information and how
to apply.

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


*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


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