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
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]]
___
2 matches
Mail list logo