Re: [R] sampling from the multivariate truncated normal

2011-07-05 Thread statfan
Well, for 0.828324 x[2] Inf the probablility is roughly 0 hence not easy to draw random numbers out there Uwe Ligges How is this probability roughly 0? -- View this message in context:

Re: [R] sampling from the multivariate truncated normal

2011-06-27 Thread Uwe Ligges
On 26.06.2011 21:26, statfan wrote: I am trying generate a sample for a truncated multivariate normal distribution via the rtmvnorm function in the {tmvtnorm} package. Why does the following produce NaNs? rtmvnorm(1, mean = rep(0, 2), matrix(c(0.06906084, -0.07463565, -0.07463565,

[R] sampling from the multivariate truncated normal

2011-06-26 Thread statfan
I am trying generate a sample for a truncated multivariate normal distribution via the rtmvnorm function in the {tmvtnorm} package. Why does the following produce NaNs? rtmvnorm(1, mean = rep(0, 2), matrix(c(0.06906084, -0.07463565, -0.07463565, 0.08078086),2),c(-0.4316738, 0.8283240),