Model training
Next, you will estimate a logistic response model on train.data. Therefore, you use the predictor variables that remained after model selection to explain the purchase probabilities for HOPPINESS. You investigate the train.model and compare the results to the previously fitted extended.model by using the function margins().
Deze oefening maakt deel uit van de cursus
Building Response Models in R
Oefeninstructies
- Estimate a logistic response model on
train.data. ExplainHOPPINESSbyprice.ratio,FEAT.HOP, andFEATDISPL.HOP. Use the functionglm()with thefamilyargumentbinomialand assign the result to an object namedtrain.model. - Investigate the
train.modelobject by using the functionmargins(). - Investigate the
extended.modelobject by using the functionmargins().
Praktische interactieve oefening
Probeer deze oefening eens door deze voorbeeldcode in te vullen.
# Fit the logistic response model to train.data
___ <- glm(___, family = binomial, data = ___)
# Investigate the train.model
___
# Investigate the extended.model
___