valesta {datana}R Documentation

A function that computes validation statistics.

Description

This function computes validation statistics, as the RMSD, AD and AAD of any response vector 'y.pred' using as real values the vector 'y.obs'. The computed statistics are: root mean square differences (RMSD); aggregated difference (AD); and aggregated of the absolute value differences (AAD). Be sure that both predicted and observed values are expressed in the same measurement unit. Thus, be careful if the model uses a transformation of the response variable.

Usage

valesta(y.obs = y.obs, y.pred = y.pred)

Arguments

y.obs

Observed values of the variable of interest.

y.pred

Predicted values of the variable of interest.

Value

This function returns the following statistics as a vector: (RMSD,RMSD.p,AD,AD.p,AAD,AAD.p); where RMSD.p stands for RMSD expressed as a percentage, and the same applied to AD.p and AAD.p.

Note

Check the reference for further details.

Author(s)

Christian Salas-Eljatib.

References

Salas C, Ene L, Gregoire TG, Nasset E, Gobakken T. 2010. Modelling tree diameter from airborne laser scanning derived variables: a comparison of spatial statistical models. Remote Sensing of Environment 114(6):1277-1285. doi:10.1016/j.rse.2010.01.020

Examples


#creating a fake dataframe
set.seed(1234)
df <- as.data.frame(cbind(Y=rnorm(30, 30,9), X=rnorm(30, 450,133)))
df
#fitting a candidate model
mod1 <- lm(Y~X, data=df)
#using the function
valesta(y.obs=df$Y,y.pred=fitted(mod1))

[Package datana version 1.0.3 Index]