找回密码
 注册
查看: 1414|回复: 0

R语言 SKAT包 SKAT()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-9-30 09:50:14 | 显示全部楼层 |阅读模式
SKAT(SKAT)
SKAT()所属R语言包:SKAT

                                        SNP-set (Sequence) Kernel Association Test
                                         SNP组(序列)内核协会测试

                                         译者:生物统计家园网 机器人LoveR

描述----------Description----------

Test for association between a set of SNPS/genes and continuous or dichotomous outcomes using the kernel machine.      
测试一套SNPS /基因和连续或二分的结果,使用的内核机之间的关联。


用法----------Usage----------



SKAT(Z, obj, kernel = "linear.weighted",
  method="davies", weights.beta=c(1,25), weights=NULL,
  impute.method="fixed", r.corr=0, is_check_genotype=TRUE,
  is_dosage = FALSE, missing_cutoff=0.15 )

SKAT.SSD.OneSet(SSD.INFO, SetID, obj, ...)

SKAT.SSD.OneSet_SetIndex(SSD.INFO, SetIndex, obj, ... )




参数----------Arguments----------

参数:Z
a numeric genotype matrix with each row as a different individual and each column as a separate gene/snp. Each genotype should be coded as 0, 1, 2, and 9 (or NA) for AA, Aa, aa, and missing, where A is a major allele and a is a minor allele. Missing genotypes will be imputed by the simple Hardy-Weinberg equilibrium (HWE) based imputation.  
一个数值作为不同的个体的每一行和每一列都作为一个单独的基因/ SNP基因型矩阵。每种基因型应编码为0,1,2,和9(或NA)为AA,Aa中,氨基酸,和缺失,其中A是一个主要的等位基因和a是一个次要等位基因。失踪的基因型将被归咎于简单的Hardy-Weinberg平衡(HWE)归集。


参数:obj
an output object of the SKAT_Null_Model function.  
一个输出对象的SKAT_Null_Model功能。


参数:kernel
a type of kernel (default= "linear.weighted"). See detail section.  
一个类型(默认的内核=“linear.weighted的”)。细节部分。


参数:method
a method to compute the p-value (default= "davies").  "davies" represents an exact method that  computes the p-value by inverting the characteristic function of the mixture chisq,  "liu" represents an approximation method that matches the first 3 moments,  "liu.mod" represents modified "liu" method that matches kurtosis instead of skewness  to improve tail probability approximation, and "optimal" represents a recently proposed optimal test based on an unified approach. See details.
的方法来计算p值(默认=“戴维斯”)。 “戴维斯”代表一个确切的方法,该方法通过反转的特征函数的混合物chisq计算p-值,“六”表示的近似方法,该方法相匹配的第3的时刻,“liu.mod”表示修改“六”峭度,而不是偏态,以改善尾概率近似,和“最佳”匹配的方法,代表了最近提出的最佳测试基于一个统一的方法。查看详细信息。


参数:weights.beta
a numeric vector of parameters of beta weights.  It is only used with weighted kernels.  If you want to use your own  weights, please specify the “weights” parameter.
一个数值向量的β的权重的参数。它只是使用与加权的内核。如果你想使用自己的重量,请注明“权重”参数。


参数:weights
a numeric vector of weights for the weighted kernels.  It is √{w} in the SKAT paper.  So if you want to use Madsen and Browning (2009) type of weight, you should set each element of weights as 1/ √{p(1-p)},  not 1/ p(1-p). When it is NULL, the beta weight with the “weights.beta” parameter is used.  
一个数值向量的权重的加权内核。它√{w}在SKAT纸。所以,如果你想使用Madsen和勃朗宁(2009)类型的重量,你应该设置每个元素的权重1/ √{p(1-p)},而不是1/ p(1-p)。当它是NULL,β重量参数“weights.beta”。


参数:impute.method
a method to impute missing genotypes (default= "fixed"). "random" imputes missing genotypes by generating binomial(2,p) random variables (p is the MAF), and "fixed" imputes missing genotypes by assigning the mean genotype value (2p). If you use "random", you will have different p-values for different runs because imputed values are randomly assigned.
方法填补缺失基因型(默认为“固定”)。 “随机”责难缺少基因型产生二项式(2,p)的随机变量(p是MAF),和“固定”责难缺少通过分配值(2p)的平均基因型基因型。如果您使用“随机”,你将有不同的p值不同的运行是随机分配的,因为估算值。


参数:r.corr
the ρ parameter of new class of kernels with compound symmetric correlation structure for genotype effects (default= 0). If you give a vector value, SKAT will conduct the optimal test. See details.
ρ内核的复合对称的相关结构参数的一类新的基因型效应(默认值= 0)。如果你给一个矢量值,,SKAT将进行最佳的测试。查看详细信息。


参数:is_check_genotype
a logical value indicating whether to check the validity of the genotype matrix Z (default= TRUE). If you use non-SNP type data and want to run kernel machine test, please set it FALSE, otherwise you will get an error message. If you use SNP data or imputed data, please set it TRUE. If it is FALSE, and you use weighted kernels, the weights should be given through “weights” parameter.
一个逻辑值,该值指示是否检查的有效性的基因型矩阵Z(默认值= TRUE)。如果您使用非SNP类型的数据和要运行的核心机测试,请设置为FALSE,否则,你会得到一个错误信息。如果您使用的SNP数据或估算数据,将其设置为TRUE。如果它是假的,使用加权的内核,应给予的权重,通过“权重”参数。


参数:is_dosage
a logical value indicating whether the matrix Z is a dosage matrix. If it is TRUE, SKAT will ignore “is_check_genotype”.  
一个逻辑值,该值指示,矩阵Z是否是剂量矩阵。如果是TRUE,,SKAT将会忽略“is_check_genotype”。


参数:missing_cutoff
a cutoff of the missing rates of SNPs (default=0.15). Any SNPs with missing rates higher than cutoff will be excluded from the analysis.
截止的SNP位点的缺失率(默认= 0.15)。将被排除在分析之外的任何单核苷酸多态性与不知所终的比率高于截止。


参数:SSD.INFO
an SSD_INFO object returned from Open_SSD.  
的SSD_INFO返回的对象Open_SSD。


参数:SetID
a character value of Set ID. You can find a set ID of each set from SetInfo object of SSD.INFO
一个字符值设置ID。从呼叫SetInfo对象的SSD.INFO中,你可以找到一个ID的每一组


参数:SetIndex
a numeric value of Set index. You can find a set index of each set from SetInfo object of SSD.INFO   
一个集指数的数值。从呼叫SetInfo对象的SSD.INFO中,你可以找到一个指数各组


参数:...
furthuer arguments to be passed to “SKAT”  
furthuer参数传递的“SKAT”


Details

详细信息----------Details----------

The old interface is defunct. Please use the output object of SKAT_Null_Model to run SKAT.
旧的接口已经不存在。请使用的输出对象SKAT_Null_Model运行SKAT。

There are pre-specified 6 types of kernels: "linear", "linear.weighted", "IBS", "IBS.weighted", "quadratic" and "2wayIX". Among them, "2wayIX" is a product kernel consisting of main effects and interaction terms. You can use one of them or you can give your own kernel matrix as a parameter.
有预先指定6类型的内核:“线性”,“linear.weighted”,“肠易激综合征”,“IBS.weighted”,“二次”和“2wayIX”。其中,“2wayIX”是产品的核心组成的主效应和交互作用项。您可以使用其中之一,或者你可以给你自己的内核矩阵作为参数。

The kernel matrix of weighted linear kernel is K = G W W G , where G is a genotype matrix and W is a diagonal weight matrix.  Please note that this notation is different from the notation we used in the original SKAT paper, which was K = G W G . The Madsen and Browning (2009) type of weight is w = 1/ √{p(1-p)} in our current notation. By the previous notation, it is w = 1/ p(1-p)
加权线性内核的内核矩阵是K = G W W G ,其中G是一个基因型矩阵和W是一个对角线的权重矩阵。请注意,此符号是不同的从原始SKAT纸,这是K = G W G 中使用的符号,我们。 Madsen和勃朗宁(2009年)的重量是w = 1/ √{p(1-p)}在我们当前的符号。通过前面的符号,它是w = 1/ p(1-p)

If you want to use the SSD file, open it first, and then use either SKAT.SSD.OneSet  or SKAT.SSD.OneSet_SetIndex. Set index is a numeric value and it is automatically assigned to each set (from 1).
如果你想使用SSD的文件,打开它,然后使用无论是SKAT.SSD.OneSet或SKAT.SSD.OneSet_SetIndex。 SET指数是一个数值,它会自动分配给每一组(1)。

r.corr represents the ρ parameter of the unified test,  Q_{ρ} = (1-ρ) Q_S + ρ Q_B , where Q_S is a test statistic of SKAT, and Q_B is a score test statistic of weighted burden test. Thus, ρ=0 results in the original weighted linear kernel SKAT, and ρ=1 results in the weighted burden test (default: ρ=0). If r.corr is a vector, the optimal test will be conducted with automatically seleting ρ from given r.corr. ρ should be a value between 0 and 1.
r.corrρ参数的统一测试,Q_{ρ} = (1-ρ) Q_S + ρ Q_B,Q_S是检验统计量的SKAT,Q_B是一个得分检验统计量的加权负担试验。因此,ρ=0结果在原来的加权线性核SKAT,和ρ=1的加权负担试验的结果(默认:ρ=0)。如果r.corr是一个向量,最佳的测试,将进行自动选课ρ从给定的r.corr的。 ρ应该是0和1之间的值。

If method="optimal", the optimal test is conducted with equal sized grid of 11 points (from 0 to 1).
如果=“最优”的方法,进行最佳的测试与大小相等的网格为11点(从0到1)。


值----------Value----------


参数:p.value
the p-value of SKAT.  
p-值SKAT。


参数:p.value.resampling
the p-value from resampled outcome. You can get it when you use obj from SKAT_Null_Model function with resampling. See the SKAT_Null_Model.  
p-值从再采样结果。当您使用obj的SKAT_Null_Model功能与重采样,你可以得到它。看到的SKAT_Null_Model。


参数:p.value.noadj
the p-value of SKAT without the small sample adjustment. It only appears when small sample adjustment is applied.
SKAT的p值的没有调整小样本。小样本调整时,才会出现。


参数:p.value.noadj.resampling
the p-value from resampled outcome without the small sample adjustment. It only appears when small sample adjustment is applied.  
p-值不小样本调整从重新采样的结果。小样本调整时,才会出现。


参数:Q
the test statistic of SKAT.
SKAT的检验统计量。


参数:param
estimated parameters of each method.   
估计参数的每个方法。


参数:param$Is_Converged
(only with method="davies") an indicator of the convergence. 1 indicates the method is converged, and 0 indicates the method is not converged. When 0 (not converged), "liu" method is used to compute p-value.   
(仅适用于=“戴维斯”)的收敛性的一个指标。 1表明,该方法被会聚,0表示的方法不收敛。 0时(融合),“柳”的方法来计算p值。


(作者)----------Author(s)----------


Seunggeun Lee, Micheal Wu



参考文献----------References----------


* contributed equally.

Combination of chi-2 Random Variables,  Journal of the Royal Statistical Society. Series C , 29(3), p. 323-333,
to the distribution of non-negative definite quadratic forms in non-central normal variables, Computational Statistics and Data Analysis, 53, 853-856



实例----------Examples----------




data(SKAT.example)
attach(SKAT.example)



#############################################################[################################################## ##########]
#        Compute the P-value of SKAT with default Beta(1,25) Weights [计算的P-值默认情况下,测试SKAT(1,25)重量]
#                - without covariates[ - 没有协变量]

# continuous trait[连续特征]
obj<-SKAT_Null_Model(y.c ~ 1, out_type="C")
SKAT(Z, obj)$p.value

# dichotomous trait [二分特征]
obj<-SKAT_Null_Model(y.b ~ 1, out_type="D")
SKAT(Z, obj)$p.value


##################################################[#################################################]
#        Compute the P-value of SKAT with default Beta(1,25) Weights[计算的P-值默认情况下,测试SKAT(1,25)重量]
#                - with covariates[ - 协变量]

# continuous trait[连续特征]
obj<-SKAT_Null_Model(y.c ~ X, out_type="C")
SKAT(Z, obj)$p.value

obj.b<-SKAT_Null_Model(y.b ~ X, out_type="D")
SKAT(Z, obj.b)$p.value

##################################################[#################################################]
#        Compute the P-value of SKAT with default Beta(1,25) Weights[计算的P-值默认情况下,测试SKAT(1,25)重量]
#                - Optimal Test[ - 优化试验]

SKAT(Z, obj, method="optimal")$p.value
SKAT(Z, obj.b, method="optimal")$p.value


#############################################################[################################################## ##########]
#        Compute the P-value of SKAT with Beta(1,30) Weights[SKAT的P-值的计算与Beta(1,30)重量]

SKAT(Z, obj, weights.beta=c(1,30))$p.value

#############################################################[################################################## ##########]
#        Resampling [重采样]

# parametric boostrap under the NULL[下NULL参数的自举]
obj<-SKAT_Null_Model(y.b ~ X, out_type="D",n.Resampling=5000, type.Resampling="bootstrap")

# SKAT p-value[SKAT p值]
re<- SKAT(Z, obj, kernel = "linear.weighted")
re$p.value        # SKAT p-value[SKAT p值]
Get_Resampling_Pvalue(re)        # get resampling p-value[得到重采样p值]



转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。


注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|小黑屋|生物统计家园 网站价格

GMT+8, 2025-5-25 16:37 , Processed in 0.028288 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表