Added a new groups argument to sobol_matrices() and sobol_indices() that
allows the user to compute Sobol' first-, total- and higher-order indices for
groups of parameters rather than for individual parameters. This is the
standard device used in Sobol'-based sensitivity analysis to handle correlated
inputs by moving them together. groups accepts either a named list of
character vectors of parameter names (e.g.
groups = list(g1 = "X1", g2 = c("X2", "X3"))) or a character vector of
length length(params) aligned with params. The grouping must be a strict
partition of params (each parameter appears in exactly one group). When
groups = NULL (the default), behaviour is unchanged. The order argument is
reinterpreted as interactions between groups when groups is supplied.
Added test coverage for the new grouped design in both sobol_matrices() and
sobol_indices(), including row-count, column-swap, list/vector equivalence,
trivial-partition regression, and validation error paths.
Fixed repeated set.seed() calls in metafunction(): the seed is now set once
at the beginning of the function, allowing the RNG to advance naturally across
all subsequent sample() and rnorm() calls.
Added #' @keywords internal / #' @noRd roxygen2 blocks to all undocumented
internal helpers: sobol_dummy_boot(), sobol_boot(), bootstats(),
sobol_sample(), plot_sobol_convergence(), add_ribbon(), theme_AP(),
CutBySize(), s_ersatz(), and ishigami().
Updated the package-level documentation in sensobol-package.R to correctly
state support for up to fourth-order (not third-order) Sobol' indices.
Expanded the @return documentation of sobol_convergence() to enumerate all
list elements returned, including their types and column names.
Fixed multi-line string in stop() call in sobol_convergence() by replacing
the embedded newline with paste().
Extended test coverage to include: second and third-order indices, sobol_convergence()
workflow and error paths, vars_matrices() / vars_to(), discrepancy_ersatz(),
metafunction() reproducibility, and plot.sensobol().
Fixed boolean logic errors in sobol_boot(): replaced !x == "value" chains
with %in% to correctly validate estimator names for all matrix configurations.
Added early anyNA() guard in sobol_indices() and sobol_dummy() to stop
with an informative error when Y contains NA or NaN values.
Added input validation in sobol_matrices() (N must be a positive integer),
sobol_convergence() (sub.sample must be non-empty, positive, and sorted),
and vars_matrices() (star.centers must be a positive integer).
Replaced auto-installing behaviour in load_packages(): the function no longer
calls install.packages() silently; it now stops with an informative message
directing the user to install the missing package themselves.
Replaced deprecated expect_is() with expect_true(is.matrix()) in the test
suite.
Expanded test coverage to include the core sobol_indices() workflow,
bootstrap output, all new validation error paths, sobol_dummy(), and the
benchmark test functions ishigami_Fun() and sobol_Fun().
Fixed a bug on sobol_matrices that caused the function to fail when a single parameter was passed into the "params" argument.
Added a line in the help page of the sobol_indices and sobol_dummy functions informing that the Y argument does not accept NA or NaN values in the model output.
Arnald Puy, Samuele Lo Piano, Andrea Saltelli, and Simon A. Levin. sensobol: an R package to compute variance-based sensitivity indices. Journal of Statistical Software 102.5 (2022), pp. 1-37. doi: 10.18637/jss.v102.i05
Added a help page for the package.
Corrected a bug in sobol_ode.
The function plot_sensobolhas been eliminated. Now the Sobol' indices can be plot by a single call to plot.
Third-order indices are now referred to as Sijl rather than Sijk.
The function sobol_convergencehas been added to check the convergence of
Sobol' indices across sub-samples of the model output.
The output of sobol_indices is now an object of class sensobol. Besides including the indices, it also informs on the sum of first-order effects, the estimators used in the computation and the total number of model runs.
The output of vars_to is now an object of class vars. Besides including the indices, it also informs on the number of stars and the h value used.
The function plot_sobol is deprecated and will be removed from future versions. Now the output of sobol_indicescan be printed with a call to plot.
This is a major package upgrade.
The package now includes four first-order (Sobol', Salteli, Jansen and Azzini) and eight total-order (Jansen, Sobol', Homma, Saltelli, Janon, Glen, Azzini and VARS-TO) sensitivity estimators.
The sample matrix can be constructed either with Sobol' quasi-random numbers, a latin hypercube design or random numbers.
Several functions to plot the results of the uncertainty and sensitivity analysis have been incorporated: the function plot_scatter plots the model inputs against the output, whereas the function plot_multiscatter plots x_i against x_j and maps the resulting coordinate to its respective model output value.
The package can now be used in models with either a scalar or a multivariate output.
This release prepares the users for a major upcoming improvement of the package.
Added warnings to the function sobol_matrices. The arguments n and k will
be substituted by N and params in the next release of the package. The
arguments second and third will be substituted by the argument order in the next
release of the package.
Added warnings to the functions plot_uncertainty, plot_scatter, sobol_dummy and sobol_indices. The argument n will be substituted by N in the next release of the package.
The function sobol_ci is deprecated. The computation of confidence intervals
will be done directly by sobol_indices in the next version of the package.
The function sobol_ci_dummy is deprecated. The computation of confidence intervals
for dummy parameters will be done directly by sobol_dummy in the next version of the package.
The function sobol_replicas is deprecated and will be removed in the next version
of the package.
The test function ishigami_Mapply would be renamed as ishigami_Fun in the next
release of the package.
Corrected a bug in the plot_uncertainty function. Now the function
demands to add the initial sample size n to visualize the model output uncertainty.
Corrected some functions to adapt them to data.table 1.12.4.
Added a new function (sobol_replicas) to easily extract the bootstrapped Sobol' indices.
New option in the sobol_matrices function: the option cluster allows to create Sobol' matrices for clusters of parameters.
New test functions added:
Added references to all test functions.
The vignette rendered wrongly in the previous version; now the issue is corrected.
Corrected the following note, found in the CRAN check:
Some functions that were exported to the R package manual are now internal.