predict.aalen.model: Subject-specific prediction for an Aalen model

View source: R/predict.aalen.model.R

predict.aalen.modelR Documentation

Subject-specific prediction for an Aalen model

Description

A function that returns subject-specific predictions from a survaalen or rsaalen object.

Usage

## S3 method for class 'aalen.model'
predict(object, newdata, type = "Haz", ...)

Arguments

object

A survaalen or rsaalen object

newdata

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

type

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

...

Not used for now

Value

A data.frame containing the times and survival (or excess/population) estimates.

Author(s)

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

Examples

data(rdata)
mod <- survaalen(Surv(time, cens)~sex+age, data=rdata)
predict(mod, data.frame(age=68, sex=2))

mod <- rsaalen(Surv(time, cens)~sex+age, data=rdata, ratetable=slopop,
                rmap=list(age=age*365.241))
predict(mod, data.frame(age=68, sex=2, year=as.Date('1982-06-24')))

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