get.kappa.max {mFDP} | R Documentation |
Based on a vector of raw p-values, compute kappa.max
, which defines the mFDP envelope
Description
Based on a vector of unadjusted(!) p-values, compute kappa.max
, which together with c
defines the mFDP envelope
Usage
get.kappa.max(P, c="1/(2m)", s1=0, s2=0.1)
Arguments
P |
A vector of p-values. |
c |
The tuning parameter, which influences the intercept and slope of the enveloppe. Should either be numeric or |
s1 |
The smallest p-value threshold of interest. Non-negative. |
s2 |
The largest p-value threshold of interest. Should be larger than |
Value
kappa.max
, which together with c
defines the mFDP envelope.
Examples
set.seed(5193)
### Make some p-values
m=500 #the nr of hypotheses
nrfalse=100 #the nr of false hypotheses
tstats = rnorm(n=m) #m test statistics
tstats[1:nrfalse] = tstats[1:nrfalse] + 3 #add some signal
P = 1 - pnorm(tstats) #compute p-values
### Compute kappa.max. (Taking c to be the default value 1/(2m).)
kappa.max = get.kappa.max(P=P)
kappa.max
[Package mFDP version 0.1.0 Index]