partworth_utility_basic | R Documentation |
It provides partworth utilities obtained from a simple multinomial logit model based on a Stated preference survey
partworth_utility_basic(coefficients, data, nalts, optout, attribute_type)
coefficients |
A numeric vector containing multinomial logit coefficients |
data |
The SP dataset obtained from a SP Survey containing attributes, alternatives and responses columns. Otherwise you can insert the dataset file path |
nalts |
The number of alternatives per choice set in the experimental design matrix without considering the optout option if presents. |
optout |
A logical vector that assumes the value TRUE if the optout option is present, FALSE otherwise.In this case the optout option can be considered a no choice option as well as a status quo option (with always the same attributes levels) |
attribute_type |
A character vector indicating if each attribute must be considered quantitative ("C") or qualitative ("NC") |
It provides partworth utilities obtained from a simple multinomial logit model based on a SP survey. In particular,it takes as input the coefficients of the multinomial logit model of the function SP_mlogit_basic.In the dataset, attributes columns must stay before the other columns.Furthermore, alternatives column must be called "alt" while responses "resp".
Gabriele Iannaccone
Federov, V.V. (1972). Theory of optimal experiments. Academic Press, New York.
Wheeler, R.E. (2004). AlgDesign. The R project for statistical computing. (http://www.r-project.org).
Croissant, Y. (2012). Estimation of multinomial logit models in R: The mlogit Packages. R package version 0.2-2. URL: http://cran. r-project. org/web/packages/mlogit/vignettes/mlogit. pdf.
optFederov, optBlock, dcm.design.cand, mlogit
#multinomial logit coefficients estimation
z<-SP_mlogit_basic(dataset=retailers_freight,attribute_type = c("NC","C","C"))
#partworth utilities
partworth_utility_basic(coefficients=z$coefficients,data=data,nalts=2,optout=TRUE,attribute_type=c("NC","C","C"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.