Learn R Programming

xhaz (version 2.1.0)

qbs: qbs function

Description

a function indicating which covariates have a time-dependent effect in the formula.

Usage

qbs(x)

Value

No return value, called for side effects.

Arguments

x

a covariate to be considered in the xhaz formula with a time-dependant effect. Quadratic B-splines with two interior knots are used.

Examples

Run this code

# \donttest{

library("xhaz")
library("numDeriv")
library("survexp.fr")
library("splines")

fit.tdphBS <- xhaz(
              formula = Surv(obs_time_year, event) ~ ageCentre + qbs(immuno_trt),
              data = dataCancer, ratetable = survexp.fr,
              interval = c(0, NA, NA, max(dataCancer$obs_time_year)),
              rmap = list(age = 'age', sex = 'sexx', year = 'year_date'),
              baseline = "bsplines", pophaz = "classic")

print(fit.tdphBS)
# }

Run the code above in your browser using DataLab