Skip to content
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

Bug in equivalente_test when using big numbers for lower bounds #982

Closed
DominiqueMakowski opened this issue Jun 21, 2024 · 1 comment · Fixed by #992
Closed

Bug in equivalente_test when using big numbers for lower bounds #982

DominiqueMakowski opened this issue Jun 21, 2024 · 1 comment · Fixed by #992
Assignees
Labels
Bug 🐛 Something isn't working

Comments

@DominiqueMakowski
Copy link
Member

For some reason the equivalent tests says Accepted when the low bound becomes "big" (?)

m <- lm(Sepal.Length ~ Species, data=iris)
rez <- parameters::equivalence_test(m)
rez
#> # TOST-test for Practical Equivalence
#> 
#>   ROPE: [-0.08 0.08]
#> 
#> Parameter            |       90% CI |   SGPV | Equivalence |      p
#> -------------------------------------------------------------------
#> (Intercept)          | [4.89, 5.13] | < .001 |    Rejected | > .999
#> Species [versicolor] | [0.76, 1.10] | < .001 |    Rejected | > .999
#> Species [virginica]  | [1.41, 1.75] | < .001 |    Rejected | > .999
plot(rez)

rez <- parameters::equivalence_test(m, range=c(-Inf, 0.1))
rez
#> # TOST-test for Practical Equivalence
#> 
#>   ROPE: [-Inf 0.10]
#> 
#> Parameter            |       90% CI |   SGPV | Equivalence |      p
#> -------------------------------------------------------------------
#> (Intercept)          | [4.89, 5.13] | < .001 |    Accepted | < .001
#> Species [versicolor] | [0.76, 1.10] | < .001 |    Accepted | < .001
#> Species [virginica]  | [1.41, 1.75] | < .001 |    Accepted | < .001
plot(rez)

rez <- parameters::equivalence_test(m, range=c(-99, 0.1))
rez
#> # TOST-test for Practical Equivalence
#> 
#>   ROPE: [-99.00 0.10]
#> 
#> Parameter            |       90% CI |   SGPV | Equivalence |      p
#> -------------------------------------------------------------------
#> (Intercept)          | [4.89, 5.13] | < .001 |    Accepted | < .001
#> Species [versicolor] | [0.76, 1.10] | < .001 |    Accepted | < .001
#> Species [virginica]  | [1.41, 1.75] | < .001 |    Accepted | < .001
plot(rez)

Created on 2024-06-21 with reprex v2.1.0

@strengejacke strengejacke added the Bug 🐛 Something isn't working label Jun 21, 2024
@strengejacke
Copy link
Member

Yes, I think we were always assuming an "equal ranged" rope.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug 🐛 Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants