Bayesian dynamic ordered probit panel model

I analyse the central bank reaction to the capital flows. I’m trying to apply a Bayesian approach to estimate a dynamic ordered probit in panel data. But I do not know how to use stan for panel data.
I want to know if it’s possible and eventually request the code to fit it.

Hi, @Djakiss and welcome to the Stan forums.

Yes, Stan can handle probit regressions for panel data. I would suggest reading the chapter on regressions in the Stan User’s Guide. It covers logistic and probit regression as well as ordered logit. Here’s the ordered regression section.

In general, logit is going to be much more efficient than probit because the cdf of the standard logistic is much easier to evaluate than the cdf of the normal distribution.

1 Like

Hi @Bob_Caroenter,

Thank you for replying. I had indeed seen this section. But I had understood that it was a code for cross-sectional data. But after your reply, I tried to adapt it for panel data.
I need you to confirm that this is correct.
Thanks

data {
int<lower=2> K;
int<lower=0> N;
int<lower=1> D;
int<lower=1> T;
array[N, T] int<lower=1, upper=K> y;
array[N, T] matrix[D] x;
int<lower=1, upper=N> panel[N];
}
parameters {
matrix[D] beta;
ordered[K - 1] c;
}
model {
for (n in 1:N) {
for (t in 1:T) {
y[n, t] ~ ordered_logistic(x[n, t] * beta, c);
}
}
}