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: Simple slopes analysis in fixed effects panel regression


From   "Maartje Groenewegen" <[email protected]>
To   <[email protected]>
Subject   st: Re: Simple slopes analysis in fixed effects panel regression
Date   Tue, 7 Jan 2014 18:03:26 +0100

Dear Maarten,

Thanks a lot for your help. Although I already tried these commands,
I made some mistakes and due to your help and the specific commands it worked.


-----Oorspronkelijk bericht----- From: Maarten Buis
Sent: Monday, January 06, 2014 11:20 AM
To: [email protected]
Subject: Re: st: Simple slopes analysis in fixed effects panel regression

On Sun, Jan 5, 2014 at 4:13 PM, Maartje Groenewegen wrote:
Currently I am conducting a fixed effects panel regression which includes a
marginal significant (p=0.067) two-way interaction term consisting of two
mean centered continuous variables.
I would like to perform a simple slopes analysis on this interaction, but I
don’t know how to do it.

*------------------------ begin example -------------------------
// load some example data
webuse nlswork, clear
xtset idcode

// center your variables  (noone works 7 days a week 24 hours a day)
gen chours = cond(hours > 112, 112, hours) if hours < .
sum chours , meanonly
replace chours = chours - r(mean)
sum tenure , meanonly
gen ctenure = tenure - r(mean)

// estimate the model
xtreg ln_w age c.age#c.age ttl_exp c.ttl_exp#c.ttl_exp tenure ///
           c.ctenure#c.ctenure not_smsa south chours c.chours#c.ctenure, fe

// the simple slopes
margins, dydx(chours) at(ctenure=(-3(1)22))

// look at a graph
marginsplot
*------------------------ end example ---------------------------


Hope this helps,
Maarten

---------------------------------
Maarten L. Buis
WZB
Reichpietschufer 50
10785 Berlin
Germany

http://www.maartenbuis.nl
---------------------------------

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