Ein Wahlmodell anpassen
Als Nächstes schätzt du ein Wahlmodell mit der Funktion mlogit() aus dem Paket mlogit anhand der Daten in sportscar. Die Daten sind bereits geladen. Der Ablauf ist dem Anpassen eines Regressionsmodells mit lm() sehr ähnlich.
Diese Übung ist Teil des Kurses
Choice Modeling für Marketing in R
Anleitung zur Übung
- Lade das Paket
mlogitmitlibrary(). - Passe ein Modell an, das
choicein Abhängigkeit vonseat,trans,convertundpricevorhersagt. Du musst den Formeleingabeteil ausfüllen. - Fasse das Objekt
m1zusammen.
Interaktive Übung
Vervollständige den Beispielcode, um diese Übung erfolgreich abzuschließen.
# load the mlogit library
# fit a choice model using mlogit() and assign the output to m1
m1 <- mlogit(___ ~ ___, data=sportscar)
# summarize the m1 object to see the output of the choice model