GLAM_1d_covariates {TwoTimeScales}R Documentation

Fit the 1d GLAM with covariates

Description

GLAM_1d_covariates() fits a GLAM for the hazard with one time scale, with covariates.

Usage

GLAM_1d_covariates(
  R,
  Y,
  Bs,
  Z = Z,
  Wprior = NULL,
  P,
  control_algorithm = list(maxiter = 20, conv_crit = 1e-05, verbose = FALSE)
)

Arguments

R

A 2d-array of dimensions ns by n containing exposure times.

Y

A 2d-array of dimensions ns by n containing event indicators.

Bs

A matrix of B-splines for the s time scale of dimension ns by cs.

Z

A regression matrix of covariates values of dimensions n by p.

Wprior

An optional vector of length ns of a-priori weights.

P

The penalty matrix of dimension cs by cs.

control_algorithm

A list with optional values for the parameters of iterative processes: *maxiter The maximum number of iterations for the IWSL algorithm, default is 20 . * conv_crit The convergence criteria, expressed as difference between estimates at iteration i and i+1, default is 1e-5. * verbose A Boolean. Default is FALSE. If TRUE, monitor the iteration process.

Value

A list with the following elements:


[Package TwoTimeScales version 1.0.0 Index]