Description Usage Arguments Details Value Author(s)
View source: R/perturbations.R
Given a background mean and standard deviation for a number of variables, the function returns random samples from the background conditional distribution, with a given inflation factor and possibly subject to fixed-value and cross-variable constraints. See details below.
1 | orthoEnsemble(p, MC, m, MCcons = NULL, sdfac = 1)
|
p |
LIST with named input variables as components. Each component is then a vector of length two, containing its background mean and standard deviation |
MC |
Dataframe with metadata, where the |
m |
number of members in the ensemble, m has to be an exact multiplier of ntheta |
MCcons |
CHARACTER, 3-column matrix of cross-variable constraints. For each row, the first and third
columns are variable names matching those in |
sdfac |
REAL, scalar or [ntheta] vector. Multiplicative factor of the standard deviation for the perturbations |
Makes a conditional-sampling parameter Ensemble given the parameters in p and MC. This ensemble includes the control run [or background] as the component $b. Then one list member for each perturbed parameter. MCcons gives a number of equality and inequality constrains with one row per constraint. As it might happen that a background value violates a constrain, these are first evaluated on the background, then on the generated ensemble
A LIST with the components
b |
[ntheta] background vector |
thetaNam |
[ntheta] name of the output variables |
dtheta |
[ntheta,mperpar] matrix of perturbations, where mperpar is the number of perturbations per thetaNam variable |
Then for each thetaNam, there is an additional component in the LIST with a vector or matrix (if more than one sample is requested for each thetaNam variable) where only thetaNam is perturbed
Javier Garcia-Pintado
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.