Learn R Programming

cnmlcd (version 1.2-0)

plot.lcd: Plot Log-concave Density

Description

Plot method for class "lcd".

Usage

# S3 method for lcd
plot(x, data, w=NULL, log=FALSE, col="blue", knotcol=col, 
   border="grey", lwd=1, pch=1, main, breaks=50, ...)

Arguments

x

an object of class "lcd".

data

a numeric vector storing the observations.

w

frequencies or weights for the values in x. If NULL, w = 1 is used for each value in x.

log

logical, indicating if the log density plot is to be plotted instead.

col

color of lines.

knotcol

color of knots.

border

color for the border of histogram or log histogram.

lwd

line width.

pch

point type used for knots.

main

main title.

breaks

number of break points used for creating histogram or log-histogram.

...

further arguments passed to or from other methods.

Details

Either the density or its logarithm is plotted, depending on the value of log. Knots are shown in circles. If data is provided, the plot also includes a histgram or log-histogram for data.

References

Liu, Y. and Wang, Y. (2018). A Fast Algorithm for Univariate Log-concave Density Estimation. Australia & New Zealand Journal of Statistics (To appear).

See Also

cnmlcd, lcd, new.lcd, dlcd.