Exercise

# Generating predictions from models

Demonstrate your knowledge of generating predictions from different types of models.

Here are 3 models built using sample data called `myData`

that has a response of `y`

, predictor variable of `x`

, and categorical variable of `group`

.

```
model1 <- glm(y ~ x * group, data = myData, family = "gaussian")
model2 <- glm.nb(y ~ x * group, data = myData)
model3 <- lme(y ~ x, random = ~1 + x|group, data = myData)
```

Note the `myData`

data set, `nlme`

and `MASS`

libraries, and the models above have been preloaded.

Instructions 1/4

**undefined XP**

- Create a data frame to be used for generating predictions of the value of
`y`

when`x`

is 35 and 40, for each`group`

.