partworth_utility: Multinomial logit partworth utilities

View source: R/partworth_ut_stud.R

partworth_utilityR Documentation

Multinomial logit partworth utilities

Description

It provides partworth utilities obtained from a simple multinomial logit model based on a Stated preference survey

Usage

partworth_utility(coefficients,design, optout=FALSE, attribute_type)

Arguments

coefficients

A numeric vector containing multinomial logit coefficients

design

The experimental design matrix

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")

Details

It provides attribute importances 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.

Value

partworth_utility

The partworth utilities vector

Author(s)

Gabriele Iannaccone

References

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.

See Also

optFederov, optBlock, dcm.design.cand, mlogit

Examples

#design creation
attribute.names=list(delivery_cost = c(3,5,6,10),
                     delivery_time = c("Same day","2/3 days"),
                     delivery_location=c("Pick-up","Home"),
                     co2emissions=c(15,100,150,200,300),
                     carrier_drivers_benefits=c("Low","Medium","High"))
 design<-opt_design(condition=10,alt=2,set=10,block=2,
                    attribute.names=attribute.names,seed=635,
                    sign=c("-","-","+","-","+"))
 design<-design$design
 #Coefficients calculation, don't RUN!!!!
 calculations<-SP_mlogit(attribute_type = c("C","NC","NC","C","NC"),
dataset_forms=c("C:/Users/utente/Downloads/Block 1 DELIVERY (Risposte).xlsx",
        "C:/Users/utente/Downloads/_Block 2 DELIVERY (Risposte).xlsx"),
        nrespondents=c(12,3),design=design,optout=FALSE)
#partworth utility calculation
k<-partworth_utility(coefficients=calculations$summary$coefficients,
                     design=design,optout=FALSE,
                     attribute_type=c("C","NC","NC","C","NC"))











Iannacks/SP.Survey documentation built on May 18, 2023, 11:23 a.m.