library(tidyverse)
library(effectsize)
Homework 6
In a study1, female mice were randomly assigned to four treatment groups to investigate whether restricting dietary intake increases life expectancy:
[NP] mice ate unlimited amount of nonpurified, standard diet
[N/N85] normal diet before weaning and normal diet after weaning (85 kcal/wk)
[N/R50] normal diet before weaning and reduced calorie diet after weaning (50 kcal/wk)
[N/R40] normal diet before weaning and reduced diet after weaning (40 Kcal/wk)
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.- Make side-by-side boxplots of the lifespan data in each treatment group. Assess whether the model assumptions for ANOVA seem plausible.
- Compute summary statistics by treatment group: sample means, standard deviations, sample sizes, and standard errors for the sample means.
- Test for an effect of diet restriction on mean lifespan. Interpret the result of the test in context following the narrative format from class.
- 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
- [your answer here]
- [your answer here]
- [your answer here]
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).
- Using the prior study to estimate total variation in lifespan, what is the target effect size?
- 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
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.↩︎