We ran a one-million data point hierarchical IRT model with
around 40K (or maybe slightly more) parameters. It took about four
hours to fit. But that was a standard IRT model where we'd
identified what was correct. Ideal-point modeling is more
problematic because you don't know which way the issues go,
so the sign of rho can change. Andrew and Jennifer discuss some
tricks for identification in their regression book.
Some comments on the code:
> for (n in 1:N) {
> y[n] ~ bernoulli(Phi_approx(alpha_beta[r[n], 1] + alpha_beta[r[n], 2] * rho[t[n], j[n]]));
Logistic regression is a lot faster. So I'd suggest
y[n] ~ bernoulli_logit(alpha_beta[r[n], 1] + alpha_beta[r[n], 2] * rho[t[n], j[n]])
It's too bad we don't have more general lambda abstraction to vectorize the
algebra on the inside.
That puts the priors on a slightly different scale
> rho[t[n]] ~ normal(theta[t[n], p[n]], .3);
You do realize our normal priors use scale, not precision parameters
(i.e., like R, unlike BUGS/JAGS)?
Also, this doesn't make sense, as it's going to include priors
for rho[t] multiple times. And they somehow depend on n. I don't
know what you're trying to do, but I don't think this can be right.
Finally, you can vectorize this:
> for (i in 2:T)
> theta[i] ~ normal(theta[i - 1], .2);
> }
but you'll have to tear apart the terms to build up
the y and the mu terms. It'll be much more efficient
that way, but uglier to code.
> alpha_beta ~ multi_normal(b0, B0);
Multi-normal is relatively slow. It's a little more efficient with
multi_normal_cholesky, but still you'll find it much more
efficient with independent priors.
- Bob
> --
> 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.
> To post to this group, send email to
stan-...@googlegroups.com.
> For more options, visit
https://groups.google.com/d/optout.