sobolBasis {BASS} | R Documentation |
BASS Sensitivity Analysis
Description
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.
Usage
sobolBasis(
mod,
int.order,
prior = NULL,
mcmc.use = NULL,
nind = NULL,
n.cores = 1,
parType = "fork",
plot = F,
verbose = T
)
Arguments
mod |
output from the |
int.order |
an integer indicating the highest order of interactions to include in the Sobol decomposition. |
prior |
a list with the same number of elements as there are inputs to mod. Each element specifies the prior for the particular input. Each prior is specified as a list with elements |
mcmc.use |
an integer indicating which MCMC iteration to use for sensitivity analysis. Defaults to the last iteration. |
nind |
number of Sobol indices to keep (will keep the largest nind). |
n.cores |
number of cores to use (nearly linear speedup for adding cores). |
parType |
either "fork" or "socket". Forking is typically faster, but not compatible with Windows. If |
plot |
logical; whether to plot results. |
verbose |
logical; print progress. |
Details
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.
Value
If non-functional (func.var = NULL
), a list with two elements:
S |
a data frame of sensitivity indices with number of rows matching the length of |
T |
a data frame of total sensitivity indices with number of rows matching the length of |
Otherwise, a list with four elements:
S |
an array with first dimension corresponding to MCMC samples (same length as |
S.var |
same as |
names.ind |
a vector of names of the main effects and interactions used. |
See Also
bassPCA and bassBasis for model fitting and predict.bassBasis for prediction.
Examples
# See examples in bass documentation.