repeatedMeasuresROC: repeatedMeasuresROC

Description Usage Arguments Value Examples

Description

repeatedMeasuresROC provides a table of sensitivities and specificities, as well as the AUC using Wilcoxon non-parametric approach, both in line with Liu and Wu (2003)

Usage

1
repeatedMeasuresROC(glmerModel)

Arguments

glmerModel

an lme4::glmer() model

Value

a list containing: ROC_table and AUC

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
hdp <- read.csv("http://www.ats.ucla.edu/stat/data/hdp.csv")
hdp <- within(hdp, {
  Married <- factor(Married, levels = 0:1, labels = c("no", "yes"))
  DID <- factor(DID)
  HID <- factor(HID)
})
library(lme4)
m <- glmer(remission ~ IL6 + CRP + CancerStage + LengthofStay + Experience + (1 | DID),
           data = hdp,
           family = binomial,
           control = glmerControl(optimizer = "bobyqa"),
           nAGQ = 10)
out <- repeatedMeasuresROC(m)
plot(x = 1-out$ROC_table$spec, y = out$ROC_table$sens)
abline(0,1)
(AUC = out$AUC)

TaylorAndrew/atAnalyze documentation built on May 9, 2019, 4:21 p.m.