[R] generate multivariate F with specified correlation matrix

Jiao Yang yj316 at gwu.edu
Fri Nov 16 22:53:15 CET 2007


Dear all,

In MATLAB, to generate multivariate F with specified correlation matrix Pn I can use the code such as

Z = mvnrnd([0 0 0 0 0], Pn, N);
U = normcdf(Z,0,1);
X = [finv(U(:,1),5,15) finv(U(:,2),5,15) finv(U(:,3),5,15) finv(U(:,4),5,15) finv(U(:,5),5,15)];

Is there something similar in R?

Thank you for your time.



More information about the R-help mailing list