Learn R Programming

SurvRegCensCov (version 1.1)

WeibullIntegrate: Function to be integrated in function SurvRegCens

Description

Function to be integrated to compute log-likelihood function for the Weibull survival regression model with a censored covariate.

Usage

WeibullIntegrate(x, x_i_noncens = NULL, density, param_y_i,
                 param_delta_i, param_lambda, param_gamma,
                 param_beta, intlimit = 10^-10, ForIntegrate = TRUE)

Arguments

x
Value of the censored covariate for observation $i$.
x_i_noncens
Vector of values of the non-censored covariates for observation $i$, i.e. one row of the matrix where each column represents a non-censored covariate.
density
Density function of the censored covariate.
param_y_i
Value of the time-to-event for observation $i$.
param_delta_i
Censoring indicator of time-to-event for observation $i$ (0: censored, 1: not censored).
param_lambda
Scale parameter of the Weibull distribution.
param_gamma
Shape parameter of the Weibull distribution.
param_beta
Regression parameters (i.e. $\beta$): (betaNonCens1, ..., betaNonCens, betaCens)
intlimit
In computation of integrals, values of the function to be integrated below intlimit are set to 0. This makes integration results more accurate and speeds up integration. If the data is such that the absolute values of the underlying baseline
ForIntegrate
logical indicating whether the function is to be integrated or not.