I'm using the package coxme and I want to extract the AIC from models, in order to select the best one.
1) I didn't found how to do this directly and I think this is not possible without changing the function coxme()'s code but I would be very happy to be wrong, let me know if I am !
2) I looked the function's code with the command :
coxme:::print.coxme
in order to add a variable to stock AIC and saw the code but if I call it 'coxme2' for example (I just add coxme2<- at the begining) and try to use it (without any other add), I get an error :
Error in
colnames<-
(*tmp*
, value = c("NULL", "Integrated", "Fitted" : length of 'dimnames' [2] not equal to array extent
To sum it up, the coxme function works well but if I juste copy and paste its code, it doesn't. How can I fix this issue ?