Learn R Programming

PedCNV (version 0.1)

STE: Score test with the most probable CNV

Description

Calculates the score test statistics with the most probable CNV.

Usage

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.

Examples

Run this code
# 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)

Run the code above in your browser using DataLab