vars_matrices: STAR-VARS sampling strategy

View source: R/vars_matrices.R

vars_matricesR Documentation

STAR-VARS sampling strategy

Description

It creates the STAR-VARS matrix needed to compute VARS-TO following \insertCiteRazavi2016a;textualsensobol.

Usage

vars_matrices(star.centers, params, h = 0.1, type = "QRN", ...)

Arguments

star.centers

Positive integer, number of star centers.

params

Character vector with the name of the model inputs.

h

Distance between pairs. The user should select between 0.001, 0.002, 0.005, 0.01, 0.02, 0.05, 0.1, 0.2. Default is h = 0.1.

type

Approach to construct the STAR-VARS. Options are:

  • type = "QRN": It uses \insertCiteSobol1967;textualsensobol Quasi-Random Numbers through a call to the function sobol of the randtoolbox package.

  • type = "R": It uses random numbers.

...

Further arguments in sobol.

Details

The user randomly selects N_{star} points across the factor space using either Sobol' Quasi Random Numbers (type = "QRN") or random numbers (type = "R"). These are the star centres and their location can be denoted as \mathbf{s}_v = s_{v_1},...,s_{v_i}, ..., s_{v_k}, where v=1,2,...,N_{star}. Then, for each star centre, the function generates a cross section of equally spaced points \Delta h apart for each of the k model inputs, including and passing through the star centre. The cross section is produced by fixing \mathbf{s}_{v_{\sim i}} and varying s_i. Finally, for each factor all pairs of points with h values of \Delta h, 2\Delta h, 3\Delta h and so on are extracted. The total computational cost of this design is N_t=N_{star} (k (\frac{1}{\Delta h} - 1) + 1).

Value

A matrix where each column is a model input and each row a sampling point.

References

\insertAllCited

Examples

# Define settings
star.centers <- 10; params <- paste("X", 1:5, sep = ""); h <- 0.1

# Create STAR-VARS
mat <- vars_matrices(star.centers = star.centers, params = params, h = h)

sensobol documentation built on May 29, 2024, 10:05 a.m.