plot.cpf: Plot method for cpf objects

Description Usage Arguments Value Author(s) See Also Examples

View source: R/plot.cpf.R

Description

A plot of conditional probability curves is produced, one for each strata. Pointwise confidence intervals and legend can also be displayed

Usage

1
2
3
4
5
6
## S3 method for class 'cpf'
plot(x, conf.int = FALSE, mark.time = FALSE, mark = 3,
     col = 1, lty, ci.lty = 3, xlim, ylim = c(0, 1),
     xlab = "", ylab = "", bty = "n", legend = TRUE, 
     curvlab = NULL, legend.pos = NULL,
     legend.bty = "n", ...)

Arguments

x

An object of class cpf

conf.int

A logical indicating whether to plot a pointwise confidence interval. Default is FALSE

mark.time

Controls the labelling of the curves. If set to TRUE, then the curves are marked at each occurrence of a competing event

mark

Mark parameter which will be used to label the curve. The same as pch

col

Vector of colours for the curves

lty

Vector of integers specifying the line types

ci.lty

A vector of integer controlling the line types for the pointwise confidence intervals

xlim

x-axis limits for the plot area. Default is c(0, 1)

ylim

y-axis limits for the plot area

xlab

x-axis label

ylab

y-axis label

bty

see par

legend

Whether or nor draw a legend. Default is TRUE

curvlab

Text for legend

legend.pos

Position for the legend. Default is the upper left corner

legend.bty

Box type. See legend

...

Further arguments for plot

Value

No value returned

Author(s)

Arthur Allignol, arthur.allignol@gmail.com

See Also

par, cpf

Examples

1
2
3
4
5
6
7
data(mgus)
mgus$A <- ifelse(mgus$age < 64, 0, 1)

fit <- cpf(Hist(time, ev)~A, mgus)

plot(fit, curvlab = c("Age < 64", "Age >= 64"),
     main = "Conditional Probability of Cancer", xlab = "Years")

Example output

Loading required package: prodlim

Cprob documentation built on May 2, 2019, 9:31 a.m.