gt(globaltest)
gt()所属R语言包:globaltest
Global Test (new implementation, 2009)
全球测试(2009年实施新)
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Tests a low-dimensional null hypothesis against a potentially high-dimensional alternative in regression models (linear regression, logistic regression, poisson regression, Cox proportional hazards model).
测试针对潜在高维替代在回归模型(线性回归,logistic回归,泊松回归,Cox比例风险模型)的低维的零假设。
用法----------Usage----------
gt(response, alternative, null, data, test.value,
model = c("linear", "logistic", "cox", "poisson", "multinomial"), levels,
directional = FALSE, standardize = FALSE, permutations = 0, subsets,
weights, alias, x = FALSE, trace)
参数----------Arguments----------
参数:response
The response vector of the regression model. May be supplied as a vector or as a formula object. In the latter case, the right hand side of response is passed on to alternative if that argument is missing, or otherwise to null.
响应向量回归模型。可提供作为向量或作为formula对象。在后一种情况,response的右侧被传递到alternative如果缺少这样的说法,否则null。
参数:alternative
The part of the design matrix corresponding to the alternative hypothesis. The covariates of the null model do not have to be supplied again here. May be given as a half formula object (e.g. ~a+b). In that case the intercept is always suppressed. Alternatively, the alternative argument may also be given as an ExpressionSet object, in which case t(exprs(alternative)) is used for the alternative argument, and pData(alternative) is passed on to the data argument if that argument is missing.
设计矩阵相应的替代假说的一部分。空模型的协变量没有在这里再次提供。可作为半formula对象(例如~a+b)。在这种情况下,的截距总是抑制。另外,alternative参数也可以得到ExpressionSet对象,在这种情况下,t(exprs(alternative))alternative参数,pData(alternative)通过data参数,如果参数丢失。
参数:null
The part of the design matrix corresponding to the null hypothesis. May be given as a design matrix or as a half formula object (e.g. ~a+b). The default for null is ~1, i.e. only an intercept. This intercept may be suppressed, if desired, with null = ~0.
设计矩阵对应的零假设的一部分。可作为一个设计矩阵或半formula对象(如~a+b)。默认null是~1,即只有一个拦截。这可能会被拦截压制,如果需要的话,用null = ~0。
参数:data
Only used when response, alternative, or null is given in formula form. An optional data frame, list or environment containing the variables used in the formulae. If the variables in a formula are not found in data, the variables are taken from environment(formula), typically the environment from which gt is called.
只用了response,alternative或null公式的形式。一个可选的数据框,列表或包含在公式中使用的变量的环境。如果在公式中的变量不会被发现在data,变量从环境(公式),通常从gt被称为环境。
参数:test.value
An optional vector regression coefficients to test. The default is to test the null hypothesis that all regression coefficients of the covariates of the alternative are zero. The test.value argument can be used to test a value other than zero. The coefficients are applied to the design matrix of alternative before any standardization (see the standardize argument).
一个可选的向量回归系数测试。默认的是测试的零假设,即替代的所有协变量的回归系数均为零。 test.value参数,可以用来测试一个值大于零。系数应用于设计矩阵alternative(见standardize参数)之前的任何标准化。
参数:model
The type of regression model to be tested. If omitted, the function will try to determine the model from the class and values of the response argument.
回归模型的类型进行测试。如果省略,函数会尝试从类和response参数值确定模型。
参数:levels
Only used if response is factor. Selects a subset of levels(response) to be tested, given as a character vector. If a vector of length >1, the test uses only the subjects with the specified outcome categories. If levels is of length 1, the test reduces the response to a two-valued factor, testing the specified outcome category against the others combined.
只用了,如果反应是factor。选择一个子集levels(response)进行测试,作为特征向量。如果一个向量长度>1,测试科目使用指定类别的结果。 levels如果长度为1,测试减少到两个值的因素,结合其他测试对指定的结果类别。
参数:directional
If set to TRUE, directs the power of the test especially against the alternative that the true regression coefficients under the alternative have the same sign. The default is that the power of the test does not depend on the sign of the true regression coefficients. Set negative weights for covariates that are expected to have opposite sign.
如果设置为TRUE,指导的替代品,替代下的真正的回归系数有相同的符号,尤其是对测试的权力。默认的是,真正的回归系数的符号不依赖于电源测试。设置的负面weights变项,预计将有相反的符号。
参数:standardize
If set to TRUE, standardizes all covariates of the alternative to have unit second central moment. This makes sure that the test result is independent of the relative scaling of the covariates. The default is to let covariates with more variance have a greater weight in the test.
如果设置为TRUE,规范所有协变量的替代单位第二次中央时刻。这可以确保测试结果是独立的协变量的相对尺度。默认的是让更多的方差协变量在测试中有一个更大的重量。
参数:permutations
The number of permutations to use. The default, permutations = 0, uses the asymptotic distribution. The asymptotic distribution is the exact distribution in case of the linear model with normal errors.
使用数量排列。默认情况下,permutations = 0,使用的渐近分布。渐近分布是在正常误差的线性模型的情况下的精确分布。
参数:subsets
Optional argument that can be used to test one or more subsets of the covariates in alternative. Can be a vector of column names or column indices of alternative, or a list of such vectors. In the latter case, a separate test will be performed for each subset.
可选的参数,可以使用测试alternative的一个或多个协变量子集。可以是一个列名或列索引alternative,或列表等向量的向量。在后一种情况下,将执行一个单独的测试,为每个子集。
参数:weights
Optional argument that can be used to give certain covariates in alternative greater weight in the test. Can be a vector or a list of vectors. In the latter case, a separate test will be performed for each weight vector. If both subsets and weights are specified as a list, they must have the same length. In that case, weights vectors may have either the same length as the number of covariates in alternative, or the same length as the corresponding subset vector. Weights can be negative; the sign has no effect unless directional is TRUE.
可选参数,可以用来给alternative更大的重量在测试中的某些变项。可以是一个向量或向量列表。在后一种情况下,将执行一个单独的测试,每个权重向量。如果这两个subsets和weights列表中指定的,他们必须具有相同的长度。在这种情况下,weights向量可能有作为协变量alternative相同的长度,或相应的子集向量的长度相同。权重可以是负的标志有没有影响,除非directional是TRUE。
参数:alias
Optional second label for each test. Should be a vector of the same length as subsets. See also alias.
可选的第二个标签,每个测试。应该是相同长度的向量subsets。还可以看alias。
参数:x
If TRUE, gives back the null and alternative design matrices. Default is not to return these matrices.
如果TRUE,还给null和alternative设计矩阵。默认是不归还这些矩阵。
参数:trace
If TRUE, prints progress information. This is useful if many tests are performed, i.e.\ if subsets or weights is a list. Note that printing progress information involves printing of backspace characters, which is not compatible with use of Sweave. Defaults to gt.options()$trace.
如果TRUE,打印进度信息。这是有用的,如果进行了多次试验,即\如果subsets或weights是一个列表。请注意,打印进度信息涉及印刷退格字符,这是不兼容与Sweave使用的。默认为gt.options ()$trace。
Details
详情----------Details----------
The Global Test tests a low-dimensional null hypothesis against a (potentially) high-dimensional alternative, using the locally most powerful test of Goeman et al (2006). In this regression model implementation, it tests the null hypothesis response ~ null, that the covariates in alternative are not associated with the response, against the alternative model response ~ null + alternative that they are.
全球测试,测试反对(潜在的)高维替代低维的零假设,利用的Goeman等(2006)的当地最强大的测试。在此回归模型的实现,它测试的零假设response ~ null,在协变量alternative不与响应,对替代模型response ~ null + alternative他们。
The test has a wide range of applications. In gene set testing in microarray data analysis alternative may be a matrix of gene expression measurements, and the aim is to find which of a collection of predefined subsets of the genes (e.g. Gene Ontology terms or KEGG pathways) is most associated with the response. In penalized regression or other machine learning techniques, alternative may be a collection of predictor variables that may be used to predict a response, and the test may function as a useful pre-test to see if training the classifier is worthwhile. In goodness-of-fit testing, null may be a model with linear terms fitted to the response, and alternative may be a large collection of non-linear terms. The test may be used in this case to test the fit of the null model with linear terms against a non-linear alternative.
测试具有广泛的应用。在基因芯片数据分析alternative集测试,可能是基因表达测量矩阵,目的是要找到一个集合预定subsets的基因(如基因本体论条款或KEGG通路)是最response相关的。在回归处罚或其他机器学习技术,alternative可能是一个可能被用来预测一个response预测变量的集合,并测试可作为一个有用的预测试,如果培训分类是值得的。拟合优度测试中,null可能response,alternative可能是一个大集合非线性拟合的线性条款的典范。在这种情况下,可用于测试,测试适合空对非线性替代线性模型。
See the vignette for extensive examples of these applications.
看到这些应用广泛的例子的小插曲。
值----------Value----------
The function returns an object of class gt.object. Several operations and diagnostic plots can be made from this object. See also Diagnostic plots.
该函数返回一个对象的类gt.object。一些操作和诊断图可从该对象。也看到诊断的图。
注意----------Note----------
If null is supplied as a formula object, an intercept is automatically included. As a consequence gt(Y, X, Z) will usually give a different result from gt(Y, X, ~Z). The first call is equivalent to gt(Y, X, ~0+Z), whereas the second call is equivalent to gt(Y, X, cbind(1,Z)).
如果null作为formula对象提供的,自动包含截距。因此gt(Y, X, Z)通常会从gt(Y, X, ~Z)不同的结果。首先调用的是相当于gt(Y, X, ~0+Z),而在第二个检测相当于gt(Y, X, cbind(1,Z))的。
P-values from the asymptotic distribution are accurate to at least two decimal places up to a value of around 1e-12. Lower p-values are numerically less reliable.
P值的渐近分布是精确到小数点后两位至少周围1e-12价值。较低的P-值的数值不可靠。
Missing values are allowed in the alternative matrix only. Missing values are imputed conservatively (i.e. under the null hypothesis). Covariates with many missing values get reduced variance and therefore automatically carry less weight in the test result.
只允许在alternative矩阵缺失值。遗漏值都归咎于保守(即零假设下)。许多缺失值的协变量得到减少变异,因此自动进行测试结果的重量少。
作者(S)----------Author(s)----------
Jelle Goeman: <a href="mailto:j.j.goeman@lumc.nl">j.j.goeman@lumc.nl</a>; Jan Oosting
参考文献----------References----------
<h3>See Also</h3> Diagnostic plots: <code>covariates</code>, <code>subjects</code>.
举例----------Examples----------
# Simple examples with random data here[简单的例子,与这里的随机数据]
# Real data examples in the Vignette[真实数据的例子中的小插曲]
# Random data: covariates A,B,C are correlated with Y[随机数据:协变量,B,C是与Y相关]
set.seed(1)
Y <- rnorm(20)
X <- matrix(rnorm(200), 20, 10)
X[,1:3] <- X[,1:3] + Y
colnames(X) <- LETTERS[1:10]
# Compare the global test with the F-test[比较全球测试与F-测试]
gt(Y, X)
anova(lm(Y~X))
# Using formula input[使用公式输入]
res <- gt(Y, ~A+B, null=~C+E, data=data.frame(X))
summary(res)
# Beware: null models with and without intercept[注意:与空模型没有拦截]
Z <- rnorm(20)
summary(gt(Y, X, null=~Z))
summary(gt(Y, X, null=Z))
# Logistic regression[Logistic回归]
gt(Y>0, X)
# Subsets and weights (1)[亚群和重量(1)]
my.sets <- list(c("A", "B"), c("C","D"), c("D", "E"))
gt(Y, X, subsets = my.sets)
my.weights <- list(1:2, 2:1, 3:2)
gt(Y, X, subsets = my.sets, weights=my.weights)
# Subsets and weights (2)[亚群和重量(2)]
gt(Y, X, subset = c("A", "B"))
gt(Y, X, subset = c("A", "A", "B"))
gt(Y, X, subset = c("A", "A", "B"), weight = c(.5,.5,1))
# Permutation testing[置换测试]
summary(gt(Y, X, perm=1e4))
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|