1

I am carrying out a zero-inflated negative binomial GLM on some insect count data in R. My problem is how to get R to read my species data as one stacked column so as to preserve the zero inflation. If I subtotal and import it into R as a single row titled Abundance, I loose the zeros and the model doesn't work. Already, I have tried to:

  1. stack the data myself (there are 80 columns * 47 rows) so with 3760 rows after stacking manually you can imagine how slow R gets when using the pscl zeroinfl() command (It takes 20mins on my computer!, It still worked)

  2. The next problem concerns a spatial correlation. Certain samplers sampled from the same medium so as to violate independence. Can I just put medium in as a factor in the model?

4

1 回答 1

0

使用 PSCL 时 3760 行需要 20 分钟?我的上帝,我已经战斗了 30.000 行 :) 这就是为什么我的 pscl 计算没有完成......

然而,我随后使用了一个 GLMM,包括嵌套随机效应 (lme/gamm) 和负二项式分布,将 theta 设置为低值,以便分布处理零通胀。我认为这取决于零的程度。就我而言,它是 44%,残差看起来相当不错。

于 2012-09-01T19:00:24.220 回答