[R-sig-ME] Advice on repeated-measures mixed model (lmer)
th|erry@onke||nx @end|ng |rom |nbo@be
Mon Nov 4 09:46:00 CET 2019
Q1: you have count data, they don't follow a normal distribution. Use a
Poisson or negative binomial distribution.
Q2: confirming the best model without access to the data is not possible.
Plot the predictions of the models, so you get an idea of different
structures that they model. See what makes sense for your data and what not.
ir. Thierry Onkelinx
Statisticus / Statistician
Vlaamse Overheid / Government of Flanders
INSTITUUT VOOR NATUUR- EN BOSONDERZOEK / RESEARCH INSTITUTE FOR NATURE AND
Team Biometrie & Kwaliteitszorg / Team Biometrics & Quality Assurance
thierry.onkelinx using inbo.be
Havenlaan 88 bus 73, 1000 Brussel
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
Op do 31 okt. 2019 om 18:39 schreef André Pardal <
andre.pardal.souza using gmail.com>:
> Hey everyone,
> I am wondering if someone could advice me on a repeated-measure mixed model
> So, I carried out an experiment of effect of contamination by antifouling
> paint on predator-prey interaction (snails and barnacles).
> I have the repeated-measures of number of barnacles consume through time in
> different treatments (AP and control) in each replicate (cages). See
> structure of my dataframe below. (Everything is balanced.)
> > str(consumption)
> 'data.frame': 96 obs. of 9 variables:
> $ tr : Factor w/ 2 levels "antifouling paint",..: 1 1 1 1 1 1 1
> 1 1 1 ...
> $ replicate : Factor w/ 16 levels "AP1","AP2","AP3",..: 1 2 3 4 5 6 7 8 1
> 2 ...
> $ time : int 0 0 0 0 0 0 0 0 27 27 ...
> $ cons : int 0 0 0 0 0 0 0 0 19 37 ...
> $ cons_pc : num 0 0 0 0 0 ...
> 1) My first doubt is about day 0. In day 0 there is no consumption, so I
> have a lot of zeros what is giving me trouble to meet a normal
> distribution. My doubt here is if I should/could (or not) to remove day 0
> from analysis. I did some tests and removed day 0, and I got far better
> normal distribution.
> 2) I am running the following mixed-model, but I am not sure if it is
> right. As consumption is 0 in day 0, I am running a mixed-model with
> varying slope only. Also, what I want is set a model in each the slope
> varies randomly per replicate through time. That's what I am running:
> *m1 = lmer(cons_pc ~ tr*time + (time-1|replicate), data= consumption)*
> Alternatively, I could have:
> *m2 = lmer(cons_pc ~ tr*time + (1+time|replicate), data= consumption)*#
> intercept and slope varying per replicate
> *m3 = lmer(cons_pc ~ tr*time + (1|replicate), data= consumption)* #
> intercept only varying per replicate
> I think the first model is the right one, but I am not sure. Anyone could
> I ran all of them as a test and all of them work, and the first one is the
> best one (according to AIC score and LR-test).
> Thanks very much in advance.
> My best,
> Visiting PhD student
> School of Ocean Sciences
> Bangor University
> Menai Bridge, Anglesey, UK
> [[alternative HTML version deleted]]
> R-sig-mixed-models using r-project.org mailing list
[[alternative HTML version deleted]]
More information about the R-sig-mixed-models