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

Sometimes pvalues = 0 #63

Open
jarbet opened this issue Dec 1, 2023 · 0 comments
Open

Sometimes pvalues = 0 #63

jarbet opened this issue Dec 1, 2023 · 0 comments

Comments

@jarbet
Copy link

jarbet commented Dec 1, 2023

I am finding that sometimes logistf returns chisquare test pvalues of 0 in the summary(fit) output, and the chisquare test stat will be Inf. This is a problem since p-values can't equal 0, especially if doing FDR multiple-testing adjustments (e.g. using p.adjust).

My apologies but I can't share the data that produces this problem. A simple solution I found was to calculate Z-test pvalues in this case:

zstat <- fit$coefficients / sqrt(diag(fit$var));
pvalue.zstat <- 2 * pnorm(abs(zstat), lower.tail = FALSE);

Similarly, anova.logistf sometimes returns pvalues of 0. A simple solution was to manually calculate the chisquare pvalue:

pchisq(anova.result$chisq, anova.result$df, lower.tail = FALSE);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant