Download the template R markdown file for this workshop.
In this exercise you will:
RiverProbAll
data.data(RiverProbAll, package="ELMER")
str(RiverProbAll)
'data.frame': 91 obs. of 4 variables:
$ Flow : int 24 24 26 26 50 48 72 72 25 23 ...
$ Type : Factor w/ 3 levels "Canadian","Kayak",..: 1 3 2 1 1 1 1 2 1 2 ...
$ Problems: int 1 0 0 0 1 0 1 2 1 3 ...
$ Type2 : logi FALSE TRUE FALSE FALSE FALSE FALSE ...
The dataset RiverProbAll
gives the number of problems
experienced by travelers on the Whanganui river. This is the full data
set including the craft type as a categorical variable.
Fit a generalised linear model to this data using a Poisson distribution for the number of problems and a log link function.
Use comparisons of the deviance to make any simplifications to a full model you find possible.
Hint: The categorical variable could be altered.
You should only move on to the second exercise using this dataset) once you have completed the above exercise.
You should compare your work with the solutions for this workshop.