Learn R Programming

geospt (version 1.0-2)

rbf.cv1: Generates a RMSPE value, result of cross validation leave-one-out

Description

Generate the RMSPE value, which is given by the radial basis function with smoothing parameter eta and robustness parameter rho.

Usage

rbf.cv1(param, formula, data, n.neigh, func)

Arguments

param
vector starting points (eta and rho respectively) for searching the RMSPE optimum.
formula
formula that defines the dependent variable as a linear model of independent variables; suppose the dependent variable has name z, for a rbf detrended use z~1, for a rbf with trend, suppose z is linearly dependent on x and y, use the formula z~x+y (linear trend).
data
SpatialPointsDataFrame: should contain the dependent variable, independent variables, and coordinates.
n.neigh
number of nearest observations that should be used for a rbf prediction, where nearest is defined in terms of the spatial locations
func
radial basis function model type, e.g. "GAU", "EXPON", "TRI", "TPS", "CRS", "ST", "IM" and "M", are currently available

Value

returns the RMSPE value

See Also

rbf

Examples

Run this code
## Not run: 
# data(preci)
# coordinates(preci) <- ~x+y
# bobyqa(c(0.5, 0.5), rbf.cv1, lower=c(1e-05,0), upper=c(2,2), formula=prec~x+y, data=preci,
#     n.neigh=9, func="TRI")
# # obtained with the optimal values previously estimated
# rbf.cv1(c(0.2126191,0.1454171), prec~x+y, preci, n.neigh=9, func="TRI")  
# ## End(Not run)

Run the code above in your browser using DataLab