-
Notifications
You must be signed in to change notification settings - Fork 0
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
Numeric p-value "always" 1 or 0? #13
Comments
As a first attempt at studying the issue through simulations, please see this script, which outputs this the last time I tried: Which may be an indication that To reproduce (results vary due to randomization), we need the package version on the remotes::install_github("ocbe-uio/permChacko@issue-13") |
Solution: use mid-P values (Lancaster, 1961). |
Having a hard time finding an example where the analytic p-value is
NA
and the numeric one is neither 0 or 1.I wonder if the numeric p-value (calculated below) should be computed based on
>=
or>
.permChacko/R/permChacko.R
Line 55 in 3c263d4
If
chisq_bar = 0
, then allperm_p_value
s are going to be equal to or larger than that. Assuming the equation below (eq. 5 from Chacko 1966) is always non-negative, which seems to be the case:The code below offers a template for some benchmarking to be done between the
>=
and>
solutions. Play around with different values forruns
,reps
, andvec
. Bias, error, etc, are some simple ways to compare the estimates to the tabular value:The text was updated successfully, but these errors were encountered: