Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

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.

  • rows: Boolean vector. Consideration of rows to include, FALSE to exclude. Length equal to the number of observations (nObs). Default is "all", equivalent to rep(TRUE, nObs).

apollo_control

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

database

data.frame. Data used by model.

Details

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

Value

Silently returns a matrix containg the mean ehen chosen and un chose for each explanator, as well as the t-test comparing those means (H0: equivalence). The table is also writen to a file called modelName_choiceAnalysis.csv.


apollo

Tools for Choice Model Estimation and Application

v0.2.4
GPL-2
Authors
Stephane Hess [aut], David Palma [aut, cre]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.