Learn R Programming

oceCens (version 0.1.2)

plot.oceCoxph: Plot oceNPMLE object.

Description

Plot oceNPMLE object.

Usage

# S3 method for oceCoxph
plot(
  x,
  linesonly = FALSE,
  xlab = "Ordering Score",
  ylab = "Proportion with a larger ordering score",
  col = c("red", "blue"),
  ...
)

Value

The function invisibly (see invisible) returns a list with 4 elements: (time0, surv0, time1, and surv1)

Arguments

x

oceCoxph object (see oceCoxph).

linesonly

logical, add lines to an existing plot?

xlab

x label

ylab

y label

col

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

...

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

See Also

Example in plot.oceNPMLE shows adding lines from the coxph output to an existing plot.

Examples

Run this code
# need to first run oceFormat and oceCoxph
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"))
coxOutput<- oceCoxph(dataFormt)
plot(coxOutput, xlab="Custom x label")

Run the code above in your browser using DataLab