plot.loglm(vcd)
plot.loglm()所属R语言包:vcd
Visualize Fitted Log-linear Models
可视化拟合对数线性模型
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Visualize fitted "loglm" objects by mosaic or association plots.
马赛克或关联图的可视化拟合"loglm"对象。
用法----------Usage----------
## S3 method for class 'loglm'
plot(x, panel = mosaic, type = c("observed", "expected"),
residuals_type = c("pearson", "deviance"), gp = shading_hcl, gp_args = list(),
...)
参数----------Arguments----------
参数:x
a fitted "loglm" object, see loglm.
一个装有"loglm"对象,请参阅loglm。
参数:panel
a panel function for visualizing the observed values, residuals and expected values. Currently, mosaic and assoc in vcd.
一个面板功能,可视化的观测值,残差和预期值。目前,mosaic和assoc中vcd。
参数:type
a character string indicating whether the observed or the expected values of the table should be visualized.
一个字符的字符串,用于指示是否观察到的或预期的表的值应该是可视化。
参数:residuals_type
a character string indicating the type of residuals to be computed.
一个字符串,表示要计算的残差的类型。
参数:gp
object of class "gpar", shading function or a corresponding generating function (see details and shadings). Ignored if shade = FALSE.
对象的类"gpar",遮光功能或相应的生成函数(查看详细信息和shadings)。如果忽略shade = FALSE。
参数:gp_args
list of arguments for the shading-generating function, if specified.
阴影生成函数的参数列表,如果指定的话。
参数:...
Other arguments passed to the panel function.
其他参数传递给panel功能。
Details
详细信息----------Details----------
The plot method for "loglm" objects by default visualizes the model using a mosaic plot (can be changed to an association plot by setting panel = assoc) with a shading based on the residuals of this model. The legend also reports the corresponding p value of the associated goodness-of-fit test. The mosaic and assoc methods are simple convenience interfaces to this plot method, setting the panel argument accordingly.
plot方法"loglm"对象默认情况下可视化的模型,根据这个模型的残差使用着色使用的马赛克图(可以更改为关联图通过设置panel = assoc)。的传说还报告了相关的善良的拟合优度检验对应的P值。 mosaic和assoc方法是简单方便的接口,这plot方法,相应地panel参数设置。
值----------Value----------
The "structable" visualized is returned invisibly.
"structable"返回的可视化是不可见的。
(作者)----------Author(s)----------
Achim Zeileis <a href="mailto:Achim.Zeileis@R-project.org">Achim.Zeileis@R-project.org</a>
参见----------See Also----------
loglm, assoc, mosaic, strucplot
loglm,assoc,mosaic,strucplot
实例----------Examples----------
## mosaic display for PreSex model[#马赛克显示为PreSex模型]
data("PreSex")
fm <- loglm(~ PremaritalSex * ExtramaritalSex * (Gender + MaritalStatus),
data = aperm(PreSex, c(3, 2, 4, 1)))
fm
## visualize Pearson statistic[可视化皮尔逊统计]
plot(fm, split_vertical = TRUE)
## visualize LR statistic[可视化LR统计]
plot(fm, split_vertical = TRUE, residuals_type = "deviance")
## conditional independence in UCB admissions data[UCB#条件独立招生数据]
data("UCBAdmissions")
fm <- loglm(~ Dept * (Gender + Admit), data = aperm(UCBAdmissions))
## use mosaic display[#使用拼接显示]
plot(fm, labeling_args = list(abbreviate = c(Admit = 3)))
## and association plot[#和关联图]
plot(fm, panel = assoc)
assoc(fm)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|