We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b1b4b07 commit 850ed8cCopy full SHA for 850ed8c
R/check_predictions.R
@@ -226,6 +226,11 @@ check_predictions.stanreg <- function(
226
)
227
}
228
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
+
234
attr(out, "is_stan") <- TRUE
235
attr(out, "check_range") <- check_range
236
attr(out, "response_name") <- resp_string
0 commit comments