[R-sig-ME] cross validation for discrete time survival analysis

shahla ebrahimi shebrahimi_3622 at yahoo.com
Sat Jul 16 05:50:25 CEST 2016

Dear Mr./Ms.

I would be very grateful if you could let me know how to do cross validation when estimating a discrete time survival analysis in R.
setwd("D:/Nasdaq")df=read_excel("Book1.xlsx",sheet = 1)model <- glmer(EVENT ~ TIME + (1+TIME|ID)+x1+x2+x3+x4+x5, data=df, family=binomial)p <- as.numeric(predict(model, type="response")>0.5)acc=mean(p==df$EVENT)

Thanks in advance.Best regards,   


	[[alternative HTML version deleted]]

More information about the R-sig-mixed-models mailing list