ggplot: Plot for decision curve

Description Usage Arguments Value Examples

Description

Plot for decision curve

Plot for decision curve

Plot Decision Curve

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
## S3 method for class 'rFP.p100'
ggplot(
  data,
  mapping,
  color = TRUE,
  linetype = TRUE,
  lwd = 1.05,
  ...,
  environment = parent.frame()
)

## S3 method for class 'dca.cph'
ggplot(
  data,
  mapping,
  color = TRUE,
  linetype = TRUE,
  lwd = 1.05,
  ...,
  environment = parent.frame()
)

## S3 method for class 'dca.lrm'
ggplot(
  data,
  mapping,
  color = TRUE,
  linetype = TRUE,
  lwd = 1.05,
  ...,
  environment = parent.frame()
)

Arguments

data

results of dca() function

mapping

ignore

color

logical, whether models will be classified by color

linetype

logical, whether models will be classified by line type

lwd

line width

...

ignore

environment

ignore

Value

a ggplot2 picture

Examples

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
library(ggDCA)
library(rms)

######## logistic regression

model1 <- lrm(status~ANLN,LIRI)
d <- dca(model1,model.names = 'ANLN')
ggplot(d)



model2 <- lrm(status~ANLN+CENPA,LIRI)
d <- dca(model2,model.names = 'ANLN+CENPA')
ggplot(d)


model3 <- lrm(status~ANLN+CENPA+GPR182,LIRI)
d <- dca(model3,model.names = 'ANLN+CENPA+GPR182')
ggplot(d)

model4 <- lrm(status~ANLN+CENPA+GPR182+BCO2,LIRI)
d <- dca(model4,model.names = 'ANLN+CENPA+GPR182+BCO2')
ggplot(d)


d <- dca(model1,model2,model3,model4,
         model.names = c('ANLN',
                         'ANLN+CENPA',
                         'ANLN+CENPA+GPR182',
                         'ANLN+CENPA+GPR182+BCO2'))
ggplot(d,
       linetype = FALSE,
       color = c('blue','green','black','red','gray','gray'))


##########  cox regression

# evaluate at median time

model1 <- coxph(Surv(time,status)~ANLN,LIRI)
d <- dca(model1,model.names = 'ANLN')
ggplot(d)

model2 <- coxph(Surv(time,status)~ANLN+CENPA,LIRI)
d <- dca(model2,model.names = 'ANLN+CENPA')
ggplot(d)


model3 <- coxph(Surv(time,status)~ANLN+CENPA+GPR182,LIRI)
d <- dca(model3,model.names = 'ANLN+CENPA+GPR182')
ggplot(d)

model4 <- coxph(Surv(time,status)~ANLN+CENPA+GPR182+BCO2,LIRI)
d <- dca(model4,model.names = 'ANLN+CENPA+GPR182+BCO2')
ggplot(d)


d <- dca(model1,model2,model3,model4,
         model.names = c('ANLN',
                         'ANLN+CENPA',
                         'ANLN+CENPA+GPR182',
                         'ANLN+CENPA+GPR182+BCO2'))
ggplot(d,
       linetype = FALSE,
       color = c('blue','green','black','red','gray','gray'))



# evaluate at different times

qt <- quantile(LIRI$time,c(0.25,0.5,0.75))
qt=round(qt,2)
model1 <- coxph(Surv(time,status)~ANLN,LIRI)
d <- dca(model1,
         model.names = 'ANLN',
         times = qt)
ggplot(d)

model2 <- coxph(Surv(time,status)~ANLN+CENPA,LIRI)
d <- dca(model2,
         model.names = 'ANLN+CENPA',
         times = qt)
ggplot(d)


model3 <- coxph(Surv(time,status)~ANLN+CENPA+GPR182,LIRI)
d <- dca(model3,
         model.names = 'ANLN+CENPA+GPR182',
         times = qt)
ggplot(d)

model4 <- coxph(Surv(time,status)~ANLN+CENPA+GPR182+BCO2,LIRI)
d <- dca(model4,
         model.names = 'ANLN+CENPA+GPR182+BCO2',
         times = qt)
ggplot(d)


d <- dca(model1,model2,model3,model4,
         model.names = c('ANLN',
                         'ANLN+CENPA',
                         'ANLN+CENPA+GPR182',
                         'ANLN+CENPA+GPR182+BCO2'),
         times = qt)
ggplot(d)

ggDCA documentation built on Sept. 6, 2020, 5:06 p.m.

Related to ggplot in ggDCA...