sobol_ci {sensobol}R Documentation

Bootstrap confidence intervals for Sobol' indices.

Description

It computes bootstrap confidence intervals for Sobol' indices.

Usage

sobol_ci(b, params, type, conf, second = FALSE, third = FALSE)

Arguments

b

The output of the sobol_indices function.

params

A vector with the name of the model inputs.

type

A vector of character strings representing the type of intervals required. The value should be any subset of the values c("norm", "basic", "perc", "bca"). For more information, check the function boot.ci.

conf

A scalar or vector containing the confidence level(s) of the required interval(s).

second

Logical. If second = TRUE, it computes the confidence intervals for second-order indices. Default is second = FALSE.

third

Logical. If third = TRUE, it computes the confidence intervals for third-order indices. Default is third = FALSE.

Value

A data table.

See Also

boot, boot.ci.

Examples

# Define settings:
n <- 1000; k <- 8; R <- 100
# Design the sample matrix:
A <- sobol_matrices(n = n, k = k, second = TRUE, third = TRUE)
# Compute the model output:
Y <- sobol_Fun(A)
# Compute the Sobol' indices:
sens <- sobol_indices(Y = Y, params = colnames(data.frame(A)),
R = R, n = n, parallel = "no", ncpus = 1,
second = TRUE, third = TRUE)
# Compute confidence intervals:
sobol_ci(sens, params = colnames(data.frame(A)), type = "norm", conf = 0.95)

[Package sensobol version 0.2.2 Index]