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]

Re: st: Modeling Interactions and Interpretation using ONLY factorial interactions (and having imputed data)


From   Nick Winter <nwinter@virginia.edu>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Modeling Interactions and Interpretation using ONLY factorial interactions (and having imputed data)
Date   Thu, 06 Oct 2011 13:40:10 -0400

Just a note to say that I have found -margins- and -marginsplot- invaluable for looking at the substantive effects implied by complex 2-way (and 3-way, and 4-way) interactions.

something like

*****
clear
* create fake data
set seed 12345
set obs 500
gen female=round(uniform())
gen treatment=round(uniform())+round(uniform())
gen outcome = female + 1.treatment + 2*2.treatment ///
  + female*2.treatment - female*1.treatment  ///
  + uniform()*3

* run model
reg outcome i.female##i.treatment

*effects displayed one way
margins female#treatment
marginsplot, name(one)

*and another
margins treatment#female
marginsplot, name(two)
*****

Nick Winter



On 10/6/2011 10:26 AM, Maarten Buis wrote:
>  how can I make sure that I do it right.
Basically I go to my whiteboard to keep track of which parameter
represent which comparison. Its a pain, but there is no real
alternative. Over time I have gotten better at it, that is, I can do
it more quickly, but I don't think I will ever be able to completely
avoid writing it down (I can of course, but than I will start making
errors again...).

Hope this helps,
Maarten

--
--------------------------------------------------------------
Nicholas Winter                                 434.924.6994 t
Associate Professor                             434.924.3359 f
Department of Politics                  nwinter@virginia.edu e
University of Virginia          faculty.virginia.edu/nwinter w
S385 Gibson Hall, South Lawn
*
*   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