Zigeom(VGAM)
Zigeom()所属R语言包:VGAM
Zero-Inflated Geometric Distribution
零充气几何分布
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Density, and random generation for the zero-inflated geometric distribution with parameter pstr0.
密度,和随机产生的零膨胀的几何分布参数pstr0。
用法----------Usage----------
dzigeom(x, prob, pstr0 = 0, log = FALSE)
pzigeom(q, prob, pstr0 = 0)
qzigeom(p, prob, pstr0 = 0)
rzigeom(n, prob, pstr0 = 0)
参数----------Arguments----------
参数:x, q
vector of quantiles.
向量的位数。
参数:p
vector of probabilities.
向量的概率。
参数:prob
see dgeom.
看到dgeom。
参数:n
number of observations.
参数:pstr0
Probability of structural zero (ignoring the geometric distribution), called phi. The default value corresponds to the response having an ordinary geometric distribution.
结构零(忽略的几何分布),称为phi概率。默认值对应于具有一个普通的几何分布的响应。
参数:log
Logical. Return the logarithm of the answer?
逻辑。返回数的回答吗?
Details
详细信息----------Details----------
The probability function of Y is 0 with probability phi, and geometric(prob) with probability 1-phi. Thus
Y的概率函数是0的概率phi,geometric(prob)的概率1-phi。从而
where W is distributed geometric(prob).
W的分布geometric(prob)。
值----------Value----------
dzigeom gives the density, pzigeom gives the distribution function, qzigeom gives the quantile function, and rzigeom generates random deviates.
dzigeom给出了密度,pzigeom给出了分布函数,qzigeom给出了分位数的功能,和rzigeom随机产生的偏离。
注意----------Note----------
The argument pstr0 is recycled to the required length, and must have values which lie in the interval [0,1].
的参数pstr0被回收到所需的长度,而且必须有趴在区间[0,1]值。
These functions actually allow for zero-deflation. That is, the resulting probability of a zero count is less than the nominal value of the parent distribution. See Zipois for more information.
实际上,这些功能允许零通缩。也就是说,一个零计数所得到的概率是小于标称值父分布。见Zipois更多信息。
(作者)----------Author(s)----------
Thomas W. Yee
参见----------See Also----------
zigeometric, dgeom.
zigeometric,dgeom。
实例----------Examples----------
prob = 0.5; pstr0 = 0.2; x = (-1):20
(ii = dzigeom(x, prob, pstr0))
max(abs(cumsum(ii) - pzigeom(x, prob, pstr0))) # Should be 0[应为0]
table(rzigeom(1000, prob, pstr0))
## Not run: x = 0:10[,#未运行:X = 0:10]
barplot(rbind(dzigeom(x, prob, pstr0), dgeom(x, prob)),
beside = TRUE, col = c("blue","orange"),
ylab = "P[Y = y]", xlab = "y", las = 1,
main = paste("zigeometric(", prob, ", pstr0 = ", pstr0,
") (blue) vs",
" geometric(", prob, ") (orange)", sep = ""),
names.arg = as.character(x))
## End(Not run)[#(不执行)]
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|