rPLSIM | R Documentation |
Using the piecewise linear PLSIM method to simulate non-normal data
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 |
excesskurtosis |
Target excess kurtosis |
reps |
Number of simulated samples |
numsegments |
The number of line segments in each marginal |
gammalist |
A list of breakpoints in each margin |
monot |
True if piecewise linear functions are forced to be monotonous. The copula will then be normal. |
verbose |
If true, progress details of the procedure are printed |
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.