[R-sig-eco] GAM with a Gamma error structure

Sally Roman sroman at umassd.edu
Sun Nov 16 23:58:54 CET 2008


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



More information about the R-sig-ecology mailing list