Learn R Programming

apollo (version 0.0.7)

apollo_choiceAnalysis: Reports market share for subsamples

Description

Compares market shares across subsamples in dataset, and writes results to a file.

Usage

apollo_choiceAnalysis(choiceAnalysis_settings, apollo_control, database)

Arguments

choiceAnalysis_settings

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.

apollo_control

List. Options controlling the running of the code. See apollo_validateInputs.

database

data.frame. Data used by model.

Value

nothing, but prints the output to screen and writes a csv file to the working directory.

Details

Saves the output to a csv file in the working directory.