diff --git a/DESCRIPTION b/DESCRIPTION index 71d0d5f8..35d6c831 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: report Type: Package Title: Automated Reporting of Results and Statistical Models -Version: 0.5.8 +Version: 0.5.8.1 Authors@R: c(person(given = "Dominique", family = "Makowski", @@ -55,11 +55,11 @@ BugReports: https://github.com/easystats/report/issues Depends: R (>= 3.6) Imports: - bayestestR (>= 0.13.1), + bayestestR (>= 0.13.2), effectsize (>= 0.8.6), - insight (>= 0.19.7), - parameters (>= 0.21.3), - performance (>= 0.10.8), + insight (>= 0.19.8), + parameters (>= 0.21.5), + performance (>= 0.10.9), datawizard (>= 0.9.1), stats, tools, @@ -76,12 +76,12 @@ Suggests: survival, modelbased, emmeans, - testthat + testthat (>= 3.2.1) VignetteBuilder: knitr Encoding: UTF-8 Language: en-US -RoxygenNote: 7.2.3.9000 +RoxygenNote: 7.3.1 Config/testthat/edition: 3 Config/Needs/website: rstudio/bslib, diff --git a/man/report-package.Rd b/man/report-package.Rd index 68600e2f..43f8fa51 100644 --- a/man/report-package.Rd +++ b/man/report-package.Rd @@ -3,7 +3,6 @@ \docType{package} \name{report-package} \alias{report-package} -\alias{_PACKAGE} \title{report: Automated Results Reporting as a Practical Tool to Improve Reproducibility and Methodological Best Practices Adoption} \description{ diff --git a/tests/testthat/_snaps/windows/report.brmsfit.md b/tests/testthat/_snaps/windows/report.brmsfit.md index 6f1f6348..4f8894dd 100644 --- a/tests/testthat/_snaps/windows/report.brmsfit.md +++ b/tests/testthat/_snaps/windows/report.brmsfit.md @@ -4,6 +4,41 @@ report(model, verbose = FALSE) Message Start sampling + Chain 1 Informational Message: The current Metropolis proposal is about to be rejected because of the following issue: + Chain 1 Exception: normal_id_glm_lpdf: Scale vector is 0, but must be positive finite! (in 'C:/Users/DL/AppData/Local/Temp/RtmpERRA9z/model-12d437f47a61.stan', line 35, column 4 to column 62) + Chain 1 If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine, + Chain 1 but if this warning occurs often then your model may be either severely ill-conditioned or misspecified. + Chain 1 + Chain 2 Informational Message: The current Metropolis proposal is about to be rejected because of the following issue: + Chain 2 Exception: normal_id_glm_lpdf: Scale vector is inf, but must be positive finite! (in 'C:/Users/DL/AppData/Local/Temp/RtmpERRA9z/model-12d437f47a61.stan', line 35, column 4 to column 62) + Chain 2 If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine, + Chain 2 but if this warning occurs often then your model may be either severely ill-conditioned or misspecified. + Chain 2 + Chain 2 Informational Message: The current Metropolis proposal is about to be rejected because of the following issue: + Chain 2 Exception: normal_id_glm_lpdf: Scale vector is inf, but must be positive finite! (in 'C:/Users/DL/AppData/Local/Temp/RtmpERRA9z/model-12d437f47a61.stan', line 35, column 4 to column 62) + Chain 2 If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine, + Chain 2 but if this warning occurs often then your model may be either severely ill-conditioned or misspecified. + Chain 2 + Chain 3 Informational Message: The current Metropolis proposal is about to be rejected because of the following issue: + Chain 3 Exception: normal_id_glm_lpdf: Scale vector is inf, but must be positive finite! (in 'C:/Users/DL/AppData/Local/Temp/RtmpERRA9z/model-12d437f47a61.stan', line 35, column 4 to column 62) + Chain 3 If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine, + Chain 3 but if this warning occurs often then your model may be either severely ill-conditioned or misspecified. + Chain 3 + Chain 3 Informational Message: The current Metropolis proposal is about to be rejected because of the following issue: + Chain 3 Exception: normal_id_glm_lpdf: Scale vector is inf, but must be positive finite! (in 'C:/Users/DL/AppData/Local/Temp/RtmpERRA9z/model-12d437f47a61.stan', line 35, column 4 to column 62) + Chain 3 If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine, + Chain 3 but if this warning occurs often then your model may be either severely ill-conditioned or misspecified. + Chain 3 + Chain 3 Informational Message: The current Metropolis proposal is about to be rejected because of the following issue: + Chain 3 Exception: normal_id_glm_lpdf: Scale vector is inf, but must be positive finite! (in 'C:/Users/DL/AppData/Local/Temp/RtmpERRA9z/model-12d437f47a61.stan', line 35, column 4 to column 62) + Chain 3 If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine, + Chain 3 but if this warning occurs often then your model may be either severely ill-conditioned or misspecified. + Chain 3 + Chain 3 Informational Message: The current Metropolis proposal is about to be rejected because of the following issue: + Chain 3 Exception: normal_id_glm_lpdf: Scale vector is inf, but must be positive finite! (in 'C:/Users/DL/AppData/Local/Temp/RtmpERRA9z/model-12d437f47a61.stan', line 35, column 4 to column 62) + Chain 3 If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine, + Chain 3 but if this warning occurs often then your model may be either severely ill-conditioned or misspecified. + Chain 3 Output We fitted a Bayesian linear model (estimated using MCMC sampling with 4 chains of 300 iterations and a warmup of 150) to predict mpg with qsec and wt @@ -12,18 +47,18 @@ is substantial (R2 = 0.82, 95% CI [0.75, 0.85], adj. R2 = 0.79). Within this model: - - The effect of b Intercept (Median = 19.74, 95% CI [9.45, 32.02]) has a 99.83% - probability of being positive (> 0), 99.83% of being significant (> 0.30), and - 99.67% of being large (> 1.81). The estimation successfully converged (Rhat = - 1.000) but the indices are unreliable (ESS = 522) - - The effect of b qsec (Median = 0.92, 95% CI [0.34, 1.47]) has a 99.83% - probability of being positive (> 0), 98.17% of being significant (> 0.30), and - 0.17% of being large (> 1.81). The estimation successfully converged (Rhat = - 1.002) but the indices are unreliable (ESS = 521) - - The effect of b wt (Median = -5.09, 95% CI [-6.06, -4.09]) has a 100.00% + - The effect of b Intercept (Median = 19.23, 95% CI [6.80, 31.02]) has a 99.67% + probability of being positive (> 0), 99.67% of being significant (> 0.30), and + 99.33% of being large (> 1.81). The estimation successfully converged (Rhat = + 0.999) but the indices are unreliable (ESS = 343) + - The effect of b qsec (Median = 0.95, 95% CI [0.41, 1.56]) has a 100.00% + probability of being positive (> 0), 99.17% of being significant (> 0.30), and + 0.33% of being large (> 1.81). The estimation successfully converged (Rhat = + 0.999) but the indices are unreliable (ESS = 345) + - The effect of b wt (Median = -5.02, 95% CI [-6.06, -4.09]) has a 100.00% probability of being negative (< 0), 100.00% of being significant (< -0.30), and 100.00% of being large (< -1.81). The estimation successfully converged - (Rhat = 0.997) but the indices are unreliable (ESS = 543) + (Rhat = 0.999) but the indices are unreliable (ESS = 586) Following the Sequential Effect eXistence and sIgnificance Testing (SEXIT) framework, we report the median of the posterior distribution and its 95% CI @@ -41,18 +76,18 @@ substantial (R2 = 0.82, 95% CI [0.75, 0.85], adj. R2 = 0.79). Within this model: - - The effect of b Intercept (Median = 19.74, 95% CI [9.45, 32.02]) has a 99.83% - probability of being positive (> 0), 99.83% of being significant (> 0.30), and - 99.67% of being large (> 1.81). The estimation successfully converged (Rhat = - 1.000) but the indices are unreliable (ESS = 522) - - The effect of b qsec (Median = 0.92, 95% CI [0.34, 1.47]) has a 99.83% - probability of being positive (> 0), 98.17% of being significant (> 0.30), and - 0.17% of being large (> 1.81). The estimation successfully converged (Rhat = - 1.002) but the indices are unreliable (ESS = 521) - - The effect of b wt (Median = -5.09, 95% CI [-6.06, -4.09]) has a 100.00% + - The effect of b Intercept (Median = 19.23, 95% CI [6.80, 31.02]) has a 99.67% + probability of being positive (> 0), 99.67% of being significant (> 0.30), and + 99.33% of being large (> 1.81). The estimation successfully converged (Rhat = + 0.999) but the indices are unreliable (ESS = 343) + - The effect of b qsec (Median = 0.95, 95% CI [0.41, 1.56]) has a 100.00% + probability of being positive (> 0), 99.17% of being significant (> 0.30), and + 0.33% of being large (> 1.81). The estimation successfully converged (Rhat = + 0.999) but the indices are unreliable (ESS = 345) + - The effect of b wt (Median = -5.02, 95% CI [-6.06, -4.09]) has a 100.00% probability of being negative (< 0), 100.00% of being significant (< -0.30), and 100.00% of being large (< -1.81). The estimation successfully converged - (Rhat = 0.997) but the indices are unreliable (ESS = 543) + (Rhat = 0.999) but the indices are unreliable (ESS = 586) Following the Sequential Effect eXistence and sIgnificance Testing (SEXIT) framework, we report the median of the posterior distribution and its 95% CI @@ -70,18 +105,18 @@ substantial (R2 = 0.82, 95% CI [0.75, 0.85], adj. R2 = 0.79). Within this model: - - The effect of b Intercept (Median = 19.74, 95% CI [9.45, 32.02]) has a 99.83% - probability of being positive (> 0), 99.83% of being significant (> 0.30), and - 99.67% of being large (> 1.81). The estimation successfully converged (Rhat = - 1.000) but the indices are unreliable (ESS = 522) - - The effect of b qsec (Median = 0.92, 95% CI [0.34, 1.47]) has a 99.83% - probability of being positive (> 0), 98.17% of being significant (> 0.30), and - 0.17% of being large (> 1.81). The estimation successfully converged (Rhat = - 1.002) but the indices are unreliable (ESS = 521) - - The effect of b wt (Median = -5.09, 95% CI [-6.06, -4.09]) has a 100.00% + - The effect of b Intercept (Median = 19.23, 95% CI [6.80, 31.02]) has a 99.67% + probability of being positive (> 0), 99.67% of being significant (> 0.30), and + 99.33% of being large (> 1.81). The estimation successfully converged (Rhat = + 0.999) but the indices are unreliable (ESS = 343) + - The effect of b qsec (Median = 0.95, 95% CI [0.41, 1.56]) has a 100.00% + probability of being positive (> 0), 99.17% of being significant (> 0.30), and + 0.33% of being large (> 1.81). The estimation successfully converged (Rhat = + 0.999) but the indices are unreliable (ESS = 345) + - The effect of b wt (Median = -5.02, 95% CI [-6.06, -4.09]) has a 100.00% probability of being negative (< 0), 100.00% of being significant (< -0.30), and 100.00% of being large (< -1.81). The estimation successfully converged - (Rhat = 0.997) but the indices are unreliable (ESS = 543) + (Rhat = 0.999) but the indices are unreliable (ESS = 586) Following the Sequential Effect eXistence and sIgnificance Testing (SEXIT) framework, we report the median of the posterior distribution and its 95% CI @@ -99,18 +134,18 @@ substantial (R2 = 0.82, 95% CI [0.75, 0.85], adj. R2 = 0.79). Within this model: - - The effect of b Intercept (Median = 19.74, 95% CI [9.45, 32.02]) has a 99.83% - probability of being positive (> 0), 99.83% of being significant (> 0.30), and - 99.67% of being large (> 1.81). The estimation successfully converged (Rhat = - 1.000) but the indices are unreliable (ESS = 522) - - The effect of b qsec (Median = 0.92, 95% CI [0.34, 1.47]) has a 99.83% - probability of being positive (> 0), 98.17% of being significant (> 0.30), and - 0.17% of being large (> 1.81). The estimation successfully converged (Rhat = - 1.002) but the indices are unreliable (ESS = 521) - - The effect of b wt (Median = -5.09, 95% CI [-6.06, -4.09]) has a 100.00% + - The effect of b Intercept (Median = 19.23, 95% CI [6.80, 31.02]) has a 99.67% + probability of being positive (> 0), 99.67% of being significant (> 0.30), and + 99.33% of being large (> 1.81). The estimation successfully converged (Rhat = + 0.999) but the indices are unreliable (ESS = 343) + - The effect of b qsec (Median = 0.95, 95% CI [0.41, 1.56]) has a 100.00% + probability of being positive (> 0), 99.17% of being significant (> 0.30), and + 0.33% of being large (> 1.81). The estimation successfully converged (Rhat = + 0.999) but the indices are unreliable (ESS = 345) + - The effect of b wt (Median = -5.02, 95% CI [-6.06, -4.09]) has a 100.00% probability of being negative (< 0), 100.00% of being significant (< -0.30), and 100.00% of being large (< -1.81). The estimation successfully converged - (Rhat = 0.997) but the indices are unreliable (ESS = 543) + (Rhat = 0.999) but the indices are unreliable (ESS = 586) Following the Sequential Effect eXistence and sIgnificance Testing (SEXIT) framework, we report the median of the posterior distribution and its 95% CI diff --git a/tests/testthat/_snaps/windows/report_performance.md b/tests/testthat/_snaps/windows/report_performance.md index 76bd46c4..0e669f03 100644 --- a/tests/testthat/_snaps/windows/report_performance.md +++ b/tests/testthat/_snaps/windows/report_performance.md @@ -2,6 +2,10 @@ Code report_performance(x5) + Message + VSCode WebView has restricted access to local file. + Opening in external browser... + Browsing file:///C:/Users/DL/AppData/Local/Temp/RtmpERRA9z/file12d47a7090f_StanProgress.html Output The model's explanatory power is substantial (R2 = 0.62, 95% CI [0.53, 0.69], adj. R2 = 0.61) @@ -10,6 +14,10 @@ Code summary(report_performance(x5)) + Message + VSCode WebView has restricted access to local file. + Opening in external browser... + Browsing file:///C:/Users/DL/AppData/Local/Temp/RtmpERRA9z/file12d465985229_StanProgress.html Output [1] "The model's explanatory power is substantial (R2 = 0.62, adj. R2 = 0.61)" @@ -17,6 +25,10 @@ Code report_performance(x6) + Message + VSCode WebView has restricted access to local file. + Opening in external browser... + Browsing file:///C:/Users/DL/AppData/Local/Temp/RtmpERRA9z/file12d4560a39d2_StanProgress.html Output The model's explanatory power is substantial (R2 = 0.54, 95% CI [0.27, 0.77]) @@ -24,6 +36,10 @@ Code summary(report_performance(x6)) + Message + VSCode WebView has restricted access to local file. + Opening in external browser... + Browsing file:///C:/Users/DL/AppData/Local/Temp/RtmpERRA9z/file12d452f95d46_StanProgress.html Output [1] "The model's explanatory power is substantial (R2 = 0.54)" @@ -31,6 +47,10 @@ Code report_performance(x7) + Message + VSCode WebView has restricted access to local file. + Opening in external browser... + Browsing file:///C:/Users/DL/AppData/Local/Temp/RtmpERRA9z/file12d412fbc1_StanProgress.html Output The model's explanatory power is substantial (R2 = 0.83, 95% CI [0.79, 0.86], adj. R2 = 0.83) and the part related to the fixed effects alone (marginal R2) @@ -40,6 +60,10 @@ Code summary(report_performance(x7)) + Message + VSCode WebView has restricted access to local file. + Opening in external browser... + Browsing file:///C:/Users/DL/AppData/Local/Temp/RtmpERRA9z/file12d426713848_StanProgress.html Output [1] "The model's explanatory power is substantial (R2 = 0.83, adj. R2 = 0.83) and the part related to the fixed effects alone (marginal R2) is of 0.95" diff --git a/tests/testthat/_snaps/windows/report_s.md b/tests/testthat/_snaps/windows/report_s.md index e60f51a3..0e3708e3 100644 --- a/tests/testthat/_snaps/windows/report_s.md +++ b/tests/testthat/_snaps/windows/report_s.md @@ -2,7 +2,7 @@ Code report_s(s = 4.2) - Message + Message If the test hypothesis (parameter = 0) and all model assumptions were true, there is a 5.4% chance of observing this outcome. How weird is that? It's hardly more surprising than getting 4 heads in a row with @@ -12,7 +12,7 @@ Code report_s(p = 0.06) - Message + Message If the test hypothesis (parameter = 0) and all model assumptions were true, there is a 6% chance of observing this outcome. How weird is that? It's hardly more surprising than getting 4 heads in a row with fair coin