Compares market shares across subsamples in dataset, and writes results to a file.
apollo_choiceAnalysis(choiceAnalysis_settings, apollo_control, database)List containing settings for this function. The settings must be:
alternatives: Named numeric vector. Names of alternatives and their corresponding value in choiceVar.
avail: Named list of numeric vectors or scalars. Availabilities of alternatives, one element per alternative. Names of elements must match those in alternatives. Values can be 0 or 1.
choiceVar: Numeric vector. Contains choices for all observations. It will usually be a column from the database. Values are defined in alternatives.
explanators: data.frame. Variables determining subsamples of the database. Values in each column must describe a group or groups of individuals (e.g. socio-demographics). Most usually a subset of columns from database.
List. Options controlling the running of the code. See apollo_validateInputs.
data.frame. Data used by model.
nothing, but prints the output to screen and writes a csv file to the working directory.
Saves the output to a csv file in the working directory.