It's about a logistic GLMM to account for repeated measurements, blocks (think about 'spatial' independent observations) and a nested factor. How should my random term look like??? Complex things need to be explained a bit longer, sorry...
The test design is a RCBD with 5x2x2 factors (so, 20 treatments) with 6 replicates for each combination=120 samples and every sample got it's own
sampleID. Within every sample, a male and a female were placed, so this is my additonally nested factor
sex. Overall, it's a balanced design.
7 repeated measurements were performed at 2h, 22h, 24h, 26h, 46h, 48h and 50h after teststart (
tf as factor 1:7 ).
This was repeated twice, reflected in
blockID (a & b) (actually, you can think of it as they are spatially distributed plots. Anyway, block a and b are independent of each other)
Ending up in 120 samples * 2 nested sexes * 7 tf * 2 blocks= 3360 observations.
The independent variable is an integer counts (
fail; so 1/0 and 0/1 are the only possible observations respectively).
Question, which should be answered by the study: My interest is to identify the best performing fac1
I am not interested in the development over time. So, i thought, i should only account for it in the random term, as I learned once, that things someone is not interested in, should be not in the fixed, but in the random term. However, an effect of time is present by nature in any case meaning the longer it lasts, the higher is the ratio of
The aim of the study was to examine which of
fac1 performes best while accounting also for
fac3 with respect to
I built a model like this:
glmmTMB(cbind(succ,fail)~fac1*fac2*fac3*sex+(1|block/sampleID/sex), family="binomial", REML=F,...).
fail are the counts explained above.
fac1 has 5 levels (4 + water control),
fac3 have 2 levels each (yes and no). The random intercept should account for
sex nested in
sampleID nested in
I am interested in the effect of
sex and assume interactions.
Is this model (random term) setup right? Or should I not mix up nested things with 'spatial measurement' (this is how I see my blocks, of course they are not separated by space but separated by time, but independent of each other). Maybe my random term should look like this:
+(1|blockID) + (1|sampleID/sex). So I should account for the nested and 'spatial' variability separately...
But how do I get my repeated measurement characteristic along with that?