R/splitting.stat.MST3.R

Defines functions splitting.stat.MST3

Documented in splitting.stat.MST3

splitting.stat.MST3 <-
function(surv, id, z) {
  score <- NA
  options(warn = -1)
  fit <- try(survdiff(surv ~ z + strata(id)), silent = TRUE)
  options(warn = 0)
  if (!inherits(fit, "try-error")) {
    score <- fit$chisq
    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.