Outcome variable with fixed binomial totals in glm()

Viewed 7

I have a binomially distributed dependent variable with fixed binomial totals of 6 (= number of test words correctly identified by a test subject, out of 6 test words). When analyzing the data with glmer(), I used to enter this outcome variable as cbind(nr_corr,maximum-nr_corr) in the model:

model=glmer(cbind(nr_corr,maximum-nr_corr) ~ (1|RF) + predictor 1 + predictor 2...., my_data,  family = binomial)

I'm now working with a subset of the data which makes the random effect in the above model irrelevant and thus want to analyse the data with glm() rather than glmer(). Can I enter the outcome variable in the same way, i.e. as cbind(nr_corr,maximum-nr_corr), or does the function glm() necessitate a different format? The aim is that the model again predicts the per-trial probability of a test word being correctly identified in terms of log odds.

Suggested code:

model2=glm(cbind(nr_corr,maximum-nr_corr) ~  predictor 1 + predictor 2...., data=my_data_subset, family = binomial(link = "logit")) 
0 Answers
Related