ggplot_KS | R Documentation |
Plot with or without predicted variance in each spatial location of the functional kriging.
ggplot_KS(KS, show.varpred = FALSE, main = "Functional Data",
main2 = "Functional Data", ylab = "Value", xlab = "Time", ndigits = 2,
palette.plot = c("#440154FF", "#3336FF", "#33FCFF", "#33FF4C", "#FDE725FF"))
KS |
Object of class 'KS_pred'. Not NULL. |
show.varpred |
Boolean. If the predicted variance is shown. Default FALSE. |
main |
character. Title of the plot.Default "Functional Data". |
main2 |
character. If there are two methods where used, the title of the second plot. Default "Functional Data". |
ylab |
character. Name of the y-axis. |
xlab |
character. Name of the x-axis. |
ndigits |
numeric. Number of decimals for the predicted variance if shown. Default 2. |
palette.plot |
list. String values of hexadecimal colors. Default c("#440154FF", "#3336FF", "#33FCFF", "#33FF4C", "#FDE725FF") |
ggplot. If there are two plots a list of ggplots.
Diego Sandoval diasandovalsk@unal.edu.co.
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).
KS_scores_lambdas
library(gstat)
data(AirQualityBogota)
newcoorden=data.frame(X=seq(93000,105000,len=10),Y=seq(97000,112000,len=10))
SFD_PM10 <- SpatFD(PM10, coords = coord[, -1], basis = "Bsplines", nbasis = 17,
norder=5, lambda = 0.00002, nharm=3)
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))
KS_SFD_PM10_both <- KS_scores_lambdas(SFD_PM10, newcoorden, method = "both",
model = modelos)
ggplot_KS(KS_SFD_PM10_both,show.varpred = FALSE,
main = "Plot 1 - Using Scores",
main2 = "Plot 2 - Using Lambda",
ylab = "PM10")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.