[R-sig-ME] glmer random effects structure: a case

Simone miseno77 at hotmail.com
Sat Nov 14 17:48:46 CET 2015


Hi all,
I have a simple (but not that simple to me) question on how to specify the random structure in R.A binary response variable (Var1) has been measured from a number of individuals (IND) that have been susceptible of being captured over a number of dates (DATE). I suspect that Var1 might depend either on its sex (SEX), or age (AGE) or Var2 which is a continuous variable measured from each individual every time it is captured. Since Var2 is a measure of the quality of each individual, it is likely that some individuals will tend to have greater values of Var2 than others during the entire study period.Note that some individuals have been captured only one time, other two, other three and so on (very unbalanced). For each date an individual can be captured only one time.So, I have two groups: IND and DATE. I would think this is a two-level model with IND nested to DATE so that:
model1 <- glmer(Var1 ~ SEX + AGE + Var2 + (1|DATE/IND), family = binomial, data = mydata)
Does it make sense? I think i am not taking into account the fact that the mean of Var2 may be different among individuals but I don't know how to do that.I would really appreciate an answer to this question that I am sure would help me a lot to understand better how mixed models work.
 		 	   		  
	[[alternative HTML version deleted]]



More information about the R-sig-mixed-models mailing list