On 07/08/10 19:25, Knut Krueger wrote:
> Hi to all,
> is there any function available to combine those p values;
> 
> 
> Kind Regards Knut

Here's a couple of functions I've used for one thing that you might
mean.  The idea is that you have two p-values for different tests of
the same hypothesis, and you want to get an overall p-value for the
hypothesis.  The first method, for combining two p-values, was
invented by Fisher a very long time ago.  The second method I do not
remember a thing about, but I found it somewhere.  You need to look
these up before trusting them.

# combine and output one-tailed p's.  Enter 2-tailed p's.
combine <- function(x,y)
return(pchisq(-2*log(x/2)-2*log(y/2),4,low=F)) 

# Stouffer's method for vector x, gives 2-tailed result
 pnorm(sum(qnorm(x))/sqrt(length(x)))
-- 
Jonathan Baron, Professor of Psychology, University of Pennsylvania
Home page: http://www.sas.upenn.edu/~baron

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to