Displaying 1 result from an estimated 1 matches for "newrisk".
Did you mean:
newdisk
2013 Feb 12
0
error message from predict.coxph
...rs to be an incorrect subscripting of xbar (and xbar2) in defining dt (and dt2) in one part of predict.coxph:
#
#if (ncol(y) == 2) {
# if (se.fit) {
# dt <- (chaz * newx[indx2, ]) - xbar[indx2, ] # *** SHOULD BE JUST xbar
# se[indx2] <- sqrt(varh + rowSums((dt %*% object$var) * dt)) * newrisk[indx2]
# }
#}
#else {
# j2 <- approx(afit$time, 1:afit.n, newy[indx2, 2], method = "constant", f = 0, yleft = 0, yright = afit.n)$y # chaz2 <- approx(-afit$time, afit$cumhaz, -newy[indx2, 2], method = "constant", rule = 2, f = 0)$y # chaz2 <- c(0, afit$cumhaz)[j2 +...