DesignFormula {tvcure}R Documentation

Internal function extracting design matrices from formulas in the tvcure function and computing penalty related matrices

Description

Internal function extracting design matrices from formulas in the tvcure function and computing penalty related matrices.

Usage

DesignFormula(
  formula,
  data,
  K = 10,
  pen.order = 2,
  knots.x = NULL,
  n = NULL,
  nointercept = FALSE
)

Arguments

formula

A formula describing the fixed effects and the additive terms in a regression model.

data

A dataframe containing the data.

K

Number of B-splines to describe an additive term.

pen.order

Desired penalty order for the spline parameters in the additive terms.

knots.x

(Optional) list of length J with the knots associated to each of the J additive terms. Automatically specified from the data by default.

n

Number of units (Default: number of rows in the design matrix constructed from the formula and the data frame).

nointercept

Logical indicating if the intercept should be set to zero (Default: FALSE).

Value

A list with

If additive terms are specified in the formula, the following elements also appear:

Author(s)

Philippe Lambert p.lambert@uliege.be

References

Lambert, P. and Kreyenfeld, M. (2025). Time-varying exogenous covariates with frequently changing values in double additive cure survival model: an application to fertility. Journal of the Royal Statistical Society, Series A. <doi:10.1093/jrsssa/qnaf035>


[Package tvcure version 0.6.6 Index]