R/splitting.stat.MST1.R

Defines functions splitting.stat.MST1

Documented in splitting.stat.MST1

splitting.stat.MST1 <-
function(surv, id, z, weights) {
  score <- NA
  options(warn = -1)
  fit <- try(coxph(surv ~ z + cluster(id), weights=weights), silent = TRUE)
  options(warn = 0)
  if (!inherits(fit, "try-error")) {
    score <- fit$rscore
    if (length(score) == 0) { score <- NA }
  }
  score
}

Try the MST package in your browser

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

MST documentation built on April 14, 2020, 6:14 p.m.