coxlps.baseline {blapsr}R Documentation

Extract estimated baseline quantities from a fit with coxlps.

Description

The routine takes as input an object of class 'coxlps' and computes point estimates and credible intervals for the baseline hazard and survival on a user-specified time vector.

Usage

coxlps.baseline(object, time = NULL, compute.cred = TRUE, cred.int = 0.95,
                verbose = TRUE)

Arguments

object

An object of class 'coxlps'.

time

A vector of time values on which to compute the estimated baseline quantities. Each component of 'time' must be between 0 and the largest observed follow-up time. If time is 'NULL' (the default), then only the baseline median lifetime (if available) is computed.

compute.cred

Should the credible intervals be computed? Default is TRUE.

cred.int

The level for an approximate pointwise credible interval to be computed for the baseline hazard and survival curves. Default is 0.95.

verbose

Should the table of estimated values be printed to console? Default is TRUE.

Value

A list with the following components:

fit.time

A matrix with point and set estimates of the baseline hazard and survival curves for values provided in 'time'. Only available if 'time' is not 'NULL'. Column Time summarizes the provided values in 'time'. Columns named h0, S0, are the point estimates of the baseline hazard and baseline survival respectively. low and up give the lower and upper bound respectively of the approximate pointwise credible interval.

median.lifetime

The estimated baseline median lifetime.

cred.int

The chosen level to construct credible intervals.

Author(s)

Oswaldo Gressani oswaldo_gressani@hotmail.fr.

Examples


## Simulate survival data
set.seed(2)
betas <- c(0.15, 0.82, 0.41) # Regression coefficients
data <- simsurvdata(a = 1.8, b = 2, n = 300, betas = betas, censperc = 15)
simdat <- data$survdata

# Fit model
fit <- coxlps(Surv(time, delta) ~ x1 + x2 + x3, data = simdat, K = 20)
coxlps.baseline(fit, time = seq(0, 2, by = 0.5), cred.int = 0.90)


[Package blapsr version 0.6.1 Index]