Nothing
# Classes that inherit an apa7 method that does not fit them give an error
# instead of a table with wrong labels. The errors depend only on the class,
# so objects with the class of a tobit model (AER) or a survey-weighted GLM
# (survey) stand in for real ones, without those packages.
test_that("conditional logistic regression models give an error", {
skip_if_not_installed("survival")
# clogit() calls coxph() without its namespace, so survival must be attached
withr::local_package("survival")
fit <- survival::clogit(
case ~ spontaneous + induced + survival::strata(stratum),
data = infert
)
expect_error(apa_parameters(fit), "Conditional logistic regression")
expect_error(apa_performance(fit), "not supported yet")
expect_error(apa_parameters(list(fit, fit)), "Conditional logistic regression")
expect_error(apa_performance_comparison(fit, fit), "Conditional logistic regression")
})
test_that("tobit models give an error", {
fit <- structure(list(), class = c("tobit", "survreg"))
expect_error(apa_parameters(fit), "Tobit models")
expect_error(apa_performance(fit), "not supported yet")
expect_error(apa_performance_comparison(fit, fit), "Tobit models")
})
test_that("survey-weighted GLMs give an error", {
fit <- structure(list(), class = c("svyglm", "glm", "lm"))
expect_error(apa_parameters(fit), "Survey-weighted")
expect_error(apa_performance(fit), "survey design")
})
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.