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

R语言 simFrame包 simXyplot()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-9-30 02:44:26 | 显示全部楼层 |阅读模式
simXyplot(simFrame)
simXyplot()所属R语言包:simFrame

                                        X-Y plots
                                         X-Y图

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

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

Generic function for producing x-y plots.  For simulation results, the average  results are plotted against the corresponding contamination levels or missing  value rates.
X-Y曲线的通用功能。模拟的结果,平均结果对相应的污染程度或遗漏值绘制。


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


simXyplot(x, ...)

## S4 method for signature 'SimResults'
simXyplot(x, true = NULL, epsilon, NArate,
          select, cond = c("Epsilon", "NArate"),
          average = c("mean", "median"), ...)



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

参数:x
the object to be plotted.  For plotting simulation results, this  must be an object of class "SimResults".
要绘制的对象。对于绘制的模拟结果,这必须是一个对象的类"SimResults"。


参数:true
a numeric vector giving the true values.  If supplied,  reference lines are drawn in the corresponding panels.  
一个数值向量提供的真正价值。如果提供的话,参考线绘制在相应的面板。


参数:epsilon
a numeric vector specifying contamination levels.  If  supplied, the values corresponding to these contamination levels are  extracted from the simulation results and plotted.
一个数字向量确定污染程度。如果提供,这些污染水平对应的值从仿真结果中提取并绘制。


参数:NArate
a numeric vector specifying missing value rates.  If  supplied, the values corresponding to these missing value rates are  extracted from the simulation results and plotted.
指定一个数值向量遗漏值。如果提供,这些缺失值对应的值从仿真结果中提取并绘制。


参数:select
a character vector specifying the columns to be plotted.  It  must be a subset of the colnames slot of x, which is the  default.
一个字符指定要绘制的列向量。它必须是一个colnames插槽x,这是默认的子集。


参数:cond
a character string; for simulation results with multiple  contamination levels and multiple missing value rates, this specifies  the column of the simulation results to be used for producing conditional  x-y plots.  If "Epsilon", conditional plots are produced for the  different contamination levels.  If "NArate", conditional plots are  produced for the different missing value rates.  The default is to use  whichever results in less plots.
一个字符串,模拟结果与多种污染程度和多个遗漏值,指定列的模拟结果可以用于生产条件的XY坐标图。如果"Epsilon",有条件的图产生不同的污染水平。如果"NArate",有条件的图产生的不同遗漏值。默认情况下是在较少的土地使用任何结果。


参数:average
a character string specifying how the averages should be  computed.  Possible values are "mean" for the mean (the default)  or "median" for the median.
一个字符串指定的平均值应如何计算。可能的值是"mean"的均值(默认值)或"median"的中位数。


参数:...
additional arguments to be passed down to methods and eventually  to xyplot.
额外的参数传递的方法,并最终xyplot。


Details

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

For simulation results with multiple contamination levels and multiple  missing value rates, conditional x-y plots are produced, as specified by  cond.
模拟结果与多种污染水平和多个缺失值率,有条件的XY坐标图,指定的cond。


值----------Value----------

An object of class "trellis".  The  update method can be used to update  components of the object and the print  method (usually called by default) will plot it on an appropriate plotting  device.
对象的类"trellis"。 update方法可以用来更新组件的对象和print方法(通常称为默认情况下),将绘制在一个适当的绘图装置。


方法----------Methods----------




x = "SimResults" produce x-y plots of simulation results.
x = "SimResults"产生的X-Y曲线的仿真结果。


注意----------Note----------

Functionality for producing conditional x-y plots (including the argument  cond) was added in version 0.2.  Prior to that, the function gave an  error message if simulation results with multiple contamination levels and  multiple missing value rates were supplied.
生产条件的XY坐标图的功能(包括参数cond)中添加了0.2版本。在此之前,该功能给了一个错误的信息,提供模拟结果与多种污染水平和多个缺失值率。

The argument average that specifies how the averages are computed  was added in version 0.1.2.  Prior to that, the mean has always been used.
参数average“”,指定在版本0.1.2中加入的平均值计算。在此之前,平均值一直被使用。


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


Andreas Alfons



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

Statistical Simulation: The R Package <code>simFrame</code>. Journal of  Statistical Software, 37(3), 1&ndash;36. URL  http://www.jstatsoft.org/v37/i03/.

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

simBwplot, simDensityplot,  xyplot, "SimResults"
simBwplot,simDensityplot,xyplot,"SimResults"


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


#### design-based simulation[###设计为基础的模拟]
set.seed(12345)  # for reproducibility[可重复性]
data(eusilcP)    # load data[加载数据]

## control objects for sampling and contamination[#控制对象的采样和污染]
sc <- SampleControl(size = 500, k = 50)
cc <- DARContControl(target = "eqIncome",
    epsilon = seq(0, 0.05, by = 0.01),
    fun = function(x) x * 25)

## function for simulation runs[功能模拟运行]
sim <- function(x) {
    c(mean = mean(x$eqIncome), trimmed = mean(x$eqIncome, 0.05))
}

## run simulation[#运行仿真]
results <- runSimulation(eusilcP,
    sc, contControl = cc, fun = sim)

## plot results[#图谋结果的]
tv &lt;- mean(eusilcP$eqIncome)  # true population mean[真正的人口是什么意思]
simXyplot(results, true = tv)



#### model-based simulation[###基于模型的仿真]
set.seed(12345)  # for reproducibility[可重复性]

## function for generating data[#,用于产生数据的功能]
rgnorm <- function(n, means) {
    group <- sample(1:2, n, replace=TRUE)
    data.frame(group=group, value=rnorm(n) + means[group])
}

## control objects for data generation and contamination[#控制对象的数据生成和污染]
means <- c(0, 0.25)
dc <- DataControl(size = 500, distribution = rgnorm,
    dots = list(means = means))
cc <- DCARContControl(target = "value",
    epsilon = seq(0, 0.05, by = 0.01),
    dots = list(mean = 15))

## function for simulation runs[功能模拟运行]
sim <- function(x) {
    c(mean = mean(x$value),
        trimmed = mean(x$value, trim = 0.05),
        median = median(x$value))
}

## run simulation[#运行仿真]
results <- runSimulation(dc, nrep = 50,
    contControl = cc, design = "group", fun = sim)

## plot results[#图谋结果的]
simXyplot(results, true = means)

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-5-24 06:16 , Processed in 0.021895 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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