[prev in list] [next in list] [prev in thread] [next in thread] 

List:       r-sig-mixed-models
Subject:    [R-sig-ME] Advice on repeated-measures mixed model (lmer)
From:       André_Pardal <andre.pardal.souza () gmail ! com>
Date:       2019-10-31 17:39:23
Message-ID: CAFxBq7x6iRxuSTgT+=wp0Dry-a9bgAnipK2BOqZVBJ0=TfrX+g () mail ! gmail ! com
[Download RAW message or body]

Hey everyone,

I am wondering if someone could advice me on a repeated-measure mixed model
analysis.

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
confirm?

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,

Andre.
-- 

Visiting PhD student
School of Ocean Sciences
Bangor University
Menai Bridge, Anglesey, UK

	[[alternative HTML version deleted]]

_______________________________________________
R-sig-mixed-models@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic