How to simulate multivariate dataset on random basis


i used sample function to create random variables but the correlation between variables is nearly 0, which is not true.


A multivariate data set should have some complex dependency between variables, so making a data set which is totally random and is without any prior dependency functions could give you wrong results. Rather you could set some dependencies to start with and add some random noise to it.