| calibrate_vm | R Documentation |
Performs the calibration step of the Vale-Maurelli algorithm: for each
variable the Fleishman polynomial a + bZ + cZ^2 + dZ^3 (with
a = -c) matching the target skewness and excess kurtosis is found,
and for each pair of variables the intermediate normal correlation that
yields the target correlation after transformation is solved from the
Vale-Maurelli cubic. Calibration is decoupled from simulation so the same
calibration object can be reused to draw many samples without recomputation.
calibrate_vm(sigma.target, skewness, excesskurtosis)
sigma.target |
Target population covariance matrix. |
skewness |
Target skewness vector. |
excesskurtosis |
Target excess kurtosis vector. |
When the Fleishman equations have several solutions, a monotone increasing
polynomial is preferred. For many common skewness/kurtosis combinations
(e.g. skewness 1 and excess kurtosis 1.5) only polynomials that turn down
in the far tails exist; these are used, and flagged in monotone.
An object of class c("covsim_calib_vm", "covsim_calib") that can
be passed to simulate to draw samples. The element
coef holds the Fleishman coefficients (one row per variable),
monotone whether each polynomial is monotone increasing, and
z.corr the intermediate correlation matrix.
Fleishman, A. I. (1978). A method for simulating non-normal distributions. Psychometrika, 43(4), 521-532.
Vale, C. D. and Maurelli, V. A. (1983). Simulating multivariate nonnormal distributions. Psychometrika, 48(3), 465-471.
rVM, simulate
sigma.target <- matrix(c(1, 0.5, 0.5, 1), 2)
cal <- calibrate_vm(sigma.target, skewness = c(1, 2), excesskurtosis = c(2, 7))
samples <- stats::simulate(cal, nsim = 5, N = 1000)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.