如何在 R 中将零膨胀 GLM 截距设置为正值?

How to set zero-inflated GLM intercept to positive in R?

我正在尝试使用 zeroinfl 函数 运行 一些零膨胀的 GLM,但其中很多都给我负截距,这对我的变量没有意义。有没有办法将截距设置为零以上?谢谢! 例如:

zeroinfl(formula = crab.burrows.m2 ~ Algae, data = vegdata)

Pearson residuals:
    Min      1Q  Median      3Q     Max 
-1.0557 -1.0557 -0.7236  0.1067 11.8967 

Count model coefficients (poisson with log link):
            Estimate Std. Error z value Pr(>|z|)    
(Intercept)  2.40350    0.03991  60.216   <2e-16 ***
Algae        0.03964    0.02067   1.918   0.0551 .  

Zero-inflation model coefficients (binomial with logit link):
            Estimate Std. Error z value Pr(>|z|)  
(Intercept) -0.30108    0.20093  -1.498   0.1340  
Algae        0.18556    0.09047   2.051   0.0403 *
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 

Number of iterations in BFGS optimization: 1 
Log-likelihood: -525.5 on 4 Df```

对于模型的“Zero-inflation”部分,您不需要将截距设置为零。

zero-inflation 模型有两部分:

  • 计数部分(输出的高位)不应有负截距。

  • 零通货膨胀部分 对观测值是否为零进行建模。这是用 logit 或 probit 模型估计的,反过来可以有负截距。