R/se-grpsurv.R

Defines functions se.grpsurv

# Bootstrap method for calculating CVSE for Cox models
se.grpsurv <-function (y, eta, B = 100) {
  cve <- matrix(NA, B, ncol(eta))
  for (b in 1:B) {
    ind <- sample(1:nrow(eta), replace=TRUE)
    cve[b,] <- loss.grpsurv(y[ind,], eta[ind,])
  }
  apply(cve, 2, sd)
}

Try the grpreg package in your browser

Any scripts or data that you put into this service are public.

grpreg documentation built on Sept. 27, 2018, 5:03 p.m.