Skip to content
Prev 14359 / 20628 Next

lme4 observation level effects with indicator

Dear Tiffany,

You could try to make dummy variables for each level of period.
dat$PrePeriod <- as.integer(dat$period == "Pre")
dat$PostPeriod <- as.integer(dat$period == "Post")

mod.pois <- glmer( count ~ 1 + period + year  + year*period +
(period|year.factor) + (period|Site)  + (0 + PrePeriod|Site:year.factor)  +
(0 + PostPeriod|Site:year.factor),
                        data=dat, family=poisson)

Best regards,

ir. Thierry Onkelinx
Instituut voor natuur- en bosonderzoek / Research Institute for Nature and
Forest
team Biometrie & Kwaliteitszorg / team Biometrics & Quality Assurance
Kliniekstraat 25
1070 Anderlecht
Belgium

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

2016-04-02 21:23 GMT+02:00 Tiffany Vidal <tiffany.vidal at gmail.com>: