-
-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature] report() for BayesFactor objects #420
Conversation
I really dislike that the default behavior of library(report)
rez <- BayesFactor::ttestBF(iris$Sepal.Width, iris$Sepal.Length)
report_statistics(rez, exact = TRUE)
#> [1] "BF10 = 6.11e+107"
report(rez, exact = TRUE)
#> [1] "There is extreme evidence in favour of H1 over H0 (BF10 = 6.11e+107)." Also works now (but can probably be better…) rez <- BayesFactor::correlationBF(iris$Sepal.Width, iris$Sepal.Length, nullInterval = c(-0.1, 0.1))
report_statistics(rez, exact = TRUE)
#> Multiple `BFBayesFactor` models detected - reporting for the first
#> numerator model.
#> See help("get_parameters", package = "insight").
#> [1] "BF10 = 1.18"
report(rez, exact = TRUE)
#> Multiple `BFBayesFactor` models detected - reporting for the first
#> numerator model.
#> See help("get_parameters", package = "insight").
#> [1] "There is anecdotal evidence in favour of H1 over H0 (BF10 = 1.18)." Also auto passes to bayestestR::bf_models() |> report() for linear models rez <- BayesFactor::lmBF(mpg ~ hp, data = mtcars)
report(rez)
#> Bayes factors were computed with the `BayesFactor` package, using JZS priors.
#> Compared to the (Intercept only) model (the least supported model), we found
#> extreme evidence (BF = 5.70e+04) in favour of the hp model (the most supported
#> model). Created on 2024-03-28 with reprex v2.1.0 |
nice addition of the LM case!
We can |
Yes please! |
Thanks, but we see: ── R CMD check results ───────────────────────────────────── report 0.5.8.1 ────
Duration: 3m 47.5s
❯ checking Rd \usage sections ... WARNING
Undocumented arguments in documentation object 'report.BFBayesFactor'
‘...’ ‘table’
Functions with \usage entries need to have the appropriate \alias
entries, and all their arguments documented.
The \usage entries must correspond to syntactically valid R code.
See chapter ‘Writing R documentation files’ in the ‘Writing R
Extensions’ manual.
❯ checking for unstated dependencies in examples ... WARNING
'::' or ':::' import not declared from: ‘BayesFactor’
'library' or 'require' call not declared from: ‘BayesFactor’
Error in `build_reference_index()`:
! All topics must be included in reference index
✖ Missing topics: report.BFBayesFactor
ℹ Either add to _pkgdown.yml or use @keywords internal |
|
Snapshots updated, closes #422 |
Cannot fix this .01 snapshot value difference between local and GHA, so skipping it... Error: Error: Snapshot of code has changed (variant 'windows'):
old vs new
Code
report_performance(x7)
Output
- The model's explanatory power is substantial (R2 = 0.83, 95% CI [0.79, 0.86],
+ The model's explanatory power is substantial (R2 = 0.83, 95% CI [0.79, 0.87],
adj. R2 = 0.83) and the part related to the fixed effects alone (marginal R2)
is of 0.95 (95% CI [0.93, 0.97]) |
Created on 2024-03-28 with reprex v2.0.2