R function for combining p-values
Is there a base R function that implements fisher's method for combining p-value?I'd rather not use a package.
• 7,598 views
•
link
1 answer
You can use the metap package. But then if you must, then this should work
pchisq((sum(log(p))*-2), df=length(p)*2, lower.tail=F)
Given p is the list of p-values
• 1 views
•
link
Log in to answer this question.
May I ask why you don't want to use packages? Many many functions will only be available through very specific packages, as such best fitting your need.
That's a trivial function to write yourself.