Open Fumeng-Yang opened 1 year ago
[add_][predicted|linpred]_draws
appears to return response variables.
add_predicted_draws(object = mvo,
# need some placeholders
newdata = tibble(likert1 = -1, likert2 = -1),
resp = c('likert1', 'likert2'),
draw_ids = 100:102
)
The output is
likert1 | likert2 | .row | .chain | .iteration | .draw | .category | .prediction |
---|---|---|---|---|---|---|---|
-1 | -1 | 1 | NA | NA | 1 | likert1 | 3 |
-1 | -1 | 1 | NA | NA | 2 | likert1 | 5 |
-1 | -1 | 1 | NA | NA | 3 | likert1 | 4 |
-1 | -1 | 1 | NA | NA | 1 | likert2 | 3 |
-1 | -1 | 1 | NA | NA | 2 | likert2 | 1 |
-1 | -1 | 1 | NA | NA | 3 | likert2 | 5 |
For a multivariate ordinal model,
brms
still uses.category
for ordinal responses; therefore, it seems that response variables are not included in[add]_epred_draws
(and[add]_epred_rvars
?)It would be nice to have the response variables somewhere, at least when
resp = ...
is specified.A minimal reproducible example
The output is
Verify the output of
brms:posterior_epred
The output is