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] McKay interval slightly incorrect? (Either in vignette or code) #3

Open
bca2 opened this issue Nov 20, 2021 · 0 comments
Open
Assignees
Labels
bug Something isn't working documentation Improvements or additions to documentation
Milestone

Comments

@bca2
Copy link

bca2 commented Nov 20, 2021

The code for the McKay interval is:

else if ("mckay" %in% method && correction == FALSE) {
v <- length(x) - 1
t1 <- stats::qchisq(1 - alpha/2, v)/v
t2 <- stats::qchisq(alpha/2, v)/v
u1 <- v * t1
u2 <- v * t2
est.mckay <- cv
lower.tile.mckay <- cv/sqrt((u1/(v + 1) - 1) * (cv^2) +
u1/v)
upper.tile.mckay <- cv/sqrt((u2/(v + 1) - 1) * (cv^2) +
u2/v)
}
else if ("mckay" %in% method && correction == TRUE) {
v <- length(x) - 1
t1 <- stats::qchisq(1 - alpha/2, v)/v
t2 <- stats::qchisq(alpha/2, v)/v
u1 <- v * t1
u2 <- v * t2
est.mckay <- cv_corr
lower.tile.mckay <- cv_corr/sqrt((u1/(v + 1) - 1) * (cv_corr^2) +
u1/v)
upper.tile.mckay <- cv_corr/sqrt((u2/(v + 1) - 1) * (cv_corr^2) +
u2/v)
}
Note that we have (v + 1) instead of (v) as it is in the vignette.
Which is correct?

Thanks!

Edit: Your package has been very helpful, thank you very much.

@bca2 bca2 added the bug Something isn't working label Nov 20, 2021
@MaaniBeigy MaaniBeigy added this to the v1.0.1 milestone Nov 26, 2021
@MaaniBeigy MaaniBeigy added the documentation Improvements or additions to documentation label Nov 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants