Learn R Programming

smacpod (version 1.1.1)

lines.confenvkd: Adds lines to plot of fv object.

Description

lines plots the confidence envelopes on a plot of the results of the kdest or kdenv objects.

Usage

## S3 method for class 'confenvkd':
lines(x, ...)

Arguments

x
A cienv object from the confint.kdenv function.
...
Further graphical arguments for lines function.

Value

  • A line is added to the plot on the current graphics device. No values are returned.

Examples

Run this code
data(grave)
kd = kdest(grave, nsim = 9)
ci = confenv(kd, level = 0.9)
plot(kd, legend = FALSE, main = "")
lines(ci, lty = 2)
legend("topleft", legend = c("observed", "average", "max/min", "90% conf. bands"),
lty = c(1, 2, 1, 3), col = c("black", "red", "grey", "black"))

Run the code above in your browser using DataLab