Description Usage Arguments Details Value
This function does a scatter plot of a predicted value (ypred) vs. its actual value (y). The points are color coded such that if the signs of y and ypred are the same, the points are green, otherwise they are red.
1 | plot_rsquare(xy, main = NA)
|
xy |
A 2 column xts matrix containing y and ypred. |
main |
If provided, overrides the default plot title |
In addition, a linear regression is performed and the regression line is shown in red, along with the R-square value in the subtitle. A line is also plotted in dotted blue to illustrate the split of data at x = y.
NOTE: This function assumes that column 1 is y, and column 2 is ypred.
The linear regression model is returned
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.