NPH: Non Proportional Hazard effect

View source: R/NLL.NPH.func.R

NPHR Documentation

Non Proportional Hazard effect

Description

Generate the design matrix of spline basis for non proportional effect.

Usage

NPH(x, 
    timevar, 
    Spline = c("b-spline", "tp-spline", "tpi-spline"),
    Knots.t = NULL, 
    Degree.t = 3, 
    Intercept.t = TRUE, 
    Boundary.knots.t = c(0, max(timevar)), 
    Keep.duplicates.t = TRUE, 
    outer.ok = TRUE, 
    ...)

Arguments

x

the predictor variable.

timevar

the time variable.

Spline

a character string specifying the type of spline basis. "b-spline" for B-spline basis, "tp-spline" for truncated power basis and "tpi-spline" for monotone (increasing) truncated power basis.

Knots.t

the internal breakpoints that define the spline used to estimate the NPH effect. By default there are none.

Degree.t

degree of splines which are considered.

Intercept.t

a logical value indicating whether intercept/first basis of spline should be considered.

Boundary.knots.t

range of time period which is analysed. By default it is c(0, max(timevar)).

Keep.duplicates.t

Should duplicate interior knots be kept or removed. Defaults is FALSE, which removes duplicate knots with a warning if duplicate interior knots are found.

outer.ok

logical indicating how are managed timevar values outside the knots. If FALSE, return NA, if TRUE, return 0 for the corresponding timevar values.

...

not used

Details

NPH is based on package orthogonalsplinebasis

See Also

NLL, and NPHNLL.


flexrsurv documentation built on June 7, 2023, 5:09 p.m.

Related to NPH in flexrsurv...