MATH 315 Quiz 04
Due 2025-12-10 by 12:59pm
-
Using the data set carnviora, predict longevity (
LY, measured in months) using age of independence (AI, measured in days) fitting unique intercepts and unique slopes by super family (SuperFamily).For this quiz, run the following code yourself. On the final exam, the code and its output will be included for you.library(ggplot2) suppressMessages(library(dplyr)) carnivora <- read.csv("https://raw.githubusercontent.com/roualdes/data/refs/heads/master/carnivora.csv") ggplot(carnivora, aes(AI, LY, color = SuperFamily)) + geom_point() + geom_smooth(method = "lm", se = FALSE) + theme_minimal() fit <- lm(LY ~ SuperFamily * AI, data = carnivora) summary(fit) df <- data.frame( yhat = fitted(fit), r = rstandard(fit)) ggplot(df, aes(yhat, r)) + geom_point() ggplot(df, aes(r)) + geom_histogram(bins = 5)a. Which is(are) the explanatory variable(s)? Which is the response?
b. Calculate the intercept for the super family Feliformia.
c. Interpret the intercept for the super family Feliformia in context of the data.
d. Does the intercept for the super family Feliformia make sense in context of the data.
e. Calculate the slope for the super family Feliformia.
f. Interpret the slope for the super family Feliformia in context of the data.
g. Which assumptions does the residual on
yhatscatter plot check?h. Are these assumptions satisfactorily met? Why or why not?
i. Which assumption does the histogram of residuals check?
j. Is this assumption satisfactorily met? Why or why not?
k. Are there any potential outliers?