Skip to main content
added 7 characters in body
Source Link

I am working to produce a model in R for seed germination count data with lots of zeros (around 50% of the 264 total observations). The purpose is to determine the effect treatments have on plant species as a whole and individually. Originally, I had fit a generalised linear mixed effects model (binomial error structure) and though I got decent results for an entire dataset model, when I looked at individual species the model was unable to capture a seemingly obvious effect of a treatment when all the alternative cases were 0. For example the below is the summary output of the model when only filtered to one seed with around 24 observations. The sample data behind the output is below as well.

I am working to produce a model in R for seed germination count data with lots of zeros (around 50% of the 264 total observations). The purpose is to determine the effect treatments have on plant species as a whole and individually. Originally, I had fit a generalised linear mixed effects model (binomial error structure) and though I got decent results for an entire dataset model, when I looked at individual species the model was unable to capture a seemingly obvious effect of a treatment when all the alternative cases were 0. For example the below is the summary output of the model when only filtered to one seed with 24 observations. The sample data behind the output is below as well.

I am working to produce a model in R for seed germination count data with lots of zeros (around 50% of the 264 total observations). The purpose is to determine the effect treatments have on plant species as a whole and individually. Originally, I had fit a generalised linear mixed effects model (binomial error structure) and though I got decent results for an entire dataset model, when I looked at individual species the model was unable to capture a seemingly obvious effect of a treatment when all the alternative cases were 0. For example the below is the summary output of the model when only filtered to one seed with around 24 observations. The sample data behind the output is below as well.

Added sample data
Source Link

I am working to produce a model in R for seed germination count data with lots of zeros (around 50% of the 264 total observations). The purpose is to determine the effect treatments have on plant species as a whole and individually. Originally, I had fit a generalised linear mixed effects model (binomial error structure) and though I got decent results for an entire dataset model, when I looked at individual species the model was unable to capture a seemingly obvious effect of a treatment when all the alternative cases were 0. For example the below is the summary output of the model when only filtered to one seed with around 24 observations. The sample data behind the output is below as well.

n<- c(19,20,20,20,20,20,19,19,20,20,20,20,19,20,20,20,20,20,20,20,19,19,19,20)
count<-c(8,11,13,13,15,11,0,0,0,0,0,0,9,9,13,11,14,8,0,0,0,0,0,0)
GA<-c(1,1,1,1,1,1,0,0,0,0,0,0,1,1,1,1,1,1,0,0,0,0,0,0)
Sm<-c(1,1,1,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0)
light<-c(1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0)
mod_data<-data.frame(n, count, GA, Sm, light)
Call:
glm(formula = cbind(count, n - count) ~ GA + Sm + light, 
    family = binomial, data = mod_data)

Coefficients:
             Estimate Std. Error z value Pr(>|z|)
(Intercept)  -23.7210  5592.9950  -0.004    0.997
GA            24.0074  5592.9950   0.004    0.997
Sm            -0.2706     0.2627  -1.030    0.303
light          0.2410     0.2627   0.917    0.359

(Dispersion parameter for binomial family taken to be 1)

    Null deviance: 251.9059  on 23  degrees of freedom
Residual deviance:   9.9247  on 20  degrees of freedom
AIC: 58.669

Number of Fisher Scoring iterations: 20 

I am working to produce a model in R for seed germination count data with lots of zeros (around 50% of the 264 total observations). The purpose is to determine the effect treatments have on plant species as a whole and individually. Originally, I had fit a generalised linear mixed effects model (binomial error structure) and though I got decent results for an entire dataset model, when I looked at individual species the model was unable to capture a seemingly obvious effect of a treatment when all the alternative cases were 0. For example the below is the summary output of the model when only filtered to one seed with around 24 observations.

glm(formula = cbind(count, n - count) ~ GA + Sm + light, 
    family = binomial, data = mod_data)

Coefficients:
             Estimate Std. Error z value Pr(>|z|)
(Intercept)  -23.7210  5592.9950  -0.004    0.997
GA            24.0074  5592.9950   0.004    0.997
Sm            -0.2706     0.2627  -1.030    0.303
light          0.2410     0.2627   0.917    0.359

(Dispersion parameter for binomial family taken to be 1)

    Null deviance: 251.9059  on 23  degrees of freedom
Residual deviance:   9.9247  on 20  degrees of freedom
AIC: 58.669

Number of Fisher Scoring iterations: 20 

I am working to produce a model in R for seed germination count data with lots of zeros (around 50% of the 264 total observations). The purpose is to determine the effect treatments have on plant species as a whole and individually. Originally, I had fit a generalised linear mixed effects model (binomial error structure) and though I got decent results for an entire dataset model, when I looked at individual species the model was unable to capture a seemingly obvious effect of a treatment when all the alternative cases were 0. For example the below is the summary output of the model when only filtered to one seed with 24 observations. The sample data behind the output is below as well.

n<- c(19,20,20,20,20,20,19,19,20,20,20,20,19,20,20,20,20,20,20,20,19,19,19,20)
count<-c(8,11,13,13,15,11,0,0,0,0,0,0,9,9,13,11,14,8,0,0,0,0,0,0)
GA<-c(1,1,1,1,1,1,0,0,0,0,0,0,1,1,1,1,1,1,0,0,0,0,0,0)
Sm<-c(1,1,1,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0)
light<-c(1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0)
mod_data<-data.frame(n, count, GA, Sm, light)
Call:
glm(formula = cbind(count, n - count) ~ GA + Sm + light, 
    family = binomial, data = mod_data)

Coefficients:
             Estimate Std. Error z value Pr(>|z|)
(Intercept)  -23.7210  5592.9950  -0.004    0.997
GA            24.0074  5592.9950   0.004    0.997
Sm            -0.2706     0.2627  -1.030    0.303
light          0.2410     0.2627   0.917    0.359

(Dispersion parameter for binomial family taken to be 1)

    Null deviance: 251.9059  on 23  degrees of freedom
Residual deviance:   9.9247  on 20  degrees of freedom
AIC: 58.669

Number of Fisher Scoring iterations: 20 
Source Link

Small Sample Sizes and Zero Inflated Count Data in R

I am working to produce a model in R for seed germination count data with lots of zeros (around 50% of the 264 total observations). The purpose is to determine the effect treatments have on plant species as a whole and individually. Originally, I had fit a generalised linear mixed effects model (binomial error structure) and though I got decent results for an entire dataset model, when I looked at individual species the model was unable to capture a seemingly obvious effect of a treatment when all the alternative cases were 0. For example the below is the summary output of the model when only filtered to one seed with around 24 observations.

glm(formula = cbind(count, n - count) ~ GA + Sm + light, 
    family = binomial, data = mod_data)

Coefficients:
             Estimate Std. Error z value Pr(>|z|)
(Intercept)  -23.7210  5592.9950  -0.004    0.997
GA            24.0074  5592.9950   0.004    0.997
Sm            -0.2706     0.2627  -1.030    0.303
light          0.2410     0.2627   0.917    0.359

(Dispersion parameter for binomial family taken to be 1)

    Null deviance: 251.9059  on 23  degrees of freedom
Residual deviance:   9.9247  on 20  degrees of freedom
AIC: 58.669

Number of Fisher Scoring iterations: 20 

I originally expected this seed to have a significant GA treatment as looking at the raw results, all the GA observations produced higher counts than their non-GA results (of all zero). However, I have since discovered that this type of model doesn't utilise zeros and therefore cannot produce a significant effect of GA (even though the overall model does).

This led me to investigate zero-inflated models like the zero-inflated negative binomial GLM (using the pscl package). However, when I looked at a similar model for that same seed I received an warning message and all NAs for my treatments:

Warning message:
In value[[3L]](cond) :
  system is computationally singular: reciprocal condition number = 1.09697e-23FALSE
> summary(mod)

Call:
zeroinfl(formula = count ~ GA + Sm + light | GA + Sm + light, data = mod_data, dist = "negbin")

Pearson residuals:
       Min         1Q     Median         3Q        Max 
-1.001e+00 -3.804e-02 -6.695e-11 -6.263e-11  9.649e-01 

Count model coefficients (negbin with log link):
            Estimate Std. Error z value Pr(>|z|)
(Intercept) -21.2880         NA      NA       NA
GA           23.7197         NA      NA       NA
Sm           -0.1335         NA      NA       NA
light         0.1038         NA      NA       NA
Log(theta)   15.5141         NA      NA       NA

Zero-inflation model coefficients (binomial with logit link):
              Estimate Std. Error z value Pr(>|z|)
(Intercept)  2.557e+01         NA      NA       NA
GA          -5.113e+01         NA      NA       NA
Sm          -9.764e-09         NA      NA       NA
light       -9.764e-09         NA      NA       NA

Theta = 5466023.2431 
Number of iterations in BFGS optimization: 20 
Log-likelihood: -27.84 on 9 Df

Its not entirely clear to me why NAs are being produced here however, the overall model is again producing decent (and better than first model) results.

My question is, is there a better approach in examining the effect of treatments on an individual seed like this? Or is it better to just look at the overall models and initial data exploration for the individual seeds? Thanks in advance.