easystats / easystats/parameters
One-sided CIs
Nobody has claimed this yet.
- Dominant language
- R
- Stars
- 499
- Forks
- 45
- Avg merge
- 3d 1h
- Merged PRs (30d)
- 3
Description
as per https://github.com/easystats/effectsize/pull/366
This affects, by default, Phi, Cohen's w, Cramer's V, ANOVA effect sizes, rank Epsilon squared, Kendall's W - which now will all default to one-sided CIs.
library(parameters)
df <- iris
df$Sepal.Big <- ifelse(df$Sepal.Width >= 3, "Yes", "No")
model <- aov(Sepal.Length ~ Sepal.Big, data = df)
Old behavior
model_parameters(
model,
omega_squared = "partial",
eta_squared = "partial",
epsilon_squared = "partial",
ci = 0.90
)
#> Parameter | Sum_Squares | df | Mean_Square | F | p | Omega2 | Omega2 90% CI | Eta2 | Eta2 90% CI | Epsilon2 | Epsilon2 90% CI
#> ----------------------------------------------------------------------------------------------------------------------------------------
#> Sepal.Big | 1.10 | 1 | 1.10 | 1.61 | 0.207 | 4.04e-03 | [0.00, 0.04] | 0.01 | [0.00, 0.05] | 4.07e-03 | [0.00, 0.04]
#> Residuals | 101.07 | 148 | 0.68 | | | | | | | |
#>
#> Anova Table (Type 1 tests)
NEW behavior
model_parameters(
model,
omega_squared = "partial",
eta_squared = "partial",
epsilon_squared = "partial",
ci = 0.95
)
#> Parameter | Sum_Squares | df | Mean_Square | F | p | Omega2 | Omega2 95% CI | Eta2 | Eta2 95% CI | Epsilon2 | Epsilon2 95% CI
#> ----------------------------------------------------------------------------------------------------------------------------------------
#> Sepal.Big | 1.10 | 1 | 1.10 | 1.61 | 0.207 | 4.04e-03 | [0.00, 1.00] | 0.01 | [0.00, 1.00] | 4.07e-03 | [0.00, 1.00]
#> Residuals | 101.07 | 148 | 0.68 | | | | | | | |
#>
#> Anova Table (Type 1 tests)
Information about the "side" can be found in the "alternative" attribute:
library(effectsize)
cohens_d(mpg ~ am, data = mtcars) |>
attr("alternative")
#> [1] "two.sided"
cohens_d(mpg ~ am, data = mtcars, alternative = "g") |>
attr("alternative")
#> [1] "greater"
cohens_d(mpg ~ am, data = mtcars, alternative = "less") |>
attr("alternative")
#> [1] "less"
Created on 2021-08-18 by the reprex package (v2.0.1)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the supplied parameters and effectsize examples, then trace how confidence-interval sides are handled for Phi, Cohen's w, Cramer's V, ANOVA effect sizes, rank Epsilon squared, and Kendall's W. Done means the reported intervals and the alternative attribute consistently reflect the intended one-sided defaults.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r
- Domain
- data
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100