View source: R/vars_matrices.R
vars_matrices | R Documentation |
It creates the STAR-VARS matrix needed to compute VARS-TO following \insertCiteRazavi2016a;textualsensobol.
vars_matrices(star.centers, params, h = 0.1, type = "QRN", ...)
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 |
type |
Approach to construct the STAR-VARS. Options are:
|
... |
Further arguments in |
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)
.
A matrix where each column is a model input and each row a sampling point.
# 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.