SPA(SPA3G)
SPA()所属R语言包:SPA3G
run SPA
运行SPA
译者:生物统计家园网 机器人LoveR
描述----------Description----------
SPA function for testing overall genetic effect and ineraction effect of a pair of genes.
SPA用于测试整体遗传效应和ineraction效果对基因功能。
用法----------Usage----------
SPA(Y, G, g.size, cutoff = 0.05, par = NULL, est.alt = FALSE)
参数----------Arguments----------
参数:Y
numerical vector: phenotype values.
数值向量:表型值。
参数:G
matrix: genotypes of the gene pair, where columns are SNP markers and rows are samples.
矩阵基因型的基因对,其中列SNP标记和行样品。
参数:g.size
numerical vector: with two elements indicating number of SNP markers in each gene of the gene pair.
数值向量数量的基因对每个基因中的SNP标记,表示两个元素。
参数:cutoff
numerical value: cutoff for the overall test pvalue indicating when to perform interaction test.
数值:截止指示进行互动测试的整体测试P值。
参数:par
numerical vector: initial values of variance components under null model of interaction test
数值向量:空互动的测试模型下方差分量的初始值
参数:est.alt
logical: if TRUE estimate variance comonents under the full model.
逻辑如果TRUE的估计方差comonents的,根据完整的模型。
Details
详细信息----------Details----------
SPA implements the model based kernel machine method for testing gene-centric gene-gene interaction of Li, S and Cui, Y. (2012). SPA takes a numerical vector as phenotypes and a numerical data matrix of SNP markers as columns and rows as samples. Markers in two genes are ordered as (gene 1, gene 2) and combined together into one matrix.
SPA实现基于模型的核心机基因为中心的李,S和崔,Y.(2012年)的基因 - 基因交互作用的测试方法。 SPA采用数字矢量表型和数值数据矩阵的列和行作为样本的SNP标记。标记是有序的两个基因(基因,基因2),并结合成一个矩阵。
This function performs overall genetic effect test and interaction effect test as judged by users. Variance components can also be estimated by setting alt.est=TRUE.
此功能进行的整体遗传效应测试和互作效应试验作为判断用户。方差分量还可以通过以下来估计设置alt.est = TRUE。
For a detailed description of usage, input and output, see the example.
如需使用,输入和输出的详细描述,请参见例如。
值----------Value----------
参数:test.overall
results of the overall test
整体测试结果
参数:test.interaction
results of the interaction test
的相互作用试验的结果
参数:parameter.est.alter
estimates of variance components under the full model
下全模型的方差分量估计
(作者)----------Author(s)----------
Yuehua Cui<cui@stt.msu.edu>
Shaoyu Li<shaoyu.li@stjude.org>
参考文献----------References----------
实例----------Examples----------
## The function is currently defined as[#功能目前被定义为]
function (Y, G, g.size, cutoff = 0.05, par = NULL, est.alt = FALSE)
{
L1 <- g.size[1]
L2 <- g.size[2]
Gene1 <- G[, 1 1]
Gene2 <- G[, (L1 + 1):ncol(G)]
w1 <- rep(1, L1)
w2 <- rep(1, L2)
K1 <- KERNEL(Gene1, w1)
K2 <- KERNEL(Gene2, w2)
K3 <- K1 * K2
test_o <- Score.Test.Overall(Y, K1, K2, K3)
if (test_o$p.value < cutoff) {
if (is.null(par)) {
grid <- c(0, 1e-05, 1e-04, 0.001, 0.01, 0.1, 1)
test_i <- est <- vector("list", length(grid))
for (i in 1:length(grid)) {
initials <- c(var(Y), rep(grid[i], 2))
test_i[[i]] <- Score.Test.Interact(Y, K1, K2,
K3, initials, method = "BFGS", test = TRUE)
}
}
if (!is.null(par)) {
initials <- par
test_i <- list(Score.Test.Interact(Y, K1, K2, K3,
initials, method = "BFGS", test = TRUE))
}
test.lr <- c()
for (i in 1:length(test_i)) {
test.lr[i] <- test_i[[i]]$restricted.logLik
}
test_int <- test_i[[which.max(test.lr)]]
if (est.alt) {
initials <- c(test_int$VCs, 0)
est_res <- Score.Test.Interact(Y, K1, K2, K3, initials,
method = "BFGS", test = FALSE)
res <- list(test.overall = test_o, test.interaction = test_int,
parameter.est.alter = est_res)
}
else {
res <- list(test.overall = test_o, test.interaction = test_int)
}
}
else {
res <- list(test.overall = test_o)
}
return(res)
}
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|