Recently Published
Crossed Random Effects in a Penicillin Assay
Group 5: Penicillin assay, crossed random effects
Data: lme4::Penicillin. Inhibition zone diameter for 24 plates, each tested with 6 penicillin
samples.
data(Penicillin, package = "lme4"); str(Penicillin)
To do in R
1. Show that plate and sample are fully crossed (xtabs).
2. Fit diameter ~ 1 + (1 | plate) + (1 | sample).
3. Compare with models that omit one random effect.
4. Plot ranef with lattice::dotplot(ranef(m, condVar = TRUE)).
5. Fit the same data with sample as fixed effect and compare conclusions.
Questions
1. Why are plate and sample crossed rather than nested? Write the model equation.
2. Which variance is larger, between-plate or between-sample? What does that mean for
the assay?
3. When is it more reasonable to treat sample as fixed? What changes in the inference?
4. What assumptions about the random effects are required (independence, normality)?
Describe the design. Identify the response, fixed factors/covariates, grouping factors.
Are the grouping factors nested or crossed? Balanced or not? Use str(), summary(),
xtabs(), table().
2. Explore graphically. Plot the response per group (e.g. xyplot from lattice or ggplot2
with facet_wrap). Comment on between-group vs within-group variability.
3. Fit a naive model (lm, ignoring grouping) and show why it is inappropriate
(independence assumption).
4. Fit a sequence of mixed models from simple to complex (null model with random
intercept, then add fixed effects, then random slopes if relevant).
5. Compare models. Use REML for variance components comparison, ML for fixed-effects
comparison (anova(m1, m2), AIC/BIC). State which method you used and why.
6. Inspect the final model. summary(), VarCorr(), fixef(), ranef(), confint(m, method =
"profile"), ICC with performance::icc(), R² with performance::r2().
7. Diagnostics. Residuals vs fitted, QQ-plot of residuals, QQ-plot of random effects,
check for outliers/influential groups, singular fit warnings.
8. Interpret and conclude in plain language for a non-statistician.
General questions to answer in every report:
• (a) Which effects are fixed and which random, and why?
• (b) What does each variance component represent in this experiment?
• (c) How would the conclusions change if the grouping structure were ignored?
• (d) What are the limitations of your model?
Webinaire RUC : Modélisation des risques sanitaires avec R
Analyse de l'essai TME-Afrique : Évaluation de l'efficacité de l'AZT dans la prévention de la transmission mère-enfant du VIH
Assignment on Linear Model: Public Health Applications
In a public health study investigating the impact of environmental factors, socio-economic conditions and healthcare interventions on malaria incidence, data were collected from several health districts during a peak transmission period. Each observation describes local environmental and living conditions, a specific medical intervention and the resulting malaria incidence rate, measured in cases per 1,000 inhabitants. This practical exercise aims to model and explain malaria incidence using a multiple linear regression approach based on available environmental, socioeconomic and prevention variables.