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 at the end of May, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: RE: Re: RE: re: RM ANOVA, was SPSS vs. Stata


From   "Feiveson, Alan H. (JSC-SK311)" <alan.h.feiveson@nasa.gov>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   st: RE: Re: RE: re: RM ANOVA, was SPSS vs. Stata
Date   Tue, 3 Aug 2010 10:35:13 -0500

Phil, and others

For larger data sets  with high imbalance I don't think there's much doubt that using a mixed model is more flexible and less biased than rpm anova with complete observations only. But for small sample sizes, using infinite degrees of freedom for the denominators (i.e. chi-square statistics rather than F) also creates bias in the inference. What would be nice is to have some way to calculate approximate denominator degrees of freedom after obtaining the pseud0-F statistics with -xtmixed- and -test-.

Al Feiveson

-----Original Message-----
From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Philip Ender
Sent: Tuesday, August 03, 2010 10:24 AM
To: statalist@hsphsun2.harvard.edu
Subject: st: Re: RE: re: RM ANOVA, was SPSS vs. Stata

<robert.ploutz-snyder-1@nasa.gov> had an example of a repeated
measures anova in which two of the observations were set to missing.
Here are partial results from his Stata output:

Between-subjects error term:  person
                     Levels:  5         (4 df)
     Lowest b.s.e. variable:  person

Repeated variable: drug
                                          Huynh-Feldt epsilon        =  0.5297
                                          Greenhouse-Geisser epsilon =  0.4228
                                          Box's conservative epsilon =  0.3333

                                            ------------ Prob > F ------------
                  Source |     df      F    Regular    H-F      G-G      Box
              -----------+----------------------------------------------------
                    drug |      3    27.71   0.0000   0.0019   0.0047   0.0102
                Residual |     10
              ----------------------------------------------------------------

And here are the partial results from his SPSS:

IN SPSS (same dataset):


			Tests of Within-Subjects Effects
Source		Type III Sum of Squares	df	Mean Square	F	Sig.
drug	Sphericity Assumed	478.333	3	159.444	13.932	.004
	Greenhouse-Geisser	478.333	1.268	377.157	13.932	.044
	Huynh-Feldt			478.333	2.466	193.938	13.932	.008
	Lower-bound			478.333	1.000	478.333	13.932	.065
Error(drug)	Sphericity Assume	68.667	6	11.444		
	Greenhouse-Geisser	68.667	2.537	27.071		
	Huynh-Feldt			68.667	4.933	13.920		
	Lower-bound			68.667	2.000	34.333	

----------------------	

I prefer using -xtmixed- for repeated measures designs with missing
observation.  I think that it is far superior to deleting whole cases
when only one observation is missing.  In this example there are four
observations on each subject.  Two of them are missing only a single
observation.

. xtmixed score i.drug || person:

Performing EM optimization:

Performing gradient-based optimization:

Iteration 0:   log restricted-likelihood = -43.456003
Iteration 1:   log restricted-likelihood = -43.456003

Computing standard errors:

Mixed-effects REML regression                   Number of obs      =        18
Group variable: person                          Number of groups   =         5

                                                Obs per group: min =         3
                                                               avg =       3.6
                                                               max =         4


                                                Wald chi2(3)       =     83.43
Log restricted-likelihood = -43.456003          Prob > chi2        =    0.0000

------------------------------------------------------------------------------
       score |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
        drug |
          2  |   1.120543   2.136759     0.52   0.600    -3.067427    5.308514
          3  |  -10.17271   1.980896    -5.14   0.000    -14.05519   -6.290222
          4  |   6.227293   1.980896     3.14   0.002     2.344808    10.10978
             |
       _cons |   25.77271   3.175225     8.12   0.000     19.54938    31.99603
------------------------------------------------------------------------------

------------------------------------------------------------------------------
  Random-effects Parameters  |   Estimate   Std. Err.     [95% Conf. Interval]
-----------------------------+------------------------------------------------
person: Identity             |
                   sd(_cons) |    6.26194   2.334319      3.015775    13.00226
-----------------------------+------------------------------------------------
                sd(Residual) |   2.901958    .646767      1.874915    4.491595
------------------------------------------------------------------------------
LR test vs. linear regression: chibar2(01) =    14.32 Prob >= chibar2 = 0.0001

. testparm i.drug

 ( 1)  [score]2.drug = 0
 ( 2)  [score]3.drug = 0
 ( 3)  [score]4.drug = 0

           chi2(  3) =   83.43
         Prob > chi2 =    0.0000

/* rescale chi2 to F */

. display r(chi2)/r(df)
27.808724

The F-ratio given here is actually closer to the F-ratio for the
complete data (F=24.76) then the F-ratio produced by SPSS (F=13.932).
I this case I have greater trust in -xtmixed- than I do in the SPSS
repeated measures.  In general, I feel that complete case analysis can
lead to greater bias then using a linear mixed model approach.
Further, -xtmixed- allows for more covariance structures than repeated
measure in SPSS which only allows for compound symmetry (echangable)
and unstructured.

Phil
-- 
Phil Ender
UCLA Statistical Consulting Group
*
*   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/

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