Price as a factor
As I mentioned in the last video, you can treat price as a factor. Let's estimate a model like that. The chocolate data is already loaded.
Este ejercicio forma parte del curso
Choice Modeling for Marketing in R
Instrucciones del ejercicio
- Change the
Pricevariable to a factor in thechocolatedata. - Call
mlogitto fit a model with the formulaSelection ~ 0 + Brand + Type + Pricewith the chocolate data and assign it tochoc_m3. - Use
summary()to inspect the model coefficients.
Ejercicio interactivo práctico
Prueba este ejercicio y completa el código de muestra.
# change the Price variable to a factor in the chocolate data
# fit a model with mlogit and assign it to choc_m3
# inspect the coefficients