Displaying 2 results from an estimated 2 matches for "mbeta".
Did you mean:
beta
2010 Dec 09
1
Constraints when sampling from a distribution
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 vector with two elements.
My question is how do I place a restriction on one of the elements of the ans vector. For example, suppose my goal is to reject any draw for ans[2] below -1 and above 1, how should I implemen...
2010 Jul 05
2
Function to compute the multinomial beta function?
Dear R-users,
Is there an R function to compute the multinomial beta function? That is, the normalizing constant that arises in a Dirichlet distribution. For example, with three parameters the beta function is Beta(n1,n2,n2) = Gamma(n1)*Gamma(n2)*Gamma(n3)/Gamma(n1+n2+n3)
Thanks in advance for any assisstance.
Regards,
Greg
[[alternative HTML version deleted]]