Hello, community!
I’m working on a categorical_logit regression model where each column of a matrix \beta represents the set of parameters associated with the j-category/answer, and each line represents the parameters associated with the k-covariate among all categories.
Due to a specific reason, I must apply priors in each row instead of each column.
From the Multi-logit regression page, I understood that the normal priors are being associated with each column of beta, i.e., each category/answer set of parameter:
model {
matrix[N, K] x_beta = x * beta;
to_vector(beta) ~ normal(0, 5);
for (n in 1:N) {
y[n] ~ categorical_logit(x_beta[n]');
}
}
I’m wondering if I do something like below I’ll obtain what I want (priors on rows):
model {
matrix[N, K] x_beta = x * beta;
to_row_vector(beta) ~ normal(0, 5);
for (n in 1:N) {
y[n] ~ categorical_logit(x_beta[n]');
}
}
I read the mixed-operations page, but I’m not sure if I got it right :/
Can anyone help with that, please?
Thanks in advance!