CommencerCommencer gratuitement

Predicting with logistic models

The logistic regression model computes the probabilities that the given observation belongs to one of the classes.

The logistic model with two explanatory variables has the following form:

$$\frac{1}{1+e^{-(\beta_{0} + \beta_{1} \cdot x_{1} + \beta_{2} \cdot x_{2})}}$$

The R functions do the hard work for the users, but knowing the mechanics behind them will give you confidence in their correct application during the interview.

In the previous exercise, you've used the parkinsons dataset and fitted the logistic regression model. These two objects and the new_person data frame are available in your environment.

Cet exercice fait partie du cours

Practicing Statistics Interview Questions in R

Afficher le cours

Exercice interactif pratique

Essayez cet exercice en complétant cet exemple de code.

# Print the new person's data
print(___)

# Print the logistic model
___(___)
Modifier et exécuter le code