[R-sig-ME] Binomial glmer with time dependency
Luca Corlatti
luca.corlatti at boku.ac.at
Sun Oct 8 18:58:50 CEST 2017
Dear list member,
suppose I want to investigate how the success in DNA extraction (binary response 1/0) from, e.g., scats, is affected by the method of sample storage (4 levels: “ethanol”, “silica”, “DMSO” and “lysis”) and the time elapsed from scat deposition (3 levels: “<48h”, "week1”, "week2”). If I collect scats from, e.g, 10 individuals, my dataset will look like:
ID_individual method time DNA_extraction
1 ethanol <48h 1
1 ethanol week1 1
1 ethanol week2 0
1 silica <48h 1
1 silica week1 0
1 silica week2 0
1 DMSO <48h 1
1 DMSO week1 1
1 DMSO week2 1
1 lysis <48h 1
1 lysis week1 1
1 lysis week2 0
2 ethanol <48h 1
2 ethanol week1 1
2 ethanol week2 0
…
10 lysis <48h 1
10 lysis week1 1
10 lysis week2 1
for an overall of 120 records.
A simple model could be:
mod <- glmer(DNA_extraction ~ method*time + (1|ID_individual), family=binomial)
This model should account for pseudoreplication between methods, while different time decays should be corrected for by the “method” variable.
However, the success in DNA extraction is not independent between 48h, week1 and week2 (e.g. if i fail in 48h, I am likely to fail also in week1 and week 2), and I am not sure how to account for this time dependency.
Any suggestion?
Thanks a lot in advance!
Luca
More information about the R-sig-mixed-models
mailing list