report
report copied to clipboard
When using stats::t.test, the report() and report_table() function output displays "95 % CI" even if, say, conf.level = 0.975
Describe the bug
Not sure if this is a bug, or if I'm not specifying the correct parameters when using the reporter::report() function, but when using stats::t.test, the report() and report_table() functions' output displays "95 % CI" even if, say, the stats::t.test conf.level is set to a value other than 0.95.
To Reproduce Steps to reproduce the behaviour:
A_vs_B <- stats::t.test(
A, B,
conf.level = 0.975,
alternative = 'greater',
mu = -4.5
) |>
report::report()
Expected behaviour Display column header "97.5% CI" instead of "95% CI":
[Parameter1 | Parameter2 | Mean_Parameter1 | Mean_Parameter2 | Difference | 97.5% CI | t(98.86) | p | Cohen's d | Cohen's d CI
A | B | 1.01 | 1.29 | -0.28 | [-2.47, Inf] | 3.20 | < .001 | 0.64 | [0.30, Inf]]
Screenshots If applicable, add screenshots to help explain your problem.
Specifications (please complete the following information):
- Package Version [e.g. 0.2.1] report version is: 0.5.7 (R version is: 4.2.2)
Do you have a reproducible example?
t.test(1:10, y = c(7:20, 200)) |> report::report()
#> Effect sizes were labelled following Cohen's (1988) recommendations.
#>
#> The Welch Two Sample t-test testing the difference between 1:10 and c(7:20,
#> 200) (mean of x = 5.50, mean of y = 25.93) suggests that the effect is
#> negative, statistically not significant, and medium (difference = -20.43, 95%
#> CI [-47.24, 6.38], t(14.16) = -1.63, p = 0.125; Cohen's d = -0.60, 95% CI
#> [-1.34, 0.16])
t.test(1:10, y = c(7:20, 200), conf.level = 0.7) |> report::report()
#> Effect sizes were labelled following Cohen's (1988) recommendations.
#>
#> The Welch Two Sample t-test testing the difference between 1:10 and c(7:20,
#> 200) (mean of x = 5.50, mean of y = 25.93) suggests that the effect is
#> negative, statistically not significant, and medium (difference = -20.43, 70%
#> CI [-33.90, -6.97], t(14.16) = -1.63, p = 0.125; Cohen's d = -0.60, 70% CI
#> [-0.98, -0.19])