library(LM2GLMM)
options(width = 100)
knitr::opts_chunk$set(cache = FALSE, fig.width = 5, fig.height = 5, fig.align = "center",
                      cache.path = "./cache_knitr/Exo_GLM/", fig.path = "./fig_knitr/Exo_GLM/")

The Generalized Linear Model: GLM


[Back to main menu](./Title.html#2)

Dataset: InsectSprays (difficulty = 2/5) r .emo("practice")

head(InsectSprays, n = 3)
levels(InsectSprays$spray)


r .emo("goal") Test whether insecticide type significantly affects the number of insects in agricultural experimental units.

r .emo("goal") Compare the effect of spray C to all other spray types.

r .emo("goal") What is the mean number of insects we would predict to find on a plot treated with each insecticide spray. Compare results between the LM approach (with and without BoxCox transformation) to those from the GLM approach.

Dataset: Surprise (difficulty = 0/5) r .emo("practice")

head(Surprise)


r .emo("goal") Do children value more the type of the present, the cost of the present, or both?

Dataset: esoph (difficulty = 3/5) r .emo("practice")

head(esoph)


r .emo("goal") Would it be better to limit alcohol consumption or tobacco consumption in order to avoid developing an oesophageal cancer? Use a GLM to find out.

Dataset: TitanicSurvival (difficulty = 3/5) r .emo("practice")

head(TitanicSurvival)


r .emo("goal") Find out how the sex, age and passenger class influenced who died during the Titanic disaster of 1912.

Dataset: Challenger (difficulty = 2/5) r .emo("practice")

head(Challenger)


r .emo("goal") What was the probability of an O-ring experiencing thermal distress when the space shuttle Challenger took off on the 28th of January 1986 by 31 degrees F?

Dataset: UK (difficulty = 2/5) r .emo("practice")

UK[1:2, ]


r .emo("goal") Try to identify the influential determinants of the smoking behaviour of children.

Optional (not corrected):

r .emo("goal") Try to identify the influential determinants of bronchitis in children.

r .emo("goal") Try to identify the influential determinants of the variable backward.

Dataset: HSE98women (difficulty = 2/5) r .emo("practice")

head(HSE98women)


r .emo("goal") Study the influences of age, body mass index and smoking status upon the probability of a woman being in menopause.

r .emo("goal") Estimate the proportion of women in menopause in the population, depending on their age (40, 45, 50, 55, 60 yrs).

Solutions

Answers to Exercises


You can find the solution to all problems here.

Give it a good try before checking how I did it!

Table of contents

The Generalized Linear Model: GLM


[Back to main menu](./Title.html#2)


courtiol/LM2GLMM documentation built on July 3, 2022, 7:42 a.m.