--
You received this message because you are subscribed to the Google Groups "stan users mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to stan-users+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Linas
--
You received this message because you are subscribed to the Google Groups "stan users mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to stan-users+unsubscribe@googlegroups.com.
Choose(n + a - 1, a)Choose(n + a - 1, a - 1)lgamma(a + n) - lgmma(a + 1) - lgamma(n)
lgamma(a + n) - lgmma(n + 1) - lgamma(a)
Thank you, Linas 765-494-0344On 3/7/2014 2:07 PM, Avraham Adler wrote:
On further review, it may well be that this could be due to R and Stan using different parameterizations. If Stan is actually following Gelman et al (2014 p. 44), then it is self consistent, but has defined successes and failures opposite that of R (check ?rbinom). Stan is using the same formulation as found in Wikipedia, in that alpha is the number of set failures for which we are finding the probability of y successes. R, on the other hand, has x as the random successes before a fixed number of n failures. In other words, "p" and (1-p) are reversed so that the exponent to the 1 / 1+ b and b / 1 + b have to be switched between the two.
Linus, using your Stan parametrization, did you generate variates in R using size and mu?
On Friday, March 7, 2014 1:33:17 PM UTC-5, Avraham Adler wrote:
--
You received this message because you are subscribed to a topic in the Google Groups "stan users mailing list" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/stan-users/8ILE6JLcENU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to stan-users+...@googlegroups.com.
Thank you, Linas 765-494-0344
Linas