Skip to content
Prev 18725 / 20628 Next

mixed model with recapture data

Dear Leandro,

You could consider splitting the time effect into a year effect and a month
effect. This will assume that every year has the same seasonal pattern. Add
year as a fixed effect factor if your data spans only a few years.

lm.smi <- lmer(SMI ~ Sex * MarkR + Year + (1 | ID) + (1 | Month), data =
smi)

The bats in our region are hibernating. Their body condition peaks in the
early autumn and is low in early spring. You can model such a pattern with
e.g. a sine wave as fixed effect and a random effect to model the
deviations from the sine wave.
Month_rad <- 2 * pi * Month / 12
sin(Month_rad) + cos(Month_rad) + (1 | Month)

Notethataddingspacestotextmakesitmuchmorereadable.Thesamegoesforcode.

Best regards,

ir. Thierry Onkelinx
Statisticus / Statistician

Vlaamse Overheid / Government of Flanders
INSTITUUT VOOR NATUUR- EN BOSONDERZOEK / RESEARCH INSTITUTE FOR NATURE AND
FOREST
Team Biometrie & Kwaliteitszorg / Team Biometrics & Quality Assurance
thierry.onkelinx at inbo.be
Havenlaan 88 bus 73, 1000 Brussel
www.inbo.be

///////////////////////////////////////////////////////////////////////////////////////////
To call in the statistician after the experiment is done may be no more
than asking him to perform a post-mortem examination: he may be able to say
what the experiment died of. ~ Sir Ronald Aylmer Fisher
The plural of anecdote is not data. ~ Roger Brinner
The combination of some data and an aching desire for an answer does not
ensure that a reasonable answer can be extracted from a given body of data.
~ John Tukey
///////////////////////////////////////////////////////////////////////////////////////////

<https://www.inbo.be>


Op do 24 sep. 2020 om 22:47 schreef Leandro Rabello Monteiro <lrmont at uenf.br