Zipois(VGAM)
Zipois()所属R语言包:VGAM
Zero-Inflated Poisson Distribution
零膨胀泊松分布的
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Density, distribution function, quantile function and random generation for the zero-inflated Poisson distribution with parameter pstr0.
密度,分布函数,分位数的功能和随机生成的零膨胀泊松分布参数pstr0。
用法----------Usage----------
dzipois(x, lambda, pstr0 = 0, log = FALSE)
pzipois(q, lambda, pstr0 = 0)
qzipois(p, lambda, pstr0 = 0)
rzipois(n, lambda, pstr0 = 0)
参数----------Arguments----------
参数:x, q
vector of quantiles.
向量的位数。
参数:p
vector of probabilities.
向量的概率。
参数:n
number of observations. Must be a single positive integer.
若干意见。必须是一个单一的正整数。
参数:lambda
Vector of positive means.
向量的积极手段。
参数:pstr0
Probability of a structural zero (i.e., ignoring the Poisson distribution), called phi. The default value of phi = 0 corresponds to the response having an ordinary Poisson distribution.
概率的结构零(即,忽略了泊松分布),称为phi。的默认值phi = 0对应于具有一个普通的泊松分布的响应。
参数:log
Logical. Return the logarithm of the answer?
逻辑。返回数的回答吗?
Details
详细信息----------Details----------
The probability function of Y is 0 with probability phi, and Poisson(lambda) with probability 1-phi. Thus
Y的概率函数是0的概率phi,Poisson(lambda)的概率1-phi。从而
where W is distributed Poisson(lambda).
W的分布Poisson(lambda)。
值----------Value----------
dzipois gives the density, pzipois gives the distribution function, qzipois gives the quantile function, and rzipois generates random deviates.
dzipois给出了密度,pzipois给出了分布函数,qzipois给出了分位数的功能,和rzipois随机产生的偏离。
注意----------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 the zero-deflated Poisson distribution. Here, pstr0 is also permitted to lie in the interval [-1/expm1(lambda), 0]. The resulting probability of a zero count is less than the nominal Poisson value, and the use of pstr0 to stand for the probability of a structural zero loses its meaning. When pstr0 equals -1/expm1(lambda) this corresponds to the positive-Poisson distribution (e.g., see dpospois).
实际上,这些功能允许零瘪的泊松分布。在这里,pstr0也允许说谎的时间间隔[-1/expm1(lambda), 0]。一个零计数所得的概率小于泊松的标称值,并使用pstr0放置的结构零的概率也就失去了意义。当pstr0等于-1/expm1(lambda)“”此相对应的正泊松分布(例如,见dpospois)。
(作者)----------Author(s)----------
Thomas W. Yee
参见----------See Also----------
zipoisson, dpois, rzinegbin.
zipoisson,dpois,rzinegbin。
实例----------Examples----------
lambda = 3; pstr0 = 0.2; x = (-1):7
(ii = dzipois(x, lambda, pstr0 = pstr0))
max(abs(cumsum(ii) - pzipois(x, lambda, pstr0 = pstr0))) # Should be 0[应为0]
table(rzipois(100, lambda, pstr0 = pstr0))
table(qzipois(runif(100), lambda, pstr0))
round(dzipois(0:10, lambda, pstr0 = pstr0) * 100) # Should be similar[应该是相似的]
## Not run: x = 0:10[,#未运行:X = 0时10]
par(mfrow = c(2, 1)) # Zero-inflated Poisson[零膨胀泊松]
barplot(rbind(dzipois(x, lambda, pstr0 = pstr0), dpois(x, lambda)),
beside = TRUE, col = c("blue","orange"),
main = paste("ZIP(", lambda, ", pstr0 = ", pstr0, ") (blue) vs",
" Poisson(", lambda, ") (orange)", sep = ""),
names.arg = as.character(x))
deflat_limit = -1 / expm1(lambda) # Zero-deflated Poisson[零瘪泊松]
newpstr0 = round(deflat_limit / 1.5, 3)
barplot(rbind(dzipois(x, lambda, pstr0 = newpstr0),
dpois(x, lambda)),
beside = TRUE, col = c("blue","orange"),
main = paste("ZDP(", lambda, ", pstr0 = ", newpstr0, ") (blue) vs",
" Poisson(", lambda, ") (orange)", sep = ""),
names.arg = as.character(x))
## End(Not run)[#(不执行)]
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|