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

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

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

                                        Kernel density plots
                                         核密度图

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

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

Generic function for producing kernel density plots.
通用函数核密度图。


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


simDensityplot(x, ...)

## S4 method for signature 'SimResults'
simDensityplot(x, true = NULL, epsilon, NArate, select, ...)



参数----------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,这是默认的子集。


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


Details

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

For simulation results with multiple contamination levels or missing value  rates, conditional kernel density plots are produced.
模拟结果与多种污染水平或遗漏值,有条件的内核密度图。


值----------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 kernel density plots of simulation
x = "SimResults"产生模拟的内核密度图


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

Functionality for producing conditional kernel density plots was added in  version 0.2.  Prior to that, the function gave an error message if simulation  results with multiple contamination levels or missing value rates were  supplied.
生产条件的内核密度图在版本0.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, simXyplot,  densityplot,  "SimResults"
simBwplot,simXyplot,densityplot,"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 = 0.02,
    fun = function(x) x * 25)

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

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

## plot results[#图谋结果的]
tv &lt;- mean(eusilcP$eqIncome)  # true population mean[真正的人口是什么意思]
simDensityplot(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 = 0.02, dots = list(mean = 15))

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

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

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

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-5-24 07:02 , Processed in 0.024642 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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