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: Interaction of ANOVA contrast (e.g. linear/quadratic trend) and another Factor Variable?


From   Jared Saletin <jsaletin@berkeley.edu>
To   statalist@hsphsun2.harvard.edu
Subject   re: st: Interaction of ANOVA contrast (e.g. linear/quadratic trend) and another Factor Variable?
Date   Thu, 5 May 2011 00:25:53 -0700

Dear David and Phil,

Thanks so much for the help. I'll definitely look into desmat as per below.

Would it be possibly correct (based on the example here: http://www.ats.ucla.edu/stat/Stata/examples/da/dastata7.htm), to do the below, in order to look at say linear(A) x B interaction

Generate linear, quad and cubic coefficients for the factor a (3 levels), as per:

generate linear = a
generate quad = a
recode linear  1 = -1 2 = 0 3 = 1
recode quad 1 = 1 2 = -2 3 = 1

and then load the anova model as the following:

anova y c.linear c.quad b c.linear#b c.quad#b

--

At least in this simple example, would that make sense?

Will look into desmat as well as it undoubtedly will help for any designs more complicated than the above.

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


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index