Skip to Content.

mget-help - RE: [mget-help] fit negbin GAM error

Please Wait...

Subject: Marine Geospatial Ecology Tools (MGET) help

Text archives


From: "Jason Roberts" <>
To: "'Hugo Parra'" <>
Cc: <>
Subject: RE: [mget-help] fit negbin GAM error
Date: Tue, 9 Apr 2013 13:20:57 -0400

Hugo,

 

I’m sorry you’re seeing this error. I’m not sure what to make of it, as it comes from mgcv in R. My guess is that the “Non-finite coefficients at iteration 1” is what ultimately causes the “NAs in d(mu)/d(eta)”. I would start by looking at why “Non-finite coefficients at iteration 1” might be reported. Perhaps some predictor variables have extreme values, or the model formula includes transformations that cause them to take on extreme values.

 

If you privately send me the complete output of the tool and a copy of your input table, I will try it myself and see if I can develop a better guess.

 

There is some possibility that we could eventually implement negbin for GLM. The reason we have not already is that the standard R glm package does not support negbin. My understanding is that the traditional way to fit GLMs with negbin is to use the glm.nb function from the R MASS package. Thus we’d have to code MGET to use MASS for negbin distributions, and the glm package for all other distributions. That is probably doable but we’d have to be careful that the MASS package was interchangeable with the glm package in the ways that MGET currently uses the glm package. That requires some work. Because we’ve never had a need for negbin GLMs, we’ve never bothered to do it. If this is a critical need for you, we might be able to do it sometime in the next few months.

 

Best regards,

 

Jason

 

From: Hugo Parra [mailto:]
Sent: Tuesday, April 09, 2013 11:21 AM
To:
Subject: [mget-help] fit negbin GAM error

 

Hello,

 

i'm trying to fit count data with a negative binomial GAM but an error occurs when the fitting process begins:

 

Warning in gam.fit3(x = X, y = y, sp = L %*% lsp + lsp0, Eb = Eb, UrS = UrS, :

Non-finite coefficients at iteration 1

RPy_RException: Error in gam.fit3(x = X, y = y, sp = L %*% lsp + lsp0, Eb = Eb, UrS = UrS, :

NAs in d(mu)/d(eta)

Obtaining additional debugging information. This may cause this tool to hang. If you do not see any additional messages after one minute, halt its execution.

<class 'rpy.RPy_RException'>: Error in gam.fit3(x = X, y = y, sp = L %*% lsp + lsp0, Eb = Eb, UrS = UrS, :

NAs in d(mu)/d(eta)

Failed to execute (GAMFitToArcGISTable).

 

Thank you for your help.

Other question: I wonder if it is possible to implement negbin family into the GLM options? I´ve noticed that is available for GAM but not for GLM.

 

Best wishes

 

Hugo Parra

 

 

Archives powered by MHonArc.
Top of Page