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: Re: Re: st: How to graph means with correct SE after repeated ANOVA?


From   "RAMPL Linn" <Linn.RAMPL@insead.edu>
To   <statalist@hsphsun2.harvard.edu>
Subject   Re: Re: Re: st: How to graph means with correct SE after repeated ANOVA?
Date   Mon, 29 Mar 2010 14:26:06 +0200

>ANOVA?

>> I looked up
http://www.ats.ucla.edu/stat/stata/faq/margins_nested1.htm
>> 
>> where you see a similar situation for the SE. 
>> 
>> WHY ARE THE SE exactly the SAME? In particular, the consequence is,
that
>> the confidence intervals in one group have the same range (i.e. the
same
>> absolute difference). Is this a mistake or correct? If this is
correct
>> then graphing confidence intervals in this case would not make a lot
of
>> sense...!
>> 
>> Thank you so much for any advice!
>> 
>> Best Linn

>In that example, it's also possible to use

>margins, within(trt)

>You use within() with nested designs.

>It does seem a little confusing, since within() is required to estimate
>predicted marginal means in some models, but not others:

>/* one between, one within-subject factor design */
>use http://www.ats.ucla.edu/stat/data/repeated_anova, clear

>anova dv trt / sid|trt time trt#time, repeated(time)

>margins trt           // doesn't work
>margins, within(trt)  // works

>/* one between, two-within-subject factor design, Example 17 of the
Stata >11 manual for -anova- */

>use http://www.stata-press.com/data/r11/t713, clear

>anova score noise / subject|noise period noise#period ///
>	/ period#subject|noise dial noise#dial / dial#subject|noise ///
>	period#dial noise#period#dial, repeated(period dial)

>margins noise           // works
>margins, within(noise)  // works

>Why is that???

>Note, with regard to your question, the standard errors for the means
>within subject factors are the same, as in your model without the
between >subject factor. So we need to know the relationship between the
standard >errors for those marginal means (which are the same across
within subject >factors), and the mean squared errors used in the ANOVAs
for testing the >within subject terms (which differ).

>So we have more questions.

>- -Dave

Dear Dave, 

thank you very much for your answer. 
I checked your command 

"margins, within(x)"

Which did not change the results compared to 

"margins x" 

in my data.

As you said the standard errors reported through "margins" are still the
same across within subject factors although the Mean SS in the Anova
differ, leaving us with the following questions:

(1) What type of SE and confidence interval are reported exactly in a
within subject design with the command "margins" after a repeated anova?

(2) How can we obtain the "correct" confidence intervals for within
subjects' designs? The standard error cannot be the same across for
different levels in one factor, if the standard deviation does differ
for the groups but the n stays the same, or? Isn't SE = s/sqrt(n)?! Or
is that different for within subject designs?

I appreciate any advice!! Thank you so much!!

Best
Linn

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