[R] Help with a (g)lmer code

Saudi Sadiq @@ud|@@d|q @end|ng |rom gm@||@com
Wed Jun 10 17:47:52 CEST 2020


Dear Sir/Madam,

Hope everyone is safe and sound. I appreciate your help a lot.

I am evaluating two Arabic subtitles of a humorous English scene and asked
263 participants (part) to evaluate the two subtitles (named Standard
Arabic, SA, and Egyptian Arabic, EA) via a questionnaire that asked them to
rank the two subtitles in terms of how much each subtitle is

2) more humorous (hum),

5) closer to Egyptian culture (cul)



The questionnaire contained two 1-10 linear scale questions regarding the 2
points clarified, with 1 meaning the most humorous and closest to Egyptian
culture, and 1 meaning the least humorous and furthest from Egyptian
culture. Also, the questionnaire had a general multiple-choice question
regarding which subtitle is better in general (better). General information
about the participants were also collected concerning gender (categorical
factor), age (numeric factor) and education (categorical factor).

Two versions of the questionnaire were relied on: one showing the ‘SA
subtitle first’ and another showing the ‘EA subtitle first’. Nearly half
the participants answered the first and nearly half answered the latter.

I am focusing on which social factor/s lead/s the participants to evaluate
one of the two subtitles as generally better and which subtitle is more
humorous and closer to Egyptian culture. Each of these points alone can be
the dependent factor, but the results altogether can be linked.

I thought that mixed effects analyses would clarify the picture and answer
the research questions (which  factor/s lead/s participants to favour a
subtitle over another?) and, so,  tried the lme4 package in R and ran many
models but all the codes I have used are not working.

I ran the following codes, which yielded Error messages, like:

model1<- lmer (better ~ gender + age + education + WF + (1 | part),
data=sub_data)

Error: number of levels of each grouping factor must be < number of
observations (problems: part)



Model2 <- glmer (better ~ gender + age + education + WF + (1 | part), data
= sub_data, family='binomial')

Error in mkRespMod(fr, family = family) :

  response must be numeric or factor



Model3 <- glmer (better ~ age + gender + education + WF + (1 | part), data
= sub_data, family='binomial', control=glmerControl(optimizer=c("bobyqa")))

Error in mkRespMod(fr, family = family) :

  response must be numeric or factor



Why does the model crash? Does the problem lie in the random factor part (which
is a code for participants)? Or is it something related to the mixed
effects analysis?

Best
Saudi Sadiq

	[[alternative HTML version deleted]]



More information about the R-help mailing list