POLR with Random Effects

If I try using stan_polr with random effects:

bayes <- stan_polr(
    value ~ 1 | q,
    prior = R2(.5, what="mean"),

I get an error:

Error in dimnames(x) <- dn : 
  length of 'dimnames' [2] not equal to array extent
In addition: Warning message:
In Ops.factor(1, q) : ‘|’ not meaningful for factors

I’m not sure what the warning means; to me, it seems that the idea of a is perfectly well-defined. To be fair, I’m not all that used to rstanarm’s syntax, so I might be misunderstanding it.

I’m trying to do an IRT-like model where outcomes are ordinal and each question has a different difficulty, and I’d like to partially pool the difficulties together to get better estimates.