Learn R Programming

gsaot (version 1.1.0)

confint.gsaot_indices: Compute confidence intervals for sensitivity indices

Description

Computes confidence intervals for a gsaot_indices object using bootstrap results.

Usage

# S3 method for gsaot_indices
confint(object, parm = NULL, level = 0.95, type = "norm", ...)

Value

A data frame with the following columns:

  • input: Name of the input variable.

  • component: The index component for Wasserstein-Bures.

  • index: Estimated indices

  • original: Original estimates.

  • bias: Bootstrap bias estimate.

  • low.ci: Lower bound of the confidence interval.

  • high.ci: Upper bound of the confidence interval.

Arguments

object

An object of class gsaot_indices, with bootstrap results included.

parm

A specification of which parameters are to be given confidence intervals, either a vector of numbers or a vector of names. If missing, all parameters are considered.

level

(default is 0.95) Confidence level for the interval.

type

(default is "norm") Method to compute the confidence interval. For more information, check the type option of boot::boot.ci().

...

Additional arguments (currently unused).

Examples

Run this code
N <- 1000

mx <- c(1, 1, 1)
Sigmax <- matrix(data = c(1, 0.5, 0.5, 0.5, 1, 0.5, 0.5, 0.5, 1), nrow = 3)

x1 <- rnorm(N)
x2 <- rnorm(N)
x3 <- rnorm(N)

x <- cbind(x1, x2, x3)
x <- mx + x %*% chol(Sigmax)

A <- matrix(data = c(4, -2, 1, 2, 5, -1), nrow = 2, byrow = TRUE)
y <- t(A %*% t(x))

x <- data.frame(x)
y <- y

res <- ot_indices_wb(x, y, 10, boot = TRUE, R = 100)
confint(res, parm = c(1,3), level = 0.9)

Run the code above in your browser using DataLab