plot_preds: Make a scatterplot of observed vs. predicted values

Description Usage Arguments Value Examples

View source: R/plot_preds.R

Description

If there are more than 25,0000 points then they are subsampled down to 25,000. Observed values are on the x axis predicted values on the y. A blue line shows the diagonal. Points are transparent to show dense clusters. Predictions for points where the true value is not known are plotted at zero in blue.

Usage

1
plot_preds(pred, true, show.na = T, ...)

Arguments

pred

matrix or vector of predicted values

true

matrix or vector of predicted values

show.na

logical, display NA values as blue dots at the mean for the x or y axis (def: T)

...

other parameters passed to plot

Value

none

Examples

1
2
3
4
x <- seq(-10,10, 0.01)+rnorm(2001)
y <- seq(-10,10, 0.01)+rnorm(2001)
x[sample(2001, 100)] <- NA
plot_preds(y, x)

Example output



BaTFLED3D documentation built on May 2, 2019, 2:38 p.m.