Re: [R] Generate variable with Bivariate Normal Distribution

2010-10-20 Thread Gregor
You could e.g. use the package "mvtnorm" (not horribly fast, but handy): (assuming that rho is the correlation) library("mvtnorm") m <- c(mean1, mean2) #mean vector cov <- rho*sqrt(variance1*variance2) sig <- matrix(c(variance1, cov, cov, variance2), nrow=2) #covariance matrix rmvnorm(100, mean=m

[R] Generate variable with Bivariate Normal Distribution

2010-10-19 Thread สถาบันวิจัยและพัฒนา มหาวิทยาลัยราชภัฏอุบลร าชธานี
Dear All I want to generate variable with Bivariate Normal Distribution by use mean1 = a, variance1 = b, mean2 = c, variance2 = d, rho = e. How I can do this. Many Thanks. IRD [[alternative HTML version deleted]] ___