spCdfplot(simPopulation)
spCdfplot()所属R语言包:simPopulation
Plot (weighted empirical) cumulative distribution functions
加权图(经验)的累积分布函数
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Plot (weighted empirical) cumulative distribution functions for survey and population data, possibly broken down according to conditioning variables. For survey data, sample weights are taken into account.
图(加权经验)的累积分布函数的调查和人口数据,根据条件变量可能打破。调查数据显示,样本权重考虑。
用法----------Usage----------
spCdfplot(x, ...)
## Default S3 method:[默认方法]
spCdfplot(x, weights = NULL, cond = NULL, dataS, dataP = NULL,
approx = NULL, n = 10000, bounds = TRUE, ...)
参数----------Arguments----------
参数:x
for the default method (currently the only method implemented), a character vector specifying the columns of dataS and dataP to be plotted.
默认的方法(目前唯一的方法实现),字符dataS和dataP要绘制的列向量确定。
参数:weights
a character string specifying the column of dataS that contains the (personal) sample weights.
指定列的dataS,包含一个字符串(个人)样本权重。
参数:cond
an optional character vector specifying conditioning variables.
一个可选的字符向量指定条件变量。
参数:dataS
a data.frame containing household survey data.
data.frame包含家庭调查数据。
参数:dataP
optional; a data.frame containing simulated population data or a list of such data.frames.
可选的data.frame包含模拟的人口数据或列表这样的data.frame的。
参数:approx
logicals indicating whether approximations of the cumulative distribution functions should be computed. The default is to use FALSE for the survey data and TRUE for any population data. If no population data are supplied, a single logical should be used. On the other hand, if any population data are supplied, the behavior is as follows. If a single logical is supplied, it is used for the population data and FALSE is used for the survey data. If a vector of length two is supplied, the first value is used for the survey data and the second for the population data. Note that if multiple populations are supplied, the same value is used for all of them.
逻辑值指示是否应计算的累积分布函数的逼近。默认情况下是使用FALSE的调查数据和TRUE任何人口数据的。如果没有人口数据被提供时,应使用一个单一的逻辑。另一方面,如果任何人口数据被提供,该行为是如下。如果一个单一的逻辑被提供时,它被用于人口数据和FALSE用于调查数据。如果供给的矢量的长度为2的,第一个值被用于调查数据和第二人口数据。请注意,如果多个种群供给,相同的值被用于所有这些。
参数:n
integers specifying the number of points at which the approximations for the respective data sets take place (see approx). If a single value is supplied, it is used wherever approx is TRUE. If a vector of length two and any population data are supplied, the first value is used for the survey data and the second for the population data (in case the corresponding values of approx are TRUE). Note that if multiple populations are supplied, the same value is used for all of them.
整数,指定相应的数据集的近似点发生(见approx“)。如果有一个值,它会被用于任何approx是TRUE。如果一个向量的长度和任何人口数据提供,用于调查数据的第一个值和第二次人口数据(的情况下的相应值approx是TRUE)。请注意,如果多个种群供给,相同的值被用于所有这些。
参数:bounds
a logical indicating whether vertical lines should be drawn at 0 and 1 (the bounds for cumulative distribution functions).
一个逻辑指示是否应在0和1(的累积分布函数的边界)绘制垂直线。
参数:...
for the generic function, further arguments to be passed down to methods. For the default method, further arguments to be passed to xyplot.
的通用功能,进一步论证流传下来的方法。对于默认的方法,进一步的参数被传递到xyplot。
Details
详细信息----------Details----------
Sample weights are taken into account by adjusting the step height. To be precise, the weighted step height for an observation is defined as its weight divided by the sum of all weights.
样本权重被考虑在内,通过调整的台阶高度。为了精确,加权步骤用于观察的高度被定义为它的重量的总和除以所有的重量.
值----------Value----------
An object of class "trellis", as returned by xyplot.
类的一个对象"trellis",返回xyplot。
注意----------Note----------
A formula interface may be added in the future.
的公式接口可以在将来添加。
(作者)----------Author(s)----------
Andreas Alfons
参见----------See Also----------
spCdf, xyplot
spCdf,xyplot
实例----------Examples----------
## Not run: [#不运行:]
## these take some time and are not run automatically[#这需要一定的时间,并没有自动运行]
## copy & paste to the R command line[#复制和粘贴到R命令行]
set.seed(1234) # for reproducibility[可重复性]
data(eusilcS) # load sample data[加载示例数据]
# multinomial model with random draws[多项式模型与随机抽取]
eusilcM <- simEUSILC(eusilcS, upper = 200000, equidist = FALSE)
# two-step regression[两步回归]
eusilcT <- simEUSILC(eusilcS, method = "twostep")
# plot results by gender[图按性别]
spCdfplot("netIncome", "rb050", "rb090", dataS = eusilcS,
dataP = list(M = eusilcM, T = eusilcT), layout = c(1, 2))
## End(Not run)[#(不执行)]
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|