newTestSurvRec (version 1.0.2)

fit.Data.Survrecu: This function let to adjust the IDs the database

Description

This function let to adjust the ID`s the database in case that it is not have the order numeric correct. Observation: this function only let to adjust the id variable not sort the rest of the data.

Usage

fit.Data.Survrecu(x)

Arguments

x

a database type dataframe

Value

Returns the correct numeric order for the dataframe

References

Martinez C., Ramirez, G., Vasquez M. (2009).Pruebas no parametricas para comparar curvas de supervivencia de dos grupos que experimentan eventos recurrentes. Propuestas. Revista Ingenieria U.C.,Vol 16, 3, 45-55.//Pena E., Strawderman R., Hollander M. (2001). Nonparametric Estimation with Recurrent Event Data. J.A.S.A. 96, 1299-1315

See Also

FitSurvRec, Survrecu, is.Survrecu

Examples

Run this code
# NOT RUN {
data(MMC.TestSurvRec)
ID<-fit.Data.Survrecu(Survrecu(MMC.TestSurvRec$id,MMC.TestSurvRec$time,
                               MMC.TestSurvRec$event))
ID
fit<-PSH.fit(Survrecu(ID,MMC.TestSurvRec$time,
                               MMC.TestSurvRec$event))
fit$time
fit$surv
plot(fit$time,fit$surv)

 
# }
# NOT RUN {
data(DataColonDukesABvsD)
XL<-data(DataColonDukesABvsD)
DataColonDukesABvsD$Iden
Y<-fit.Data.Survrecu(Survrecu(DataColonDukesABvsD$Iden,DataColonDukesABvsD$time,
                                  DataColonDukesABvsD$event))
Y
fit<-WC.fit(Survrecu(Y,DataColonDukesABvsD$time,DataColonDukesABvsD$event))
fit$time
fit$surv
plot(fit$time,fit$surv)
print(data.frame(time=fit$time,n.event=fit$n.event, 
                     Surv=fit$survfunc,std.error=fit$std.error))
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab