Task 3: Model the number of road traffic accidents
We will start with simple models and gradually make them more complex and improve them. We will focus on the road traffic accident variable(s) that you defined in Assignment 1. Let’s denote it Y.
Randomly pick a region from the road traffic accidents data.
Which region do you pick?
Fit a linear model for Y using date as the predictor variable. Plot the fitted values and the residuals. Assess the model fit. Is a linear function sufficient for modelling the trend of Y? Support your conclusion with plots.
As we are not interested in the trend itself, relax the linearity assumption by fitting a generalised additive model (GAM). Assess the model fit. Do you see patterns in the residuals indicating insufficient model fit?
Augment the model to incorporate the weekly variations.
Compare the models using the Akaike information criterion (AIC). Report the best-fitted model through coefficient estimates and/or plots.
Analyse the residuals. Do you see any remaining correlation patterns among the residuals?
What data type is your day-of-the-week variable? Does the data type of this variable affect the model fit?
Students succeed in their courses by connecting and communicating with an expert until they receive help on their questions
Consult our trusted tutors.