Package 'miRecSurv'

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

Help Index


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 <[email protected]>

See Also

recEvFit

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)

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 ~ operator, and the terms on the right. The response must be a survival object as returned by the Surv function.

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 (riskBef==FALSE) or subject who was at risk before the start of follow-up (riskBef==TRUE).

oldInd

time an individual has been at risk prior to the follow-up.

frailty

should the model include a frailty term. Defaults to FALSE.

m

number of multiple imputations. The default is m=5.

seed

an integer that is used as argument by the set.seed function for offsetting the random number generator. Default is to leave the random number generator alone.

...

extra arguments to pass to coxph.

Value

A list with seven elements:

fit

a list with all the coxph objects fitted for each imputed dataset.

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 <[email protected]>

See Also

miRecSurv-package

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.data

Format

A data.frame with 668 rows and 17 columns, including:

  1. nidan integer number that identifies the subject.

  2. real.episode number of the episode corresponding to the real history of the individual.

  3. obs.episode number of the episode corresponding to the follow-up time of the individual.

  4. time time until the corresponding event happens (or time to subject drop-out), regarding the beginning of the follow-up time.

  5. status logical value indicating if the episode corresponds to an event or a drop-out.

  6. start time at which an episode starts, taking the beginning of follow-up as the origin of the time scale.

  7. stop time at which an episode ends, taking the beginning of follow-up as the origin of the time scale.

  8. time2 time until the corresponding event happens (or time to subject drop-out), in calendar time.

  9. start2 time at which an episode starts, where the time scale is calendar time.

  10. stop2 time at which an episode ends, where the time scale is calendar time.

  11. old real value indicating the time that the individual was at risk before the beginning of follow-up.

  12. risk.bef factor that indicates if an individual was at risk before the beginning of follow-up or not.

  13. long time not at risk immediately after an episode.

  14. zIndividual heterogeneity.

  15. xbinomial covariate.

  16. x.1binomial covariate.

  17. x.2binomial covariate.