9.4 Lab Report Instructions

9.4.1 R Script

Produce the following in R:

  1. Load the required packages: psych, ggplot2, tidyr, and emmeans.
  2. Reverse code the appropriate items of the SURPS.
  3. Use rowMeans() to calculate mean scores for each participant on each of the four SURPS subscales.
  4. Convert cannabis_use to a factor collapsing levels of with fewer than 61 participants as described in the previous section.
  5. Produce M and SD sensation seeking scores at each level of cannabis use (after collapsing the levels as needed).
  6. Use ggplot() to produce a boxplot with cannabis use on the x axis and sensation seeking on y axis. Use geom_jitter() to plot each participants’ score overtop of the boxplots.
  7. Conduct ANOVA and pairwise comparisons
    1. Use aov() to produce a model predicting hopelessness from cannabis use.
    2. Use summary() to inspect the results.
  8. Conduct planned comparisons.
    1. Use emmeans::emmeans() to produce estimated marginal means. You will need to specify values for the arguments object, specs.
    2. Use emmeans::contrast() to conduct the contrasts described in the analytic strategy. See vignette(topic = "comparisons", package = "emmeans").
    3. Use emmeans::eff_size() to produce Cohen’s d effect sizes for the contrasts.

9.4.2 Results

Write a Results section, consistent with APA style, that includes the following:

  • Results of the ANOVA.
  • Results of the planned comparisons.
  • The plot you produced.

9.4.3 Discussion Questions

Provide short answer responses to the following prompts:

  • Provide a statement of support or nonsupport for your hypothesis. Refer to the results of both the omnibus ANOVA test and the planned comparisons in your response.
  • The design plan described how levels of cannabis use would be collapsed if the groups were too small to provide adequate statistical power. Do you think that collapsing levels of cannabis use was adequately justified? Why or why not? How might collapsing levels of cannabis use have affected your results?
  • Describe one limitation of this study. How could the limitation you identified be addressed in future research?