These rubrics apply to your entire submission.
To get these mechanics marks, you are expected to:
To get the marks for this writing component, you should:
These marks apply to the collective visuals you make in this assignment.
These marks apply to the collective code you write in this assignment.
Titanic data: predicting survival from
Make a plot examining how the covariates are related to the response. Comment on what you observe about the relationship of
Fit a linear regression model, and plot the model function overtop of the data. Interpret the slope parameters. What probabilistic quantity does this model function represent an estimate of, and of what random variable?
One consequence of using this linear regression model is that the model function sometimes evaluates to numbers that don’t make sense. How often does this happen on the training data? What problems would you have to put up with if you were to use this model in practice? When answering, be sure to also comment on how often this problem would happen, and roughly where on the predictor space the problem would occur.
Adjust the assumptions of the linear regression model so that the model function always evaluates to a valid number, and so that the parameters carry an interpretation. Report the model function equation that you’re assuming. Comment on whether you chose to transform the response or the model function, and why. Then, add a distributional assumption, being clear to indicate what random variable you are making an assumption on. Now fit the model using MLE. Comment on the advantage we get by estimating parameters using MLE under the distributional assumption, in comparison to not making the distributional assumption and fitting using least squares. Plot the model function overtop of the data. Interpret the model parameters now.
Evaluate the model function for a new individual of your choice. Compare this to the null model. What conclusion can you draw from this comparison?
Fit the model using least squares, ignoring your distributional assumption. Plot the model function overtop of the data. Is it quite different from the MLE fit?
Use bootstrapping to get many bootstrap estimates under both least squares (LS) and MLE. Plot the collection of bootstrap model functions for both LS and MLE, in separate panels (you’ll probably need to use lots of alpha transparency), to give you a sense of the variability of the model function fits. Also, compare the bootstrap sampling distributions under both LS and MLE of the slope parameter (the coefficient of your predictor) by plotting kernel density estimates of both. Use these plots as evidence to comment on which estimator is better (LS or MLE).
Fit a local regression (kNN or loess) to the data, and plot the model function on top of the data. You can just choose the tuning parameters by eye (instead of more rigorous techniques like cross validation). Which model performs better? Just use the training data to calculate error. Even if the local method is better, what advantage does a parametric model hold over this local model?
We will use the Baseball dataset
Teams available in the
Lahman package in R. We will model the relationship between total number of runs scored by each team (
R, response variable) to the total number of walks (
BB) and the total number of hits (
Create a visualization to summarise the relationship between total number of runs scored to the total number of walks and the total number of hits. Comment on the shape of the relationships.
In what way(s) would linear regression be inappropriate for these data, if at all?
Fit a Poisson regression model with a log link function. Provide an interpretation of the regression coefficients (not the intercept parameter).
Make a residual plot of your Poisson regression model, and comment on the fit.
Derive a mathematical formula for the negative log likelihood function for either the binomial-logit or binomial-probit models, beginning from the pmf’s of the observations. Be sure to be clear what variable the function is of.