survint_C {MJMbamlss}R Documentation

Survival Integral

Description

This function is a wrapper function for calculating the survival integral in C needed in the calculation of the score vector and Hessian.

Usage

survint_C(
  pred = c("lambda", "gamma", "long", "fpc_re"),
  pre_fac,
  pre_vec = NULL,
  omega,
  int_fac = NULL,
  int_vec = NULL,
  weights,
  survtime
)

Arguments

pred

String to define for which predictor the survival integral is calculated.

pre_fac

Vector serving as factor before the survival integral. Corresponds to the gamma predictor.

pre_vec

Matrix serving as row vectors before the survival integral. Only needed if pred = "gamma".

omega

Vector serving as additive predictor placeholder within the survival integral. Present for all pred.

int_fac

Vector serving as factor within the survival integral. Only needed for the longitudinal predictors.

int_vec

Matrix serving as row vectors within the survival integral. NULL only if pred = "gamma".

weights

Vector containing the Gaussian integration weights.

survtime

Vector containing the survival times for weighting of the integral.

Details

The survival integral has a similar structure for the different model predictors. It is always a sum over all individuals, followed by the multiplication with a pre-integral factor (pre_fac). For the gamma predictor a pre-integral vector is next. Then, the integral itself consists of a weighted sum (weights) of gauss-quadrature integration points weighted by the survival time of the individuals (survtime). Inside the integral, the current additive predictor (omega) is multiplied with an in-integral vector (int_vec), except for predictor gamma. All longitudinal predictors addtitionally include an in-integration factor (int_fac).

The difference between predictors "long" and "fpc_re" is that the latter makes efficient use of the block structure of the design matrix for unconstrained functional principal component random effects. The outputs also differ as the Hessian for "fpc_re" is a diagonal matrix, so only the diagonal elements are returned.


[Package MJMbamlss version 0.1.0 Index]