predict.rsadd: Subject-specific prediction for an excess hazards model

View source: R/predict.rsadd.R

predict.rsaddR Documentation

Subject-specific prediction for an excess hazards model

Description

A function that returns subject-specific predictions from an rsadd object.

Usage

## S3 method for class 'rsadd'
predict(object, newdata, type = "Haz", add.times, ...)

Arguments

object

An rsadd object

newdata

A data.frame with one row (add covariate values in columns)

type

By default ('Haz') returns cumulative hazards. If 'prob' it calculates CIFs. If 'both' a list is returned with Haz and prob.

add.times

specific times at which predictions should be obtained.

...

Not used for now

Value

A data.frame containing the times, excess and population components.

Author(s)

Damjan Manevski damjan.manevski@mf.uni-lj.si

Examples

data(rdata)
fit <- rsadd(Surv(time,cens)~sex+age,rmap=list(age=age*365.241),
             ratetable=slopop,data=rdata,int=5,method="EM")
predict(fit, data.frame(sex=2,age=68, year=as.Date('1982-06-24')))

relsurv documentation built on Aug. 18, 2025, 5:27 p.m.