Solution: Explore Data with Multiple Predictors

Let's look at the solution of the previous exercise.

We'll cover the following

Solution

The model we’re going to make is straightforward. We’ll use the glm.nb() function from the MASS package. This decision is in part based on the type of data we’re working with. The data is made up of whole counts of things, dead tadpoles in this case, and so it can’t be negative nor partial values. This sort of data just makes sense for a Poisson or negative binomial distribution.

First, let’s make the full model including all the three predictors and all of their two- and three-way interactions:

Get hands-on with 1200+ tech skills courses.