Get startedGet started for free

The search for the best model

You will start with a full model that predicts professor score based on rank, ethnicity, gender, language of the university where they got their degree, age, proportion of students that filled out evaluations, class size, course level, number of professors, number of credits, average beauty rating, outfit, and picture color.

Note you do not included the pic_outfit or pic_color variables in the full model because the original study states that these variables were used in a different analysis evaluating whether they're related to how highly the six students involved in the study score the professors' beauty (not related to how the students evaluate their professors in class).

This exercise is part of the course

Data Analysis and Statistical Inference

View Course

Exercise instructions

  • Before running the model, think about which variable you would expect to have the highest p-value in this model and why.
  • Run the full model, the code is displayed in the editor.
  • Print the summary of the m_full model.

Hands-on interactive exercise

Have a go at this exercise by completing this sample code.

# The evals data frame is already loaded into the workspace

# The full model:
m_full <- lm(score ~ rank + ethnicity + gender + language + age + cls_perc_eval
             + cls_students + cls_level + cls_profs + cls_credits + bty_avg, data = evals)

# View the regression output:
Edit and Run Code