I am new to Generalized additive mixed models (GAMM) and I'm trying to model a behavioral response variable (time spent shading eggs by a nesting bird in minutes timeCS) in relation to several predictor variables: maximum temperature (maxT), species (categorical), the day of the year (jdate) and the age of the nest (ca). My data was based on repeated observations at several nests of shorebirds.

I have three random effects: nest id (nest), location (rm) and year. Nest is nested within rm and year; while rm and year are crossed.

Since I have multiple random effects, I plan to use gamm4 in R as my software package to conduct the GAMM. So far I believe the correct code to run this analysis with my data is

 gamm4 <- (timeCS~s(maxT)+ species + s(jdate) + s(ca), 
           data=Dataset, family=gaussian(link ="identity"))

Is this correct? Should I specify smooth terms for my predictor variables? Can I run model selection based on AICc on GAMM?


Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.