Let's move right onto the reproducible example using R:


dat <- data.frame(V1=c(1.36,0.65,0.66,1.27,0.57,0.58,0.85,0.67,1.56,1.28,0.59,0.64,0.8,0.8,0.74,1.01,0.68,0.6,0.5,1.56,0.76,0.96,1.16,0.73,0.61,0.67,0.82,0.69,0.5,0.47,0.68,1.34,0.97,0.5,1.64,1.12),

n <- 1000

L_cor_mat <- cor(dat) %>% chol
apply(dat, 2, function(x){
  sinh(kurtosis(x)*(asinh(rnorm(n, mean(x),sd(x)))+skewness(x)))
}) -> sim_var
(t(L_cor_mat) %*% t(sim_var)) %>% t -> sim_var

mean(dat$V1); mean(sim_var[,1])
sd(dat$V1); sd(sim_var[,1])
kurtosis(dat$V1); kurtosis(sim_var[,1])
skewness(dat$V1); skewness(sim_var[,1])

mean(dat$V2); mean(sim_var[,2])
sd(dat$V2); sd(sim_var[,2])
kurtosis(dat$V2); kurtosis(sim_var[,2])
skewness(dat$V2); skewness(sim_var[,2])

mean(dat$V3); mean(sim_var[,3])
sd(dat$V3); sd(sim_var[,3])
kurtosis(dat$V3); kurtosis(sim_var[,3])
skewness(dat$V3); skewness(sim_var[,3])

cor(dat); cor(sim_var)

Simply speaking, I want to reproduce V1, V2 and V3 in dat with larger sample sizes. I don't really know what parameters / distributions should I assume, but since there variables are highly correlated and skewed, I think I might have to consider altogether:

  1. Mean
  2. SD
  3. Correlation matrix
  4. Kurtosis
  5. Skewness

Previously I was able to reproduce correlated normal variables (#1-3) with the instructions here: Generate Correlated Normal Random Variables

This time, I am referring to here for simulation with skewness and kurtosis: Transformation to increase kurtosis and skewness of normal r.v

But no more luck this time when I added in kurtosis and skewness (#4-5)... as you can see from the outputs of the above code, the outcomes do not match with the observed parameter values.

I am not really familiar with all those mathematics. Hopefully someone can guide me with the simulation. Thanks!

  • 1
    $\begingroup$ "Simply speaking, I want to reproduce V1, V2 and V3 in dat with larger sample sizes." Why do you want this? What is your actual goal? Maybe you could simply bootstrap? $\endgroup$ – Roland Feb 14 '18 at 7:05
  • $\begingroup$ @Roland Thanks for your response. I agree that bootstrapping can be a compromise in my case. Should have thought of that. However, I also feel a bit "uncomfortable" about the gap between samples during bootstrapping. Even though the true distribution is unknown, the variables should be well approximated by the criteria above (#1-5). So, if possible, it seems preferable to simulate a distribution over doing bootstrapping. This is not a must here, though (just trying to learn more, like when I learnt to simulate correlated multivariates). $\endgroup$ – Matthew Hui Feb 14 '18 at 7:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.