0

From my talks with experts here (Link1, Link2), I think I need to do a conditional binary logistic regression. I have sorted my data in a way that each control is exactly followed by the counterpart treatment case and the data is in long format.

My design is detailed in the above two links plus these two more links: Link3, Link4

edit: later I saw that sorting is not at all important because the sorted and non-sorted data resulted in the same output.

My syntax is the following. The code runs but the result is so strange. Most SEs are zero and most P values are NaN. What is wrong?

library(Epi)

clogistic((DV ~ (Demo1 +Demo2 +Demo3 +Demo4 +Demo5)^2), 
          strata = PatientID,  data = Data4)

The output is:

> clogistic((DV ~ (Demo1 +Demo2 +Demo3 +Demo4 +Trt)^2), strata = PatientID,  data = MixedModelData4)

Call: 
clogistic(formula = (DV ~ (Demo1 + Demo2 + Demo3 + Demo4 + Trt)^2), 
    strata = PatientID, data = MixedModelData4)




                 coef exp(coef) se(coef)         z   p
Demo1        0.00e+00  1.00e+00        0       NaN NaN
Demo2        0.00e+00  1.00e+00        0       NaN NaN
Demo3       -3.27e-09  1.00e+00    56013 -5.83e-14   1
Demo4        0.00e+00  1.00e+00        0       NaN NaN
Trt         -2.12e+01  6.19e-10    14786 -1.43e-03   1
Demo1:Demo2  0.00e+00  1.00e+00        0       NaN NaN
Demo1:Demo3  0.00e+00  1.00e+00        0       NaN NaN
Demo1:Demo4  0.00e+00  1.00e+00        0       NaN NaN
Demo1:Trt   -4.34e-08  1.00e+00    50351 -8.62e-13   1
Demo2:Demo3  0.00e+00  1.00e+00        0       NaN NaN
Demo2:Demo4  0.00e+00  1.00e+00        0       NaN NaN
Demo2:Trt   -1.19e-08  1.00e+00    12937 -9.20e-13   1
Demo3:Demo4  0.00e+00  1.00e+00        0       NaN NaN
Demo3:Trt    8.08e-09  1.00e+00    19595  4.12e-13   1
Demo4:Trt   -1.62e-08  1.00e+00    31612 -5.12e-13   1

Likelihood ratio test=13.9  on 15 df, p=0.536, n=20
Warning message:
In clogistic((DV ~ (Demo1 + Demo2 + Demo3 + Demo4 + Trt)^2), strata = PatientID,  :
  Iteration limit exceeded
Community
  • 1
  • 1
Vic
  • 167
  • 1
  • 10
  • How do you expect us to answer that question when you have offered no data or output??? – IRTFM Aug 28 '13 at 19:41
  • Dwin, you are totally right. Sorry, I am going to give output. – Vic Aug 28 '13 at 20:13
  • John I sorted it because I had read before that they should be sorted under each other. However, I tried both sorted and nonsorted versions and both resulted in the same output. – Vic Aug 28 '13 at 20:15
  • I edited my question accordingly. – Vic Aug 28 '13 at 20:29
  • So that was the output. You have not offered even the barest description of the data. – IRTFM Aug 29 '13 at 04:22
  • DWin, I referred to data in the links, however my data is confidential and I could not put it in a public forum. – Vic Aug 29 '13 at 09:33

1 Answers1

1

When coefficients or their standard errors "blow up" it usually indicates a pathological data situation. Complete separation or serious muli-collinearity (or both) may exist. You need to provide both:

 str(MixedModelData4) 

and:

with( MixedModelData4, table(DV,Demo1, Demo2) )
with( MixedModelData4, table(DV,Demo1, Demo3))
with( MixedModelData4, table(DV,Demo1, Demo3))
with( MixedModelData4, table(DV,Demo1, Demo4))
with( MixedModelData4, table(DV,Demo1, Demo5))

And that's just for starters. The problem could exist in one of the other three way combinations that are in your data.

IRTFM
  • 258,963
  • 21
  • 364
  • 487
  • Many thanks dear DWin. I have centered all my variables and all the VIFs are below 1.6. I will come back with new output you asked for. And yes I believe my data is pathological. It even makes another test which runs on every other data non-working (I am talking about its strange behavior when be analyzed by bootMer() of new lme4: http://stackoverflow.com/questions/18443127/r-bootstrapped-binary-mixed-model-logistic-regression-using-bootmer-of-the-ne/18445215?noredirect=1#comment27114142_18445215 ) – Vic Aug 29 '13 at 09:36
  • I see these commands print out the data, but that is not possible for me to post them here (I could not run the "with()" functions though and for the str() function, I had to remove that quotation mark before running). Maybe I can send it to you if you want me to or I can send a "part" of my data here. [I should add that my data is centered] – Vic Aug 29 '13 at 10:13
  • The with statements were all missing a final paren now inserted. – IRTFM Aug 29 '13 at 16:12
  • Many thanks dear DWin. I think my colleagues would not be happy if I post my data online. However I would try to track the problem with the help of experts by following your lead (the above solution for looking into the data). – Vic Aug 30 '13 at 19:15