plot_NA {TSCS} | R Documentation |
Visualize the Spatial Distribution of Missing Observations - 2D Map
Description
plot_NA
shows spatial locations with or without missing observation. It is plotted based on
the cross-section data of a given time point, which is also often extracted from spatio-temporal data.
Usage
plot_NA(newdata, xlab = NULL, ylab = NULL, title = NULL, cex = 1)
Arguments
newdata |
data frame; should only contain the three variables in order: X coordinate, Y coordinate and observation. This is the cross-section data or pure spatial data of a particular time point you have selected, with missing observations that you want to predict. (coordinates must be numeric) |
xlab |
a label for the x axis, defaults to the name of X coordinate. |
ylab |
a label for the y axis, defaults to the name of Y coordinate. |
title |
a main title for the plot. |
cex |
numeric; size of plotting point for each spatial location. (default: 1) |
Details
plot_NA
is exclusive to 2D rectangular grid system. Similarly, if you want to fathom how this package
handles 3D rectangular grid system, please refer to plot3D_NA
.
See Also
Examples
## Not run:
## TSCS spatial interpolation procedure:
basis <- tscsRegression(data = data, h = 1, v = 1, alpha = 0.01); # regression
basis$percentage # see the percentage of cointegrated relationships
est <- tscsEstimate(matrix = basis$coef_matrix, newdata = newdata, h = 1, v = 1); # estimation
str(est)
## comparison of estimates and true values:
plot_compare(est = est$estimate[,3], true = true) # graphic comparison
index <- appraisal_index(est = est$estimate[,3], true = true); # RMSE & std
index
## data visualization:
plot_dif(data = data[,1:2], h = 1, v = 1) # differentiate boundary and interior spatial locations
plot_NA(newdata = newdata) # show spatial locations with missing value, for a cross-section data
plot_map(newdata = newdata) # plot the 2D spatial map, for a cross-section data
## End(Not run)