Page 1 of 1

model1 = lm(y ~ x) summary(modell) ## ## Call: ## Im(formula = y - x) ## ## Residuals: ## Min 1Q Median 3Q Max ## -9.94

Posted: Fri Apr 29, 2022 6:33 am
by answerhappygod
Model1 Lm Y X Summary Modell Call Im Formula Y X Residuals Min 1q Median 3q Max 9 94 1
Model1 Lm Y X Summary Modell Call Im Formula Y X Residuals Min 1q Median 3q Max 9 94 1 (165.39 KiB) Viewed 24 times
Model1 Lm Y X Summary Modell Call Im Formula Y X Residuals Min 1q Median 3q Max 9 94 2
Model1 Lm Y X Summary Modell Call Im Formula Y X Residuals Min 1q Median 3q Max 9 94 2 (20.16 KiB) Viewed 24 times
Model1 Lm Y X Summary Modell Call Im Formula Y X Residuals Min 1q Median 3q Max 9 94 3
Model1 Lm Y X Summary Modell Call Im Formula Y X Residuals Min 1q Median 3q Max 9 94 3 (271.83 KiB) Viewed 24 times
model1 = lm(y ~ x) summary(modell) ## ## Call: ## Im(formula = y - x) ## ## Residuals: ## Min 1Q Median 3Q Max ## -9.94 -4.03 1.28 3.91 8.83 ## ## Coefficients: ## Estimate Std. Error t value Pr(>It) ## (Intercept) 13.708 2.525 5.43 0.00012 *** ## x 1.585 0.307 5.16 0.00018 *** ## ## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1''1 ## ## Residual standard error: 5.72 on 13 degrees of freedom ## Multiple R-squared: 0.672, Adjusted R-squared: 0.647 ## F-statistic: 26.7 on 1 and 13 DF, p-value: 0.000182 confint(modell) ## 2.5 % 97.5 % ## (Intercept) 8.253 19.16 ## x 0.922 2.25 model2 = Imcy ~ X + URC) summary(model2) ## ## Call: ## lm(formula = y = x + URC) ## ## Residuals: ## 1Q Median 3Q Max ## -6.413 -1.855 0.245 1.641 6.596 ## ## Coefficients: ## Estimate Std. Error t value Pr(>It!) ## (Intercept) 19.106 3.412 5.60 0.00016 *** ## x 1.060 0.292 3.63 0.00393 ** ## URCS 3.588 2.702 1.33 0.21116 ## URCU -8.552 3.288 -2.60 0.02466 * ## ## Signif. codes: 0 ****' 0.001 ***' 0.01 '*' 0.05'.' 0.1'' 1 ## ## Residual standard error: 3.78 on 11 degrees of freedom ## Multiple R-squared: 0.879, Adjusted R-squared: 0.846 ## F-statistic: 26.6 on 3 and 11 DF, p-value: 2.44e-05 Min
c) Using Model 1, has this study demonstrated a positive association between distance to the nearest fire station and fire damage? Justify your answer.
d) Which is the best interpretation of the regression coefficient and confidence interval from Model 1? o O is not in the confidence interval, and therefore the result is statistically significant at the a = 0.05 level. For each additional kilometre from a fire station, fire damage will increase by $1,585. For 95% of fires, the increase due to distance lies in the range $922 to $2250. O For each additional kilometre from a fire station, average fire damage is estimated to increase by $1,585. We are 95% confident that this average increase lies in the range $922 to $2250. Because the p-value is < 0.05, we know that distance is an important predictor of fire damage. Because the p-value is < 0.05, we know that distance is not an important predictor of fire damage.
e Studentised residuals versus fitted values for Model 1 are shown below (left), and are also plotted versus Urban-Rural Classification (right). 2 2 : 1 1 Studentised residuals 0 0 -1 -1 . -2 2- -2 15 20 25 30 35 40 45 Rural Semi-urban Urban Fitted values Urban-Rural Classification Which interpretation of the two studentised residual plots is best? The residuals show non-constant variance, suggesting we should transform the response variable. The residuals are non-normal with one outlier with fitted value near 15. We should re-run the model to assess sensitivity, and report our findings. The residuals show a lack of independence, which may be corrected by fitting a model with a distance-squared term and/or with the Urban-Rural Classification variable. Residuals for Urban and Rural classifications are reasonable, but we should remove the Semi-urban data and re-run the analysis. There are no obvious departures from model assumptions, and we are comfortable with the conclusions from our analysis.
f) The regression coefficient for distance changed substantially between Model 1 and Model 2. What is the most likely cause?
g) Use the R output below to select between Model 1 and Model 2 using the AIC approach to model selection. Which answer is best? AIC(modell, model2) ## df AIC ## model1 3 98.7 ## model2 5 87.8 ООООО Model 1 is preferred because it has fewer df. Model 1 is preferred because it has higher AIC. Model 2 is preferred because it has higher df. Model 2 is preferred because it has lower AIC. Model 2 is preferred because it has higher R2.
g) Use the R output below to select between Model 1 and Model 2 using the AIC approach to model selection. Which answer is best? AIC(modell, model2) ## df AIC ## model1 3 98.7 ## model2 5 87.8 ООООО Model 1 is preferred because it has fewer df. Model 1 is preferred because it has higher AIC. Model 2 is preferred because it has higher df. Model 2 is preferred because it has lower AIC. Model 2 is preferred because it has higher R2.
h) For Model 2, write the fitted regression equation for the Semi-urban URC category.
i) Suppose we wanted to create a third model (Model 3) that includes the interaction between distance and URC category. Write the R code that would implement this model.
j) Which is the best description of Model 3? Model 3 fits separate regression lines of fire damage versus distance for each URC category. These lines have different slopes and different intercepts. O Model 3 fits separate regression lines of fire damage versus distance for each URC category. These lines have common slopes but different intercepts. O Model 3 fits separate regression lines of fire damage versus distance for each URC category. These lines have different slopes but common intercepts. O Model 3 fits the same regression line of fire damage versus distance for all URC categories. Model 3 fits a continuous 3-dimensional surface between fire damage, distance, and URC category.