找回密码
 注册
查看: 473|回复: 0

R语言 RobAStBase包 comparePlot-methods()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-9-27 19:50:39 | 显示全部楼层 |阅读模式
comparePlot-methods(RobAStBase)
comparePlot-methods()所属R语言包:RobAStBase

                                        Compare - Plots
                                         比较 - 绘图

                                         译者:生物统计家园网 机器人LoveR

描述----------Description----------

Plots 2-4 influence curves to the same model.
图2-4同一个模型的影响曲线。


用法----------Usage----------


comparePlot(obj1, obj2, ... )
## S4 method for signature 'IC,IC'
comparePlot(obj1, obj2, obj3 = NULL, obj4 = NULL,
             data = NULL, ..., withSweave = getdistrOption("withSweave"),
             main = FALSE, inner = TRUE, sub = FALSE,
             col = par("col"), lwd = par("lwd"), lty,
             col.inner = par("col.main"), cex.inner = 0.8,
             bmar = par("mar")[1], tmar = par("mar")[3],
             with.legend = TRUE, legend.bg = "white",
             legend.location = "bottomright", legend.cex = 0.8,
             mfColRow = TRUE, to.draw.arg = NULL,
             cex.pts = 1, col.pts = par("col"),
             pch.pts = 1, jitter.fac = 1, with.lab = FALSE,
             lab.pts = NULL, lab.font = NULL,
             which.lbs = NULL, which.Order  = NULL, return.Order = FALSE)



参数----------Arguments----------

参数:obj1
object of class "InfluenceCurve"
对象的类"InfluenceCurve"


参数:obj2
object of class "InfluenceCurve" to be compared with obj1
对象的类"InfluenceCurve"相比,obj1


参数:obj3
optional: object of class "InfluenceCurve" to be compared with obj1
可选的对象的类"InfluenceCurve"相比,obj1


参数:obj4
optional: object of class "InfluenceCurve" to be compared with obj1
可选的对象的类"InfluenceCurve"相比,obj1


参数:data
optional data argument — for plotting observations into the plot;
可选的数据参数 - 用于绘制观测到的图;


参数:withSweave
logical: if TRUE (for working with Sweave) no extra device is opened
逻辑:如果TRUE(工作Sweave)没有额外的设备被打开


参数:main
logical: is a main title to be used? or <br> just as argument main in plot.default.
符合逻辑的:是一个主标题使用? ,或<br>只是作为参数main中plot.default。


参数:col
color[s] of ICs in arguments obj1 [,...,obj4].
颜色IC的参数[S]obj1 [,...,obj4]。


参数:lwd
linewidth[s] of ICs in arguments obj1 [,...,obj4].
线宽[S]中的IC参数obj1 [,...,obj4]。


参数:lty
line-type[s] of ICs in arguments obj1 [,...,obj4].
线路类型[S]中的IC参数obj1 [,...,obj4]。


参数:inner
logical: do panels have their own titles? or <br> character vector of / cast to length 'number of plotted  dimensions'; if argument to.draw.arg is used, this refers to  a vector of length length(to.draw.arg), the  actually plotted dimensions. For further information, see also  description of argument main in plot.default.
逻辑:做面板有自己的游戏吗?或<br>的字符向量/施放长度“绘制尺寸;如果参数to.draw.arg使用,这是指一个向量的长度length(to.draw.arg),实际绘制的尺寸。欲了解更多信息,请参阅参数的描述main中plot.default。


参数:sub
logical: is a sub-title to be used? or <br> just as argument sub in plot.default.
符合逻辑的:是要使用一个子标题吗? ,或<br>只是作为参数sub中plot.default。


参数:tmar
top margin &ndash; useful for non-standard main title sizes
- 有用的页边距为标准的主标题大小非


参数:bmar
bottom margin &ndash; useful for non-standard sub title sizes
底部边缘 - 可用于非标字幕大小


参数:cex.inner
magnification to be used for inner titles relative to the current setting of cex; as in  par
放大倍率的相对的当前设置cex,par的内标题


参数:col.inner
character or integer code; color for the inner title      
字符或整数代码;内标题的颜色


参数:with.legend
logical; shall a legend be plotted?
逻辑;绘制一个传奇吗?


参数:legend.location
a valid argument x for legend &mdash; the place where to put the legend on the last issued plot
一个有效的参数xlegend - 的地方,把传说中的最后发出的图


参数:legend.bg
background color for the legend
背景颜色的传说


参数:legend.cex
magnification factor for the legend
放大倍数的传说


参数:mfColRow
shall default partition in panels be used &mdash; defaults to TRUE
应面板中使用默认的分区 - 默认TRUE


参数:to.draw.arg
Either NULL (default;  everything is plotted) or a vector of either integers  (the indices of the subplots to be drawn) or characters  &mdash; the names of the subplots to be drawn: these names are to be chosen either among the row names of  the trafo matrix  rownames(trafo(eval(obj1@CallL2Fam)@param))  or if the last expression is NULL a  vector "dim<dimnr>", dimnr running through  the number of rows of the trafo matrix.
要么NULL(预设值;一切绘制)或整数(要被绘制的次要图的指数)或字符 - 的次要图的名称,要绘制的向量:这些名称都是选择之间名称的trafo矩阵行中的最后一个表达式是rownames(trafo(eval(obj1@CallL2Fam)@param))或如果NULL向量"dim<dimnr>",dimnr运行通过数行的trafo矩阵。


参数:cex.pts
size of the points of the data argument plotted
大小的data参数的点绘制


参数:col.pts
color of the points of the data argument plotted
颜色的data参数的点绘制


参数:pch.pts
symbol of the points of the data argument plotted
符号的data参数的点绘制


参数:with.lab
logical; shall labels be plotted to the observations?
逻辑;标签绘制的观察吗?


参数:lab.pts
character or NULL; labels to be plotted to the observations; if NULL observation indices;
字符或NULL;的标签要绘制的观察,如果NULL的观察指标;


参数:lab.font
font to be used for labels
要使用的字体为标签


参数:jitter.fac
jittering factor used in case of a DiscreteDistribution for plotting points of the data argument in a jittered fashion.
抖动因素的DiscreteDistributiondata参数抖动的方式绘制点的情况下。


参数:which.lbs
either an integer vector with the indices of the observations to be plotted into graph or NULL &mdash; then no observation is excluded
是一个整数的观测值的索引向量,被绘制到图形或NULL - 则没有观察被排除


参数:which.Order
for each of the given ICs, we order the observations (descending) according to the norm given by the corresponding normtype(object); then which.Order either is an integer vector with the indices of the ordered observations (remaining after a possible reduction by argument which.lbs) to be plotted into graph or NULL &mdash; then no (further) observation is excluded.
对每个给定的集成电路,我们命令根据由下式给出的范数的观测值(降序)在对应的normtype(object);然后which.Order要么是一个整数向量与有序的观测指数(后剩余的可能减少参数which.lbs)来绘制成图形或NULL - 没有被排除进一步观察。


参数:return.Order
logical; if TRUE, a list of length maximally four with order vectors is returned &mdash; one for the ordering w.r.t. each of the given ICs; more specifically, the order of the (remaining) observations given by their original index is returned (remaining means: after a possible reduction by argument which.lbs, and ordering is according to the norm given by normtype(object)); othervise we return invisible() as usual.
逻辑,如果TRUE,最大限度地4阶向量的长度,则返回的列表的顺序WRT  - 每个给定的集成电路;更具体地,给出的他们的原始索引的(剩余的)观测的顺序返回(其它装置:后可能减少由参数which.lbs,顺序是根据给出的范数由 normtype(object)); othervise我们返回invisible()像往常一样。


参数:...
further arguments to be passed to plot
被传递plot的进一步的论据


Details

详细信息----------Details----------

Any parameters of plot.default may be passed on to this particular plot method.
plot.default的任何参数,可能会转嫁到这个特殊的plot方法。

For main-, inner, and subtitles given as arguments main,  inner, and sub, top and bottom margins are enlarged to 5 resp.  6 by default but may also be specified by tmar / bmar arguments.  If main / inner / sub are  logical then if the respective argument is FALSE nothing is done/plotted,  but if it is TRUE, we use a default main title taking up the calling  arguments in case of main, default inner titles taking up the class and (named) parameter slots of arguments in case of inner, and a "generated on <data>"-tag in case of sub. Of course, if main / inner / sub are character, this is used for the title; in case of inner it is then checked whether it has correct length. In all title arguments, the following patterns are substituted:   
对于主内,并作为参数的字幕main,inner和sub,顶部和底部边缘被放大至5 RESP账户。默认情况下,但也可以指定tmar/bmar参数。如果main/inner/sub是逻辑,如果相应的参数是FALSE没有做/绘制,但如果是TRUE,我们使用一个在情况main,默认的内部标题占用的类和(命名的)参数时隙的参数箱子inner,和一个“上的<data>生成的调用参数的默认主标题“标记的情况下sub。当然,如果main/inner/sub是character,这是作为标题;的情况下,inner,然后检查是否有正确的长度。在所有标题参数,下面的模式所取代:

"%C1","%C2",["%C3",]["%C4"]class of argument  obj<i>, i=1,..4
"%C1","%C2","%C3"] ["%C4"类的说法obj<i>,I = 1,... 4

"%A1","%A2",["%A3",]["%A4"]deparsed argument   obj<i>, i=1,..4
"%A1","%A2","%A3"] ["%A4"] deparsed的参数obj<i>,I = 1,... 4

"%D"time/date-string when the plot was generated   
"%D"时间/日期字符串时的图生成

If argument ... contains argument ylim, this may either be as in plot.default (i.e. a vector of length 2) or a vector of  length 2*(number of plotted dimensions); in the case of longer length,  these are the values for ylim for the plotted dimensions of the IC,  one pair for each dimension.
如果参数...包含参数ylim,这可能是当在plot.default(即一个向量的长度为2)或一个矢量的长度为2 *(绘制数量的尺寸);在长度较长的情况下,这些是值ylim绘制的尺寸的IC,一对用于每个维度。


(作者)----------Author(s)----------


Peter Ruckdeschel <a href="mailtoeter.Ruckdeschel@itwm.fraunhofer.de">eter.Ruckdeschel@itwm.fraunhofer.de</a>



参考文献----------References----------

Kohl, M. (2005) Numerical Contributions to the Asymptotic Theory of Robustness.  Bayreuth: Dissertation.

参见----------See Also----------

L2ParamFamily-class, IC-class, plot
L2ParamFamily-class,IC-class,plot


实例----------Examples----------


if(require(ROptEst)){

N0 <- NormLocationScaleFamily(mean=0, sd=1)
N0.Rob1 <- InfRobModel(center = N0, neighbor = ContNeighborhood(radius = 0.5))

IC1 <- optIC(model = N0, risk = asCov())
IC2 <- optIC(model = N0.Rob1, risk = asMSE())

comparePlot(IC1,IC2)

data <- r(N0)(20)
comparePlot(IC1, IC2, data=data, with.lab = TRUE,
            which.lbs = c(1:4,15:20),
            which.Order = 1:6,
            return.Order = TRUE)

## selection of subpanels for plotting[选择的子面板的图]
par(mfrow=c(1,1))
comparePlot(IC1, IC2 ,mfColRow = FALSE, to.draw.arg=c("mean"),
            panel.first= grid(),ylim=c(-4,4),xlim=c(-6,6))
## matrix-valued ylim[#矩阵值ylim]
comparePlot(IC1, IC2, panel.first= grid(),ylim=c(-4,4,0,4),xlim=c(-6,6))

## with use of trafo-matrix:[#,使用的trafo矩阵:]
G <- GammaFamily(scale = 1, shape = 2)
## explicitely transforming to[#显式转化为]
## MASS parametrization:[#MASS参数化:]
mtrafo <- function(x){
     nms0 <- names(c(main(param(G)),nuisance(param(G))))
     nms <- c("shape","rate")
     fval0 <- c(x[2], 1/x[1])
     names(fval0) <- nms
     mat0 <- matrix( c(0, -1/x[1]^2, 1, 0), nrow = 2, ncol = 2,
                     dimnames = list(nms,nms0))                          
     list(fval = fval0, mat = mat0)}
G2 <- G
trafo(G2) <- mtrafo
G2
G2.Rob1 <- InfRobModel(center = G2, neighbor = ContNeighborhood(radius = 0.5))
system.time(IC1 <- optIC(model = G2, risk = asCov()))
system.time(IC2 <- optIC(model = G2.Rob1, risk = asMSE()))
system.time(IC2.i <- optIC(model = G2.Rob1, risk = asMSE(normtype=InfoNorm())))
system.time(IC2.s <- optIC(model = G2.Rob1, risk = asMSE(normtype=SelfNorm())))

comparePlot(IC1,IC2, IC2.i, IC2.s)


}

转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。


注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|小黑屋|生物统计家园 网站价格

GMT+8, 2024-11-24 19:52 , Processed in 0.026001 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表