Skip to contents

This function calculates the baseline hazard function for a fitted colsa model and optionally provides confidence intervals for the estimated hazard.

Usage

# S3 method for class 'colsa'
basehaz(object, newdata = NULL, conf.int = 0.95, ...)

Arguments

object

An object of class colsa. This is the fitted model object.

newdata

A numeric vector of time points at which to evaluate the baseline hazard. If NULL, the function generates a sequence of time points based on the model's boundary.

conf.int

A numeric value between 0 and 1 specifying the confidence level for the confidence intervals. Default is 0.95.

...

Additional arguments (currently not used).

Value

A matrix with columns:

time

The time points at which the baseline hazard is evaluated.

basehaz

The estimated baseline hazard at each time point.

se

The standard error of the baseline hazard estimates.

lower

The lower bound of the confidence interval.

upper

The upper bound of the confidence interval.

Details

The function uses the model's boundary and basis functions to compute the cumulative baseline hazard. Confidence intervals are derived using the variance-covariance matrix of the model parameters.