Learn R Programming

geospt (version 1.0-0)

graph.rbf: Graph that describes the behavior of the optimized eta and rho parameters, associated with a radial basis function

Description

Function for plotting the RMSPE for several values of the smoothing parameter eta with the same dataset. A curve is fitted to the points, and then the optimal eta that provides the smallest RMSPE is determined from the curve, by the optimize function from the stats package.

Usage

graph.rbf(formula, data, eta.opt, rho.opt, n.neigh, func, np, x0, eta.dmax,
rho.dmax, P.T, ...)

Arguments

Value

returns a graph that describes the behavior of the optimized eta or rho parameter, and a table of values associated with the graph including optimal smoothing eta or rho parameters. If both eta and rho are TRUE or FALSE simultaneously, then the function returns a lattice plot of class "trellis" with RMSPE pixel values associated with combinations of eta and rho parameters.

References

Johnston, K., Ver, J., Krivoruchko, K., Lucas, N. 2001. Using ArcGIS Geostatistical Analysis. ESRI.

Examples

Run this code
data(preci)
coordinates(preci)<-~x+y
# optimizing eta
graph.rbf(prec~1, preci, eta.opt=TRUE, rho.opt=FALSE, n.neigh=9, func="TPS", 
    np=40, eta.dmax=0.2, P.T=TRUE)
# optimizing rho
graph.rbf(prec~x+y, preci, eta.opt=FALSE, rho.opt=TRUE, n.neigh=9, func="M", 
    np=20, rho.dmax=2, P.T=TRUE)
# optimizing eta and rho
tps.lo <- graph.rbf(prec~1, preci, eta.opt=TRUE, rho.opt=TRUE, n.neigh=9, func="TPS", np=10, 
    eta.dmax=2, rho.dmax=2, P.T=TRUE)
tps.lo[[1]]  # best combination of eta and rho obtained
tps.lo[[2]]  # lattice of RMSPE
# lattice of RMSPE values associated with a range of eta and rho, without optimization
tps.l <- graph.rbf(prec~1, preci, eta.opt=FALSE, rho.opt=FALSE, n.neigh=9, func="TPS", 
    np=10, eta.dmax=2, rho.dmax=2, P.T=TRUE)
tps.l[[1]]  # best combination of eta and rho obtained
tps.l[[2]]  # lattice of RMSPE

Run the code above in your browser using DataLab