Skip to content

Commit

Permalink
Merge branch 'main' into joss-paper-draft
Browse files Browse the repository at this point in the history
  • Loading branch information
IndrajeetPatil authored Mar 2, 2024
2 parents 28d2afd + a53f206 commit 023c704
Show file tree
Hide file tree
Showing 5 changed files with 108 additions and 50 deletions.
14 changes: 7 additions & 7 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -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",
Expand Down Expand Up @@ -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,
Expand All @@ -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,
Expand Down
1 change: 0 additions & 1 deletion man/report-package.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

115 changes: 75 additions & 40 deletions tests/testthat/_snaps/windows/report.brmsfit.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
24 changes: 24 additions & 0 deletions tests/testthat/_snaps/windows/report_performance.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -10,27 +14,43 @@

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)"

---

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])

---

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)"

# report_performance Bayesian 2)

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)
Expand All @@ -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"

4 changes: 2 additions & 2 deletions tests/testthat/_snaps/windows/report_s.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Code
report_s(s = 4.2)
Message <simpleMessage>
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
Expand All @@ -12,7 +12,7 @@

Code
report_s(p = 0.06)
Message <simpleMessage>
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
Expand Down

0 comments on commit 023c704

Please sign in to comment.