plot_rsquare: Scatterplot of a regressed predictor vs. actual to visualize...

Description Usage Arguments Details Value

Description

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.

Usage

1
plot_rsquare(xy, main = NA)

Arguments

xy

A 2 column xts matrix containing y and ypred.

main

If provided, overrides the default plot title

Details

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.

Value

The linear regression model is returned


jeanmarcgp/xtsanalytics documentation built on May 19, 2019, 12:38 a.m.