QUESTIONS AND VERIFIED ANSWERS ALREADY
PASSED
◉ Y ~ X1 * X2.
Answer: means "model x1 + x2 + x1x2"
◉ summary () or coef() output).
Answer: how to write the regression equation for any fit model
using R output
◉ predict ().
Answer: how to make predictions from regression model
◉ If modeling log(y), use what?.
Answer: exp(predict(fit, newdata))
◉ what argument to use when trying to fit logistic model using glm?.
Answer: family="binomial" argument
◉ what argument to predict probabilities using predict ?.
, Answer: type="response"
◉ str(bikes).
Answer: to see that there are quantitative variables and to confirm
that the strings = T argument did allow the character data to be read
in as a factor
◉ simple fit <- glm(cnt~weathersit, data = bikes).
Answer: builds a linear regression model that has count as the
response and the weather situation variable as predictor
◉ summary(simplefit).
Answer: using the summary function on simplefit to access the
results of the regression
◉ coef(simplefit)["weatheriswet"].
Answer: using the coef function to print the coefficient for the wet
weather situation followed by the name of the coefficient in quotes
inside square brackets
◉ paste("lower").
Answer: determines how the ride count for wet days compared to
the ride count on clear days, lower on wet days