zibinomial(VGAM)
zibinomial()所属R语言包:VGAM
Zero-Inflated Binomial Distribution Family Function
零充气二项分布家庭功能的
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Fits a zero-inflated binomial distribution by maximum likelihood estimation.
适合一个的零膨胀二项式分布的最大似然估计。
用法----------Usage----------
zibinomial(lpstr0 = "logit", lprob = "logit",
epstr0 = list(), eprob = list(),
ipstr0 = NULL, zero = 1, mv = FALSE, imethod = 1)
参数----------Arguments----------
参数:lpstr0, lprob
Link functions for the parameter phi and the usual binomial probability prob parameter. See Links for more choices. For the zero-deflated model see below.
链接功能的参数phi和一般的二项式概率prob参数。见Links更多的选择。对于零瘪的模型,请参阅下文。
参数:epstr0, eprob
List. Extra argument for the respective links. See earg in Links for general information.
列表。额外的参数,相应的链接。见earg中Links的一般信息。
参数:ipstr0
Optional initial values for phi, whose values must lie between 0 and 1. The default is to compute an initial value internally. If a vector then recyling is used.
可选为的phi,必须位于0和1之间的值的初始值。默认值是内部计算的初始值。然后,如果一个向量循环的竞争被使用。
参数:mv
Logical. Currently it must be FALSE to mean the function does not handle multivariate responses. This is to remain compatible with the same argument in binomialff.
逻辑。目前,它必须是FALSE意味着该函数不处理多因素的反应。这是保持兼容使用相同的参数在binomialff。
参数:zero, imethod
See CommonVGAMffArguments for information.
见CommonVGAMffArguments的信息。
Details
详细信息----------Details----------
This function uses Fisher scoring and is based on
此功能使用Fisher评分,并根据
for y=0, and
y=0,
for y=1/N,2/N,…,1. That is, the response is a sample proportion out of N trials, and the argument size in rzibinom is N here. The parameter phi is the probability of a structural zero, and it satisfies 0 < phi < 1. The mean of Y is E(Y) = (1-phi) * prob and these are returned as the fitted values. By default, the two linear/additive predictors are (logit(phi), logit(prob))^T.
y=1/N,2/N,…,1。也就是说,响应是一个简单的比例N试验,参数size中rzibinom是N这里。参数phi的结构零的概率,并且它满足0 < phi < 1。平均Y是E(Y) = (1-phi) * prob和这些传回的拟合值。默认情况下,两个线性/添加剂的预测是(logit(phi), logit(prob))^T。
值----------Value----------
An object of class "vglmff" (see vglmff-class). The object is used by modelling functions such as vglm and vgam.
类的一个对象"vglmff"(见vglmff-class)。该对象被用于建模功能如vglm和vgam。
警告----------Warning ----------
Numerical problems can occur. Half-stepping is not uncommon. If failure to converge occurs, make use of the argument ipstr0.
数值可能会出现问题。半步的情况并不少见。如果出现收敛失败,使使用的说法ipstr0。
注意----------Note----------
The response variable must have one of the formats described by binomialff, e.g., a factor or two column matrix or a vector of sample proportions with the weights argument specifying the values of N.
响应变量都必须有一个描述的格式binomialff因素,例如,一个或两个列的矩阵或向量的样本比例的weights参数指定的值N。
To work well, one needs N>1 and prob>0, i.e., the larger N and prob are, the better.
把工作做好,需要N>1和prob>0,即较大的N和prob,更好。
For intercept-models and constant N over the n observations, the misc slot has a component called pobs0 which is the estimate of the probability of an observed 0, i.e., P(Y=0). This family function currently cannot handle a multivariate response (only mv = FALSE can be handled).
对于截距模型和不断N在n观察,misc插槽中有一种成分叫做pobs0是观察到的,即概率的估计, P(Y=0)。这间家庭功能,目前还没有一个的多元响应(仅mv = FALSE可以处理)处理。
The zero-deflated binomial distribution might be fitted by setting lpstr0 = identity, albeit, not entirely reliably. See zipoisson for information that can be applied here. Else try the zero-altered binomial distribution (see zabinomial).
零泄了气的二项分布可能安装通过设置lpstr0 = identity,虽然不完全可靠。见zipoisson信息,可用于在这里。其他尝试零二项式分布的改变(见zabinomial“)。
(作者)----------Author(s)----------
T. W. Yee
参见----------See Also----------
rzibinom, binomialff, posbinomial, rbinom.
rzibinom,binomialff,posbinomial,rbinom。
实例----------Examples----------
size = 10 # Number of trials; N in the notation above[在上面的符号试验次数; N]
nn = 200
zibdata = data.frame(pstr0 = logit( 0, inverse = TRUE), # 0.50[0.50]
mubin = logit(-1, inverse = TRUE), # Mean of usual binomial[通常二项式平均值]
sv = rep(size, length = nn))
zibdata = transform(zibdata,
y = rzibinom(nn, size = sv, prob = mubin, pstr0 = pstr0))
with(zibdata, table(y))
fit = vglm(cbind(y, sv - y) ~ 1, zibinomial, zibdata, trace = TRUE)
coef(fit, matrix = TRUE)
Coef(fit) # Useful for intercept-only models[仅截距模型]
fit@misc$pobs0 # Estimate of P(Y = 0)[估计P(Y = 0)]
head(fitted(fit))
with(zibdata, mean(y)) # Compare this with fitted(fit)[与此相比,与拟合(FIT)]
summary(fit)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|