View source: R/SimulateMvGammaData.R
| generate_mvGamma_data | R Documentation |
This function generates multivariate normal samples, transforms
them into Z-scores, and then calls the qgamma() function to transform the
values for each correlated variable to those from a Gamma distribution.
generate_mvGamma_data(sampSize, sampCorr_mat, shape_num, rate_num)
sampSize |
Number of samples to generate. |
sampCorr_mat |
A correlation matrix for the normal distribution. |
shape_num |
A numeric vector of shape parameters for the Gamma transformation. |
rate_num |
A numeric vector of rate parameters for the Gamma transformation. Second column: https://en.wikipedia.org/wiki/Gamma_distribution |
A data frame containing the transformed Gamma samples.
p <- 4
N <- 1000
shapeGamma_num <- c(0.5, 0.75, 1, 1.25)
rateGamma_num <- 1:4
cov_mat <- diag(p)
generate_mvGamma_data(N, cov_mat, shapeGamma_num, rateGamma_num)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.