R/getP2.R

Defines functions getP2

Documented in getP2

getP2<-function(pG,combine="fisher"){
#given a pG returns two equal p-values such as   combfunc(p1,p2)=pG
 if(combine=="fisher"){
ch=qchisq(pG,4,lower.tail = FALSE)
return(sqrt(exp(-ch/2)))
}

 if(combine=="norminv"){
  return(pnorm(qnorm(pG)*sqrt(2)/2))
 }
}

Try the SPIA package in your browser

Any scripts or data that you put into this service are public.

SPIA documentation built on Nov. 8, 2020, 5:44 p.m.