# How to check assumptions for a discrete time survival analysis

What tests are required before and after estimating a discrete time survival model? In other words, how the assumptions should be tested and how the generalization of results should be investigated and discussed? For example, how do you test if we should include random effects or fixed effects?

library(readxl)
require(lme4)

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)

• Asking for help with code is off-topic in Stats.SE – Firebug Sep 30 '16 at 19:09
• Questions solely about how to use software are off-topic here, but you may have a real statistical question buried here. You may want to edit your question to clarify the underlying statistical issue. You may find that when you understand the statistical concepts involved, the software-specific elements are self-evident or at least easy to get from the documentation. – gung - Reinstate Monica Oct 1 '16 at 23:15
• @ gung @ Firebug First, thanks. Then, I edited it so could you please provide your answer. – ebrahimi Oct 4 '16 at 5:43