| Type: | Package | 
| Title: | Left-Censored Recurrent Events Survival Models | 
| Version: | 1.0.2 | 
| Maintainer: | David Moriña <dmorina@ub.edu> | 
| 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) <doi:10.48550/arXiv.2007.15031>. | 
| Depends: | R (≥ 3.5.0), survival | 
| Imports: | COMPoissonReg, matrixStats, stringi | 
| License: | GPL-2 | GPL-3 [expanded from: GPL (≥ 2)] | 
| Encoding: | UTF-8 | 
| LazyData: | true | 
| NeedsCompilation: | no | 
| Packaged: | 2021-08-17 15:35:20 UTC; dmorina | 
| Author: | David Moriña | 
| Repository: | CRAN | 
| Date/Publication: | 2021-08-17 16:20:05 UTC | 
Left-Censored Recurrent Events Survival Models
Description
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>.
Details
| Package: | miRecSurv | 
| Type: | Package | 
| Version: | 1.0.2 | 
| Date: | 2021-8-17 | 
| License: | GPL version 2 or newer | 
| LazyLoad: | yes | 
Author(s)
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 <dmorina@ub.edu>
See Also
Examples
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)
Internal miRecSurv functions
Description
Internal miRecSurv functions
Usage
com.compute.log.z(lambda, nu, log.error = 0.001)
com.log.density(x, lambda, nu, log.z = NULL)
com.log.difference(x, y)
com.log.factorial(x)
com.log.sum(x, y)
rcom(n, lambda, nu, log.z = NULL)
accum.sample(data, id, status, covars, riskBef, oldInd) 
## S3 method for class 'recEvFit'
summary(object, ...)
## S3 method for class 'recEvFit'
print.summary(x, ...)
Details
These functions are not to be called by the user.
See Also
Left-censored recurrent events survival models
Description
The function allows the user to fit recurrent events survival models.
Usage
recEvFit(formula, data, id, prevEp, riskBef, oldInd,
         frailty=FALSE, m=5, seed=NA, ...)
Arguments
| 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  | 
Value
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. | 
Author(s)
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 <dmorina@ub.edu>
See Also
Examples
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)
Simulated data set
Description
This data corresponds to a recurrent events simulated cohort using the survsim package.
Usage
sim.dataFormat
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.