Skip to contents

Return the plot of the cross entropy loss from a cv.DiscSurv object

Usage

# S3 method for class 'cv.DiscSurv'
plot(
  fit,
  log.x = T,
  vertical.line = T,
  col.vertical.line = "blue",
  col.dot = "red"
)

Arguments

fit

a cv.DiscSurv object.

log.x

whether the horizontal axis be on the log scale.

vertical.line

whether draws a vertical line at the value where cross-validaton error is minimized.

Examples

data(DiscTime)
data <- DiscTime$data
Event.char <- DiscTime$Event.char
Z.char <- DiscTime$Z.char
Time.char <- DiscTime$Time.char
cv.fit.DiscSurv <- cv.DiscSurv(data, Event.char, Z.char, Time.char, nfolds = 10)
plot(cv.fit.DiscSurv)