try_car_anova | R Documentation |
tryCatch
around car::Anova
Captures warnings when executing car::Anova.
try_car_anova(mod, test.statistic)
mod |
|
test.statistic |
for a generalized linear model, whether to calculate
|
A list with item aov
for the result of the model and error_text
for the captured warnings.
# `car::Anova` on cox regression model including strata and expected
# a likelihood ratio test triggers a warning as only Wald method is
# accepted.
library(survival)
mod <- coxph(
formula = Surv(time = futime, event = fustat) ~ factor(rx) + strata(ecog.ps),
data = ovarian
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.