Zibinom(VGAM)
Zibinom()所属R语言包:VGAM
Zero-Inflated Binomial Distribution
零充气二项式分布
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Density, distribution function, quantile function and random generation for the zero-inflated binomial distribution with parameter pstr0.
密度,分布函数,分位数的功能和随机生成的零膨胀的二项式分布参数pstr0。
用法----------Usage----------
dzibinom(x, size, prob, pstr0 = 0, log = FALSE)
pzibinom(q, size, prob, pstr0 = 0, lower.tail = TRUE, log.p = FALSE)
qzibinom(p, size, prob, pstr0 = 0, lower.tail = TRUE, log.p = FALSE)
rzibinom(n, size, prob, pstr0 = 0)
参数----------Arguments----------
参数:x, q
vector of quantiles.
向量的位数。
参数:p
vector of probabilities.
向量的概率。
参数:size
number of trials. It is the N symbol in the formula given in zibinomial.
试验次数。这是N符号中给出的公式中zibinomial。
参数:prob
probability of success on each trial.
每次试验的成功概率。
参数:n
number of observations. Must be a single positive integer.
若干意见。必须是一个单一的正整数。
参数:log, log.p, lower.tail
Arguments that are passed on to pbinom.
参数传递到pbinom。
参数:pstr0
Probability of a structural zero (i.e., ignoring the binomial distribution), called phi. The default value of phi=0 corresponds to the response having an ordinary binomial distribution.
概率的结构零(即,忽略了二项分布),称为phi。的默认值phi=0对应于具有一个普通的二项式分布的响应。
Details
详细信息----------Details----------
The probability function of Y is 0 with probability phi, and Binomial(size, prob) with probability 1-phi. Thus
Y的概率函数是0的概率phi,Binomial(size, prob)的概率1-phi。从而
where W is distributed Binomial(size, prob).
W的分布Binomial(size, prob)。
值----------Value----------
dzibinom gives the density, pzibinom gives the distribution function, qzibinom gives the quantile function, and rzibinom generates random deviates.
dzibinom给出了密度,pzibinom给出了分布函数,qzibinom给出了分位数的功能,和rzibinom随机产生的偏离。
注意----------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----------
zibinomial, dbinom.
zibinomial,dbinom。
实例----------Examples----------
prob = 0.2; size = 10; pstr0 = 0.5
(ii = dzibinom(0:size, size, prob, pstr0 = pstr0))
max(abs(cumsum(ii) - pzibinom(0:size, size, prob, pstr0 = pstr0))) # Should be 0[应为0]
table(rzibinom(100, size, prob, pstr0 = pstr0))
table(qzibinom(runif(100), size, prob, pstr0 = pstr0))
round(dzibinom(0:10, size, prob, pstr0 = pstr0) * 100) # Should be similar[应该是相似的]
## Not run: x = 0:size[#不运行:X = 0:大小]
barplot(rbind(dzibinom(x, size, prob, pstr0 = pstr0),
dbinom(x, size, prob)),
beside = TRUE, col = c("blue", "green"), ylab = "Probability",
main = paste("ZIB(", size, ", ", prob, ", pstr0 = ", pstr0, ") (blue) vs",
" Binomial(", size, ", ", prob, ") (green)", sep=""),
names.arg = as.character(x), las = 1, lwd = 2)
## End(Not run)[#(不执行)]
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|