plot.simplereg {BasketballAnalyzeR} | R Documentation |
Plot simple regression from a 'simplereg' object
Description
Plot simple regression from a 'simplereg' object
Usage
## S3 method for class 'simplereg'
plot(
x,
labels = NULL,
subset = NULL,
Lx = 0.01,
Ux = 0.99,
Ly = 0.01,
Uy = 0.99,
title = "Simple regression",
xtitle = NULL,
ytitle = NULL,
repel = TRUE,
...
)
Arguments
x |
an object of class |
labels |
character, labels for subjects. |
subset |
an optional vector specifying a subset of observations to be highlighted in the graph or |
Lx |
numeric; if |
Ux |
numeric; if |
Ly |
numeric; if |
Uy |
numeric; if |
title |
character, plot title. |
xtitle |
character, x-axis label. |
ytitle |
character, y-axis label. |
repel |
logical, if |
... |
other graphical parameters. |
Value
A ggplot2
object
Author(s)
Marco Sandri, Paola Zuccolotto, Marica Manisera (basketballanalyzer.help@unibs.it)
References
P. Zuccolotto and M. Manisera (2020) Basketball Data Science: With Applications in R. CRC Press.
See Also
Examples
Pbox.sel <- subset(Pbox, MIN >= 500)
X <- Pbox.sel$AST/Pbox.sel$MIN
Y <- Pbox.sel$TOV/Pbox.sel$MIN
Pl <- Pbox.sel$Player
mod <- simplereg(x=X, y=Y, type="lin")
plot(mod)