Q:

Why am I getting NA's for sigma in this gamlss call?

The following question was asked by Michael Barton on Cross Validated and rejected because it was deemed to be a computer question.  Regardless, I personally think the question is interesting and am wondering if it can be answered here.  
The original post is here.

I am fitting a gamlss model with the call:
gamlss(formula = image_name + random(biological_source_name) - 1,
       sigma.formula = biological_source_name - 1,
       family = "NBI",
       data = na.omit(data))

After three iterations I get an error:
GAMLSS-RS iteration 1: Global Deviance = 3814 
GAMLSS-RS iteration 2: Global Deviance = 7760
GAMLSS-RS iteration 3: Global Deviance = 7756

In digamma(y + (1/sigma)) : NaNs produced
In digamma(1/sigma) : NaNs produced
In digamma(y + (1/sigma)) : NaNs produced
In digamma(1/sigma) : NaNs produced
Error in glim.fit(f = sigma.object, X = sigma.X, y = y, w = w, fv = sigma,  : 
  NA's in the working vector or weights for parameter sigma

This suggests to me that the estimated sigma for some of the
  categorical predictors is going to 0. Would this be correct?
Any suggestions on how to go about resolving this?

A:

I contacted the authors regarding this. The issue is that a negative binomial is only able to model over dispersion, whereas my data contains both under- and over-dispersed output variables, between different dependent variable groups. This results in the error for the sigma going to 0.

The problem could be that the data are underdispered. and sigma goes to zero and the derivatives produced NA’s.
  Try to fit double Poisson DPO() in this specific data set.

As recommended by the one of the authors, a distribution such as double poisson allows for fitting this because the standard deviation can be modelled being both more or less than the mean. When using this distribution, this solved the above problem for me and I was able to fit a model.
gamlss(formula = metric ~ image_name + random(biological_source_name) - 1,
   sigma.formula = ~ biological_source_name - 1,
   family = "DPO",
   data = na.omit(data))

Note the use of DPO in the above example.

