sobolBasis {BASS}R Documentation

BASS Sensitivity Analysis


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.


  prior = NULL,
  mcmc.use = NULL,
  nind = NULL,
  n.cores = 1,
  parType = "fork",
  plot = F,
  verbose = T



output from the bassBasis or bassPCA function.


an integer indicating the highest order of interactions to include in the Sobol decomposition.


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 dist (one of c("normal", "student", "uniform")), trunc (a vector of dimension 2 indicating the lower and upper truncation bounds, taken to be the data bounds if omitted), and for "normal" or "student" priors, mean (scalar mean of the Normal/Student, or a vector of means for a mixture of Normals or Students), sd (scalar standard deviation of the Normal/Student, or a vector of standard deviations for a mixture of Normals or Students), df (scalar degrees of freedom of the Student, or a vector of degrees of freedom for a mixture of Students), and weights (a vector of weights that sum to one for the mixture components, or the scalar 1). If unspecified, a uniform is assumed with the same bounds as are represented in the input to mod.


an integer indicating which MCMC iteration to use for sensitivity analysis. Defaults to the last iteration.


number of Sobol indices to keep (will keep the largest nind).


number of cores to use (nearly linear speedup for adding cores).


either "fork" or "socket". Forking is typically faster, but not compatible with Windows. If n.cores==1, parType is ignored.


logical; whether to plot results.


logical; print progress.


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.


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.

See Also

bassPCA and bassBasis for model fitting and predict.bassBasis for prediction.


# See examples in bass documentation.

[Package BASS version 1.3.1 Index]