KS_scores_lambdas {SpatFD} | R Documentation |
Functional Kriging
Description
Linear Spatial functional prediction. Two predictors are possible: scores or lambda.
Usage
KS_scores_lambdas(SFD, newcoords, model, method = "lambda", name = NULL, fill.all = NULL)
Arguments
SFD |
object of class 'SpatFD'. |
newcoords |
The N × 2 matrix or data.frame with the spatial coordinates corresponding to the N prediction locations. |
model |
The scores variogram model. A variogramModel object. See gstat package. |
method |
Prediction method: "lambda" or "scores". By default "lambda". See details. |
name |
The variable to predict in SpatFD object. By default, the predictions is performed for the first variable in the SpatFD object. |
fill.all |
gstat function parameter. If there are more than 1 score vector and not all models or a valid and complete linear model of coregionalization is given, fill all of the direct and cross variogram model with the only model given. |
Details
"lambda" option corresponds to the predictor , given by
and weigths are found such that minimize
.
"scores" method performs kriging or cokriging directly on the scores and predictions are used to build the functional prediction
It is used simple cokriging to predict the vector at the unsampled location
. The predictor is
, so the prediction of the curve
is
.
Value
Returns a 'KS_pred' object with functional kriging: weights (lambda) using the first method and kriging score predictions using the second method in Bohorquez, M., Giraldo, R., & Mateu, J. (2016).
Author(s)
Diego Sandoval diasandovalsk@unal.edu.co & Angie Villamil acvillamils@unal.edu.co.
References
Bohorquez, M., Giraldo, R., & Mateu, J. (2016). Optimal sampling for spatial prediction of functional data. Statistical Methods & Applications, 25(1), 39-54.
Bohorquez, M., Giraldo, R., & Mateu, J. (2016). Multivariate functional random fields: prediction and optimal sampling. Stochastic Environmental Research and Risk Assessment, 31, pages53–70 (2017).
Bohorquez M.; Giraldo R. and Mateu J. Spatial prediction and optimal sampling of functional data in Geostatistical Functional Data Analysis: Theory and Methods (2021). John Wiley Sons, Chichester, UK. ISBN: 978-1-119-38784-8. https://www.wiley.com/en-us/Geostatistical+Functional+Data+Analysis-p-9781119387848.
See Also
Examples
library(gstat)
data(AirQualityBogota)
newcoorden=data.frame(X=110000,Y=125000)
# Recibir los datos, suavizarlos y ACP
SFD_PM10 <- SpatFD(PM10, coords = coord[,2:3], basis = "Bsplines",
nbasis = 17,norder=5, lambda = 0.00002, nharm=3)
#Variogram model for each component
modelos <- list(vgm(psill = 2634000, "Exp", range = 2103.25, nugget = 0),
vgm(psill = 101494.96, "Exp", range = 1484.57, nugget = 0),
vgm(psill =53673, "Exp", range = 42406, nugget = 0))
#Genera los scores y los lambdas para predecir en nuevas coordenadas
#method = "lambda"
KS_SFD_PM10_l <- KS_scores_lambdas(SFD_PM10, newcoorden ,method = "lambda",
model = modelos)
class(KS_SFD_PM10_l)
#method = "scores"
KS_SFD_PM10_sc <- KS_scores_lambdas(SFD_PM10, newcoorden, method = "scores",
model = modelos)
#method = "both"
KS_SFD_PM10_both <- KS_scores_lambdas(SFD_PM10, newcoorden, method = "both",
model = modelos)