From d8fa8ae88e28e59cf19b317c8a466daaddcb7f1a Mon Sep 17 00:00:00 2001 From: Indrajeet Patil Date: Mon, 2 Dec 2024 21:14:04 +0100 Subject: [PATCH] Fix tests for insight update --- .github/workflows/pkgdown.yaml | 2 +- CITATION.cff | 4 +-- DESCRIPTION | 6 ++--- codemeta.json | 6 ++--- man/tidy_model_parameters.Rd | 26 +++++++++++-------- .../testthat/_snaps/tidy-model-expressions.md | 23 +++++++++------- tests/testthat/test-pairwise-comparisons.R | 1 - 7 files changed, 38 insertions(+), 30 deletions(-) diff --git a/.github/workflows/pkgdown.yaml b/.github/workflows/pkgdown.yaml index 11f910dd..eff5ad1d 100644 --- a/.github/workflows/pkgdown.yaml +++ b/.github/workflows/pkgdown.yaml @@ -48,7 +48,7 @@ jobs: - name: Deploy to GitHub pages 🚀 if: github.event_name != 'pull_request' - uses: JamesIves/github-pages-deploy-action@v4.6.9 + uses: JamesIves/github-pages-deploy-action@v4.7.1 with: branch: gh-pages folder: docs diff --git a/CITATION.cff b/CITATION.cff index 3d3edb51..62b850d5 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -348,7 +348,7 @@ references: orcid: https://orcid.org/0000-0002-9271-5075 year: '2024' doi: 10.32614/CRAN.package.insight - version: '>= 0.20.5' + version: '>= 1.0.0' - type: software title: magrittr abstract: 'magrittr: A Forward-Pipe Operator for R' @@ -397,7 +397,7 @@ references: orcid: https://orcid.org/0000-0001-9560-6336 year: '2024' doi: 10.32614/CRAN.package.parameters - version: '>= 0.23.0' + version: '>= 0.24.0' - type: software title: performance abstract: 'performance: Assessment of Regression Models Performance' diff --git a/DESCRIPTION b/DESCRIPTION index 31a46019..cf66b460 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -20,7 +20,7 @@ URL: https://indrajeetpatil.github.io/statsExpressions/, https://github.com/IndrajeetPatil/statsExpressions BugReports: https://github.com/IndrajeetPatil/statsExpressions/issues Depends: - R (>= 4.1.0), + R (>= 4.3.0), stats Imports: afex (>= 1.4-1), @@ -31,9 +31,9 @@ Imports: dplyr (>= 1.1.4), effectsize (>= 0.8.9), glue (>= 1.8.0), - insight (>= 0.20.5), + insight (>= 1.0.0), magrittr (>= 2.0.3), - parameters (>= 0.23.0), + parameters (>= 0.24.0), performance (>= 0.12.4), PMCMRplus (>= 1.9.12), purrr (>= 1.0.2), diff --git a/codemeta.json b/codemeta.json index cf4c6422..4ff6de3c 100644 --- a/codemeta.json +++ b/codemeta.json @@ -285,7 +285,7 @@ "@type": "SoftwareApplication", "identifier": "insight", "name": "insight", - "version": ">= 0.20.5", + "version": ">= 1.0.0", "provider": { "@id": "https://cran.r-project.org", "@type": "Organization", @@ -311,7 +311,7 @@ "@type": "SoftwareApplication", "identifier": "parameters", "name": "parameters", - "version": ">= 0.23.0", + "version": ">= 0.24.0", "provider": { "@id": "https://cran.r-project.org", "@type": "Organization", @@ -439,7 +439,7 @@ }, "SystemRequirements": null }, - "fileSize": "4229.33KB", + "fileSize": "4229KB", "citation": [ { "@type": "ScholarlyArticle", diff --git a/man/tidy_model_parameters.Rd b/man/tidy_model_parameters.Rd index ea4ccf06..4313b12a 100644 --- a/man/tidy_model_parameters.Rd +++ b/man/tidy_model_parameters.Rd @@ -10,17 +10,21 @@ tidy_model_parameters(model, ...) \item{model}{Statistical Model.} \item{...}{Arguments passed to or from other methods. Non-documented -arguments are \code{digits}, \code{p_digits}, \code{ci_digits} and \code{footer_digits} to set -the number of digits for the output. If \code{s_value = TRUE}, the p-value will -be replaced by the S-value in the output (cf. \emph{Rafi and Greenland 2020}). -\code{pd} adds an additional column with the \emph{probability of direction} (see -\code{\link[bayestestR:p_direction]{bayestestR::p_direction()}} for details). \code{groups} can be used to group -coefficients. It will be passed to the print-method, or can directly be used -in \code{print()}, see documentation in \code{\link[parameters:print.parameters_model]{print.parameters_model()}}. Furthermore, -see 'Examples' in \code{\link[parameters:model_parameters.default]{model_parameters.default()}}. For developers, whose -interest mainly is to get a "tidy" data frame of model summaries, it is -recommended to set \code{pretty_names = FALSE} to speed up computation of the -summary table.} +arguments are +\itemize{ +\item \code{digits}, \code{p_digits}, \code{ci_digits} and \code{footer_digits} to set the number of +digits for the output. \code{groups} can be used to group coefficients. These +arguments will be passed to the print-method, or can directly be used in +\code{print()}, see documentation in \code{\link[parameters:print.parameters_model]{print.parameters_model()}}. +\item If \code{s_value = TRUE}, the p-value will be replaced by the S-value in the +output (cf. \emph{Rafi and Greenland 2020}). +\item \code{pd} adds an additional column with the \emph{probability of direction} (see +\code{\link[bayestestR:p_direction]{bayestestR::p_direction()}} for details). Furthermore, see 'Examples' in +\code{\link[parameters:model_parameters.default]{model_parameters.default()}}. +\item For developers, whose interest mainly is to get a "tidy" data frame of +model summaries, it is recommended to set \code{pretty_names = FALSE} to speed +up computation of the summary table. +}} } \description{ Convert \code{{parameters}} package output to \code{{tidyverse}} conventions diff --git a/tests/testthat/_snaps/tidy-model-expressions.md b/tests/testthat/_snaps/tidy-model-expressions.md index 182ccd95..eaba1db2 100644 --- a/tests/testthat/_snaps/tidy-model-expressions.md +++ b/tests/testthat/_snaps/tidy-model-expressions.md @@ -60,15 +60,17 @@ Code select(df_chi, -expression) Output - # A tibble: 2 x 10 - term estimate std.error conf.level conf.low conf.high statistic df.error - - 1 age 0.0170 0.00923 0.95 -0.00106 0.0351 3.40 1 - 2 sex -0.512 0.168 0.95 -0.840 -0.183 9.31 1 - p.value conf.method - - 1 0.0650 Wald - 2 0.00228 Wald + # A tibble: 3 x 10 + term estimate std.error conf.level conf.low conf.high statistic + + 1 age 0.0170 0.00923 0.95 -0.00106 0.0351 3.40 + 2 sex -0.512 0.168 0.95 -0.840 -0.183 9.31 + 3 frailty(inst) NA NA 0.95 NA NA 0.0000605 + df.error p.value conf.method + + 1 1 0.0650 Wald + 2 1 0.00228 Wald + 3 1 0.994 Wald --- @@ -83,6 +85,9 @@ list(widehat(italic(beta)) == "-0.51", italic(chi)^2 * ("1") == "9.31", italic(p) == "2.28e-03") + [[3]] + NULL + # tidy_model_expressions works - z diff --git a/tests/testthat/test-pairwise-comparisons.R b/tests/testthat/test-pairwise-comparisons.R index 2160d70e..764248a8 100644 --- a/tests/testthat/test-pairwise-comparisons.R +++ b/tests/testthat/test-pairwise-comparisons.R @@ -213,7 +213,6 @@ test_that( ) - # within-subjects design - no NAs ----------------------------------------- test_that(