Returns the predicted hazard (response scale) as a plain numeric vector, one value per row of newdata. Together with sim_hazard this is the only primitive a new estimation backend must provide: every derived quantity (cumulative hazard, survival probability, CIF, transition probabilities) and its simulation-based confidence intervals are built from these two. Analytic ("default"/"delta") confidence intervals additionally use make_X/get_coefs/get_Vp.

get_hazard(object, newdata, ...)

# Default S3 method
get_hazard(object, newdata, ...)

Arguments

object

A fitted model object.

newdata

A data frame for which the hazard is predicted.

...

Further arguments passed to methods.

Value

A numeric vector of hazards on the response scale.

See also

The package website (https://adibender.github.io/pammtools/) has worked examples of implementing get_hazard and sim_hazard for new estimation backends: the articles “Defining a new backend: gradient boosting with xgboost” (a bootstrap tree ensemble) and “Bayesian Baseline PAMMs” (a brms model, drawing from the posterior).