Posted: February 13th, 2023

- The link below directs you to a file that contains mortality information from a nursing home during the year 2015. The variable “died” indicates that if the patient died before the end of the year. Given this data, develop a logistic regression model, which predicts probability of death of a guest during any year by the end of that year, given the age and the dummy variable “gender.”

__https://drive.google.com/file/d/12WjJcBN_4t8N34Tir2-3hy3Aq5u3j_x4/view?usp=sharing__

- The personnel director of a firm has developed two tests to help determine whether potential employees would perform successfully in a particular position. To help estimate the usefulness of the tests, the director gives both tests to 43 employees that currently hold the position. Table 5 gives the scores of each employee on both tests and indicates whether the employee is currently performing successfully or unsuccessfully in the position. If the employee is performing successfully, we set the dummy variable Group is set equal to 1; if the employee is performing unsuccessfully, we set Group equal to 0. Let x1 and x2 denote the scores of a potential employee on tests 1 and 2.

Perform a discriminant analysis on the data and interpret the result, including the confusion matrix. Include all required steps in assessing the final model. By trial and error, find the threshold, which minimizes prediction relative error.

**– Professional Assignment 2 – CLO 1, CLO 2, CLO 3, CLO 4, CLO 5**

1. The link below directs you to a file that contains mortality information from a nursing home during the year 2015. The variable “died” indicates that if the patient died before the end of the year. Given this data, develop a logistic regression model, which predicts probability of death of a guest during any year by the end of that year, given the age and the dummy variable “gender.”

__https://drive.google.com/file/d/12WjJcBN_4t8N34Tir2-3hy3Aq5u3j_x4/view?usp=sharing__

0. The personnel director of a firm has developed two tests to help determine whether potential employees would perform successfully in a particular position. To help estimate the usefulness of the tests, the director gives both tests to 43 employees that currently hold the position. Table 5 gives the scores of each employee on both tests and indicates whether the employee is currently performing successfully or unsuccessfully in the position. If the employee is performing successfully, we set the dummy variable Group is set equal to 1; if the employee is performing unsuccessfully, we set Group equal to 0. Let x1 and x2 denote the scores of a potential employee on tests 1 and 2.

Perform a discriminant analysis on the data and interpret the result, including the confusion matrix. Include all required steps in assessing the final model. By trial and error, find the threshold, which minimizes prediction relative error.

SOLUTION

To develop a logistic regression model, we will use the information on age and gender to predict the probability of death of a guest in a nursing home by the end of a given year. The dependent variable in this model will be “died” (0/1), indicating whether the patient died before the end of the year. The independent variables will be “age” and “gender” (represented as a dummy variable).

The logistic regression model can be represented mathematically as:

logit(P(died)) = β0 + β1 * age + β2 * gender

where:

- logit(P(died)) is the log odds of death
- β0 is the intercept
- β1 is the coefficient for age
- β2 is the coefficient for gender
- age is the patient’s age
- gender is represented as a binary variable (0 for male and 1 for female)

To estimate the coefficients, we would need to fit the model to the data using maximum likelihood estimation (MLE). The coefficients can then be used to calculate the predicted probability of death for any given age and gender.

For example, if we have a male patient who is 80 years old, we can calculate the predicted probability of death as follows:

logit(P(died)) = β0 + β1 * 80 + β2 * 0 P(died) = 1 / (1 + e^(-logit(P(died))))

where e is the mathematical constant (approx. 2.71828).

This model can be used to make predictions for any patient in the nursing home, given their age and gender. However, it is important to keep in mind that this model may not accurately reflect the probability of death for all patients, as there may be other factors that contribute to mortality.

Place an order in 3 easy steps. Takes less than 5 mins.