Homework 6

Course

STAT218

Due

February 6, 2025

library(tidyverse)
library(effectsize)

In a study1, female mice were randomly assigned to four treatment groups to investigate whether restricting dietary intake increases life expectancy:

  1. The longevity dataset contains observations of lifetime in weeks for 237 mice from the study described above. In this problem you’ll test whether diet restriction has an effect on longevity.

    1. Make side-by-side boxplots of the lifespan data in each treatment group. Assess whether the model assumptions for ANOVA seem plausible.
    2. Compute summary statistics by treatment group: sample means, standard deviations, sample sizes, and standard errors for the sample means.
    3. Test for an effect of diet restriction on mean lifespan. Interpret the result of the test in context following the narrative format from class.
    4. Estimate the effect size of diet restriction on mean lifespan; provide and interpret a (two-sided) 95% confidence interval.
# read in data and preview
load('data/longevity.RData')
head(longevity)
  lifetime diet
1     35.5   NP
2     35.4   NP
3     34.9   NP
4     34.8   NP
5     33.8   NP
6     33.5   NP
# part a: side-by-side boxplots

# part b: summary statistics by treatment group

# part c: point estimates and standard errors

# part d: estimate effect size
  1. [your answer here]
  2. [your answer here]
  3. [your answer here]
  1. Imagine you are designing a follow up study with two additional levels of dietary restriction. Since you’d expect between-group variability to be smaller, suppose you want to detect a between-group variance of \(25\) (equivalently, a standard deviation among group means of 5 days).

    1. Using the prior study to estimate total variation in lifespan, what is the target effect size?
    2. How many mice per group would you need to detect an effet of this magnitude 85% of the time with a 5% level test?
# effect size for between-group variance of 25

# power calculation

Footnotes

  1. Weindruch, R., Walford, R.L., Fligiel, S. and Guthrie D. (1986). The Retardation of Aging in Mice by Dietary Restriction: Longevity, Cancer, Immunity and Lifetime Energy Intake, Journal of Nutrition 116(4):641–54.↩︎