A vector of predictor values for the data. Must be the same length as y.
y
A vector of response values for the data. Must be the same length as x.
nbins
How many bins to use construction of the regressogram.
show.bins
A logical argument specifying if dashed vertical lines should be drawn at the boundaries of the bins. Default is TRUE.
show.means
A logical argument specifying if a large point should be overlayed at the midpoint of each bin and the respective mean of the response values within that bin. Default is TRUE.
show.lines
A logical argument specifying if a line should be drawn connecting the points determined by show.means. Default is TRUE.
x.lab
Label for the x-axis.
y.lab
Label for the y-axis.
main
Title for the regressogram.
Value
regressogram returns a plotted regressogram using the ggplot2 package.
References
Wasserman, L. (2006), All of Nonparametric Statistics, Springer.
Young, D. S. (2017), Handbook of Regression Methods, CRC Press.
# NOT RUN {## Regressogram for the natural gas dataset.
data(gas)
regressogram(x = gas$LA, y = gas$OK, nbins = 6, x.lab = "LA",
y.lab = "OK", main = "Regressogram")
# }