تبليغاتX
stat - Stata Data Analysis Examples One-way Manova











 Stata Data Analysis Examples One-way Manova جمعه چهاردهم فروردین 1388 21:23

Stata Data Analysis Examples
One-way Manova

Examples of One-way Multivariate Analysis of Variance

Example 1. A researcher randomly assigns 33 subjects to one of three groups. The first group receives technical dietary information interactively from an on-line website. Group 2 receives the same information in from a nurse practitioner, while group 3 receives the information from a video tape made by the same nurse practitioner. The researcher looks at three different ratings of the presentation, difficulty, useful and importance, to determine if there is a difference in the modes of presentation. In particular, the researcher is interested in whether the interactive website is superior because that is the most cost-effective way of delivering the information.

Description of the Data

Let's pursue Example 1 from above.

We have a data file, manova.dta, with 33 observations on three response variables. The response variables are ratings of useful, difficulty and importance. Level 1 of the group variable is the treatment group, level 2 is control group 1 and level 3 is control group 2.

Let's look at the data.

use http://www.ats.ucla.edu/stat/stata/dae/manova, clear

 

 summarize difficulty useful importance

 

    Variable |       Obs        Mean    Std. Dev.       Min        Max

-------------+--------------------------------------------------------

      useful |        33     16.3303    3.292461       11.9       24.3

  difficulty |        33    5.715152    2.017598        2.4      10.25

  importance |        33    6.475758    3.985131         .2       18.8

 

tabulate group

 

      group |      Freq.     Percent        Cum.

------------+-----------------------------------

  treatment |         11       33.33       33.33

  control_1 |         11       33.33       66.67

  control_2 |         11       33.33      100.00

------------+-----------------------------------

      Total |         33      100.00

 

tabstat difficulty useful importance, by(group)

 

Summary statistics: mean

  by categories of: group

 

    group |   useful   diffic~y  import~e

----------+------------------------------

treatment |  18.11818  6.190909  8.681818

control_1 |  15.52727  5.581818  5.109091

control_2 |  15.34545  5.372727  5.636364

----------+------------------------------

    Total |   16.3303  5.715152  6.475758

 

correlate useful difficulty importance

(obs=33)

 

             |   useful diffic~y import~e

-------------+---------------------------

      useful |   1.0000

  difficulty |   0.0978   1.0000

  importance |  -0.3411   0.1978   1.0000

Some Strategies You Might Be Tempted To Try

Before we show how you can analyze this with a canonical correlation analysis, let's consider some other methods that you might use.

  • Separate univariate anovas - You could analyze these data using separate univariate anovas for each response variable. The univariate anova will not produce multivariate results utilizing information from all variables simultaneously. In addition, separate univariate tests are generally less powerful.
  • Discriminant function is a reasonable option and is equivalent to a one-way manova.

Stata One-way Manova

Although this is a multivariate analysis, we will begin with separate univariate anovas to get a feel for what is happening with the data.

foreach vname in difficulty useful importance {

  anova `vname' group

}

              /* useful */

                           Number of obs =      33     R-squared     =  0.1526

                           Root MSE      = 3.13031     Adj R-squared =  0.0961

 

                  Source |  Partial SS    df       MS           F     Prob > F

              -----------+----------------------------------------------------

                   Model |  52.9242378     2  26.4621189       2.70     0.0835

                         |

                   group |  52.9242378     2  26.4621189       2.70     0.0835

                         |

                Residual |  293.965442    30  9.79884808  

              -----------+----------------------------------------------------

                   Total |   346.88968    32  10.8403025  

              /* difficulty */

                           Number of obs =      33     R-squared     =  0.0305

                           Root MSE      = 2.05173     Adj R-squared = -0.0341

 

                  Source |  Partial SS    df       MS           F     Prob > F

              -----------+----------------------------------------------------

                   Model |  3.97515121     2   1.9875756       0.47     0.6282

                         |

                   group |  3.97515121     2   1.9875756       0.47     0.6282

                         |

                Residual |  126.287277    30  4.20957589  

              -----------+----------------------------------------------------

                   Total |  130.262428    32  4.07070087  

              /* importance */

                           Number of obs =      33     R-squared     =  0.1610

                           Root MSE      = 3.76993     Adj R-squared =  0.1051

 

                  Source |  Partial SS    df       MS           F     Prob > F

              -----------+----------------------------------------------------

                   Model |  81.8296936     2  40.9148468       2.88     0.0718

                         |

                   group |  81.8296936     2  40.9148468       2.88     0.0718

                         |

                Residual |  426.370896    30  14.2123632  

              -----------+----------------------------------------------------

                   Total |   508.20059    32  15.8812684  

While none of the three anovas were statistically significant at the alpha = .05 level, in particular, the anova for difficulty was less than 1.

Next, we will run the manova itself.

 manova difficulty useful importance = group

 

                           Number of obs =      33

 

                           W = Wilks' lambda      L = Lawley-Hotelling trace

                           P = Pillai's trace     R = Roy's largest root

 

                  Source |  Statistic     df   F(df1,    df2) =   F   Prob>F

              -----------+--------------------------------------------------

                   group | W   0.5258      2     6.0    56.0     3.54 0.0049 e

                         | P   0.4767            6.0    58.0     3.02 0.0122 a

                         | L   0.8972            6.0    54.0     4.04 0.0021 a

                         | R   0.8920            3.0    29.0     8.62 0.0003 u

                         |--------------------------------------------------

                Residual |                30

              -----------+--------------------------------------------------

                   Total |                32

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

                           e = exact, a = approximate, u = upper bound on F

Now that we have have determined that the overall multivariate test is significant, we will follow up with several post-hoc tests.

/* multivariate test of group 1 versus the average of group 2 & 3 */

matrix c1=(0,2,-1,-1)

 

manovatest, test(c1)

 

 Test constraint

 (1)    2 group[1] - group[2] - group[3] = 0

 

                           W = Wilks' lambda      L = Lawley-Hotelling trace

                           P = Pillai's trace     R = Roy's largest root

 

                  Source |  Statistic     df   F(df1,    df2) =   F   Prob>F

              -----------+--------------------------------------------------

              manovatest | W   0.5290      1     3.0    28.0     8.31 0.0004 e

                         | P   0.4710            3.0    28.0     8.31 0.0004 e

                         | L   0.8904            3.0    28.0     8.31 0.0004 e

                         | R   0.8904            3.0    28.0     8.31 0.0004 e

                         |--------------------------------------------------

                Residual |                30

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

                           e = exact, a = approximate, u = upper bound on F

 

/* multivariate test of group 2 versus group 3 */

matrix c2=(0,0,1,-1)

 

manovatest, test(c2)

 

Test constraint

 (1)    group[2] - group[3] = 0

 

                           W = Wilks' lambda      L = Lawley-Hotelling trace

                           P = Pillai's trace     R = Roy's largest root

 

                  Source |  Statistic     df   F(df1,    df2) =   F   Prob>F

              -----------+--------------------------------------------------

              manovatest | W   0.9932      1     3.0    28.0     0.06 0.9785 e

                         | P   0.0068            3.0    28.0     0.06 0.9785 e

                         | L   0.0068            3.0    28.0     0.06 0.9785 e

                         | R   0.0068            3.0    28.0     0.06 0.9785 e

                         |--------------------------------------------------

                Residual |                30

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

                           e = exact, a = approximate, u = upper bound on F

                          

/* we know from the univariate tests above that difficulty by itself was clearly not significant */

/* this test does the multivariate test using the combination of useful and importance */

matrix y=(0,1,1)

 

manovatest group , ytransform(y)

 

 Transformation of the dependent variables

 (1)    y1 + y3

 

                           W = Wilks' lambda      L = Lawley-Hotelling trace

                           P = Pillai's trace     R = Roy's largest root

 

                  Source |  Statistic     df   F(df1,    df2) =   F   Prob>F

              -----------+--------------------------------------------------

                   group | W   0.5360      2     2.0    30.0    12.99 0.0001 e

                         | P   0.4640            2.0    30.0    12.99 0.0001 e

                         | L   0.8657            2.0    30.0    12.99 0.0001 e

                         | R   0.8657            2.0    30.0    12.99 0.0001 e

                         |--------------------------------------------------

                Residual |                30

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

                           e = exact, a = approximate, u = upper bound on F

Sample Write-Up of the Analysis

There is a lot of variation in the write-ups of multivariate analysis of variance. The write-up below is fairly minimal, more detail may be required for most instances.

The multivariate test of differences between groups using the Wilks Lambda criteria was statistically significant (F(6, 56) = 3.54; p=0.0049). Follow-up multivariate comparisons showed that the treatment group was significantly different from the average of control 1 and control 2 (F(3,28) = 8.31; p=0.0004). Further, it was determined that control 1 and control 2 were not significant different (F(3,28) = 0.06; p=0.9785). Each of the F-ratio transformations of the Wilks criteria were exact.

None of the separate univariate anovas were statistically significant. In particular, the univariate test for difficulty has an F less than 1, so the multivariate test was rerun using the combination of useful and importance, which was statistically significant (F(2,30) = 12.99; p<0.0001).

 

UCLA Academic Technology Services                                                                : source

نوشته شده توسط mostafa | لينک ثابت | موضوع: |











کپي برداري از مطالب وبلاگ فقط با ذکر منبع مجاز ميباشد .

All Rights Reserved 2005-2006 © by stat84

Template Design by S T A T 84