[R] sampling from the multivariate truncated normal

statfan irene_vrbik at hotmail.com
Sun Jun 26 21:26:32 CEST 2011


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),  c(Inf,Inf), algorithm="gibbsR",
burn.in.samples=100)

Thanks

--
View this message in context: http://r.789695.n4.nabble.com/sampling-from-the-multivariate-truncated-normal-tp3626438p3626438.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list