View source: R/analyze_choices.R
compare_choice_shares | R Documentation |
The function calculates the average value of the explanator for each alternative when chosen and not chosen.
compare_choice_shares(db, str_choice, alt_avail, explanators = NULL)
db |
A data.frame or tibble |
str_choice |
A character string giving the name of the choice variable |
alt_avail |
A list the length of the total number of alternatives. Each list element is a vector of length equal to the number of observations with the values 0 and 1 indicating unvailable/available aleternatives in each choice situation |
explanators |
A character vector with the names of the variables for which to calcualte differences in choice shares The function is a rewritten version of |
A list with the choice shares and test statistics for difference in means
Hess, S. & Palma, D. (2019), Apollo: a flexible, powerful and customisable freeware package for choice model estimation and application, Journal of Choice Modelling, Volume 32, September 2019, 100170 Hess, S. & Palma, D. (2019), Apollo version 0.1.0, user manual, www.ApolloChoiceModelling.com
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.