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)
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.
r .emo("practice")
head(stackloss)
r .emo("goal")
Find out if the acid concentration influences the loss of ammonia by the plants.
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.
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?
r .emo("practice")
head(chickwts) levels(chickwts$feed)
r .emo("goal")
Predict the proportion of chickens larger than 300g for each feed supplements.
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
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)
r .emo("practice")
You can find the solution to all problems here.
Give it a good try before checking how I did it!
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.