[英]How to set zero-inflated GLM intercept to positive in R?
我正在嘗試使用 zeroinfl function 運行一些零膨脹 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```
對於 model 的“零通貨膨脹”部分,您不需要將截距設置為零。
零通脹 model 有兩個部分:
不應有負截距的計數部分(輸出的高位)。
zeroinflation 部分,用於對觀測值是否為零進行建模。 這是用 logit 或 probit model 估計的,這反過來可能有負截距。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.