Generate interpolation error stats from validation datasets

Description

Generate error statistics from validation point datasets overlaid on a raster surface

Usage

1
2
errorGen(finalraster, validation.spdf, validation.data, plot = FALSE,
  title = "")

Arguments

finalraster

RasterLayer object

validation.spdf

SpatialPointsDataFrame

validation.data

data.frame

plot

logical. Plot comparison?

title

Plot labels

Value

List of error statistics

Author(s)

Joseph Stachelek

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
validation.data <- data.frame(rnorm(10, mean = 0.2, sd = 1))
names(validation.data) <- c("validation")
validation.spdf <- validation.data
validation.data <- as.numeric(unlist(validation.data))
xy <- data.frame(x = c(0:9), y = rep(1, 10))
coordinates(validation.spdf) <- xy

m <- matrix(NA, 1, 10)
out.ras <- raster(m, xmn = 0, xmx = ncol(m), ymn = 0, ymx = nrow(m))
out.ras[] <- validation.data + rnorm(ncell(out.ras), mean = 0.01, sd = 0.2)

valid.stats <- errorGen(out.ras, validation.spdf, validation.data, plot = TRUE,
title = "Validation Plot")
valid.stats