plot.PDFe {PDFEstimator} | R Documentation |
Plot Method for Nonparametric Density Estimation
Description
The plot method for pdfEstimator objects.
Usage
## S3 method for class 'PDFe'
plot(x, plotPDF = TRUE, plotSQR = FALSE,
plotShading = FALSE, shadeResolution = 100,
showOutlierPercent = 0, outlierColor = "red3", sqrPlotThreshold = 2,
sqrColor = "steelblue4", type="l", lwd = 2, xlab = "x", ylab = "PDF",
legendcex = 0.9, ...)
Arguments
x |
an "estimatePDF" object |
plotPDF |
plot the probability density function |
plotSQR |
plot the scaled quantile residual of the estimate |
plotShading |
plot a gray background shading representing the probability density of the scaled quantile residuals |
shadeResolution |
the number of sample points plotted in the background if plotShading = TRUE. Increasing resolution will provide sharper contours and take longer to plot. |
showOutlierPercent |
specify confidence threshold for outliers |
outlierColor |
color for outliers positions outside of threshold defined in showOutlierPercent |
sqrPlotThreshold |
magnitude of ylim above and below zero for SQR plot |
sqrColor |
color for sqr plot for positions within the threshold defined in showOutlierPercentage |
type |
plot type for pdf. If plotPDF = FALSE and plotSQR = TRUE, then the sqr plot uses this type |
lwd |
line width for pdf. If plotPDF = FALSE and plotSQR = TRUE, then the sqr plot uses this line width |
xlab |
x-axis label for pdf. If plotPDF = FALSE and plotSQR = TRUE, then the sqr plot uses this label |
ylab |
y-axis label for pdf. If plotPDF = FALSE and plotSQR = TRUE, then the sqr plot uses this label |
legendcex |
expansion factor for legend point size with sqr plot type, for plotPDF = FALSE and plotSQR = TRUE |
... |
further plotting parameters |
Value
No return value, called for side effects
Author(s)
Jenny Farmer, Donald Jacobs
References
Farmer, J. and D. Jacobs (2018). "High throughput nonparametric probability density estimation." PLoS One 13(5): e0196937.
Examples
plot(estimatePDF(rnorm(1000, 0, 1)), plotSQR = TRUE, showOutlierPercent = 99)