2

I am trying to extract the Concordance index of a glmer model by using somers2 of the Hmisc package in R.

probs <- binomial()$linkinv(fitted(my.glmer.model))
somers2(probs, as.numeric(my.df$my.col)-1)

By I get this error:

Error in somers2(probs, as.numeric(my.df$my.col)- 1) : 
  y must be binary

But, when I ask about my y:

  0   1 
655 697 

Isn't this as binary as it gets? I'm very stuck. Any help will be appreciated!!

IRTFM
  • 258,963
  • 21
  • 364
  • 487
Audrey
  • 33
  • 4
  • `Error in fitted(my.glmer.model) : object 'my.glmer.model' not found` ... perhaps you can provide some more information? Refs: https://stackoverflow.com/questions/5963269, https://stackoverflow.com/help/mcve, and https://stackoverflow.com/tags/r/info. – r2evans Nov 08 '18 at 02:34

1 Answers1

1

I found an answer guys. Just posting it here in case someone has the same issue: though binary, I had to turn it into a factor.

Audrey
  • 33
  • 4