Learn R Programming

ahw (version 0.1.0)

weightPredict: Continuous time weight estimation based on predict.aalen

Description

Extracts cumulative hazard estimates for each individual. Each individual receives a weight process evaluated at pre-specified time points. The weight process is estimated as a cumulative product involving estimated cumulative hazard increments, and a hazard ratio estimated using a smoothing parameter b.

Usage

weightPredict(fPred, cfPred, wtFrame, ids, eventTimes, eventIds, b)

Value

data.table

Arguments

fPred

predict.aalen object of the factual fit

cfPred

predict.aalen object of the counterfactual fit

wtFrame

data.frame or data.table for the at risk individuals

ids

All individuals in the data set

eventTimes

Observed event times

eventIds

Individuals that experience the event

b

Smoothing parameter

Author

Pål Christie Ryalen <p.c.ryalen@medisin.uio.no>