Re: [R] GAM and Poisson distribution

From: Ben Bolker <bolker_at_ufl.edu>
Date: Sat, 15 Nov 2008 01:49:31 -0800 (PST)

sallyr wrote:
>
> Hi -I'm running a GAM with 7 explanatory variables with a Poisson error
> structure. All of the variables are continuous so I'm getting error
> messages in R.
>
> cod.fall.full.gam.model<-gam(Kept.CPUE~s(HOUR)+s(LAT_dec)+s(LONG_dec)+s(meantemp_C)+s(meandepth_fa)+s(change_depth)+s(seds),
> data=cod.fall.version2,family=poisson)
>
> In dpois(y, mu, log = TRUE) ... : non-integer x = 5.325517
>
> Thanks Sally
>

If your response variable is an intensity (catch per unit effort) you probably need to
include an offset for the total effort, e.g. something like offset=log(effort)

-- 
View this message in context: http://www.nabble.com/GAM-and-Poisson-distribution-tp20508604p20513810.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Received on Sat 15 Nov 2008 - 09:53:51 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sat 15 Nov 2008 - 13:30:25 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive