Learn R Programming

riskRegression (version 1.4.3)

CoxBaseEstimator: Extract the type of estimator for the baseline hazard

Description

Extract the type of estimator for the baseline hazard

Usage

CoxBaseEstimator(object)

# S3 method for coxph CoxBaseEstimator(object)

# S3 method for phreg CoxBaseEstimator(object)

Arguments

object

The fitted Cox regression model object either obtained with coxph (survival package), cph (rms package), or phreg (mets package).

Examples

Run this code
# NOT RUN {
d <- sampleData(1e2, outcome = "survival")
d$entry <- 0

##
library(survival)
mCox <- coxph(Surv(time, event) ~ X1+X2, data = d)
CoxBaseEstimator(mCox)

##
library(rms)
mCox <- cph(Surv(time, event) ~ X1+X2, data = d, y = TRUE)
CoxBaseEstimator(mCox)

##
library(mets)
mCox <- phreg(Surv(entry, time, event) ~ X1+X2, data = d)
CoxBaseEstimator(mCox)
# }

Run the code above in your browser using DataLab