1 Initialize R

options(digits=5,width=70) # R console display parameters
options(contrasts=c("contr.sum","contr.poly") )
#install.packages("DAAG")
library(DAAG)
data("mignonette") # load data file
?mignonette # read about the data file

Answer the questions in Section 2 and submit your answers as a script file on Avenue 2 Learn. Make sure to begin your script file with the following lines:

# PSYCH 710 Lab 2 Homework
# Date: 15-SEP-2022
# Your Name: <<Your name here>>
# Student ID: <<Your ID here>>
# Collaborators: <<Names of your collaborators here>>

Also, make sure that text that is not an R command is preceded by a comment symbol (#). For example, you can insert questions or comments among your commands like this:

# The following command doesn't work... not sure why...
# ttest(x=g1,y=g2) # was trying to do a t test

2 t tests & equivalence tests

The mignonette data frame contains the results of an experiment that compared the heights of crossed plants with self-fertilized plants. Plants were paired within the pots in which they were grown, with one on one side and one on the other.

  1. Use an independent samples \(t\) test to examine whether heights differed in the crossed- and self-fertilized conditions, and calculate Cohen’s \(d\).

  2. Note that the experiment used a paired samples design: each crossed plant was paired witha self-fertilized plant grown in the same pot. Evaluate the null hypothesis of no difference between means, and calculate Cohen’s \(d\), assuming that the data are paired.

  3. Normally, a paired \(t\) test provides more power than an independent samples \(t\) test, but in this case the two tests yield similar results. Why?

  4. Assume that the cross and self data are two independent samples. Use an equivalence test to examine the hypothesis that true difference between the population means is between +/- 4.