splineKM | R Documentation |
This function shows the empirical cumulative distribution function (ECDF) for left-censored data as estimated by the Kaplan-Meier (KM) method and a cubic smoothing spline fitted to it (KMSS method, see multKM
).
splineKM(x, label = NULL, dl = NULL, n.knots = NULL,
legend.pos = "bottomright",
ylab = "ECDF", xlab = "Value",
col.km = "black", lty.km = 1, lwd.km = 1,
col.sm = "red", lty.sm = 2, lwd.sm = 2, ...)
x |
Numerical data vector ( |
label |
Unique label ( |
dl |
Numeric vector of detection limits/thresholds for each element of |
n.knots |
Integer or function giving the number of knots used for fitting a cubic smoothing spline to the KM ECDF (see |
legend.pos |
Location of the graph legend. Choose one amongst |
ylab |
Title for y-axis. |
xlab |
Title for x-axis. |
col.km |
Plotting color for KM ECDF (see base graphical parameters |
lty.km |
Line type for KM ECDF (see base graphical parameters |
lwd.km |
Line width for KM ECDF (see base graphical parameters |
col.sm |
Plotting color for smoothing spline curve. |
lty.sm |
Line style for smoothing spline curve. |
lwd.sm |
Line width for smoothing spline curve. |
... |
Other graphical parameters. |
Graphical output.
data(Water)
data(mdl)
# Examine default spline smoothed KM ECDF fit for Potassium and Sulphate
splineKM(Water[,1],label=0,mdl[,1])
splineKM(Water[,4],label=0,mdl[,4],xlim=c(28,41))
# Reduce to 5 knots for Potassium
splineKM(Water[,1],label=0,mdl[,1],n.knots=5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.