# Problem set 4

I encourage you to work in teams for this problem set.

**Submission information**: please submit on ZoneCours

- a PDF report
- your code

following the naming convention `PS4-studentid.extension`

where `studentid`

is replaced with your student ID and `extension`

is the file extension (e.g., `.pdf`

, `.R`

, `.Rmd`

, `.sps`

)

**Instructions**: We consider data collected for Study 3 of Grossmann & Kross (2014) (click the links to download the paper and the Supplementary material). You can access these data directly from **R** from the `hecedsm`

package or download the SPSS data.

The purpose of the exercise is to reproduce part of Table S4 of the Supplementary material. We will compute linear contrasts and adjust the resulting comparisons to account for multiple testing.^{1}

We will fit one-way ANOVA model for each of the four response (`compr`

,`limits`

,`persp`

and `change`

) and for each age group separately. Thus, we will have four contrasts for each of the eight models (one per outcome and age group). The size of the family, assuming the global \(F\)-tests are not of interest, is thus \(m=32\).

Use the helper code to get started. Don’t be intimidated: this task will involve a lot of copy-pasting. Fill the helper file code by replacing the `#TODO`

statements and reach out for help if you are stuck.

- Determine the contrast vectors (i.e., the weights) for the four hypothesis tests outlined in Grossmann & Kross (2014).
- Compute the contrasts in the pre-planned comparisons reported in Table S4. Check whether these match the reported values.
^{2} - Using the helper code, compare

- the raw
*p*-values - Bonferroni’s adjusted
*p*-values - the Holm–Bonferroni adjusted
*p*-values.

How many of the planned comparisons are significant at level \(\alpha=0.05\) if you modify the *p*-values? 4. Another way to present the results of the two-sided *t*-test for contrasts is to report confidence intervals rather than *p*-values. Which interval would be the largest between (a) an unadjusted confidence interval and (b) one derived using Bonferroni’s method? Justify your answer.^{3}

## References

*Psychological Science*,

*25*(8), 1571–1580. https://doi.org/10.1177/0956797614535400

## Footnotes

Technical aside: there are four correlated outcome variables, so this is technically a multivariate problem. ↩︎

The sign may be different from the paper depending on how you set up the contrasts, but the \(p\)-values should be the same. ↩︎

*Hint: Bonferroni’s method amounts to making the tests at level \(\alpha^{\star}=\alpha/m\). Try modifying the level in the code for the confidence intervals to see which is largest.*↩︎