gaussian, exponential, trigonometric, thin plate spline, inverse multiquadratic, and multiquadratic radial basis function for spatio-temporal prediction

Share:

Description

Function for spatio-temporal interpolation from radial basis function (rbfST), where rbfST is in a local neighbourhood.

exponential (EXPON)

φ(δ)=e^{-η δ}, η>0

gaussiano (GAU)

φ(δ)=e^{-η δ^{2}}, η\neq0

multiquadratic (M)

φ(δ)=√{η^2+δ^2}, η\neq0

inverse multiquadratic (IM)

φ(δ)=1/√{η^2+δ^2}, η\neq0

thin plate spline (TPS)

φ(δ)=(η\cdotδ)^{2}log(η\cdotδ), if: δ>0, η>0

φ(δ) = 0, otherwise

completely regularized spline (CRS)

φ(δ) = \ln(η\cdot δ/2)^{2}+E_{1}(η\cdot δ/2)^{2}+C_{E}, if: δ>0, η>0

φ(δ) = 0, otherwise

where \ln is natural logarithm, E_{1}(x) is the exponential integral function, and C_{E} is the Euler constant.

spline with tension (ST)

φ(δ)=\ln(η\cdot δ/2)+K_{0}(η\cdot δ)+C_{E}, if: δ>0

φ(δ) = 0, otherwise

where K_{0}(x) is the modified Bessel function and C_{E} is the Euler constant.

Usage

1
rbfST(formula, data, eta, rho, newdata, n.neigh, func, progress)

Arguments

formula

formula that defines the dependent variable as a linear model of independent variables (covariates or 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

the optimal smoothing parameter, we recommend using the parameter found by minimizing the root-mean-square prediction errors using cross-validation

rho

optimal robustness parameter, we recommend using the value obtained by minimizing the root-mean-square prediction errors with cross-validation. eta and rho parameters can be optimized simultaneously, through the bobyqa function from nloptr or minqa packages

newdata

data frame or spatial object with prediction/simulation spatio-temporal locations; should contain attribute columns with the independent variables (if present) and (if locations is a formula) the coordinates and time with names, as defined in locations where you want to generate new predictions

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

spatio-temporal radial basis function; model type: "GAU", "EXPON", "TRI", "TPS", "CRS", "ST", "IM" and "M", are currently available

progress

whether a progress bar shall be printed for spatio-temporal radial basis functions; default=TRUE

Details

rbf.st function generates individual spatio-temporal predictions from gaussian (GAU), exponential (EXPON), trigonometric (TRI) thin plate spline (TPS), completely regularized spline (CRS), spline with tension (ST), inverse multiquadratic (IM), and multiquadratic (M) functions

Value

Attributes columns contain coordinates, time, predictions, and the variance column contains NA's

References

Melo, C. E. (2012). Analisis geoestadistico espacio tiempo basado en distancias y splines con aplicaciones. PhD. Thesis. Universitat de Barcelona. 276 p. [link]

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
## Not run: 
# considering 10 principal coordinates (constructed from a distance-based regression model)
data(croatia.temp)
data(croatiadb)

# prediction case: one point
point <- data.frame(670863,5043464,5,170,200,15.7,3)
names(point) <- c("x","y","t","dem","dsea","twi","est")

croatia.temp[,7] <- as.factor(croatia.temp[,7])
dblm1 <- dblm(data=croatia.temp,y=croatiadb$MTEMP)         
newdata1 <- t(cp.xnews(newdata=point,eigenvalues=dblm1$ev, data=croatia.temp,trend=dblm1$cp))
colnames(newdata1) <- c("X1","X2","X3","X4","X5","X6","X7","X8","X9","X10")
newdata1 <- data.frame(point[,1:3],newdata1)

data(croatiadb)
coordinates(croatiadb) <- ~x+y
coordinates(newdata1) <- ~x+y
rbfST(MTEMP~X1+X2+X3+X4+X5+X6+X7+X8+X9+X10, data=croatiadb, eta=0.010076, rho=0.00004, 
       newdata=newdata1, n.neigh=60, func="TPS")

# prediction case: a grid of points Croatia (month july)
data(croatia.grid7cp)
coordinates(croatia.grid7cp) <- ~x+y
rbf.t <- rbfST(MTEMP~X1+X2+X3+X4+X5+X6+X7+X8+X9+X10, croatiadb, eta=0.01076, rho=0.00004, 
                newdata=croatia.grid7cp, n.neigh=30, func="TPS")                  
coordinates(rbf.t) <- c("x", "y")
gridded(rbf.t) <- TRUE

# show prediction map
spplot(rbf.t["var1.pred"], cuts=30, col.regions=bpy.colors(40), main = "Earth's average 
       temperature TPS map\n (july month)", key.space=list(space="right", cex=0.8))

## End(Not run)