plot.oceNPMLE {oceCens}R Documentation

Plot oceNPMLE object.

Description

Plot oceNPMLE object.

Usage

## S3 method for class 'oceNPMLE'
plot(
  x,
  xlab = "Ordering Score",
  ylab = "Proportion with a larger ordering score",
  ylim = c(0, 1),
  col = c("red", "blue"),
  mark.time = TRUE,
  ...
)

Arguments

x

oceNPMLE object (see oceNPMLE).

xlab

x label

ylab

y label

ylim

limits for the y axis, defaults to c(0,1)

col

color vector, col[1] for group=0 and col[2] for group=1.

mark.time

logical, should censored values be plotted?

...

Extra arguments (e.g., lwd=2) added to lines functions.

Value

No return value, called for side effects.

Examples

data(simScenario5)
dataFormt<-oceFormat(data=simScenario5, oceTime=c("T1","T2","T3"),
   oceStatus=c("I1","I2","I3"), group=c("Z"),
   oceNames = c("Death","Stroke/MI","Bleed"))
npmleOutput<- oceNPMLE(dataFormt)
plot(npmleOutput, xlab="Custom x label", mark.time=FALSE, lwd=2)
# can add lines from coxph output
coxOutput<- oceCoxph(dataFormt)
plot(coxOutput,linesonly=TRUE, col=c("orange","purple"),lwd=2)
legend("bottomleft",
   legend=c("grp=0, NPMLE","grp=1, NPMLE","grp=0, coxph","grp=1, coxph"),
   col=c("red","blue","orange","purple"),lty=c(1,1,1,1),lwd=2)


[Package oceCens version 0.1.2 Index]