Olivia Jones
Olivia Jones

Reputation: 11

Getting results output for random factors in glmer()

CONTEXT: Previously, my data fit a normal distribution and I was able to use a linear mixed effects model, lmer(), with the following format:

lmer(predictor ~ response + (1 | random), data = data)

I have had to change my predictor variable from the basal stem width (diameter) to the area of the basal stem. Owing to this change, a log normal distribution now fits my dataset better, meaning I must use a generalized linear mixed effects model, glmer(), with the following format:

glmer(new_predictor ~ response + (1 | random), family=gaussian(link="log"), data = updated_data)

When using the lmer(), I was able to get an output for my random factors using rand() [package: lmerTest]. The output looks like this:

enter image description here

This line of code does not work for the glmer() model.

QUESTION: Can anyone please help me with an appropriate line of code to get a summary output for the random variables in my glmer() models??

The best answer I could find for this question is using ranef(), as described in https://stats.stackexchange.com/questions/381208/r-how-to-get-estimates-and-p-values-for-random-effects-in-glmer

This gives the conditional modes of the random effects, but I would like to get an overall estimate for each one...

With thanks,

Upvotes: 0

Views: 53

Answers (0)

Related Questions