# Activity 10/12/2020 ## STAT 757 -- Section 1001
Instructor: Colin Grudzien
## Instructions: We will work through the following series of activities as a group and hold small group work and discussions in Zoom Breakout Rooms. Follow the instructions in each sub-section when the instructor assigns you to a breakout room. ## Activities: ```{r} require("faraway") ``` ### Activity 1: For the ```prostate``` data, fit a model with ```lpsa``` as the response and the other variables as predictors. 1. Suppose a new patient with the following values arrives: ``` lcavol lweight age lbph svi lcp 1.44692 3.62301 65.00000 0.30010 0.00000 -0.79851 gleason pgg45 7.00000 15.00000 ``` Predict the ```lpsa``` for this patient along with an appropriate 95% confidence interval (CI). 2. Repeat the last question for a patient with the same values except that he is ```age``` 20. Explain why the CI is wider. 3. For the model of the previous question, systematically select predictors so that all the predictors remaining are significant at the 5% level. You should consider using the `update()` function for linear models to update the model equation. Test this model versus the original model with an ANOVA. Now recompute the predictions of the previous question. Are the CIs wider or narrower? Which predictions would you prefer? Explain. ### Activity 2: Using the ```teengamb``` data, we fit the following model: ```{r} lm_gamb <- lm(gamble ~ sex * income, data = teengamb) summary(lm_gamb) ``` 1. Predict the amount that a male with average ```income``` for this subpopulation would gamble along with an appropriate 95% CI. 2. Repeat the prediction for a male with maximal value of ```income```. Which CI is wider and why is this result expected? 3. Fit a model with ```sqrt(gamble)``` and ```log(gamble)``` as the response but with the same predictors. Explain which of these is possible and why. Now use a working model with transformed response predict the response and give a 95% prediction interval for the individual in part 1. Take care to give your answer in the original units of the response. 4. Repeat the prediction for the model in 3 for a female with ```income=1```. Comment on the credibility of the result.