Extra exercises for VHM 881: Statistical Analysis of Generalized, Linear, and Mixed Models -
Fall Semester 2009
- Example 3.1:
Analyze the data from Figure 3.1 in MSN (with data values read off the figure, Stata dataset)
by a linear regression model and by a generalised linear model (in both cases ignoring the weeks),
as well as by linear (mixed) models with fixed and random effects of
weeks. Compare the estimates with those presented in the text.
- Example 4.7:
Go through the calculations of Section 4.7 using the R software.
- Section 5.6:
Explore whether the ML and MQL equations are identical for a Bernoulli model, and
also for a Normal model. Explore also whether the equations are identical for
any exponential family.
- Extra for Chapter 6 of VR:
For the Whiteside data, fit simple linear regressions and check the
normality of standardized residuals using Shapiro-Wilks test
(shapiro.test). By simulation, compute a P-value that takes into
account the dependence between residuals. Use n=1000
simulated datasets with normal errors.
- Extra for Chapter 10 of VR:
Analyse the bacteria dataset in the MASS library by a random
effects generalised linear model using the following methods:
- glmmPQL function in the MASS library
- glmmML user-contributed package
Study the documentation to determine which estimation procedure
is used. Export the dataset to Stata and run the same model using
xtlogit, xtmelogit or gllamm commands.
Other options in R are a glmmAK package, as well as two packages based
on MCMC procedures: glmmGIBBS and GLMMarp.
Henrik Stryhn
(hstryhn@upei.ca) 2009-11-11