[R-sig-ME] alternative to gams for smoothed terms? - modelling approach suggestions please
Rafael Mares
crm53 at cam.ac.uk
Tue Jul 26 13:05:43 CEST 2011
Dear all
I emailed the list a few weeks ago regarding a model I was trying to
specify using the gamm4 package (ver 0.1-2), but I have not found a
solution regarding that specific model. I was wondering if anyone had
any suggestions on alternative ways of tackling my problem, as I am as
of yet, unaware of how to do it within a gam.
I am looking at the occurrence or not of a behaviour (extraterritorial
foray) in each week across several years (and among several
individuals) and how this behaviour might be predicted by a series of
continuous and categorical variables. I would like to include week as
a predictor variable in a "null model" and compare this model with
others that do not include week, but an alternative predictor variable
which is expected to be highly seasonal (for example, oestrus). The
original idea was to include week as a predictor variable in a gam
like so: s(week,bs="cc") - as the behaviour is highly cyclical - , and
allow this smoothed term to interact with my other predictor
variables: age of the individual, total rainfall during week and
occurrence of an intergroup encounter (yes/no). However, I have not
found a way in gam to create a "fixed smoothed term" for week, that I
could then allow to interact linearly with each of my other predictor
variables, as in:
logit(occurrence of foray) ~ f(week) + age + f(week):age + rainfall +
f(week):rainfall + (1|individual) ... where f(week) is a fixed
smoothed function of week
... so, I am open to suggestions on other ways of specifying my model.
My main interest is to see whether other highly seasonal variables
(such as oestrus and it's interactions), which are expected to have
linear effects, are better predictors than a smooth of week (plus
interactions), in explaining whether individuals embark on
extraterritorial forays or not.
Thank you in advance for any help.
All the best,
Raff
--
Rafael Mares
Large Animal Research Group (LARG)
Department of Zoology
University of Cambridge
Downing Street
Cambridge
CB2 3EJ
More information about the R-sig-mixed-models
mailing list