Exercises
For the first example, modify the synthetic data to make it harder for the model to recover the true parameters; try increasing the overlap of the 3 Gaussians by changing the means and standard deviations. Try changing the number of points per cluster, and think of ways to improve the model for the harder data you come up with.
-
Using the
fish
data, extend the model in the book to include thepersons
variable as part of a linear model. Include this variable to model the number of extra zeros. You should get a model with two linear models, one connecting the number of children and the presence/absence of a camper to the Poisson rate (as in the example we saw) and another connecting the number of persons to the variable. For the second case you will need a logistic inverse link! Use the data for the robust logistic example to feed a non-robust logistic regression model and to check that the outliers actually affected the results. You may want to add or remove outliers to better understand...