Score.Test.Overall(SPA3G)
Score.Test.Overall()所属R语言包:SPA3G
Implement the overall genetic effect test for H0:
实现的整体遗传效应试验H0:
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Score.Test.Overall returns results of overall genetic effect test, including score test statistic, estimated degree of freedom and scale parameter, and test p-value.
Score.Test.Overall返回结果的的整体遗传效应试验,包括得分检验统计量,估计程度的自由和尺度参数,并检验p值。
用法----------Usage----------
Score.Test.Overall(Y, K1, K2, K3)
参数----------Arguments----------
参数:Y
numerical vector: quantitative phenotypes
数值向量量化表型
参数:K1
matrix: kernel matrix of the first gene.
矩阵:核矩阵的第一个基因。
参数:K2
matrix: kernel matrix of the second gene.
矩阵:核矩阵的第二个基因。
参数:K3
matrix: elementwise multiplication of K1 and K2
K1和K2的矩阵:的elementwise的乘法
值----------Value----------
参数:Score
score statistic
分数统计
参数:df
estimated degree of freedom for the scaled chi-square
估计自由度的比例卡方
参数:scale
estimated scale parameter for the scaled chi-square
估计尺度参数的比例卡方
参数:p.value
test p-value
检验的P值
实例----------Examples----------
## The function is currently defined as[#功能目前被定义为]
function (Y, K1, K2, K3)
{
b <- mean(Y)
sig2 <- var(Y)
U <- t(Y - b) %*% (K1 + K2 + K3) %*% (Y - b)/(2 * sig2)
M <- (K1 + K2 + K3)
e <- TRACE(PROJECT(M))/2
c11 <- TT(PROJECT(K1), PROJECT(K1))
c12 <- TT(PROJECT(K1), PROJECT(K2))
c13 <- TT(PROJECT(K1), PROJECT(K3))
c22 <- TT(PROJECT(K2), PROJECT(K2))
c23 <- TT(PROJECT(K2), PROJECT(K3))
c33 <- TT(PROJECT(K3), PROJECT(K3))
COV <- matrix(c(c11, c12, c13, c12, c22, c23, c13, c23, c33),
3, 3)
Its <- c(TRACE(PROJECT(K1)), TRACE(PROJECT(K2)), TRACE(PROJECT(K3)))
correct_COV <- (COV - Its %*% t(Its)/(n - 1))/2
Itt <- sum(correct_COV)
k <- Itt/(2 * e)
v <- 2 * e^2/Itt
pvalue <- pchisq(U/k, df = v, lower.tail = FALSE)
object <- list(Score = U, p.value = pvalue, df = v, scale = k)
class(object) <- "Score Test: tau1=tau2=tau3=0"
return(object)
}
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|