recEvFit {miRecSurv} | R Documentation |
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)