Question 1

load(url("http://pnb.mcmaster.ca/bennett/psy710/p3/tagalog.rda"))
sapply(tagalog.df,class)
##    subjID      time  strategy    recall 
##  "factor"  "factor"  "factor" "numeric"
  1. A study compared three strategies of memorizing the meaning of foreign words. Participants studied 24 Tagalog (Philippine language) words using three strategies: keyword-generated, keyword-provided, and rote learning. In the keyword-generated condition, participants generated their own keywords to help them remember each word. In the keyword-provided condition, the experimenters provided the keywords to help remember each word. In the rote learning condition, participants were simply instructed to memorize the meaning of the words. Memory for word meanings was tested 5 minutes and 2 days after study. The data are stored in tagalog.df, which contains the factors time, strategy, and subjID, and the numeric dependent variable recall. (N.B. The factor time codes the study-test intervals of 5 minutes and 2 days as short or long.)
  1. Conduct an ANOVA to evaluate the fixed effects of time and strategy on recall.

  2. Evaluate the simple main effect of strategy at each level of time. (You may use local error terms to evaluate the simple main effects). If a simple main effect is significant, analyze the pairwise differences among different strategies using Tukey HSD.


Question 2

load(url("http://pnb.mcmaster.ca/bennett/psy710/p3/pLearn.rda"))
summary(pLearn)
##     subject       accuracy         stimuli   day    
##  s1     :  4   Min.   :13.00   blocked :80   d0:60  
##  s2     :  4   1st Qu.:44.00   fixed   :80   d1:60  
##  s3     :  4   Median :53.00   variable:80   d2:60  
##  s4     :  4   Mean   :53.57                 d3:60  
##  s5     :  4   3rd Qu.:63.00                        
##  s6     :  4   Max.   :88.00                        
##  (Other):216
sapply(pLearnWide,class)
##   subject   stimuli        d0        d1        d2        d3 
##  "factor"  "factor" "numeric" "numeric" "numeric" "numeric"
  1. A perceptual learning experiment was conducted to examine the effect of stimulus variability on the effects of practice. Performance in a texture identification task was measured on four consecutive days. Response accuracy was measured with a 1-of-10 identification task: On each trial, an observer was shown a brief presentation of a single texture and then had to select the presented texture from a response screen that showed 10 possible textures. On each day, responses were recorded for 100 trials and the dependent measure was the percentage of correct responses. Participants were assigned randomly to one of three conditions. In the fixed condition, the same set of 10 textures were used throughout the four days. In the blocked conditions, a different set of textures was shown on each day. In the variable condition, a different set of 10 textures was used on every trial.
  1. Conduct an analysis of variance to evaluate the effects of stimuli and day on accuracy. Where necessary, correct p values for deviations from sphericity.

  2. Do an analysis to evaluate the linear trend \(\times\) stimuli interaction. If the interaction is significant, evaluate differences among the groups using Tukey HSD. If the interaction is not significant, determine if the average trend (i.e., ignoring stimuli) is significant.

  3. Do an analysis to evaluate the quadratic trend \(\times\) stimuli interaction. If the interaction is significant, evaluate differences among the groups using Tukey HSD. If the interaction is not significant, determine if the average trend (i.e., ignoring stimuli) is significant.


Question 3

load(url("http://pnb.mcmaster.ca/bennett/psy710/p3/liver.rda"))
summary(liver)
##      condition  rat        sample      measure      glycogen    
##  control  :12   r1:6   s1     : 2   m1     : 1   Min.   :125.0  
##  c217     :12   r2:6   s2     : 2   m2     : 1   1st Qu.:135.8  
##  c217Sugar:12   r3:6   s3     : 2   m3     : 1   Median :141.0  
##                 r4:6   s4     : 2   m4     : 1   Mean   :142.2  
##                 r5:6   s5     : 2   m5     : 1   3rd Qu.:150.0  
##                 r6:6   s6     : 2   m6     : 1   Max.   :162.0  
##                        (Other):24   (Other):30
sapply(liver,class)
## condition       rat    sample   measure  glycogen 
##  "factor"  "factor"  "factor"  "factor" "integer"

Sokal and Rohlf (1995) reported data from an experiment designed to analyze glycogen content of rat livers. Glycogen was measured in rats in three conditions: control, compound 217, and compound 217 plus sugar. Each condition used two randomly selected rats. From each rat, the experimenters took three samples of liver, and from each sample the experimenters took two measures of glycogen. Thus, sample is nested in rat, and rat is nested in condition. The data are stored in the data frame liver, which contains the fixed factor condition, the random factors rat and sample, and the numeric dependent variable glycogen.

  1. Evaluate the statistical significance and effect size (Cohen’s f) of condition on glycogen.

  2. Estimate the variance components and association strength for rat and sample.

  3. Evaluate the statistical significance of the random effects rat and sample.

  4. What null hypotheses are being evaluated by your tests of condition, rat and sample?


Question 4

load(url("http://pnb.mcmaster.ca/bennett/psy710/p3/trigly.rda"))
summary(trigly)
##       TGly       tech   machine
##  Min.   :107.5   t1:8   m1:8   
##  1st Qu.:135.3   t2:8   m2:8   
##  Median :143.4   t3:8   m3:8   
##  Mean   :141.2   t4:8   m4:8   
##  3rd Qu.:148.6                 
##  Max.   :156.5
xtabs(~tech+machine,trigly)
##     machine
## tech m1 m2 m3 m4
##   t1  2  2  2  2
##   t2  2  2  2  2
##   t3  2  2  2  2
##   t4  2  2  2  2
  1. A manufacturer was developing a new spectrophotometer for medical labs. A critical issue is consistency of measurements across technicians and across different machines. Four machines were randomly selected from the production process, and several technicians were selected randomly from a large population of technicians. Each machine was used by every technician to measure the triglyceride level [mg/dl] of two samples. The data are stored in the data frame trigly, which contains the random factors tech and machine, and the numeric dependent variable TGly.
  1. Evaluate the statistical significance of the main effects of tech and machine and the tech \(\times\) machine interaction.

  2. Estimate the variance components and association strength for tech and machine and the tech \(\times\) machine interaction .


Question 5

load(url("http://pnb.mcmaster.ca/bennett/psy710/p3/leprosy.rda"))
summary(leprosy)
##  drug      baseline         after      
##  A:10   Min.   : 3.00   Min.   : 0.00  
##  B:10   1st Qu.: 7.00   1st Qu.: 2.00  
##  C:10   Median :10.50   Median : 7.00  
##         Mean   :10.73   Mean   : 7.90  
##         3rd Qu.:13.75   3rd Qu.:12.75  
##         Max.   :21.00   Max.   :23.00
  1. A study examined the effectiveness of three drugs for the treatment of leprosy. A baseline measure of the amount of leprosy bacilli was taken on all participants, who were then randomly assigned to one of three drug conditions. A second measure of leprosy bacilli was taken after the drug treatment. The data are stored in the data frame leprosy which contains the covariate baseline, the fixed factor drug, and the numeric dependent variable after.
  1. Evaluate group differences in drug with a one-way ANOVA. Calculate Cohen’s f for drug.

  2. Evaluate group differences in Movement with an ANCOVA, using Baseline as the covariate. Calculate Cohen’s f for Group.

  3. ANCOVA makes the so-called homogeneity of slopes assumption. What is that assumption? Check its validity for the leprosy data.

  1. Calculate the group means and the adjusted group means for drug.

  2. Evaluate the statistical significance of all pairwise differences between adjusted group means


Question 6

load(url("http://pnb.mcmaster.ca/bennett/psy710/p3/jobSatisfaction.rda"))
summary(jobSatisfaction)
##        id        gender        education   satisfaction   
##  s3     : 1   male  :25   school    :17   Min.   : 4.780  
##  s4     : 1   female:28   college   :16   1st Qu.: 5.940  
##  s5     : 1               university:20   Median : 6.450  
##  s6     : 1                               Mean   : 7.058  
##  s7     : 1                               3rd Qu.: 8.700  
##  s8     : 1                               Max.   :10.000  
##  (Other):47
  1. A survey was used to assess job satisfaction of 58 randomly selected employees of a large corporation. The survey recorded the participant’s gender, level of education, and their job satisfaction score on a standard test. The data are stored in the data frame jobSatisfaction.
  1. Determine if the 2 (gender) \(\times\) 3 (education) design is balanced.

  2. Use ANOVA to evaluate the effects of gender, education, and the gender \(\times\) education interaction on satisfaction.

  3. Analyze the simple main effect of education for each gender.


Question 7

load(url("http://pnb.mcmaster.ca/bennett/psy710/p3/catfood.rda"))
summary(catfood)
##        food       protein     
##  discount:10   Min.   :33.26  
##  original:10   1st Qu.:33.88  
##                Median :34.15  
##                Mean   :34.15  
##                3rd Qu.:34.53  
##                Max.   :34.73
sapply(catfood,class)
##      food   protein 
##  "factor" "numeric"
  1. A food science engineer for a pet food company tests a new, less expensive formulation of their popular cat food. The engineer wants to ensure that the protein content of the discount formulation is the same as the protein content of the original food. The engineer measures the amount of protein in 100 gram samples of both formulations of the food to test whether they are equivalent to within ±0.5 grams. The data are contained in the data frame catfood which contains the factor food and the numeric variable protein (measured in grams).
  1. Use a 2-tailed \(t\) test to determine if the original and discount cat food differed in terms of protein.

  2. Use an equivalence test to determine if protein levels in the two foods are equivalent (i.e., within ±0.5 grams).