For all problems, unless otherwise indicated, assume a Type 1 error rate = .05.

  1. A researcher is interested in assessing whether those individuals who respond to antidepressant medication differ in levels of the hormone prolactin. Two groups of depressed patients are formed from those who participated in a lengthy treatment study: responders and non-responders. The researcher also wants to assess whether a personality disorder (PD) can affect prolactin responses. For this reason, patients are also divided into those with a Personality Disorder and those without a Personality Disorder. Thus, the final design is a 2 (Responder/No Responder) × 2 (Personality Disorder/No Personality Disorder).

    In these problems the effects are named as:

    • dep_gp — the first effect (responder to the anti-depressant medication)
    • pd_gp — the second effect (having a personality disorder)
    • prl — the dependent variable of prolactin level

    The data can be loaded into R using the following commands:

    RespPers = c(34, 49, 38, 30)
    RespNoPers = c(23, 29, 19, 44, 22, 30, 27, 30, 29, 27, 34)
    NoRespPers = c(54, 49, 24, 25, 47, 50, 34, 39, 44)
    NoRespNoPers = c(40, 36, 39)
    prolactin.frame = data.frame(prolactin_level = c(RespPers, RespNoPers, NoRespPers, NoRespNoPers)
                                 responder = c(rep(True, length(RespPers) + length(RespNoPers)),
                                               rep(False, length(NoRespPers) + length(NoRespNoPers))),
                                 disorder = c(rep(True, length(RespPers)),
                                              rep(False, length(RespNoPers)),
                                              rep(True, length(NoRespPers)),
                                              rep(False, length(NoRespNoPers))))

    In the questions below, when cell or marginal sample sizes are involved in the answer (e.g. as contrast coefficients, terms in null hypotheses), answer using the actual n’s involved in the experiment rather than abstract terms like n1,1.

    There are two tables that will be useful in answering these questions. The first is a frequency table that shows the number of elements in each cell:

    Disorder
    TrueFalse
    ResponderTrue411
    False93

    The second is the cell means for each of the factor levels:

    Disorder
    TrueFalse
    ResponderTrue37.7528.55
    False40.6638.33

    To deal with boolean conditions in this document the following notation will be used:

    Responder¯ = ¬Responder = The set of people who were unresponsive to the anti-depressant
    1. Consider the main effect for dep_gp. Express the null hypothesis for the weighted mean/Type 1 SS test of this effect. Your expression should be in terms of cell population means that are expressed symbolically (i.e., 'mu's). You can either express sample sizes symbolically (i.e., n's) or use the actual sample sizes in this study. Maxwell and Delaney's Table 7.18 (p. 328) exemplifies expressions of null hypotheses in terms of cell means.

      For the balanced ANOVA, the null hypothesis for the main effect of responder is a responsiveness to the antidepressant mediation has no effect on prolactin level.

      H0 : μResponder = μResponder¯

      For the unbalanced ANOVA using weighted cell means the null hypothesis is that responsiveness to the antidepressant medication had an effect whose proportion is a function of the number of subjects used in this particular experiment: (for brevity, Responser is abbreviated 'R' and Disorder 'D')

      H0 : n RD μ RD + n RD¯ μ RD¯ nR = n R¯D μ R¯D + n R¯D¯ μ R¯D¯ nR¯

      There are eight unknowns in this equation. There is no simple statement about the data that can be made through an examination of this statement other than another experiment will need the same proportional distribution of subjects in order to verify this experiment.

    2. Consider again the main effect for dep_gp. Express the null hypothesis for the unweighted mean/Type 3 SS test of this effect. Your expression should again be in terms of cell population means that are expressed symbolically.

      For the unbalanced ANOVA using an unweighted mean, the null hypothesis is the same as that as the balanced ANOVA: responsiveness to the antidepressant mediation has no effect on prolactin level.

      H0 : μ RD + μ RD¯ 2 = μ R¯D + μ R¯D¯ 2 μ RD + μ RD¯ = μ R¯D + μ R¯D¯ μR = μR¯
    3. Consider the main effect for pd_gp. Let's say that you wanted to test this hypothesis using weighted means. What is the contrast that tests this main effect? What we're looking for here is a linear combination of the cell means in this sample of data (i.e., the linear combination that constitutes ψ^ — show coefficient values and relevant sample means).

      H0 : n RD μ RD + n R¯D μ R¯D nD = n RD¯ μ RD¯ + n R¯D¯ μ R¯D¯ nD¯ n RD nD μ RD + n R¯D nD μ R¯D - n RD¯ nD¯ μ RD¯ + n R¯D¯ nD¯ μ R¯D¯ = 0 n RD nD μ RD + n R¯D nD μ R¯D - n RD¯ nD¯ μ RD¯ - n R¯D¯ nD¯ μ R¯D¯ = 0

      As a table these values are:

      Disorder
      TrueFalse
      Responder True n RD nD - n RD¯ nD¯
      False n R¯D nD - n R¯D¯ nD¯

      For this particular dataset, those values are:

      Disorder
      TrueFalse
      Responder True 413 -1114
      False 913 -314

      Note that these are admissible coefficients, but that they specify a specific combination of cell means that is not generally applicable assuming that the populations being sampled are potentially infinite.

      ψ^ I 9.12
    4. Consider again the main effect for pd_gp. Now let's say that you wanted to test this hypothesis using unweighted means. What is the contrast that tests this main effect?

      H0 : μ RD + μ R¯D 2 = μ RD¯ + μ R¯D¯ 2 μ RD + μ R¯D - μ RD¯ + μ R¯D¯ = 0 μ RD + μ R¯D - μ RD¯ - μ R¯D¯ = 0
      Disorder
      TrueFalse
      ResponderTrue1-1
      False1-1
      ψ^ III 11.53
    5. For these data, express the weighted mean contrast for the main effect of dep_gp in terms of effect parameters. Discuss the implications of your results for interpretation of the results of tests of weighted marginal means.

      Consider the general formula for a particular cell in terms of effect parameters:

      • μjk — the population mean of a given combination of factors
      • μ¯ — the mean of the entire population
      • αj = μj¯ - μ¯ — the main effect for a particular level of factor j
      • βk = μk¯ - μ¯ — the main effect for a particular level of factor k
      • αβjk = μjk - μ¯ + αj + βk — the interaction effect for a specific combination of the two factors j and k
      μjk = μ¯ + αj + βk + αβjk

      When attempting to determine if there is a significant main effect the hypothesis being tested is:

      αi = αj ij

      When examining dep_gp, this is equivalent to:

      αR = αR¯ μR - μ = μR¯ - μ μR = μR¯

      To this point the comparison of weighted and unweighted means is the same. They diverge is the value for μj¯ . For weighted means these values are:

      μR ¯w = nRD μRD + nRD¯ μRD¯ nR = nR¯D μR¯D + nR¯D¯ μR¯D¯ nR¯ = μR¯ ¯w nRD nR μRD + nRD¯ nR μRD¯ = nR¯D nR¯ μR¯D + nR¯D¯ nR¯ μR¯D¯

      Going from means back to effect parameters complicates the equation:

      nRD nR μ¯ + αR + βD + αβRD + nRD¯ nR μ¯ + αR + βD¯ + αβRD¯ = nR¯D nR¯ μ¯ + αR¯ + βD + αβR¯D + nR¯D¯ nR¯ μ¯ + αR¯ + βD¯ + αβR¯D¯

      The grand mean will factor out of everything:

      nRD nR αR + βD + αβRD + nRD¯ nR αR + βD¯ + αβRD¯ = nR¯D nR¯ αR¯ + βD + αβR¯D + nR¯D¯ nR¯ αR¯ + βD¯ + αβR¯D¯

      The weights for αj will combine:

      nRD nR + nRD¯ nR αR + nRD nR βD + αβRD + nRD¯ nR βD¯ + αβRD¯ = nR¯D nR¯ + nR¯D¯ nR¯ αR¯ + nR¯D nR¯ βD + αβR¯D + nR¯D¯ nR¯ βD¯ + αβR¯D¯ αR + nRD nR βD + αβRD + nRD¯ nR βD¯ + αβRD¯ = αR¯ + nR¯D nR¯ βD + αβR¯D + nR¯D¯ nR¯ βD¯ + αβR¯D¯

      So, for this data, the null hypothesis is:

      αR - αR¯ = nRD nR βD + αβRD + nRD¯ nR βD¯ + αβRD¯ - nR¯D nR¯ βD + αβR¯D - nR¯D¯ nR¯ βD¯ + αβR¯D¯ = 415 βD + αβRD + 1115 βD¯ + αβRD¯ - 912 βD + αβR¯D - 312 βD¯ + αβR¯D¯
    6. For these data, express the unweighted mean contrast for the main effect of dep_gp in terms of effect parameters. Discuss the implications of your results for interpretation of the results of tests of unweighted marginal means.

      The initial logic is identical to the problem above. It deviates in the meaning of μj¯ . For unweighted means these values are:

      μR ¯u = μRD + μRD¯ 2 = μR¯D + μR¯D¯ 2 = μR¯ ¯u μRD + μRD¯ = μR¯D + μR¯D¯ μ¯ + αR + βD + αβRD + μ¯ + αR + βD¯ + αβRD¯ = μ¯ + αR¯ + βD + αβR¯D + μ¯ + αR¯ + βD¯ + αβR¯D¯ αR + βD + αβRD + αR + βD¯ + αβRD¯ = αR¯ + βD + αβR¯D + αR¯ + βD¯ + αβR¯D¯ 2αR + βD + βD¯ + αβRD + αβRD¯ = 2αR¯ + βD + βD¯ + αβR¯D + αβR¯D¯ 2αR + αβRD + αβRD¯ = 2αR¯ + αβR¯D + αβR¯D¯

      Recall that the interaction coefficients sum to zero along each row and column:

      2αR +0 = 2αR¯ +0 αR = αR¯

      So, when using unweighted means (from the type III sum of squares), the null hypothesis tested is the same as for balanced ANOVA.

    7. Using R, conduct a 2-way ANOVA of these data that generates both the Type 1 (weighted mean) and Type 3 (unweighted mean) SS solutions. Write the code in such a way that the dep_gp factor is the first one tested by the Type 1 SS.

      > # Type I Sum of Squares
      > prolactin.aov = aov(prolactin_level ~ responder * disorder,
      +                     data = prolactin.frame)
      > summary(prolactin.aov)
      
                         Df  Sum Sq Mean Sq F value  Pr(>F)
      responder           1  550.05  550.05  7.8669 0.01006
      disorder            1  200.66  200.66  2.8698 0.10376
      responder:disorder  1   60.12   60.12  0.8598 0.36342
      Residuals          23 1608.14   69.92
      
      > # Type III Sum of Squares
      > drop1(prolactin.aov, .~., test = "F")
      
      Single term deletions
      
      Model:
      prolactin_level ~ responder * disorder
                         Df Sum of Sq     RSS     AIC F value   Pr(F)
      <none>                          1608.14  118.35
      responder           1     23.56 1631.70  116.74  0.3369 0.56725
      disorder            1    248.52 1856.67  120.23  3.5544 0.07208
      responder:disorder  1     60.12 1668.26  117.34  0.8598 0.36342
    8. Consider the results for the main effect for dep_gp yielded by the Type 1 and Type 3 omnibus analyses. Explain why these two sets of results lead to discrepant conclusions about the effects of dep_gp.

      There is a significant main effect for reponse to the antidepressant when using the type I sum of squares, but not for the type III sum of squares.

      The issue is that the cells with the maxima and minima, Y R¯D ¯ and Y RD¯ ¯ , have at nearly three times the number of subjects that the cells with median values. Because each level of the main effect for response contains one of these cells the weighted means are pulled away from each other. This has the ultimate effect of inflating the F value.

      It is important to note that the statistical result isn't incorrect. It represents a valid and interpretable result, but that result is not one that can be easily abstracted to make generalizable statements about the overall population.

      The type III sum of squares tests a hypothesis that is more generally interesting, and it finds no statistically significant trends in the data.