Last chance! 50% off unlimited learning
Sale ends in
Generate the RMSPE value which is given by the radial basis function spatio-temporal with number of nearest observationsn.neigh associated to time factor C and optimal smoothing parameter factor.p.
idwST.cv1(param, formula, data, n.neigh, progress)
vector starting points (C and factor.p respectively) for searching the RMSPE optimum.
formula that defines a detrended linear model, use ~1
.
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.
number of nearest observations that should be used for a rbf.st prediction where nearest is defined in terms of the spatio-temporal locations
whether a progress bar shall be printed for spatio-temporal inverse-distance weighted function; default=FALSE
returns the RMSPE value
# NOT RUN {
require(minqa)
data(croatiadb)
coordinates(croatiadb) <- ~x+y
# }
# NOT RUN {
idwST.opt <- bobyqa(c(1, 2), idwST.cv1, lower=c(0,0.1), upper=c(2,4), formula=MTEMP~1,
data=croatiadb[,1:2], n.neigh=10, progres=F, control=list(maxfun=50))
# obtained with optimal values previously estimated (33 iterations)
idwST.cv1(c(1.00538675066736,1.95853920335545), MTEMP~1, data=croatiadb[,1:2], n.neigh=10,
progress=T)
# }
Run the code above in your browser using DataLab