You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Apologies for all the issues I've raised recently. My coauthor and I have found a lot of value in mboost so we have been using it a lot lately.
From the docs:
For a categorical covariate with non-observed categories bols(x) and brandom(x) both assign a zero effect to these categories. However, the non-observed categories must be listed in levels(x). Thus, predictions are possible for new observations if they correspond to this category.
This behavior is ideal, however I don't believe it is working, but it is possible I am using levels(x) incorrectly.
library(mboost)
myData <- data.frame(
ZIP = factor(c("90046","91423", "90064"),
# include non-observed categoreies in levels
levels = c("90046","91423", "90064","95432")),
uninsured = factor(c(0,1,1))
)
model <- mboost(
uninsured ~ brandom(ZIP, df = 2), data = myData,
family = Binomial(), control =
boost_control(mstop = 1000, nu = 0.01, trace=TRUE)
)
# warning about dropping unobserved levels
newData <- data.frame(
ZIP = factor(c("90046","95432"),
# use same levels in new data
levels = c("90046","91423", "90064","95432"))
)
predict(model, newData)
# errors
Thank you for your help and the wonderful package.
Regards
The text was updated successfully, but these errors were encountered:
Hm, the point is that we just fixed a related bug by disallowing empty categories (see #47). The easy solution would be to simply remove the comment from the docs. However, on the other hand, it would be quite handy to have it back up and working. This might perhaps also solve #49.
The problem: I cannot remember how this worked or was supposed to work in the first place.
Hello,
Apologies for all the issues I've raised recently. My coauthor and I have found a lot of value in
mboost
so we have been using it a lot lately.From the docs:
This behavior is ideal, however I don't believe it is working, but it is possible I am using
levels(x)
incorrectly.Thank you for your help and the wonderful package.
Regards
The text was updated successfully, but these errors were encountered: