SurvRegCens
Function to be integrated to compute log-likelihood function for the Weibull survival regression model with a censored covariate.
WeibullIntegrate(x, x_i_noncens = NULL, density, param_y_i,
param_delta_i, param_lambda, param_gamma,
param_beta, intlimit = 10^-10, ForIntegrate = TRUE)
Value of the censored covariate for observation \(i\).
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 function of the censored covariate.
Value of the time-to-event for observation \(i\).
Censoring indicator of time-to-event for observation \(i\) (0: censored, 1: not censored).
Scale parameter of the Weibull distribution.
Shape parameter of the Weibull distribution.
Regression parameters (i.e. \(\beta\)): (betaNonCens1, ..., betaNonCens, betaCens)
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 Weibull density are very small, i.e. in the range of intlimit
, it is advisable to rescale the time variable, e.g. change the scaling from days to years. A very small value of the estimated \(\lambda\) is indicative of that situation.
logical
indicating whether the function is to be integrated or not.
Stanislas Hubeaux, stan.hubeaux@bluewin.ch