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]
re: st: Interaction of ANOVA contrast (e.g. linear/quadratic trend) and another Factor Variable?
From
"Airey, David C" <[email protected]>
To
"[email protected]" <[email protected]>
Subject
re: st: Interaction of ANOVA contrast (e.g. linear/quadratic trend) and another Factor Variable?
Date
Wed, 4 May 2011 20:32:41 -0500
.
Stata factor variables currently uses indicator variable coding only.
My guess is you need to do your coding and interaction of the terms manually outside of -anova- or -xtmixed- with factor variables. You are not required to use factor variables in Stata, though it would certainly be more convenient if different coding schemes could be automated like the default indicator coding. From what I remember, StataCorp said they built factor coding into Stata 11 in such a way that it would be possible to extend the type of variable coding eventually. Maybe in Stata 12?
The ATS UCLA command xi3 had several coding schemes and can still be used to generate variables <http://www.ats.ucla.edu/stat/stata/faq/xi3.htm>.
See <http://www.ats.ucla.edu/stat/stata/webbooks/reg/chapter5/statareg5.htm> and the following two chapters (e.g., 6.4 partial interaction) for a useful discussion of coding schemes in regression.
I'm looking forward to Michael Mitchell encapsulating (perhaps extending) all the most useful bits of the ATS UCLA Stata regression web book pages in his forthcoming book (Testing and Interpreting Regression Models in Stata).
-Dave
> Hi all,
>
> So I've used the anovalator and anovacontrast ado's to calculate ANOVA contrasts (mainly linear and quadratic trends) across levels of a factor variable (say Factor A).
>
> I was wondering if anyone knows how to calculate the interaction of that contrast (across A) and another factor (Factor B).
>
> For instance in SPSS you can calculate the Linear x B interaction, or the Quadratic x B interaction, to see if the linear or quadratic trend differs by the levels of A or B.
>
> Don't see a way to get that interaction using the tools above.
>
> Is it rather something that should be specified in the model explicitly?
>
> Or perhaps defining it manually from the margins command?
>
> Thanks so much for all the help!
>
> Cheers,
> Jared
*
* 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/