| rPLSIM | R Documentation |
Backward-compatible wrapper that combines calibrate_plsim and
simulate in one call. New code should prefer the
calibrate/simulate split so the (expensive) pairwise calibration can be reused.
rPLSIM(
N,
sigma.target,
skewness,
excesskurtosis,
reps = 1,
numsegments = 4,
gammalist = NULL,
monot = FALSE,
verbose = TRUE
)
N |
Number of observations to simulate. |
sigma.target |
Target population covariance matrix. |
skewness |
Target skewness vector. |
excesskurtosis |
Target excess kurtosis vector. |
reps |
Number of simulated samples. |
numsegments |
The number of line segments in each marginal. |
gammalist |
A list of breakpoints in each margin. |
monot |
If |
verbose |
If |
A list with two elements. First element: the list of simulated samples. Second element: the fitted piecewise linear functions and the intermediate correlations matrix.
Njål Foldnes (njal.foldnes@gmail.com)
Foldnes, N. and Grønneberg S. (2021). Non-normal data simulation using piecewise linear transforms.Under review.
set.seed(1)
sigma.target <- cov(MASS::mvrnorm(5, rep(0,3), diag(3)))
res <- covsim::rPLSIM(10^5, sigma.target, skewness=rep(1,3), excesskurtosis=rep(4,3))
my.sample <- res[[1]][[1]]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.