Description Usage Arguments Value References Examples
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.
1 2 |
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. |
eta.opt |
logical, indicating whether the parameter eta should be regarded as fixed (eta.opt = FALSE) or should be estimated (eta.opt = TRUE) |
rho.opt |
logical, indicating whether the parameter rho should be regarded as fixed (rho.opt = FALSE) or should be estimated (rho.opt = TRUE) |
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 |
function to be optimized. The following radial basis function model types are currently available: gaussian "GAU", exponential "EXPON", trigonometric "TRI", thin plate spline "TPS", completely regularized spline "CRS", spline with tension "ST", inverse multiquadratic "IM", and multiquadratic "M", are currently available |
np |
number of points, where the radial basis function is calculated |
x0 |
starting point for searching the optimum. Defaults to c(0.5, 0.5), eta and rho respectively. Use this statement only if eta and rho are equal to TRUE. |
eta.dmax |
maximum value of the range of the eta parameter that will be evaluated by the |
rho.dmax |
maximum value of the range of the rho parameter that will be evaluated by the |
P.T |
logical. Print Table (TRUE) or not (FALSE) |
... |
further parameters to be passed to the minimization functions |
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.
Johnston, K., Ver, J., Krivoruchko, K., Lucas, N. 2001. Using ArcGIS Geostatistical Analysis. ESRI.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | ## Not run:
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
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.