View source: R/regression_plot.R
plot_regr | R Documentation |
Non-interactive visualization function that plots given points, regression line and relevant statistics.
plot_regr(points, ...)
points |
A |
regression |
A logical parameter that plots a regression line when set to TRUE and hides it when set to FALSE. It is set to TRUE by default. |
stats |
A logical parameter that displays the relevant statistics on the plot area when set to TRUE; it hides them when set to FALSE. It is set to TRUE by default. |
A dataframe
containing the points coordinates. Additionally, the following parameters are provided on the plot area:
Raw intercept |
The y-coordinate at which the regression line crosses the y-axis. |
Raw slope |
The value of the slope parameter. |
Correlation |
The strength of the linear relationship. |
SSR |
The sum of squares regression. |
SSE |
The sum of squares error. |
SST |
The sum of squares total. |
R-squared |
The multiple coefficient of determination. |
interactive_regression
points <- data.frame(x = c(1, 3, 5, 8), y = c(2, 4, 6 ,8)) plot_regr(points)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.