[prev in list] [next in list] [prev in thread] [next in thread]
List: r-sig-mixed-models
Subject: [R-sig-ME] cross validation for discrete time survival analysis
From: shahla ebrahimi via R-sig-mixed-models <r-sig-mixed-models () r-project ! org>
Date: 2016-07-16 3:50:25
Message-ID: 1469054561.84641.1468641025575.JavaMail.yahoo () mail ! yahoo ! com
[Download RAW message or body]
Dear Mr./Ms.
Greetings
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. library(readxl)require(lme4)
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]]
_______________________________________________
R-sig-mixed-models@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic