zigeometric(VGAM)
zigeometric()所属R语言包:VGAM
Zero-Inflated Geometric Distribution Family Function
零膨胀几何分布的家庭功能
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Fits a zero-inflated geometric distribution by maximum likelihood estimation.
适合的零膨胀的几何分布的最大似然估计。
用法----------Usage----------
zigeometric(lprob = "logit", eprob = list(),
lpstr0 = "logit", epstr0 = list(),
iprob = NULL, ipstr0 = NULL,
imethod = 1, bias.red = 0.5, zero = 2)
参数----------Arguments----------
参数:lprob, lpstr0
Link functions for the parameters prob (prob) and phi. The usual geometric probability parameter is the former. The probability of a structural zero is the latter. See Links for more choices. For the zero-deflated model see below.
链接功能的参数prob(prob)phi。通常的几何的概率参数是前者。的结构零的概率是后者。见Links更多的选择。对于零瘪的模型,请参阅下文。
参数:eprob, epstr0
List. Extra argument for the respective links. See earg in Links for general information.
列表。额外的参数,相应的链接。见earg中Links的一般信息。
参数:bias.red
A constant used in the initialization process of pstr0. It should lie between 0 and 1, with 1 having no effect.
在初始化过程中的pstr0一个常数。它应位于0和1之间,1不具有效果。
参数:iprob, ipstr0
See CommonVGAMffArguments for information.
见CommonVGAMffArguments的信息。
参数: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,2,…. The parameter phi satisfies 0 < phi < 1. The mean of Y is E(Y) = (1-phi) * prob / (1-prob) and these are returned as the fitted values. By default, the two linear/additive predictors are (logit(prob), logit(phi))^T.
y=1,2,…。参数phi满足0 < phi < 1。平均Y是E(Y) = (1-phi) * prob / (1-prob)和这些传回的拟合值。默认情况下,两个线性/添加剂的预测是(logit(prob), logit(phi))^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。
注意----------Note----------
The zero-deflated geometric 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 geometric distribution (see zageometric).
的零瘪几何的分布可能安装通过设置lpstr0 = identity,虽然不完全可靠。见zipoisson信息,可用于在这里。其他尝试改变零的几何分布(见zageometric“)。
(作者)----------Author(s)----------
T. W. Yee
参见----------See Also----------
rzigeom, geometric, zageometric, rgeom.
rzigeom,geometric,zageometric,rgeom。
实例----------Examples----------
gdata = data.frame(x2 = runif(nn <- 1000) - 0.5)
gdata = transform(gdata, x3 = runif(nn) - 0.5,
x4 = runif(nn) - 0.5)
gdata = transform(gdata, eta1 = 1.0 - 1.0 * x2 + 2.0 * x3,
eta2 = -1.0,
eta3 = 0.5)
gdata = transform(gdata, prob1 = logit(eta1, inverse = TRUE),
prob2 = logit(eta2, inverse = TRUE),
prob3 = logit(eta3, inverse = TRUE))
gdata = transform(gdata, y1 = rzigeom(nn, prob1, pstr0 = prob3),
y2 = rzigeom(nn, prob2, pstr0 = prob3),
y3 = rzigeom(nn, prob2, pstr0 = prob3))
with(gdata, table(y1))
with(gdata, table(y2))
with(gdata, table(y3))
head(gdata)
fit1 = vglm(y1 ~ x2 + x3 + x4, zigeometric, gdata, trace = TRUE)
coef(fit1, matrix = TRUE)
fit2 = vglm(y2 ~ 1, zigeometric, gdata, trace = TRUE)
coef(fit2, matrix = TRUE)
fit3 = vglm(y3 ~ 1, zigeometric, gdata, trace = TRUE)
coef(fit3, matrix = TRUE)
summary(fit3)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|