rootogram(vcd)
rootogram()所属R语言包:vcd
Rootograms
Rootograms
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Rootograms of observed and fitted values.
Rootograms的观测和拟合值。
用法----------Usage----------
## Default S3 method:[默认方法]
rootogram(x, fitted, names = NULL, scale = c("sqrt", "raw"),
type = c("hanging", "standing", "deviation"),
rect_gp = gpar(fill = "lightgray"), lines_gp = gpar(col = "red"),
points_gp = gpar(col = "red"), pch = 19,
xlab = NULL, ylab = NULL, ylim = NULL,
name = "rootogram", newpage = TRUE, pop = TRUE, ...)
参数----------Arguments----------
参数:x
either a vector or a 1-way table of frequencies.
向量或1路的频率表。
参数:fitted
a vector of fitted frequencies.
拟合的频率的矢量。
参数:names
a vector of names passed to grid_barplot, if set to NULL the names of x are used.
一个向量的名称传递给grid_barplot,如果设置为NULL的名称x使用。
参数:scale
a character string indicating whether the values should be plotted on the raw or square root scale.
一个字符的字符串表示的值是否应被绘制在原料或平方根规模。
参数:type
a character string indicating if the bars for the observed frequencies should be hanging or standing or indicate the deviation between observed and fitted frequencies.
一个字符串,表示如果条形所观察到的频率应悬挂或站立,或表示观察到的,并配备频率之间的偏差。
参数:rect_gp
a "gpar" object controlling the grid graphical parameters of the rectangles.
一个"gpar"对象的矩形网格图形参数控制。
参数:lines_gp
a "gpar" object controlling the grid graphical parameters of the lines.
"gpar"对象控制网格图形参数的线条。
参数:points_gp
a "gpar" object controlling the grid graphical parameters of the points.
"gpar"对象控制网格图形参数之分。
参数:pch
plotting character for the points.
绘制字符的点。
参数:xlab
a label for the x axis.
为x轴的标签。
参数:ylab
a label for the y axis.
为y轴的标签。
参数:ylim
limits for the y axis.
参数:name
name of the plotting viewport.
参数:newpage
logical. Should grid.newpage be called before plotting?
逻辑。 grid.newpage被称为打印之前?
参数:pop
logical. Should the viewport created be popped?
逻辑。如果视口创建弹出?
参数:...
further arguments passed to grid_barplot.
进一步的参数传递给grid_barplot。
Details
详细信息----------Details----------
The observed frequencies are displayed as bars and the fitted frequencies as a line. By default a sqrt scale is used to make the smaller frequencies more visible.
显示所观察到的频率作为条形和拟合的频率作为一个行。默认情况下,使用的sqrt规模使较小的频率更可见。
(作者)----------Author(s)----------
Achim Zeileis <a href="mailto:Achim.Zeileis@R-project.org">Achim.Zeileis@R-project.org</a>
参考文献----------References----------
Exploratory Data Analysis. Addison Wesley, Reading, MA.
Visualizing Categorical Data. SAS Institute, Cary, NC.
参见----------See Also----------
grid_barplot
grid_barplot
实例----------Examples----------
## Simulated data examples:[#模拟数据的例子:]
dummy <- rnbinom(200, size = 1.5, prob = 0.8)
observed <- table(dummy)
fitted1 <- dnbinom(as.numeric(names(observed)),
size = 1.5, prob = 0.8) * sum(observed)
fitted2 <- dnbinom(as.numeric(names(observed)),
size = 2, prob = 0.6) * sum(observed)
rootogram(observed, fitted1)
rootogram(observed, fitted2)
## Real data examples:[#实时数据的例子:]
data("HorseKicks")
HK.fit <- goodfit(HorseKicks)
summary(HK.fit)
plot(HK.fit)
## or equivalently[#或等效]
rootogram(HK.fit)
data("Federalist")
F.fit <- goodfit(Federalist, type = "nbinomial")
summary(F.fit)
plot(F.fit)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|