plot_dif: Plot Interior Spatial Locations and System Boundary - 2D Map

Description Usage Arguments Details See Also Examples

View source: R/namespace.R View source: R/plot_dif.R

Description

plot_dif differentiates boundary and interior spatial locations in a spatial domain (a collection of spatial locations with their coordinates). Since TSCS method is only capable of interpolation but not extrapolation, it is necessary to highlight the difference between interior spatial locations and system boundary.

Usage

1
plot_dif(coords, h, v, xlab = NULL, ylab = NULL, title = NULL, cex = 1)

Arguments

coords

data frame; should only contain the two variables: X coordinate and Y coordinate. Each row uniquely denotes a spatial location. (coordinates must be numeric)

h

numeric; side length of the unit grid in X coordinate direction.

v

numeric; side length of the unit grid in Y coordinate direction.

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_dif 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_dif.

See Also

plot3D_dif, plot_NA, plot_map

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
## 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)

TSCS documentation built on May 2, 2019, 4:04 p.m.

Related to plot_dif in TSCS...