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
stime 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: *
maxiterThe maximum number of iterations for the IWSL algorithm, default is 20 . *conv_critThe convergence criteria, expressed as difference between estimates at iteration i and i+1, default is1e-5. *verboseA Boolean. Default isFALSE. IfTRUE, monitor the iteration process.
Value
A list with the following elements:
alphaThe vector of estimated P-splines coefficients of length cs.SE_alphaThe vector of estimated Standard Errors for thealphacoefficients, of length cs.betaThe vector of length p of estimated covariates coefficients.se_betaThe vector of length p of estimated Standard Errors for thebetacoefficients.eta0The vector of values of the baseline linear predictor (log-hazard).HThe hat-matrix.CovThe full variance-covariance matrix.devianceThe deviance.edThe effective dimension of the model.aicThe value of the AIC.bicThe value of the BIC.Bbasesa list with the B-spline basisBs(this is a list for compatibility with functions in 2d).