chi.squared(snpStats)
chi.squared()所属R语言包:snpStats
Extract test statistics and p-values
提取检验统计量和p值
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Generic functions to extract values from the SNP association test objects returned by various testing functions
通用函数来提取的SNP关联的测试对象的值返回不同的测试功能
用法----------Usage----------
chi.squared(x, df)
deg.freedom(x)
effect.sign(x, simplify)
p.value(x, df)
sample.size(x)
effective.sample.size(x)
参数----------Arguments----------
参数:x
An object of class "SingleSnpTests", "SingleSnpTestsScore", or "GlmTests"
一个对象类"SingleSnpTests","SingleSnpTestsScore"或"GlmTests"
参数:df
Either the numeric value 1 or 2 (not used when x is of class "GlmTests")
无论是数值1或2(不使用时x类"GlmTests")
参数:simplify
This switch is relevant when x is of class "GlmTests" and plays the same role as it does in sapply. If simplify=TRUE, where possible the output is returned as a simple numeric vector rather than as a list
此开关是相关的,当x类"GlmTests"“起着同样的作用,因为它在sapply。如果simplify=TRUE,在可能的情况下输出作为一个简单的数字向量,而不是作为一个列表返回
Details
详情----------Details----------
These functions operate on objects created by single.snp.tests, snp.lhs.tests, and snp.lhs.tests.
这些功能操作single.snp.tests,snp.lhs.tests,snp.lhs.tests创建的对象。
The functions chi.squared and p.value return the chi-squared statistic and the corresponding p-value. The argument df is only used for output from single.snp.tests, since this function calculates both 1 df and 2 df tests for each SNP. The functions snp.lhs.tests and snp.rhs.tests potentially calculate chi-squared tests on varying degrees of freedom, which can be extracted with deg.freedom. The function effect.sign indicates the direction of associations. When applied to an output object from snp.single.tests, it returns +1 if the association, as measured by the 1 df test, is positive and -1 if the association is negative. Each test calculated by GlmTests are potentially tests of several parameters so that the effect sign can be a vector. Thus effect.sign returns a list of sign vectors unless, if simplify=TRUE, and it can be simplified as a single vector with one sign for each test. The function sample.size returns the number of observations actually used in the test, after exclusions due to missing data have been applied, and effective.sample.size returns the effective sample size which is less than the true sample size for tests on imperfectly imputed SNPs.
职能chi.squared和p.value返回卡方统计和相应的p值。参数df只用输出single.snp.tests,因为这个函数计算df和每个SNP的DF测试。职能snp.lhs.tests和snp.rhs.tests可能不同程度的自由,可以用deg.freedom提取计算卡方检验。功能effect.sign表示协会的方向。当应用到输出对象从snp.single.tests,它返回+1如果协会,由1 DF测试测量,是积极和-1如果该协会是否定的。 GlmTests计算每个测试有可能测试的几个参数,这样的效果符号可以是一个向量。因此effect.sign返回一个符号向量的名单,除非如果simplify=TRUE,它可以简化为单一向量与每个测试的标志之一。功能sample.size返回的实际测试中使用的意见后,排除由于缺少数据,已应用于,effective.sample.size返回的有效样本大小,这是比真正的测试样本大小不完全归咎于个SNPs。
值----------Value----------
A numeric vector containing the chi-squared test statistics or p-values. The output vector has a names attribute.
一个数字向量,卡方检验统计量p值。输出向量names属性。
注意----------Note----------
The df and simplify arguments are not always
df和simplify参数并非总是
作者(S)----------Author(s)----------
David Clayton <a href="mailto:david.clayton@cimr.cam.ac.uk">david.clayton@cimr.cam.ac.uk</a>
参见----------See Also----------
single.snp.tests, snp.lhs.tests, snp.rhs.tests, SingleSnpTests-class, SingleSnpTestsScore-class, GlmTests-class
single.snp.tests,snp.lhs.tests,snp.rhs.tests,SingleSnpTests-class,SingleSnpTestsScore-class,GlmTests-class
举例----------Examples----------
data(testdata)
tests <- single.snp.tests(cc, stratum=region, data=subject.data,
snp.data=Autosomes, snp.subset=1:10)
chi.squared(tests, 1)
p.value(tests, 1)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|