getBreaks(simPopulation)
getBreaks()所属R语言包:simPopulation
Compute break points for categorizing (semi-)continuous variables
计算破发点进行分类(半)连续变量
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Compute break points for categorizing continuous or semi-continuous variables using (weighted) quantiles. This is a utility function that is useful for writing custom wrapper functions such as simEUSILC.
计算(加权)位数进行分类的连续或半连续变量的破发点。这是一个实用的功能,编写自定义的包装功能,如simEUSILC是很有用的。
用法----------Usage----------
getBreaks(x, weights = NULL, zeros = TRUE, lower = NULL,
upper = NULL, equidist = TRUE, probs = NULL)
参数----------Arguments----------
参数:x
a numeric vector to be categorized.
一个数值向量进行分类。
参数:weights
an optional numeric vector containing sample weights.
一个可选的数字向量的样本权重。
参数:zeros
a logical indicating whether x is semi-continuous, i.e., contains a considerable amount of zeros. See “Details” on how this affects the behavior of the function.
一个逻辑指示是否x是半连续的,即,包含了相当数量的零。请参阅“详细信息”,这将如何影响行为的功能。
参数:lower, upper
optional numeric values specifying lower and upper bounds other than minimum and maximum of x, respectively.
可选的数字值的上限和下限以外的最大和最小x,分别。
参数:equidist
a logical indicating whether the (positive) break points should be equidistant or whether there should be refinements in the lower and upper tail (see “Details”).
逻辑(正)破发点,是否应该相等或是否应该有完善的下限和上限尾(见“详细信息”)。
参数:probs
a numeric vector of probabilities with values in [0, 1] giving quantiles to be used as (positive) break points. If supplied, this is preferred over equidist.
一个数值向量概率[0, 1]给分位数的值被用来作为(正)中断点。如果提供,这是优于equidist。
Details
详细信息----------Details----------
If equidist is TRUE, the behavior is as follows. If zeros is TRUE as well, the 0%, 10%, ..., 90% quantiles of the negative values and the 10%, 20%, ..., 100% of the positive values are computed. These quantiles are then used as break points together with 0. If zeros is not TRUE, on the other hand, the 0%, 10%, ..., 100% quantiles of all values are used.
如果equidist是TRUE,其行为如下。如果zeros是TRUE以及,0%,10%,...,90%的分位数的负值和10%,20%,...,100%的正的值的计算。有0个破发点,然后用这些位数。如果zeros是不是TRUE,在另一方面中,0%,10%,...,100%分位数的所有值被使用。
If equidist is not TRUE, the behavior is as follows. If zeros is not TRUE, the 1%, 5%, 10%, 20%, 40%, 60%, 80%, 90%, 95% and 99% quantiles of all values are used for the inner part of the data (instead of the equidistant 10%, ..., 90% quantiles). If zeros is TRUE, these quantiles are only used for the positive values while the quantiles of the negative values remain equidistant.
如果equidist是不TRUE,行为如下。如果zeros是不是TRUE,1%,5%,10%,20%,40%,60%,80%,90%,95%和99%的所有的值的位数的使用的数据内的一部分(而不是等距的10%,...,90%分位数)。 zeros如果是TRUE,这些位数只用正面的价值观,同时保持等距离位数的负值。
Note that duplicated values among the quantiles are discarded and that the minimum and maximum are replaced with lower and upper, respectively, if these are specified.
请注意,产生的分位数的重复值将被丢弃,并且,如果这些被指定的最小值和最大值所取代lower和upper,分别。
The (weighted) quantiles are computed with the function quantileWt.
(加权)位数计算的功能quantileWt。
值----------Value----------
A numeric vector of break points.
一个数字矢量破发点。
(作者)----------Author(s)----------
Andreas Alfons
参见----------See Also----------
getCat, quantileWt
getCat,quantileWt
实例----------Examples----------
data(eusilcS)
# semi-continuous variable, positive break points equidistant[半连续可变的,积极的破发点,等距离]
getBreaks(eusilcS$netIncome, weights=eusilcS$rb050)
# semi-continuous variable, positive break points not equidistant[半连续可变的,积极的破发点,不等距]
getBreaks(eusilcS$netIncome, weights=eusilcS$rb050,
equidist = FALSE)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|