[R] generate bi-variate normal data

From: Shin, David <david.shin_at_pearson.com>
Date: Sat 01 Jul 2006 - 15:15:21 EST


Dear all,

I would like to generate bi-variate normal data given that the first column of the data is known. for example:
I first generate a set of data using the command, x <- rmvnorm(10, c(0, 0), matrix(c(1, 0, 0, 1), 2))

then I would like to sum up the two columns of x: x.sum <- apply(x, 1, sum)

now with x.sum I would like to generate another column of data, say y, that makes cbind(x.sum, y) follow a bi-variate normal distribution with mean = c(0, 0) and sigma = matrix(c(1, 0, 0, 1),2)

I will appreciate for all insights.

David s.



This email may contain confidential material.\ If you were n...{{dropped}}

R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Sat Jul 01 15:21:21 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Sat 01 Jul 2006 - 16:14:55 EST.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.