valplot: valplot

Description Usage Arguments Details Value Author(s) Examples

View source: R/valplot.R

Description

Plots predicted values versus observed values in a coordinate system with the same range of both axes.

Usage

1
2
3
4
5
6
7
8
valplot(
  o,
  p,
  main = NA,
  sub = NA,
  xlab = "Observed value",
  ylab = "Predicted value"
)

Arguments

o

A numeric vector. Observed values.

p

A numeric vector. Predicted values.

main

A character value. The main title of the plot.

sub

A character value. The subtitle of the plot.

xlab

A character value. The x axis label.

ylab

A character value. The y axis label.

Details

Circles represent the data, dashed line represents observed = predicted and solid line represents an

Value

A scatter plot of observed and predicted values.

Author(s)

Kristin Piikki, Johanna Wetterlind, Mats Soderstrom and Bo Stenberg, E-mail: kristin.piikki@slu.se

Examples

1
2
3
4
5
6
7
obs<-c(1:10)
pred<-c(1, 1 ,3, 5, 4, 5, 6, 8, 11, 10)
t1='Measured variable (unit)'
evalue<-round(e(o=obs, p=pred),2)
maevalue<-round(mae(o=obs, p=pred),1)
t2=paste('E = ', evalue, '; MAE = ', maevalue, ' units')
valplot(o=obs, p=pred, main=t1, sub=t2)

valmetrics documentation built on Jan. 16, 2021, 5:11 p.m.