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)
A data.frame or tibble
A character string giving the name of the choice variable
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
A character vector with the names of the variables for which to calcualte differences in choice shares
The function is a rewritten version of apollo_choiceAnalysis()
.
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