The Quarto template for this assignment may be found in the repository at the following link: https://classroom.github.com/a/uPlwAu29

A 2008 paper by Cortez and Silva examined predictors of student performance in two Portuguese secondary schools. We will be using part of their dataset to examine factors that are associated with academic performance. The variables in our abridged dataset are as follows:

Suppose our primary question of interest is whether there is an association between whether a student attends extra paid classes and their final grade.

  1. Fit a linear model that predicts the student’s final Portuguese grade based on all other variables in the dataset (no need for interactions or transformations). Interpret the parameter estimate corresponding to paid.
  2. Create a residual plot that corresponds to your model (no need to display them); you should notice a group of students for whom the model is not predicting very well. What is special about these students in particular (why might your model not be so great for them)?
  3. Describe what it would mean for the independence assumption in this model to be violated, even after adjusting for all the variables in the model.
  4. Suppose you were worried about potential violation of independence by school. Fit the same model as in Ex. 1, but with a random intercept for school. Interpret the parameter estimate corresponding to paid, specifically in the context of a random effects model (hint: it shouldn’t be the same interpretation as in Ex. 1).
  5. Describe the difference in how the school variable is being treated in the two models.
  6. Compare the model coefficients from your model in Ex. 1 to the fixed effect estimates from your model in Ex. 4. What do you notice?
  7. The minimum passing grade in Portuguese secondary schools is a 10. Create a mixed-effects logistic regression model that predicts whether a student passes based on the other variables in the model; use a random intercept for school, and then interpret the odds ratio corresponding to whether the student gets extra paid classes (be careful about the interpretation in light of the random effect!).
  8. What was your reaction to the panelists’ experiences and insight? How has today’s conversation shaped your idea of what you may want to do in terms of a career or with life in general? (if you weren’t in class then you won’t get credit for this question, but it’s not going to be worth very many points. Please just leave it blank.)