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.
signal
The matrix of intensity measurements. The
row names must be consistent with the Individual ID in
fam file.
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.
STIMs
The statistic value of score test with
the intensity value under null hypothesis.
STIMp
The pvalue of score test with the intensity
value under null hypothesis.
df
The degree of
freedom of score test with the intenstiy value under null
hypothesis.
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')
alpha <- asso.fit$para$alpha
sig2g <- asso.fit$para$sig2g
sig2 <- asso.fit$para$sig2
STIM(envirX=envirX,signal=signal,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/STIM.Rd_%03d_medium.png", width=480, height=480)
> ### Name: STIM
> ### Title: Score test with the intensity value
> ### Aliases: STIM
>
> ### ** 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.
> alpha <- asso.fit$para$alpha
> sig2g <- asso.fit$para$sig2g
> sig2 <- asso.fit$para$sig2
> STIM(envirX=envirX,signal=signal,fam=fam,alpha=alpha,phi=phi,sig2g=sig2g,sig2=sig2)
$STIMs
[,1]
[1,] 28.54141
$STIMp
[,1]
[1,] 0.0001753618
$df
[1] 7
>
>
>
>
>
> dev.off()
null device
1
>