Hi
Is it possible to allow non-integers ‘n’ and ‘N’ in binomial_logit_lpmf
(ints n | ints N, reals alpha)
?
Thanks.
Hi
Is it possible to allow non-integers ‘n’ and ‘N’ in binomial_logit_lpmf
(ints n | ints N, reals alpha)
?
Thanks.
Nope. You’d have write your own binom_lpdf
like so
real binom_lpdf(real n, real N, real p){
real ldens = lchoose(N, n) + n*log(p) + (N-n)*log1m(p);
return(ldens);
}
Got it! Thanks. A follow-up question: May I drop the constant, lchoose(N,n)?
Depends on what you want to do. But it’s usually fine to drop the normalising constant, yes.