graph.rbfST {geosptdb}R Documentation

Graph that describes the behavior of the optimized eta and rho parameters, associated with a spatio-temporal 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.rbfST(formula, data, eta.opt, rho.opt, n.neigh, func, np, xo, eta.dmax,
rho.dmax, P.T, iter, ...)

Arguments

formula

formula that defines the dependent variable as a linear model of independent variables (covariates or the principal coordinates); suppose the dependent variable has name z_{st}, for a rbfST detrended use z_{st}~1, for a rbfST with trend, suppose z_{st} is linearly dependent on x and y, use the formula z_{st}~x+y (linear trend).

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.

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 rbfST prediction, where nearest is defined in terms of the spatio-temporal locations

func

function to be optimized. The following radial basis function spatio-temporal 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 spatio-temporal is calculated

xo

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 optimize function.

rho.dmax

maximum value of the range of the rho parameter that will be evaluated by the optimize function.

P.T

logical. Print table (TRUE) or not (FALSE). Default P.T=NULL.

iter

The maximum allowed number of function evaluations.

...

further parameters to be passed to the minimization functions optimize or bobyqa, typically arguments of the type control() which control the behavior of the minimization algorithm. See documentation about the selected minimization function for further details.

Value

Returns a graph that describes the behavior of the optimized eta or rho parameters and a table of values associated with the graph including optimal smoothing eta or rho parameters. If both eta and rho are FALSE simultaneously then the function returns a list with the best value obtained from the combinations smoothing eta and rho parameters and a lattice plot of class "trellis" with RMSPE pixel values associated with combinations of eta and rho parameters. Finally, if both eta and rho are TRUE, the function will return a list with the best combination of values of the smoothing eta or rho parameters and the RMSPE associated with these.

References

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

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

rbfST, rbfST.cv

Examples

## Not run: 
data(croatiadb)
coordinates(croatiadb)<-~x+y
# optimizing eta
graph.rbfST(MTEMP~X1+X2+X3+X4+X5+X6+X7+X8+X9+X10, data=croatiadb, eta.opt=TRUE,
             rho.opt=FALSE, n.neigh=30, func="TPS", np=40,  eta.dmax=2, P.T=TRUE)
# optimizing rho
graph.rbfST(MTEMP~X1+X2+X3+X4+X5+X6+X7+X8+X9+X10, data=croatiadb, eta.opt=FALSE,
             rho.opt=TRUE, n.neigh=30, func="M", np=20, rho.dmax=2, P.T=TRUE)
# optimizing eta and rho
tps.lo <- graph.rbfST(MTEMP~X1+X2+X3+X4+X5+X6+X7+X8+X9+X10, data=croatiadb,
       eta.opt=TRUE,rho.opt=TRUE, n.neigh=25, func="TPS",  eta.dmax=0.2,
       rho.dmax=0.2, xo=c(0.1,0.1), iter=50)
tps.lo  # best combination of eta and rho obtained
# lattice of RMSPE values associated with a range of eta and rho, without optimization
tps.la <- graph.rbfST(MTEMP~X1+X2+X3+X4+X5+X6+X7+X8+X9+X10, data=croatiadb,
       eta.opt=FALSE, rho.opt=FALSE, n.neigh=30,  func="TPS", np=10,  eta.dmax=0.2,
       rho.dmax=0.2)
tps.l$table  # best combination of eta and rho obtained
tps.l$spplot  # lattice of RMSPE

## End(Not run)

[Package geosptdb version 1.0-1 Index]