Skip to contents

Fit models

Define base learners and fit piecewise-constant hazard models.

Learner_glmnet-class Learner_glmnet
Penalized Poisson learner via glmnet
Learner_gam-class Learner_gam
GAM learner via mgcv::bam
Learner_hal-class Learner_hal
HAL learner for piecewise Poisson hazards
Learner_xgboost-class Learner_xgboost
Piece-wise constant hazard via xgboost
fit_learner()
Fit a single base learner
Superlearner()
Fit a Poisson Super Learner ensemble

Predict and inspect

Generate predictions and inspect fitted models.

predict(<base_learner>)
Predict hazards, survival and absolute risk from a fitted base learner
predict(<poisson_superlearner>)
Predict hazards, survival and absolute risk from a fitted Poisson Super Learner
predictRisk(<base_learner>)
Absolute-risk matrix predictions for a fitted base learner
predictRisk(<poisson_superlearner>)
Absolute-risk matrix predictions for a fitted Poisson Super Learner
coef(<base_learner>)
Extract coefficients from a fitted base learner
coef(<poisson_superlearner>)
Extract stacking (meta-learner) coefficients from a fitted Poisson Super Learner
print(<base_learner>)
Print method for base_learner
print(<poisson_superlearner>)
Print method for poisson_superlearner
summary(<base_learner>)
Summarize a fitted base learner object
summary(<poisson_superlearner>)
Summarize a fitted Poisson Super Learner object

Hazard and risk utilities

pch_survival()
Piecewise-constant hazards survival function
pch_absolute_risk()
Absolute risk (cumulative incidence) for a cause under piecewise-constant hazards
pch_absolute_risk_euler()
Absolute risk (Euler approximation) for a cause under piecewise-constant hazards

Example data

simulateStenoT1()
Simulate time-to-event data for hypothetical type-1 diabetes patients

Package

poissonsuperlearner poissonsuperlearner-package
poissonsuperlearner: Poisson Super Learner