sobol_replicas {sensobol}R Documentation

Extract bootstrap replicas

Description

It creates a data.table with all the bootstrap replicas.

Usage

sobol_replicas(dt, k, second = FALSE, third = FALSE)

Arguments

dt

The output of the sobol_indices function.

k

The number of parameters.

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.

Examples

# Define settings:
n <- 100; 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)
# Extract the bootstrap replicas up to third-order
replicas <- sobol_replicas(dt = sens, k = k, second = TRUE, third = TRUE)

[Package sensobol version 0.2.2 Index]