I have a basic question regarding modelling random effects in Glimmix.
I have a binary dependent variable.
I have fecal bacterial isolates from 2 cohorts of animals nested within farms, I have multiple samples from animals within the same sampling time, but also over two week intervals.
I have weekly samples from animals. Every time I sampled the animals I have data on 3 isolates per animal and sampling time. I have two cohorts of animals that I followed with approx 6 months apart. I have over 30 farms in my database.
I want to control for the fact that I repeatedly sampled the same animals, but also that I had clustering of animals within a cohort and within a farm.
Since bacterial isolates in these animals are very transitory, it is not really a 'repeated measure' on the animals.
I was thinking something like this below, but am new to glimmix. It seem to have so many random options, I just want to control for the clustering of isolates within animals within cohorts and farms.
Proc glimmix data=;
class animal cohort farm x y:
model y= x/dis=bin link=logit oddsration;
random intercept/subjet=farm;
random intercept/subject=animal(farm) type=un;
run;
Cat.