1

I am using glmer() in r to run a mixed logistic regression with 3 categorical (dichotomous) predictors. The outcome measure is whether or not a participant responded correctly to a memory check. This memory check is administered twice, so I include a random intercept for participant. When I run the model I am finding that some of the coefficients are huge, including the intercept. One variable is the time at which the memory check was administered (before or after the experiment). At pretest there is almost perfect performance and at posttest it is around 80%. The OR is in the millions, but the ChiSq seems reasonable at 6.788.

I'm not sure why the intercept OR would be so large but performance on around 200 trials is at about 90%.

Edit: It appears this probably is an issue of separation, so my questions are: 1) Are the statistics still valid (Chi Sq and p value)? 2) Is there another way to obtain valid estimates and ORs (would I have to calculate by hand?) 3) Should I use a different model, and if yes, what kind? Binomial test has been suggested but this doesn't seem to address the repeated measures aspect of the design? 4) Another solution would be to drop the predictor that has near-perfect performance at one level. This would prevent me from testing change in performance across time, which might be fine.

Here is a sample of what my data look like:

> head(d.mem)
id agemonths ingroupwaited personalconnect mem.time mem.acc
1  66             0               0        0.5       1
1  66             0               0       -0.5       0
2  69             1               1        0.5       1
2  69             1               1       -0.5       1

And my model:

glmer(mem.acc ~ ingroupwaited + personalconnect + mem.time + (1|id), d.mem, family=binomial(logit)
kjetil b halvorsen
  • 63,378
  • 26
  • 142
  • 467
PanPsych
  • 440
  • 4
  • 13
  • 1
    It looks like separation. You might like to search on the site for that tag which currently has 99 threads. Come back and edit if they do not help as I am not 100% sure I understand your study. – mdewey Mar 03 '18 at 11:48
  • @mdewey, I looked at many threads and couldn't find the answers to my specific questions. I've updated my question so that you can see what my data frame and model look like. – PanPsych Mar 03 '18 at 16:19
  • 1
    Likelihood ratio tests and confidence intervals based on profile likelihood should be OK. What to do about that predictor is more about the subject matter than statistics I think. – mdewey Mar 03 '18 at 17:21
  • @mdewey, could you clarify - are you suggesting it is fine to use glmer() and the resulting output (likelihood ratio test is in the output)? But what would I do about the problematic estimates/odds ratios? – PanPsych Mar 03 '18 at 19:56
  • See this Q&A especially the answer by @scortchi (which is much better than the accepted one IMHO) – mdewey Mar 04 '18 at 13:50
  • Hi @mdewey, I'm not seeing the link. Can you tell me the title of the post and I'll find it? Thanks!!! – PanPsych Mar 04 '18 at 16:27
  • 2
    https://stats.stackexchange.com/questions/11109/how-to-deal-with-perfect-separation-in-logistic-regression – mdewey Mar 04 '18 at 17:11

0 Answers0