AMCE {cjbart}R Documentation

Average Marginal Component Effect Estimation with Credible Interval

Description

AMCE calculates the average marginal component effects from a BART-estimated conjoint model.

Usage

AMCE(
  data,
  model,
  attribs,
  ref_levels,
  method = "bayes",
  alpha = 0.05,
  cores = 1,
  skip_checks = FALSE
)

Arguments

data

A data.frame, containing all attributes, covariates, the outcome and id variables to analyze.

model

A model object, the result of running cjbart()

attribs

Vector of attribute names for which IMCEs will be predicted

ref_levels

Vector of reference levels, used to calculate marginal effects

method

Character string, setting the variance estimation method to use. When method is "parametric", a typical combined variance estimate is employed; when method = "bayes", the 95% posterior interval is calculated; and when method = "rubin", combination rules are used to combine the variance analogous to in multiple imputation analysis.

alpha

Number between 0 and 1 – the significance level used to compute confidence/posterior intervals. When method = "bayes", the posterior interval is calculated by taking the alpha/2 and (1-alpha/2) quantiles of the posterior draws. When method = "rubin", the confidence interval equals the IMCE +/- qnorm(alpha/2). By default, alpha is 0.05 i.e. generating a 95% confidence/posterior interval.

cores

Number of CPU cores used during prediction phase

skip_checks

Boolean, indicating whether to check the structure of the data (default = FALSE). Only set this to TRUE if you are confident that the data is structured appropriately

Details

The AMCE estimates are the average of all computed OMCEs.

Value

AMCE returns an object of type "cjbart", a list object.

amces

A data.frame containing the average marginal component effects

alpha

The significance level used to compute the credible interval

See Also

cjbart()


[Package cjbart version 0.3.2 Index]