9.4 Lab Report Instructions
9.4.1 R Script
Produce the following in R:
- Load the required packages:
psych
,ggplot2
,tidyr
, andemmeans
. - Reverse code the appropriate items of the SURPS.
- Use
rowMeans()
to calculate mean scores for each participant on each of the four SURPS subscales. - Convert
cannabis_use
to a factor collapsing levels of with fewer than 61 participants as described in the previous section. - Produce M and SD sensation seeking scores at each level of cannabis use (after collapsing the levels as needed).
- Use
ggplot()
to produce a boxplot with cannabis use on the x axis and sensation seeking on y axis. Usegeom_jitter()
to plot each participants’ score overtop of the boxplots. - Conduct ANOVA and pairwise comparisons
- Use
aov()
to produce a model predicting hopelessness from cannabis use. - Use
summary()
to inspect the results.
- Use
- Conduct planned comparisons.
- Use
emmeans::emmeans()
to produce estimated marginal means. You will need to specify values for the argumentsobject
,specs
. - Use
emmeans::contrast()
to conduct the contrasts described in the analytic strategy. Seevignette(topic = "comparisons", package = "emmeans")
. - Use
emmeans::eff_size()
to produce Cohen’s d effect sizes for the contrasts.
- Use
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?