We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A short reprex:
a <- factor(c(rep("a", 5), rep("b", 5)), levels = c("a", "b")) b <- factor(c(rep(NA_character_, 10)), levels = c("a", "b")) c <- factor(c(sample(x = c("x", "y", "z"), size = 10, replace = TRUE)), levels = c("x", "y", "z")) df <- tibble(a, b, c) mod1 <- glm(formula = a ~ c, data = df, family = "binomial") # works fine mod2 <- glm(formula = a ~ b, data = df, family = "binomial") # error
Now, try to get this results with modelsum():
modelsum()
tab.mod <- arsenal::modelsum( formula = a ~ b + c, data = df, family = "binomial", adjust = ~ 1, control = modelsum.control( show.intercept = FALSE, binomial.stats = c("OR", "CI.lower.OR", "CI.upper.OR", "p.value", "Nmiss") ) )
Of course it fails, because a ~ b. Is it possible to catch such errors and anyway show the results with default values for example "NA" or similar ?
a ~ b
The text was updated successfully, but these errors were encountered:
No branches or pull requests
A short reprex:
Now, try to get this results with
modelsum()
:Of course it fails, because
a ~ b
.Is it possible to catch such errors and anyway show the results with default values for example "NA" or similar ?
The text was updated successfully, but these errors were encountered: