Learn R Programming

geosptdb (version 1.0-2)

idwST.cv: IDW spatio-temporal leave-one-out cross validation

Description

Generate the RMSPE value which is given by Inverse Distance Weighting (IDW) interpolation.

Usage

idwST.cv(formula, data, n.neigh, C, factor.p, progress)

Value

returns the RMSPE value

Arguments

formula

formula that defines a detrended linear model, use \(z_{st}\)~1.

data

SpatialPointsDataFrame: should contain the spatio-temporal dependent variable, independent variables (statics and/or dynamics), spatial coordinates and the time as an integer or numerical variable.

n.neigh

number of nearest observations that should be used for a rbf.st prediction, where nearest is defined in terms of the spatio-temporal locations

C

numeric; associated to time factor, we recommend using the parameter found by minimizing the root-mean-square prediction errors using cross-validation. Using idwST.cv and optimize

factor.p

numeric; specify the inverse distance weighting power (p is the exponent that influences the weighting or optimal smoothing parameter)

progress

whether a progress bar shall be printed for spatio-temporal inverse-distance weighted function; default=TRUE

References

Melo, C. E. (2012). Analisis geoestadistico espacio tiempo basado en distancias y splines con aplicaciones. PhD. Thesis. Universitat de Barcelona. 276 p. [link]

See Also

idwST, rbfST

Examples

Run this code
if (FALSE) {
data(croatiadb)
coordinates(croatiadb) <- ~x+y
idwST.cv(MTEMP~1, croatiadb[,1:2], n.neigh=10, C=1, factor.p=2)
}

Run the code above in your browser using DataLab