- Operating System:
`OS X Catalina`

- brms Version: latest
`GitHub`

version

**Question 1:**

When I run this data.csv (18.1 KB), and convert `f4f_rls`

df$f4f_rls_oc <- factor(df$f4f_rls, levels=c(“1”, “2”), ordered=TRUE)

running this model doesn’t work:

`brm(outcome ~ mo(f4f_rls_oc), family = bernoulli, data = df)`

Compiling the C++ model

Start sampling

Error in new_CppObject_xp(fields$.module, fields$.pointer, …) :

Exception: model11ee364d8d835_49a9c3ccd6faf61c3570f864000a672c_namespace::model11ee364d8d835_49a9c3ccd6faf61c3570f864000a672c: Jmo[i_0__] is 1, but must be greater than or equal to 2 (in ‘model11ee364d8d835_49a9c3ccd6faf61c3570f864000a672c’ at line 26)

failed to create the sampler; sampling not done

The predictor `f4f_rls_oc`

should be an ordered categorical variable `"1" < "2"`

. I’m a bit baffled so the question is where I’ve made a mistake?

**Question 2**

**a)** If I have ordered categorical predictors from 1-5 and 4 has not been used should I still use ordered categorical in five levels, i.e., `factor(x, "1", "2", "3", "4", "5", ordered=TRUE)`

? My question is due to the `rls`

variable above which is really 1-8, but the data has recorded only levels 1 and 2.

**b)** If yes, does the same apply when 5 has not been used above in **a)**, i.e., should I still use `factor(x, "1", "2", "3", "4", "5", ordered=TRUE)`

?

I’ve read *Modeling monotonic effects of ordinal predictors in Bayesian regression models*, and I can’t really see that i) it has to be >2 levels and, ii) how to deal with the cases of no responses on certain levels (i.e., it’s not missing data).

Sorry, I’m a bit new to this whole `mo()`

stuff :)