R/predict.coxphms.R

Defines functions predict.coxphms

predict.coxphms <- function(object, newdata, 
                       type=c("lp", "risk", "expected", "terms", "survival"),
                       se.fit=FALSE, na.action=na.pass,
                       terms=names(object$assign), collapse, 
                       reference=c("strata", "sample"), ...) {

    # if type="lp" and newdata is missing, we can use the linear.predictor
    # component, but otherwise the code is not yet written
    type <- match.arg(type)
    if (missing(newdata) && (type %in% c("lp", "risk"))) NextMethod()
    else stop("predict method not yet available for multistate coxph")
}

Try the survival package in your browser

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

survival documentation built on June 22, 2024, 10:49 a.m.