Contents
How to plot A binomial GLMM with a proportional response variable?
How to plot (in R) a binomial GLMM with a proportional response variable [cbind (Successes, Failures) variable], and a continuous fixed factor? How to plot (in R) a binomial GLMM with a proportional response variable [analyzed using cbind (Successes, Failures)], and a continuous fixed factor?
How to fit a binomial GLMM in lme4?
I fitted a binomial GLMM using ‘glmer’ from the lme4 package (because ‘glmmML’ doesn’t compute on my data and glmmPQL does not provide AIC) and did model selection using drop1 repeatedly until no more terms can be dropped. Here is the final model (let’s assume it has been validated):
How many categorical predictors are in my data?
My data has a binary response (correct/incorrect), one continuous predictor score, three categorical predictors ( race, sex, emotion) and a random intercept for the random factor subj. All predictors are within-subject. One of the categorical factor has 3 levels, the other have two.
How to obtain global p-values for each categorical factor?
I need advice on obtaining “global” p-values for each categorical factor (in an “ANOVA like” way) I fitted a binomial GLMM using ‘glmer’ from the lme4 package (because ‘glmmML’ doesn’t compute on my data and glmmPQL does not provide AIC) and did model selection using drop1 repeatedly until no more terms can be dropped.
How to plot the predicted probability of a generalized linear model?
Although we ran a model with multiple predictors, it can help interpretation to plot the predicted probability that vs =1 against each predictor separately. So first we fit a glm for only one of our predictors, wt.
How to fit generalized linear models to binary data?
In our last article, we learned about model fit in Generalized Linear Models on binary data using the glm () command. We continue with the same glm on the mtcars data set (regressing the vs variable on the weight and engine displacement ).
How to plot a generalized linear model in R?
We continue with the same glm on the mtcars data set (regressing the vs variable on the weight and engine displacement ). Now we want to plot our model, along with the observed data. Although we ran a model with multiple predictors, it can help interpretation to plot the predicted probability that vs =1 against each predictor separately.
Is the binomial GLMM the right answer?
I cant seem to find a definitive answer on the net without still feeling slightly uncertain, and wish to make sure I am not making a mistake. Any help or insight into alternative methods on this would be much appreciated. The binomial GLMM is probably the right answer.
Which is the correct method for fitting a glmer?
The second would be a binomial GLMM ( glmer ) e.g. I believe the binomial glmer to be the correct method, however they produce fairly different results. I cant seem to find a definitive answer on the net without still feeling slightly uncertain, and wish to make sure I am not making a mistake.
Do you need to check for overdispersion in glmer?
You should be careful to check for/account for overdispersion. If you have a single observation (i.e. a single binomial sample/row in your data frame) per location then your (1|Site) random effect will automatically handle this (although see Harrison 2015 for a cautionary note)