eovcheck(s20x)
eovcheck()所属R语言包:s20x
Testing for equality of variance plot
平等的方差图的测试
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Plots the residuals versus the fitted (or predicted) values from a linear model. A horizontal line is drawn at y = 0, reflecting the fact that we expect the residuals to have a mean of zero. An optional lowess line is drawn if smoother is set to TRUE. This can be useful in determining whether a trend still exists in the residuals. An optional pair of lines is drawn at +/- 2 times the standard deviation of the residuals - which is estimated from the Residual Mean Sqare (Within group mean square = WGMS). This can be useful in highlighting potential outliers. If the model has one or two factors and no continous variables, i.e. if it is a oneway or twoway ANOVA model then the P-value from Levene's test for equality variance is displayed in the top left hand corner,as long as the number of observations per group exceeds two.
图解的残差与拟合值(或预测)从线性模式。 y = 0处绘制一条水平线,反映了一个事实,我们期望的残差有一个均值为零。一个可选的LOWESS线绘制,如果平滑设置为TRUE。在确定的趋势是否依然存在的残留物,这可能是有用的。一个可选的对线绘制在+ / - 2倍的标准偏差的残差 - 这是从剩余的平均数Sqare(组内均方根= WGMS)估计。突出显示可能的异常值,这可能是有用的。如果该模型有一个或两个因素和不连续变量,即如果它是一个单向或双向方差分析模型然后在P-值列文的测试平等方差是显示的顶部左边的手角落,只要的若干意见每超过两个。
用法----------Usage----------
eovcheck(object, ...)
## S3 method for class 'formula'[类formula的方法]
eovcheck(object, data = NULL, xlab = NULL, col = NULL
,smoother = FALSE, twosd = FALSE, ...)
## S3 method for class 'lm'
eovcheck(object, smoother = FALSE, twosd = FALSE, ...)
参数----------Arguments----------
参数:object
A linear model formula. Alternatively, a fitted lm object from a linear model.
线性模型公式。另外,从线性模式的拟合LM对象。
参数:data
A data frame in which to evaluate the formula.
一个数据框中评估公式。
参数:xlab
a title for the x axis: see title.
一个标题为x轴:title。
参数:col
a color for the lowess smoother line.
LOWESS平滑的线的颜色。
参数:smoother
if TRUE then a smoothed lowess line will be added to the plot
如果TRUE,然后平滑的的LOWESS线将被添加到图
参数:twosd
if TRUE then horizontal dotted lines will be drawn at +/-2sd
如果TRUE,则水平虚线将被绘制在+ /-2SD
参数:...
Optional arguments
可选参数
参见----------See Also----------
"levene.test"
“levene.test”
实例----------Examples----------
# one way ANOVA - oysters[单因素方差分析 - 牡蛎]
data(oysters.df)
oyster.fit<-lm(Oysters~Site, data = oysters.df)
eovcheck(oyster.fit)
# Same model as the previous example, but using eovcheck.formula[模型和前面的例子一样,但使用eovcheck.formula]
data(oysters.df)
eovcheck(Oysters~Site, data = oysters.df)
# A two-way model without interaction[没有互动的双向模式]
data(soyabean.df)
soya.fit<-lm(yield~planttime+cultivar, data = soyabean.df)
eovcheck(soya.fit)
# A two-way model with interaction[双向与互动模式]
data(arousal.df)
arousal.fit<-lm(arousal~gender*picture, data = arousal.df)
eovcheck(arousal.fit)
# A regression model[回归模型]
data(peru.df)
peru.fit<-lm(BP~height+weight+age+years, data = peru.df)
eovcheck(peru.fit)
# A time series model[时间序列模型]
data(airpass.df)
t<-1:144
month<-factor(rep(1:12,12))
airpass.df<-data.frame(passengers = airpass.df$passengers, t = t, month = month)
airpass.fit<-lm(log(passengers)[-1]~t[-1]+month[-1]+log(passengers)[-144], data = airpass.df)
eovcheck(airpass.fit)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|