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
# 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)
Results
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(PedCNV)
Loading required package: Rcpp
Loading required package: RcppArmadillo
Loading required package: ggplot2
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/PedCNV/STE.Rd_%03d_medium.png", width=480, height=480)
> ### Name: STE
> ### Title: Score test with the most probable CNV
> ### Aliases: STE
>
> ### ** Examples
>
> # 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')
The first 5 principal components are used.
The logliklihood for signal model is -1477.954 when clustering number is 3.
Iteration 1:
AI algorithm for REML.
The individuals are correlated, LMM is used.
Iteration 2:
AI algorithm for REML.
The individuals are correlated, LMM is used.
Iteration 3:
AI algorithm for REML.
The individuals are correlated, LMM is used.
> 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)
$STEs
[,1]
[1,] 26.69897
$STEp
[,1]
[1,] 2.377481e-07
>
>
>
>
>
> dev.off()
null device
1
>