pcorselR: Multiple hypothesis test

Description Usage Arguments Details Value Author(s) References Examples

View source: R/equSA.R

Description

Infer networks from ψ scores using multiple hypothesis test in ψ screening procedure.

Usage

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

Arguments

score

ψ 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 ψ scores for this pair.

ALPHA2

The significance level of ψ screening, default of 0.05.

GRID

The number of components for the ψ-scores. The default value is 2.

iteration

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

Details

This is the function that conduct multiple hypothesis test for ψ scores, thus we called it ψ screening procedure.

Value

qqqscore

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

Author(s)

Bochao Jia, Faming liangfmliang@purdue.edu

References

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

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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)
     

equSA documentation built on May 6, 2019, 1:06 a.m.