get_cumu_hazard2: Calculate cumulative hazard

Description Usage Arguments

View source: R/add-functions.R

Description

Calculate cumulative hazard

Usage

1
2
3
4
5
6
7
get_cumu_hazard2(
  object,
  newdata,
  time_var = NULL,
  interval_length = "intlen",
  ...
)

Arguments

object

a fitted gam object as produced by gam().

newdata

A data frame or list containing the values of the model covariates at which predictions are required. If this is not provided then predictions corresponding to the original data are returned. If newdata is provided then it should contain all the variables needed for prediction: a warning is generated if not. See details for use with link{linear.functional.terms}.

time_var

Name of the variable used for the baseline hazard. If not given, defaults to "tend" for gam fits, else "interval". The latter is assumed to be a factor, the former numeric.

interval_length

The variable in newdata containing the interval lengths. Can be either bare unquoted variable name or character. Defaults to "intlen".

...

Further arguments passed to predict.xgb.Booster.


adibender/pem.xgb documentation built on Sept. 10, 2021, 7:24 p.m.