I am trying to analyse a data set which has numbers of behaviours performed under 2 different predictor variables. The numbers of behaviours were standardised to rates per minute, since the observation sample periods varied in duration. I originally analysed the data using a linear mixed effects model (lmer), but since my data were not normally distributed I had to use a log+1 transformation on the outcome variable (number of behaviours). I have been advised to use a Generalized mixed effects model instead, but I am having trouble fitting the model and choosing the correct distribution and link function. My outcome variable is non-negative non-integer (mostly small numbers with decimal points), so I am unable to use a Poisson distrubution. I have looked into using a log linear, gamma, or inverse gaussian distribution, but I'm not sure if this is appropriate, and I also cannot get the code to work for any type of GLMM I try (glmm or glmer). I am still fairly new to Rstudio and will be incredibly grateful for any advice! Thanks so much in advance :)

Currently working with something like this: glmm(Behaviour ~ 0 + Condition1 + (1| Individualname), varcomps.equal = c("Interact"), varcomps.names = c("Interact"), data = data, family.glmm = "gamma", m = 10^4, debug = TRUE)



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.