[英]Zero-Inflated Quasi-Poisson Models in R (glmmadmb, pscl)
Q: Can a valid, zero-inflated Quasi-Poisson model be fitted in R?问:可以在 R 中拟合有效的零膨胀准泊松模型吗?
I know zero-inflated Poisson and zero-inflated negative binomial both can be fitted with each pscl::zeroinfl()
and glmmADMB::glmmadmb()
.我知道零膨胀泊松和零膨胀负二项式都可以适合每个pscl::zeroinfl()
和glmmADMB::glmmadmb()
。
However, in the help-file examples for pscl::zeroinfl()
, the Quasi-poisson is fitted without inflation but omitted from the inflation demonstration:然而,在pscl::zeroinfl()
的帮助文件示例中,拟泊松在没有通货膨胀的情况下安装,但在通货膨胀演示中被省略:
## data
data("bioChemists", package = "pscl")
## without inflation
## ("art ~ ." is "art ~ fem + mar + kid5 + phd + ment")
fm_pois <- glm( art ~ ., data = bioChemists, family = poisson)
fm_qpois <- glm( art ~ ., data = bioChemists, family = quasipoisson)
fm_nb <- glm.nb(art ~ ., data = bioChemists)
## with simple inflation (no regressors for zero component)
fm_zip <- zeroinfl(art ~ . | 1, data = bioChemists)
fm_zinb <- zeroinfl(art ~ . | 1, data = bioChemists, dist = "negbin")
and the only options for dist are dist = c("poisson", "negbin", "geometric")
. dist 的唯一选项是dist = c("poisson", "negbin", "geometric")
。
In the help-file documentation for glmmADMB::glmmadmb()
, the negative binomial is family="nbinom"
while the Quasi-Poisson is family="nbinom1"
and the argument definition for zeroInflation
states:在glmmADMB::glmmadmb()
的帮助文件文档中,负二项式是family="nbinom"
,而 Quasi-Poisson 是family="nbinom1"
并且zeroInflation
的参数定义指出:
zeroInflation: whether a zero-inflated model should be fitted
(only "poisson" and "nbinom" families).
My understanding is that Quasi-Poisson models have the advantage of accounting for overdispersion (albeit in a linear fashion);我的理解是,准泊松模型具有解决过度分散的优势(尽管是线性方式); that is if P is Poisson and Q is Quasi-Poisson:也就是说,如果 P 是泊松且 Q 是拟泊松:
but perhaps because they lack a proper likelihood they cannot be as easily implemented and that's why they are apparently omitted from two of the more popular zero-inflated packages...但也许是因为它们缺乏适当的可能性,所以它们不能那么容易地实施,这就是为什么它们显然被两个更流行的零膨胀包省略了......
Q: Can a valid, zero-inflated Quasi-Poisson model be fitted in R?问:可以在 R 中拟合有效的零膨胀准泊松模型吗?
A: YES, a valid, zero-inflated Quasi-Poisson model be fitted in R.答:是的,在 R 中安装了一个有效的、零膨胀的准泊松模型。
Set aside pscl::zeroinfl()
and focus on glmmADMB::glmmadmb()
.搁置pscl::zeroinfl()
并专注于glmmADMB::glmmadmb()
。
A few things for glmmADMB::glmmadmb()
: glmmADMB::glmmadmb()
的一些内容:
family="nbinom1"
is still a negative binomial model with a valid likelihood -- the help-file just states that the parameterization corresponds to a quasipoisson. family="nbinom1"
仍然是一个具有有效可能性的负二项式模型——帮助文件只是说明参数化对应于拟泊松。 If you dig through the guts of glmmADMB::glmmadmb()
you'll see that "nbinom", "nbinom1", and "nbinom2" are all changed to family="nbinom"
and that specifying "nbinom1" just creates a flag to submit tau=alpha
instead of tau=(1+e1+lambda/alpha)
in the .tpl file .如果深入了解glmmADMB::glmmadmb()
,您会发现“nbinom”、“nbinom1”和“nbinom2”都已更改为family="nbinom"
,并且指定“nbinom1”只是创建一个标志以在.tpl 文件中提交tau=alpha
而不是tau=(1+e1+lambda/alpha)
。
Furthermore, the package maintainer uses family="nbinom1"
and zeroInflation=TRUE
as the preferred model in an analysis about owls displayed on page 17 of a PDF at the ADMB website :此外,软件包维护者使用family="nbinom1"
和zeroInflation=TRUE
作为ADMB 网站 PDF 第 17 页上显示的猫头鹰分析的首选模型:
gfit3 <- glmmadmb(NCalls(FoodTreatment+ArrivalTime)*SexParent+ offset(logBroodSize)+(1|Nest), data=Owls, zeroInflation=TRUE, family="nbinom1") gfit3 <- glmmadmb(NCalls(FoodTreatment+ArrivalTime)*SexParent+ 偏移量(logBroodSize)+(1|Nest), data=Owls, zeroInflation=TRUE, family="nbinom1")
While this discussion is not about a zeroInflation=TRUE
and family="nbinom1"
model, Ben explains the parameterization of nbinom1 vs. quasi-poisson in the zeroInflation=FALSE
case.虽然此讨论不是关于zeroInflation=TRUE
和family="nbinom1"
模型,但 Ben 解释了 nbinom1 与zeroInflation=FALSE
情况下的准泊松的参数化。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.