Description Usage Arguments Details Value
View source: R/perturbations.R
Given a background mean and standard deviation for a number of variables, the function returns a random ensemble possibly subject to fixed-value and cross-variable constraints. See details below.
1 | mcEnsemble(p, MC, m, MCcons = NULL, Sigma = NULL, empiricalNorm = TRUE)
|
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 |
. The number of
output variables in the ensemble is ntheta==sum(CF$MC$flag)
MC
has the additional 'max' and 'min' columns
indicating fix-valued contraints on output samples.
MC[,'dis']
indicates the random distribution type. Available values are 'rnorm',
'truncnorm' and 'rlnorm'.
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 |
Sigma |
REAL, OPT, [ntheta,ntheta], full covariance matrix. If Sigma is provided, only those element in Sigma with normal distribution will be considered for covariances |
empiricalNorm |
whether to use empircal norm for those variables with an 'rnorm' distribution |
Makes a random sample subject to the abovementioned fixed-value constraints and cross-variable constraints.
An [ntheta,m] matrix
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.