Re: [R] Constraints when sampling from a distribution

2010-12-08 Thread Peter Ehlers
On 2010-12-08 17:07, Anup Nandialath wrote: Dear R-helpers, My question is related to how to impose constraints when when sampling from a distribution. For example, suppose I'm sampling a vector from a multivariate normal distribution vbeta<- 100*diag(2) mbeta<- c(1,1) ans<- beta<- c(rmvno

[R] Constraints when sampling from a distribution

2010-12-08 Thread Anup Nandialath
 Dear R-helpers, My question is related to how to impose constraints when when sampling from a distribution. For example, suppose I'm sampling a vector from a multivariate normal distribution vbeta <- 100*diag(2) mbeta <- c(1,1) ans <- beta <- c(rmvnorm(1,mbeta,vbeta)) ans will thus be a vect