| calibrate_ig | R Documentation |
Performs the calibration step of the IG algorithm: computes the transformation
matrix A and fits a Pearson distribution to each independent generator
such that samples drawn from the calibrated model match the target covariance,
skewness, and excess kurtosis. Calibration is decoupled from simulation so the
same calibration object can be reused to draw many samples without recomputation.
calibrate_ig(sigma.target, skewness, excesskurtosis, typeA = "triang")
sigma.target |
Target population covariance matrix. |
skewness |
Target skewness vector. |
excesskurtosis |
Target excess kurtosis vector. |
typeA |
Either |
An object of class c("covsim_calib_ig", "covsim_calib") that can
be passed to simulate to draw samples.
Njål Foldnes (njal.foldnes@gmail.com)
Foldnes, N. and Olson, U. H. (2016). A simple simulation technique for nonnormal data with prespecified skewness, kurtosis, and covariance matrix. Multivariate behavioral research, 51(2-3), 207-219
rIG, simulate
sigma.target <- diag(3)
cal <- calibrate_ig(sigma.target, skewness = rep(1, 3), excesskurtosis = rep(3, 3))
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.