STIM: Score test with the intensity value

Description Usage Arguments Value Author(s) Examples

View source: R/score_test.R

Description

Calculates the score test statistics with the intensity value.

Usage

1
  STIM(envirX, signal, 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.

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

1
2
3
4
5
6
# 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)

Example output

Loading required package: Rcpp
Loading required package: RcppArmadillo
Loading required package: ggplot2
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.
$STIMs
         [,1]
[1,] 28.54141

$STIMp
             [,1]
[1,] 0.0001753618

$df
[1] 7

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