Reputation: 77
I have seen a few articles around that report Somer's Dxy and the C index (I presume with the somers2() function of e.g., Hmisc) for a conditional inference tree generated with ctree() from the R package party. However, I can't seem to find any references/guidelines as to how to compute Dxy and the C index for this function.
Could anyone provide me with some references/code to pull this off?
Thanks,
Jeroen Claes
Upvotes: 0
Views: 295
Reputation: 13
You can find how to do it in Levshina, page 633.
Example code using the data in that page:
#create a vector of predicted probabilities
prob.cit <- unlist(predict(tv.cit, type = "prob"))
[c(FALSE,TRUE)]
#compute the C-index using a function from the Hmisc package
somers2(prob.cit, as.numeric(tv$Form) - 1)
Upvotes: 1