Skip to content

GAM with a Gamma error structure

2 messages · Sally Roman, Gavin Simpson

#
Hi- I'm try to run a GAM with a Gamma distribution, but am getting an
error message that there are non positive values allowed for the gamma
family.  I do not have any negative values for my response or explanatory
variables.

cod.fall.gam2.kept<-gam(y~s(b,bs="cr",k=4)+s(e,bs="cr",k=4)+f+s(g,bs="cr",k=4),data=cod.fall,family=Gamma)
Error in eval(expr, envir, enclos) :
  non-positive values not allowed for the gamma family

Thanks Sally


Sally Roman
Fisheries Technician
University of Massachusetts, SMAST
200 Mill Rd., Fairhaven, MA 02719
sroman at umassd.edu
508-910-6379
#
On Sun, 2008-11-16 at 17:58 -0500, Sally Roman wrote:
Non-negative is *not* non-positive. Do you have zero values in the
response? This would cause the error you are getting.

HTH

G