STAT 538A November 2018

Assignment 3

Due date: please submit your completed assignment by e-mail by end of the day, Thursday, Nov. 29

The data.frame hsb in the faraway package contains the data described previously in class from the "High School and Beyond" study described in class Nov. 21. For this assignment you are to consider the prog variable as the outcome in a prediction model based on test scores in the dataset.

  1. Investigate the relationships of prog to the variables read,write,science,math and socst using plots similar to those presented by Faraway on page 97.

  2. Fit a multinomial prediction model using the same variable variables Use a stepwise approach to select a subset of these variables.

  3. Using the reduced model, produce plots of fitted probabilities similar in structure to the plots in a. To do this for each of the chosen variables, take the observed values of that variable in the newdata prediction dataframe and for the remaining variables, use their mean values in the data set. See note below.

  4. Describe and contrast the patterns in the plots obtained in a) and c).

N.B. If one applies the predict command to a fitted model object it returns predictions for the dataframe that was used in the model, excepting if you provide a new dataframe using the "newdata" argument, with "x" values you wish to use for predictions. In this question you will need to create new dataframes with "x" values to obtain fitted probabilities suitable for plotting as a means of exploring the fitted model.