Decomposes the variance of the BASS model into variance due to main effects, two way interactions, and so on, similar to the ANOVA decomposition for linear models. Uses the Sobol' decomposition, which can be done analytically for MARS models.
sobol(
bassMod,
prior = NULL,
prior.func = NULL,
mcmc.use = NULL,
func.var = NULL,
xx.func.var = NULL,
verbose = TRUE,
getEffects = FALSE
)
If non-functional (func.var = NULL
), a list with two elements:
a data frame of sensitivity indices with number of rows matching the length of mcmc.use
. The columns are named with a particular main effect or interaction. The values are the proportion of variance in the model that is due to each main effect or interaction.
a data frame of total sensitivity indices with number of rows matching the length of mcmc.use
. The columns are named with a particular variable.
Otherwise, a list with four elements:
an array with first dimension corresponding to MCMC samples (same length as mcmc.use
), second dimension corresponding to different main effects and interactions (labeled in names.ind
), and third dimension corresponding to the grid used for the functional variable. The elements of the array are sensitivity indices.
same as S
, but scaled in terms of total variance rather than percent of variance.
a vector of names of the main effects and interactions used.
the grid used for the functional variable.
a fitted model output from the bass
function.
a list of priors; uniform, truncated mixture of Normals or Ts for continuous; vector of category weights for categorical. Default is uniform over range of data.
prior for functional variable. In almost all cases, keep this as the uniform default.
an integer vector indexing which MCMC iterations to use for sensitivity analysis.
an integer indicating which functional variable to make sensitivity indices a function of. Disregard if bassMod
is non-functional or if scalar sensitivity indices are desired.
grid for functional variable specified by func.var
. Disregard if func.var
is not specified. If func.var
is specified and xx.func.var
not specified, the grid used to fit bass
will be used.
logical; should progress be displayed?
logical; should Sobols ANOVA decomposition be computed?
Performs analytical Sobol' decomposition for each MCMC iteration in mcmc.use (each corresponds to a MARS model), yeilding a posterior distribution of sensitivity indices. Can obtain Sobol' indices as a function of one functional variable.
bass for model fitting and predict.bass for prediction.
# See examples in bass documentation.
Run the code above in your browser using DataLab