View source: R/plot.simplereg.R
plot.simplereg | R Documentation |
Plot simple regression from a 'simplereg' object
## 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,
...
)
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. |
A ggplot2
object
Marco Sandri, Paola Zuccolotto, Marica Manisera (basketballanalyzer.help@unibs.it)
P. Zuccolotto and M. Manisera (2020) Basketball Data Science: With Applications in R. CRC Press.
simplereg
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.