aov(stats)
aov()所属R语言包:stats
Fit an Analysis of Variance Model
适合方差分析模型
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Fit an analysis of variance model by a call to lm for each stratum.
适合方差分析模型,为各阶层的呼叫lm。
用法----------Usage----------
aov(formula, data = NULL, projections = FALSE, qr = TRUE,
contrasts = NULL, ...)
参数----------Arguments----------
参数:formula
A formula specifying the model.
指定的模型公式。
参数:data
A data frame in which the variables specified in the formula will be found. If missing, the variables are searched for in the standard way.
一个数据框,在该公式中指定的变量会被发现。如果缺少,变量为标准的方式进行搜索。
参数:projections
Logical flag: should the projections be returned?
逻辑标志:应被退回的预测?
参数:qr
Logical flag: should the QR decomposition be returned?
逻辑标志:应返回QR分解?
参数:contrasts
A list of contrasts to be used for some of the factors in the formula. These are not used for any Error term, and supplying contrasts for factors only in the Error term will give a warning.
公式中的一些因素的对比列表。这些都不是任何Error长期使用,并提供对比因素,只有在Error任期将给予警告。
参数:...
Arguments to be passed to lm, such as subset or na.action. See "Details" about weights.
参数被传递给lm如subset或na.action。有关weights的细节“。
Details
详情----------Details----------
This provides a wrapper to lm for fitting linear models to balanced or unbalanced experimental designs.
这提供了一个lm平衡或不平衡的实验设计的线性模型拟合的包装。
The main difference from lm is in the way print, summary and so on handle the fit: this is expressed in the traditional language of the analysis of variance rather than that of linear models.
从lm的主要区别的方式是print,summary“等处理适合:这是传统的语言,而不是线性模型方差分析表示。
If the formula contains a single Error term, this is used to specify error strata, and appropriate models are fitted within each error stratum.
如果公式包含一个单一的Error来看,这是用来指定错误阶层,每个错误地层内安装适当的模型。
The formula can specify multiple responses.
该公式可以指定多个响应。
Weights can be specified by a weights argument, but should not be used with an Error term, and are incompletely supported (e.g., not by model.tables).
可以weights参数指定权重,但不应与Error长期使用,是不完全的支持(例如,不model.tables)。
值----------Value----------
An object of class c("aov", "lm") or for multiple responses of class c("maov", "aov", "mlm", "lm") or for multiple error strata of class "aovlist". There are print and summary methods available for these.
一个对象类c("aov", "lm")类c("maov", "aov", "mlm", "lm")或多个类的错误阶层"aovlist"多个响应。有print和summary这些方法可用。
注意----------Note----------
aov is designed for balanced designs, and the results can be hard to interpret without balance: beware that missing values in the response(s) will likely lose the balance. If there are two or more error strata, the methods used are statistically inefficient without balance, and it may be better to use lme in package nlme.
aov设计平衡设计,其结果可能是难以解释,无平衡:提防响应(S)中的缺失值,可能会失去平衡。如果有两个或两个以上的错误阶层,使用的方法是统计学上没有平衡的低效,它可能是更好的使用lme包nlme。
Balance can be checked with the replications function.
可以检查replications功能平衡。
The default "contrasts" in R are not orthogonal contrasts, and aov and its helper functions will work better with such contrasts: see the examples for how to select these.
默认的“反差”研发不正交对比,aov和它的辅助功能将更好地工作与这样的对比:如何选择这些例子。
作者(S)----------Author(s)----------
The design was inspired by the S function of the same name described
in Chambers <EM>et al.</EM> (1992).
参考文献----------References----------
Analysis of variance; designed experiments. Chapter 5 of Statistical Models in S eds J. M. Chambers and T. J. Hastie, Wadsworth & Brooks/Cole.
参见----------See Also----------
lm, summary.aov, replications, alias, proj, model.tables, TukeyHSD
lm,summary.aov,replications,alias,proj,model.tables,TukeyHSD
举例----------Examples----------
## From Venables and Ripley (2002) p.165.[#从维纳布尔斯和Ripley(2002)第165页。]
utils::data(npk, package="MASS")
## Set orthogonal contrasts.[#设置正交对比。]
op <- options(contrasts=c("contr.helmert", "contr.poly"))
( npk.aov <- aov(yield ~ block + N*P*K, npk) )
summary(npk.aov)
coefficients(npk.aov)
## to show the effects of re-ordering terms contrast the two fits[#显示重新排序相反的两个配合的影响]
aov(yield ~ block + N * P + K, npk)
aov(terms(yield ~ block + N * P + K, keep.order=TRUE), npk)
## as a test, not particularly sensible statistically[#作为一个测试,并不是特别明智的统计]
npk.aovE <- aov(yield ~ N*P*K + Error(block), npk)
npk.aovE
summary(npk.aovE)
options(op)# reset to previous[重置以前]
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|