Donate. I desperately need donations to survive due to my health

Get paid by answering surveys Click here

Click here to donate

Remote/Work from Home jobs

glm model with two nested variables in R (lme4)

I have a problem writing a glmm model in the lme4 package. A little background: I measured olfactory behavior (OB) in fruit flies (80 genetic lines in total), they are from two different populations, and i measured OB in the two ontogenetic stages (adult, larvae) using two differnt fruit as stimulus (apple, grape). So i have:
RI: response index as the response variable (dependent variable)
Line: ramdom variable nested within population
population : fixed variable
fruit: fixed variable
stage: fixed variable
sex: fixed variable nested within stage (because larvae has no sex)
interactions: all posible.
I used a family=binomial and Link=logit in the modeling. The real problem is that i don´t know how to write the sex/stage nested variable and the interactions

Comments