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

idwST.cvR Documentation

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)

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

Value

returns the RMSPE value

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

## Not run: 
data(croatiadb)
coordinates(croatiadb) <- ~x+y
idwST.cv(MTEMP~1, croatiadb[,1:2], n.neigh=10, C=1, factor.p=2)

## End(Not run)

geosptdb documentation built on May 13, 2022, 1:05 a.m.