R/ggplot.npsurv.r
ggplot.npsurv.RdTitle Plot npsurv Nonparametric Survival Curves Using ggplot2
# S3 method for class 'npsurv'
ggplot(
data,
mapping,
conf = c("bands", "none"),
trans = c("identity", "logit", "probit", "loglog"),
logt = FALSE,
curtail = c(0, 1),
xlab,
ylab = "Survival Probability",
abbrev.label = FALSE,
levels.only = TRUE,
alpha = 0.15,
facet = FALSE,
npretty = 10,
onlydata = FALSE,
...,
environment
)the result of npsurv
unused
set to "none" to suppress confidence bands
the name of a transformation for the survival probabilities to use in drawing the y-axis scale. The default is no transformation, and other choices are "logit", "probit", "loglog". "loglog" represents \(-log(-log(S(t)))\)
set to TRUE to use a log scale for the x-axis
set to a (lower, upper) 2-vector to curtail survival probabilities and confidence limits before transforming and plotting
x-axis label, the default coming from fit
y-axis label, the default coming from fit
set to TRUE to abbreviate strata levels
set to FALSE to keep the original strata name in the levels
transparency for confidence bands
when strata are present, set to TRUE to facet them rather than using colors on one panel
the number of major tick mark labels to be constructed by scales::breaks_pretty() or pretty(). For transformed scales, twice this number is used.
set to TRUE to return the data frame to be plotted, and no plot
ignored
unused
a ggplot2 object, if onlydata=FALSE