Learn R Programming

equSA (version 1.2.1)

pcorselR: Multiple hypothesis test

Description

Infer networks from \(\psi\) scores using multiple hypothesis test in \(\psi\) screening procedure.

Usage

pcorselR(score, ALPHA2=0.05,GRID=2,iteration=100)

Arguments

score

\(\psi\) score matrix which has 3 columns. The first two columns denote the pair of variables i and j and the last column denote the calculated \(\psi\) scores for this pair.

ALPHA2

The significance level of \(\psi\) screening, default of 0.05.

GRID

The number of components for the \(\psi\)-scores. The default value is 2.

iteration

Number of iterations for screening. The default value is 100.

Value

qqqscore

The threshold value of \(\psi\) scores which indicates that if one pair of variables has larger \(\psi\) scores than this threshold value in the \(\psi\) score matrix, this pair is considered as connected, i.e there is an edge between this pair of variables.

Details

This is the function that conduct multiple hypothesis test for \(\psi\) scores, thus we called it \(\psi\) screening procedure.

References

Liang, F. and Zhang, J. (2008) Estimating FDR under general dependence using stochastic approximation. Biometrika, 95(4), 961-977.

Examples

Run this code
# NOT RUN {
library(equSA)
data(SR0)
U <- psical(SR0, ALPHA1=0.05,iteration=50)
##   probit transformation for psi scores ###
z<-U[,3]
q<-pnorm(-abs(z), log.p=TRUE)
q<-q+log(2.0)
s<-qnorm(q,log.p=TRUE)
s<-(-1)*s
U<-cbind(U[,1:2],s)
## subsampling for psi scores ###
N <- length(U[,1])
ratio<-ceiling(N/100000)
U<-U[order(U[,3]), 1:3]
m<-floor(N/ratio)
m0<-N-m*ratio
s<-sample.int(ratio,m,replace=TRUE)
for(i in 1:length(s)) s[i]<-s[i]+(i-1)*ratio
if(m0>0){
  s0<-sample.int(m0,1)+length(s)*ratio
  s<-c(s,s0)
}
Us<-U[s,]
y <- round(Us,6)
##  multiple hypothesis tests ###
pcorselR(y,ALPHA2=0.05)
# }

Run the code above in your browser using DataLab