Bernoulli or binomial distribution

Hi, I’m trying to modify my model because I have a lot of divergent transitions, and I’m not sure now whether to use Bernoulli or binomial distribution. The code is as follows, the “res” is the binary response matrix, “response” is the matrix of the probability of selecting one of the two response options. Which distribution is correct? Thanks!

to_array_1d(res) ~ bernoulli(to_array_1d(response));

Hey there!

Bernoulli is a special case of Binomial with number of trials equal to 1. That means if your response is binary (like you said) then you should use the Bernoulli distribution.

Cheers!
Max

1 Like

thank you for your reply!

1 Like