AR1_FRAILTY | R Documentation |
Jointly model longitudinal measurements and recurrent events, accommodating both scalar and functional predictors while capturing time-dependent correlations among events. The FRAILTY method employs a two-step estimation procedure. First, functional principal component analysis through conditional expectation (PACE) is applied to extract key temporal features from sparse, irregular longitudinal data. Second, the obtained scores are incorporated into a dynamic recurrent frailty model with an autoregressive structure to account for within-subject correlations across recurrent events. This function works only for univariate functional data.
AR1_FRAILTY(
formula,
sdat,
fdat,
para0 = c(0.5, 0.5),
nbasis = 10,
pve = 0.9,
npc = NULL,
makePD = FALSE,
cov.weight.type = c("none", "counts"),
iter.max = 50,
eps = 1e-06
)
formula |
A formula, with the response on the left of a ~ operator being a |
sdat |
A data frame containing subject IDs, time-to-event outcomes (starting time, end point, censoring time and event status), and scalar covariates |
fdat |
A data frame containing subject IDs, longitudinal measurements, and the corresponding time points for each measurement. |
para0 |
A vector of initial values for |
nbasis |
An integer, representing the number of B-spline basis functions
used for estimation of the mean function and bivariate smoothing of the covariance surface.
Defaults to |
pve |
A numeric value between 0 and 1, the proportion of variance
explained: used to choose the number of principal components. Defaults to
|
npc |
An integer, giving a prespecified value for the number of
principal components. Defaults to |
makePD |
Logical: should positive definiteness be enforced for the
covariance surface estimate? Defaults to |
cov.weight.type |
The type of weighting used for the smooth covariance
estimate. Defaults to |
iter.max |
Maximum number of iterations for both inner iteration and outer iteration. Defaults to |
eps |
Tolerance criteria for a possible infinite coefficient value. Defaults to |
Model specification:
Let T_{ij}
denote the time of the j
th event for subject i
,
and let C_i
represent the censoring time.
The observed event time, accounting for right censoring, is \widetilde{T}_{ij}=\min(T_{ij}, C_i)
,
and \delta_{ij}=I(T_{ij}\leq C_i)
serves as an indicator of whether the j
th event for subject i
is observed.
The hazard function is specified as
h(t; \boldsymbol{Z}_i, {X}_i(\cdot))=h_{0}(t-t_{i,j-1}) \exp \left(\eta_{ij}\right),
where h_0(\cdot)
is the baseline hazard function,
and \eta_{ij} = \bm{\alpha}^{\top}\boldsymbol{Z}_i +\int_{t_{i, j-1}}^{t}{X}_{i}(s)\beta(s)ds + v_{ij}
.
Here, t_{i, j-1}
is the previous event time with t_{i0} = 0
.
\bm{\alpha}
is the fixed effect parameter associated with the time-invariant covariates \boldsymbol{Z}_i
,
and \beta(t)
is a time-varying coefficient that captures the effect of functional predictor X_{i}(t)
on the hazard rate of recurrent events.
A funsurv object containing the following components:
beta |
Estimation of coefficients of scalar covariates and FPC scores. Including estimated values, standard errors, and p-values |
beta_vcov |
Estimated variance-covariance of the estimates of beta |
eAR |
Estimation of variance components ( |
eAR_vcov |
Estimated variance of estimates of |
frailties |
Estimated frailty terms (random effects) |
basesurv |
Estimated baseline survival probability |
time |
Time points associated with baseline survival probability |
FPC |
Functional principal components |
Recur
PACE
data(simDat)
fit <- AR1_FRAILTY(Recur(t_start %to% t_stop, id, status) ~ z1,
sdat = sdat, fdat = fdat, iter.max = 30)
summary(fit)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.