Title: | Left-Censored Recurrent Events Survival Models |
---|---|
Description: | Fitting recurrent events survival models for left-censored data with multiple imputation of the number of previous episodes. See Hernández-Herrera G, Moriña D, Navarro A. (2020) <arXiv:2007.15031>. |
Authors: | David Moriña [aut, cre] , Gilma Hernández-Herrera [aut], Albert Navarro [aut] |
Maintainer: | David Moriña <[email protected]> |
License: | GPL (>= 2) |
Version: | 1.0.2 |
Built: | 2024-10-26 03:09:24 UTC |
Source: | https://github.com/cran/miRecSurv |
Left-censored recurrent event analysis in epidemiological studies: a proposal when the number of previous episodes is unknown. See Hernández-Herrera, G, Moriña, D and Navarro, A (2020) <arXiv:2102.11279>.
Package: | miRecSurv |
Type: | Package |
Version: | 1.0.2 |
Date: | 2021-8-17 |
License: | GPL version 2 or newer |
LazyLoad: | yes |
David Moriña (University of Barcelona), Gilma Hernández-Herrera (Universidad de Antioquía), Albert Navarro (Universitat Autònoma de Barcelona)
Mantainer: David Moriña <[email protected]>
data(sim.data) fit <- recEvFit(Surv(start2, stop2, status)~x+x.1+x.2, data=sim.data, id="nid", prevEp = "obs.episode", riskBef = "risk.bef", oldInd = "old", frailty=FALSE, m=5) summary(fit)
data(sim.data) fit <- recEvFit(Surv(start2, stop2, status)~x+x.1+x.2, data=sim.data, id="nid", prevEp = "obs.episode", riskBef = "risk.bef", oldInd = "old", frailty=FALSE, m=5) summary(fit)
The function allows the user to fit recurrent events survival models.
recEvFit(formula, data, id, prevEp, riskBef, oldInd, frailty=FALSE, m=5, seed=NA, ...)
recEvFit(formula, data, id, prevEp, riskBef, oldInd, frailty=FALSE, m=5, seed=NA, ...)
formula |
a formula object, with the response on the left of a |
data |
a data.frame in which to interpret the variables named in the formula. |
id |
subject identifier. |
prevEp |
known previous episodes. |
riskBef |
indicator for new individual in the cohort ( |
oldInd |
time an individual has been at risk prior to the follow-up. |
frailty |
should the model include a frailty term. Defaults to |
m |
number of multiple imputations. The default is |
seed |
an integer that is used as argument by the |
... |
extra arguments to pass to |
A list with seven elements:
fit |
a list with all the |
coeff |
a list with the vectors of coefficients from the models fitted to each imputed dataset |
loglik |
a list with the loglikelihood for each model fitted. |
vcov |
a list with the variance-covariance matrices for the parameters fitted for each of the imputed datasets. |
AIC |
a list with the AIC of each of the models fitted. |
CMP |
summary tables of the fitted COMPoisson models used for imputing missing values |
data.impute |
the original dataset with the multiple imputed variables as final columns. |
David Moriña (University of Barcelona), Gilma Hernández-Herrera (Universidad de Antioquía), Albert Navarro (Universitat Autònoma de Barcelona)
Mantainer: David Moriña <[email protected]>
data(sim.data) fit <- recEvFit(Surv(start2, stop2, status)~x+x.1+x.2, data=sim.data, id="nid", prevEp = "obs.episode", riskBef = "risk.bef", oldInd = "old", frailty=FALSE, m=5) summary(fit)
data(sim.data) fit <- recEvFit(Surv(start2, stop2, status)~x+x.1+x.2, data=sim.data, id="nid", prevEp = "obs.episode", riskBef = "risk.bef", oldInd = "old", frailty=FALSE, m=5) summary(fit)
This data corresponds to a recurrent events simulated cohort using the survsim
package.
sim.data
sim.data
A data.frame
with 668 rows and 17 columns, including:
nidan integer number that identifies the subject.
real.episode number of the episode corresponding to the real history of the individual.
obs.episode number of the episode corresponding to the follow-up time of the individual.
time time until the corresponding event happens (or time to subject drop-out), regarding the beginning of the follow-up time.
status logical value indicating if the episode corresponds to an event or a drop-out.
start time at which an episode starts, taking the beginning of follow-up as the origin of the time scale.
stop time at which an episode ends, taking the beginning of follow-up as the origin of the time scale.
time2 time until the corresponding event happens (or time to subject drop-out), in calendar time.
start2 time at which an episode starts, where the time scale is calendar time.
stop2 time at which an episode ends, where the time scale is calendar time.
old real value indicating the time that the individual was at risk before the beginning of follow-up.
risk.bef factor that indicates if an individual was at risk before the beginning of follow-up or not.
long time not at risk immediately after an episode.
zIndividual heterogeneity.
xbinomial covariate.
x.1binomial covariate.
x.2binomial covariate.