library(LM2GLMM)
knitr::opts_chunk$set(cache = TRUE, fig.align = "center", fig.width = 4, fig.height = 4,
                      cache.path = "./cache_knitr/Exo_LM/", fig.path = "./fig_knitr/Exo_LM/")
options(width = 200)
set.seed(1L)

The Linear Model: LM


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

Exercises

Dataset: chickwts -- part 1 (difficulty = 0/5) r .emo("practice")

head(chickwts)
levels(chickwts$feed)


r .emo("goal") Test whether diet significantly affects the weights of six weeks old chickens.

r .emo("goal") Compare the effect of different feed supplement types.

r .emo("goal") Plot mean effects for each feed supplement type showing 95% confidence intervals.

Dataset: stackloss (difficulty = 1/5) r .emo("practice")

head(stackloss)


r .emo("goal") Find out if the acid concentration influences the loss of ammonia by the plants.

Dataset: swiss (difficulty = 1/5) r .emo("practice")

head(swiss)


r .emo("goal") Plot the influence of potential determinants of fertility.

r .emo("goal") Test the effect of different predictors on fertility.

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") What is the mean number of insects we would predict to find on a plot treated with insecticide C?

Dataset: chickwts -- part 2 (difficulty = 3/5) r .emo("practice")

head(chickwts)
levels(chickwts$feed)


r .emo("goal") Predict the proportion of chickens larger than 300g for each feed supplements.

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

head(mammals)


r .emo("goal") What is the allometric exponent for the growth of brain size with body mass?

r .emo("goal") Does this exponent agree with the usual expectation of 2/3?

r .emo("goal") How large do we expect the brain of a 1kg animal to be?

r .emo("goal") Rank organisms by relative brain size (i.e. controlled for body size)

r .emo("goal") Repeat the analysis with the dataset Animals

Dataset: trees (difficulty = 4/5) r .emo("practice")

head(trees)


r .emo("goal") Compare the approximation of the volume of wood given by $\text{Volume} = c\times\text{Height}\times\text{Girth}^2$ (with $c$ to be estimated) to the approximation of a tree trunk as a cylinder.

Remember: Check the units of each column in the help file ?trees. (There are 12 inches in a foot)

Solutions

Answers to Exercises r .emo("practice")


You can find the solution to all problems here.

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

Table of contents

The Linear Model: LM


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


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