therneau / survival

Survival package for R
394 stars 106 forks source link

Information: coxfit6.c no longer returns imat_i #285

Closed jcm6t closed 2 weeks ago

jcm6t commented 2 weeks ago

Debugging 3rd party code and in 3.7-0 coxfit6.c doesn't return imat_i, while in a previous version it did.

means(nv) : vector of column means of X beta(nv) :the vector of answers (at start contains initial est) u(nv) :score vector imat(nv,nv) :the variance matrix at beta=final (returned as a vector) loglik(2) :loglik at beta=initial values, at beta=final ** sctest :the score test at beta=initial

Previous version also contained: imat_i(nv,nv):the Information matrix at beta=final (returned as a vector)

I looked through the history and couldn't see exactly where this change was made and why. You will be able to answer this very quickly, I'm sure. I can guess at these but it would be helpful if you could confirm:

  1. Why was the information matrix return removed ?
  2. Confirm how to derive it from the output that is returned in this version ? Thanks very much Joe
therneau commented 2 weeks ago

Exactly what previous version are you referring to? I almost never use underscore in variable names (I touch type, and it’s hard to hit accurately). Perhaps someone created a modification of my code? It would not be hard to do, since inverting the information matrix is the last step before returning.

Terry T.

jcm6t commented 2 weeks ago

This is helpful, I didn't realize the c code was customized also.