STE: Score test with the most probable CNV

Description Usage Arguments Value Author(s) Examples

View source: R/score_test.R

Description

Calculates the score test statistics with the most probable CNV.

Usage

1
  STE(envirX, clusRes, fam, alpha, phi, sig2g, sig2)

Arguments

envirX

The matrix of environmental variables. The intercept should be included if it's needed.

fam

The FAM file which follows the format defined in PLINK.

clusRes

The clustering group which is signed to each individual.

alpha

The estimated parameters for environmental variables under null hypothesis. This value can be calculated by using function AssoTestProc.

phi

The matrix of correlation between individuals.

sig2g

The estimated standard error for polygenic effect under null hypothesis. This value can be calculated by using function AssoTestProc.

sig2

The estimated standard error for environmental effect under null hypothesis. This value can be calculated by using function AssoTestProc.

Value

It returns the statistic value and pvalue of the score test.

STEs

The statistic value of score test with the most probable CNV.

STEp

The pvalue of score test with the most probable CNV.

Author(s)

Meiling Liu, Sungho Won

Examples

1
2
3
4
5
6
7
# Fit the data under the assumption that there are 3 clusters
asso.fit <- AssoTestProc(signal=signal,fam=fam,envirX=envirX,phi=phi,N=3,varSelection='PC.9')
cnv_e <- asso.fit$clusRes
alpha <- asso.fit$para$alpha
sig2g <- asso.fit$para$sig2g
sig2 <- asso.fit$para$sig2
STE(envirX=envirX,clusRes=cnv_e,fam=fam,alpha=alpha,phi=phi,sig2g=sig2g,sig2=sig2)

PedCNV documentation built on May 2, 2019, 8:17 a.m.