interpolation.cv: Calibration and validation of interpolation procedures

Description Usage Arguments Value Author(s) References See Also Examples

Description

Function interpolation.calibration determines optimal interpolation parameters 'N' and 'alpha' for a given meteorological variable. Optimization is done by minimizing mean absolute error (MAE) (Thornton et al. 1997). Function interpolation.cv calculates average mean absolute errors (MAE) for the prediction period of an object of class 'MeteorologyInterpolationData'. Function summary.interpolation.cv returns a data.frame with cross-validation summaries and plot.interpolation.cv plots cross-validation results. In both calibration and validation procedures, predictions for each weather station are made using a leave-one-out procedure (i.e. after excluding the station from the predictive set).

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
interpolation.calibration(object, stations = NULL, variable="Tmin",
                        N_seq = seq(5,30, by=5), alpha_seq = seq(0.25,10, by=0.25),
                        verbose = FALSE)
interpolation.calibration.fmax(object, stations = NULL, 
                               fmax_seq = seq(0.05,0.95, by=0.05), 
                               verbose = FALSE)                        
interpolation.cv(object, stations = NULL, verbose = FALSE)
## S3 method for class 'interpolation.cv'
summary(object, ...)
## S3 method for class 'interpolation.cv'
plot(x, type = "stations", ...)

Arguments

object

In the case of function interpolation.cv, an object of class MeteorologyInterpolationData-class. In the case of function summary, an object of class interpolation.cv

stations

A numeric vector containing the indices of stations to be used to calculate mean absolute errors (MAE) in the calibration or cross-validation analysis. All the stations with data are included in the training set but predictive MAE are calculated for the 'stations' subset only.

variable

A string indicating the meteorological variable for which interpolation parameters 'N' and 'alpha' will be calibrated. Accepted values are 'Tmin' (for minimum temperature), 'Tmax' (for maximum temperature), 'Tdew' (for dew-point temperature), 'PrecEvent' (for precipitation events),'PrecAmount' (for regression of precipitation amounts),'Prec' (for precipitation with the same values for precipitation events and regression of precipitation amounts).

N_seq

Set of average number of points to be tested.

alpha_seq

Set of alpha values to be tested.

fmax_seq

Set of f_max values to be tested.

verbose

A logical flag to generate additional console output.

x

A S3 object of class interpolation.cv with cross-validation results.

type

A string of the plot type to be produced (either "stations" or "dates").

...

Additional parameters passed to summary and plot functions.

Value

Function interpolation.calibration returns an object of class 'interpolation.calibration' with the following items:

Function interpolation.cv returns a list of class 'interpolation.cv' with the following items:

Author(s)

Miquel De Cáceres Ainsa, Biodiversity and Landscape Ecology Laboratory, Centre Tecnologic Forestal de Catalunya

References

Thornton, P.E., Running, S.W., 1999. An improved algorithm for estimating incident daily solar radiation from measurements of temperature, humidity, and precipitation. Agric. For. Meteorol. 93, 211–228. doi:10.1016/S0168-1923(98)00126-9.

De Caceres M, Martin-StPaul N, Turco M, Cabon A, Granda V (2018) Estimating daily meteorological data and downscaling climate models over landscapes. Environmental Modelling and Software 108: 186-196.

See Also

MeteorologyInterpolationData

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
data(exampleinterpolationdata)

#Calibration procedure
precEv_cal = interpolation.calibration(exampleinterpolationdata, variable="PrecEvent",
                                       stations = 1:5,
                                       N_seq=c(5,10,15), alpha_seq=seq(0.25,1.0, by=0.25),
                                       verbose = TRUE)

precAm_cal = interpolation.calibration(exampleinterpolationdata, variable="PrecAmount",
                                       stations = 1:5,
                                       N_seq=c(5,10,15), alpha_seq=seq(0.25,1.0, by=0.25),
                                       verbose = TRUE)

#Set 'alpha' and 'N' parameters to values found in calibration
exampleinterpolationdata@params$N_PrecipitationEvent = precEv_cal$N
exampleinterpolationdata@params$alpha_PrecipitationEvent = precEv_cal$alpha

exampleinterpolationdata@params$N_PrecipitationAmount = precAm_cal$N
exampleinterpolationdata@params$alpha_PrecipitationAmount = precAm_cal$alpha

#Run cross validation
cv = interpolation.cv(exampleinterpolationdata, stations = 1:5, verbose = TRUE)

#Print cross validation summaries
summary(cv)

#Plot results
plot(cv)

miquelcaceres/meteoland documentation built on May 8, 2019, 11:57 p.m.