Skip to content

Commit 850ed8c

Browse files
committed
fix
1 parent b1b4b07 commit 850ed8c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

R/check_predictions.R

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,11 @@ check_predictions.stanreg <- function(
226226
)
227227
}
228228

229+
# make x cateogorical for bernoulli/categorical/multinomial models
230+
if (minfo$is_bernoulli || minfo$is_categorical || minfo$is_multinomial) {
231+
out$x <- as.factor(out$x)
232+
}
233+
229234
attr(out, "is_stan") <- TRUE
230235
attr(out, "check_range") <- check_range
231236
attr(out, "response_name") <- resp_string

0 commit comments

Comments
 (0)