This function tests the association of CNV with
continuous trait of interest. Two statistics are provided
for different strategies with the intensity measurement.
The matrix of intensity measurements. The
row names must be consistent with the Individual ID in
fam file.
fam
The FAM file which follows the format defined
in PLINK.
envirX
The matrix of environmental variables. The
intercept is automatically included and it does not need
to be in this matrix.
phi
The correlation matrix between individuals. It
can be built with the kinship coefficient or the
estimated correlation matrix with SNP data. Free software
that builds this matrix is available, and one of them can
be downloaded at http://biostat.ac.kr/fqls/ The
default is an identity matrix and it is for independent
samples.
N
Number of clusters one wants to fit to the data.
N needs to be larger than 1 and if it is 1, error will be
returned. It can be estimated with the function
ClusProc.
varSelection
Factor. For specifying how to handle
the intensity values. It must take value on 'RAW',
'PC.9', 'PC1'and 'MEAN'. If the value is 'RAW', then the
raw intensity value will be used. If it is 'PC.9', then
the first several PCA scores which account for 90% of
all the variance will be used. If the value is 'PC1',
then the first PCA scores will be used. If the value is
'MEAN', the mean of all the probes will be used. The
default method is 'PC1'.
H0
Logicals. If it is TRUE (the default), all
parameters are estimated under the assumption that there
is no genetic association between CNV and phenotypes. If
it is FALSE, parameters are estimated under the null or
alternative hypothesis.
threshold
Optional number of convergence
threshold. The iteration stops if the absolute difference
of log likelihood between successive iterations is less
than it. The default threshold 1e-05 will be used if it's
missing.
itermax
Optional. The iteration stops if the times
of iteration is large than this value. The default number
8 will be used if it's missing.
thresEM
Optional number of convergence threshold
in the EM (expectation-maximization method) procedure.
The default threshold 0.005 will be used if it's
missing.
thresAI
Optional number of convergence threshold
in the AI (average information method) procedure. The
default threshold 1e-05 will be used if it's missing.
Value
It returns object of class 'asso'. The result is obtained
under the null hypothesis if H0 is TRUE, otherwise the
result is obtained under null or alternative hypothesis.
para
The parameter estimations for the best fit.
clusRes
The clustering assignment for each
individual.
Author(s)
Meiling Liu, Sungho Won and Weicheng Zhu
Examples
# Fit the data under the assumption that there are 3 clusters
fit.pc <- AssoTestProc(signal=signal,fam=fam,envirX=envirX,phi=phi,N=3,varSelection='PC.9')
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/AssoTestProc.Rd_%03d_medium.png", width=480, height=480)
> ### Name: AssoTestProc
> ### Title: CNV association test procedure
> ### Aliases: AssoTestProc
>
> ### ** Examples
>
> # Fit the data under the assumption that there are 3 clusters
> fit.pc <- 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.
>
>
>
>
>
> dev.off()
null device
1
>