diff --git a/CRAN-SUBMISSION b/CRAN-SUBMISSION index e9ec29b9d..bbf1bf0ce 100644 --- a/CRAN-SUBMISSION +++ b/CRAN-SUBMISSION @@ -1,3 +1,3 @@ -Version: 0.20.2 -Date: 2023-01-27 10:46:55 UTC -SHA: 4e29a4f13a90a32b5af3797d6c125abecc600964 +Version: 0.20.3 +Date: 2023-04-05 06:07:12 UTC +SHA: ac64894ca63668acf04804f79a9f02490ade31ca diff --git a/DESCRIPTION b/DESCRIPTION index 0fd4bf659..8fc0c56b5 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Type: Package Package: parameters Title: Processing of Model Parameters -Version: 0.20.2.19 +Version: 0.20.3 Authors@R: c(person(given = "Daniel", family = "Lüdecke", @@ -108,6 +108,7 @@ Suggests: ClassDiscovery, clubSandwich, cluster, + coda, cplm, dbscan, domir (>= 0.2.0), diff --git a/cran-comments.md b/cran-comments.md index 44cd28dab..8dd2bdc8c 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -1 +1,6 @@ -Maintainance release. Also fixes rev-dep issues with forthcoming update of the *insight* package. \ No newline at end of file +We checked 33 reverse dependencies, comparing R CMD check results across CRAN and dev versions of this package. + + * We saw 1 new problems + * We failed to check 0 packages + +This update breaks the *performance* package. Test failures are expected, because a bug fix in *parameters* affects test results of the *performance* package. Tests have been corrected and an update of *performance* is ready to be submitted once the *parameters* package is accepted on CRAN. diff --git a/tests/testthat/test-bootstrap_emmeans.R b/tests/testthat/test-bootstrap_emmeans.R index 9a81e849f..3036c1a91 100644 --- a/tests/testthat/test-bootstrap_emmeans.R +++ b/tests/testthat/test-bootstrap_emmeans.R @@ -3,6 +3,7 @@ skip_on_cran() test_that("emmeans | lm", { skip_if_not_installed("emmeans") skip_if_not_installed("boot") + skip_if_not_installed("coda") model <- lm(mpg ~ log(wt) + factor(cyl), data = mtcars) @@ -33,6 +34,7 @@ test_that("emmeans | lmer", { skip_if_not_installed("emmeans") skip_if_not_installed("boot") skip_if_not_installed("lme4") + skip_if_not_installed("coda") model <- lme4::lmer(mpg ~ log(wt) + factor(cyl) + (1 | gear), data = mtcars) @@ -59,6 +61,7 @@ test_that("emmeans | lmer", { }) test_that("emmeans | glmmTMB", { + skip_if_not_installed("coda") skip_if_not_installed("emmeans") skip_if_not_installed("boot") skip_if_not_installed("lme4") diff --git a/tests/testthat/test-coxph.R b/tests/testthat/test-coxph.R index 564aa2462..d37e51ffe 100644 --- a/tests/testthat/test-coxph.R +++ b/tests/testthat/test-coxph.R @@ -37,3 +37,26 @@ test_that("model_parameters", { tolerance = 1e-4 ) }) + +test_that("model_parameters", { + suppressPackageStartupMessages(library(survival, quietly = TRUE)) + + # Create the simplest test data set + test1 <- list( + time = c(4, 3, 1, 1, 2, 2, 3), + status = c(1, 1, 1, 0, 1, 1, 0), + x = c(0, 2, 1, 1, 1, 0, 0), + sex = c(0, 0, 0, 0, 1, 1, 1) + ) + # Fit a stratified model + m2 <- coxph(Surv(time, status) ~ x + strata(sex), test1) + expect_equal(model_parameters(m2)$Coefficient, 0.8023179, tolerance = 1e-4) + expect_equal(model_parameters(m2)$z, 0.9756088, tolerance = 1e-4) + expect_equal(model_parameters(m2)$p, 0.3292583, tolerance = 1e-4) + + unloadNamespace("rms") + unloadNamespace("quantreg") + unloadNamespace("multcomp") + unloadNamespace("TH.data") + unloadNamespace("survival") +}) diff --git a/tests/testthat/test-model_parameters.efa_cfa.R b/tests/testthat/test-model_parameters.efa_cfa.R index 33b511547..a41e3658a 100644 --- a/tests/testthat/test-model_parameters.efa_cfa.R +++ b/tests/testthat/test-model_parameters.efa_cfa.R @@ -61,12 +61,8 @@ test_that("FactoMineR", { )) expect_identical(c(ncol(x), nrow(x)), c(5L, 11L)) - x <- suppressWarnings(model_parameters( - FactoMineR::FAMD(iris, ncp = 3, graph = FALSE), - threshold = 0.2, - sort = TRUE - )) - expect_identical(c(ncol(x), nrow(x)), c(5L, 5L)) + # x <- suppressWarnings(model_parameters(FactoMineR::FAMD(iris, ncp = 3, graph = FALSE), threshold = 0.2, sort = TRUE)) + # expect_identical(c(ncol(x), nrow(x)), c(5L, 5L)) }) test_that("BayesFM", {