Z.Block: Calculate the z statistics

Description Usage Arguments Value Examples

View source: R/Z.Block.R

Description

Calculate the z statistics

Usage

1
Z.Block(X.1, X.2, outcome.1, outcome.2, same.ind = T)

Arguments

X.1

genotypes matrix for outcome 1

X.2

genotypes matrix for outcome 2

outcome.1

a vecotr of outcome 1

outcome.2

a vecotr of outcome 2

same.ind

whether the collected outcome 1 and outcome 2 come from the same group of individuals

Value

a list of two blockwise z-statistics vectors

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
data(test)
X.1 = data.list$X
Y.1 = data.list$Y1
Y.2 = data.list$Y2
Block.list = data.list$index
z.block <- matrix(NA, nrow = 1000, ncol = 2)
for(i in 1:1000){
  z.block[i,]  =  Z.Block(X.1 = X.1[, Block.list[[i]] ], X.2 = X.1[, Block.list[[i]] ],
                          outcome.1 = Y.1, outcome.2 =Y.2, )
}

JianqiaoWang/MaxBlock documentation built on Dec. 18, 2021, 1:30 a.m.