Description Usage Arguments Details See Also Examples
View source: R/namespace.R View source: R/plot_compare.R
Provided that you have the true values of missing observations, you can compare them
with the results of interpolation. plot_compare
visualizes the comparison
between estimates and true values. (NB: this plotting function can also be used
in other similar situations involving comparison between estimates and true values.)
1 | plot_compare(est, true, cex = 1, width = 1, P = 6/7, AI = TRUE)
|
est |
a numeric vector; estimations. |
true |
a numeric vector; true values. |
cex |
numeric; size of point to be plotted. (default: 1) |
width |
numeric; width of fitted straight line. (default: 1) |
P |
numeric, between 0 and 1; position for superimposing values of appraisal indexes. (default: 6/7) |
AI |
logical; |
Attentions:
The values in est
and true
vectors should be arranged in the same order,
in correspondence with the sequence of observations.
If the maximum value of either est
or true
is greater than 1000, or the
minimum is smaller than -1000, please make appropriate transformation that limits your data
to bound [-1000,1000].
In the plot:
The big red point is the origin.
The red line stands for straight line y = x
.
The blue line stands for fitted straight line.
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.