Returns a data frame of the estimated coefficients and standard errors for each parameter in each model in a data frame of estimated models.

getModelResults(models)

Arguments

models

A data frame containing estimated models for a series of different sample sizes, obtained using the estimateModels() function.

Value

A data frame of the estimated coefficients and standard errors for each parameter in each model.

Examples

library(conjointTools)

# Define the attributes and levels
levels <- list(
  price     = seq(1, 4, 0.5), # $ per pound
  type      = c('Fuji', 'Gala', 'Honeycrisp', 'Pink Lady', 'Red Delicious'),
  freshness = c('Excellent', 'Average', 'Poor')
)

# Make a full-factorial design of experiment and recode the levels
doe <- makeDoe(levels)
doe <- recodeDoe(doe, levels)

# Make the survey
survey <- makeSurvey(
    doe       = doe,  # Design of experiment
    nResp     = 2000, # Total number of respondents (upper bound)
    nAltsPerQ = 3,    # Number of alternatives per question
    nQPerResp = 6     # Number of questions per respondent
)

# Simulate random choices for the survey
data <- simulateChoices(
    survey = survey,
    obsID  = "obsID"
)

# Estimate models with different sample sizes
models <- estimateModels(
    nbreaks = 10,
    data    = data,
    pars    = c("price", "type", "freshness"),
    outcome = "choice",
    obsID   = "obsID"
)

# Extract coefficients and standard errors from models
results <- getModelResults(models)