-
-
Notifications
You must be signed in to change notification settings - Fork 102
Open
Description
Reproducible example:
library(mgcv)
library(performance)
df <- mtcars |>
tibble::as_tibble() |>
dplyr::mutate(carb = as.integer(carb))
model <- mgcv::gam(
carb~s(wt, k=5),
data = df,
family = mgcv::ocat(R=8)
)
plot(check_model(model))
Error:
Error in d[, !(names(data) %in% all.varying), drop = FALSE] :
incorrect number of dimensions
It seems that there is something wrong when using mgcv
and ocat
. Nevertheless, I can use MASS
and ordinal regression:
df <- mtcars |>
tibble::as_tibble() |>
dplyr::mutate(carb = as.factor(carb))
model <- MASS::polr(
carb~wt,
data = df,
Hess = TRUE
)
plot(check_model(model))
Metadata
Metadata
Assignees
Labels
No labels