Session Ready
Exercise

Sex and death

This exercise deals with the cost of life insurance. Data are from the AARP dataset in the statisticalModeling package.

The cost of life insurance changes as a person ages. It also (usually) depends on the person's sex, since life expectancy for women in most countries is greater than that for men. And, of course, it depends on the coverage, the amount of life insurance bought.

Your goal in this exercise is to find the effect size of Age, or Sex, and of Coverage. Keep in mind that the effect size for each variable is calculated holding each of the other explanatory variables constant.

In the console:

  • Train a linear model Cost ~ Age + Sex + Coverage.
  • Use evaluate_model() to see the model output for several values of the inputs.
  • Use effect_size() to measure how a change in the input value changes the output. Do this for each of Age, Sex and Coverage. (Remember, effect_size() takes two arguments: the model and a formula indicating which variable to vary when looking at the model output, e.g. ~ Age to get the effect size of Age on the model's response variable.)

Which of these statements are true?

  1. The effect size of Age is a rate, while for Sex it's a difference.
  2. A change in Coverage from 50 to 75 corresponds to an increase in Cost of roughly 1.80 USD/month.
  3. Cost is greater for men than women.
  4. A person aging from 55 to 65 will see a change in Cost of 33 USD/month.
  5. The natural units of the effect size of Coverage are USD/month per USD, or more simply, 1/month.
Instructions
50 XP
Possible Answers