plot_explain_edm | R Documentation |
Highlights a point to be projected, its nearest 'E+1' neighbours, and then draw arrows to show where they go and so where the projection goes. Very useful for understanding and checking what EDM is doing. Type 'plot_explain_edm_movie' for example calls, and use that function to save the movie. Use 'plot_explain_edm_save()' for single figure for manuscript.
plot_explain_edm(
obj,
tstar,
x.lab = expression(italic(Y)[t - 1]),
y.lab = expression(italic(Y)[t]),
main = "Plot all the points in lagged space.",
tstar.col = "blue",
tstar.pch = 1,
tstar.cex = 1,
lib.remove = FALSE,
neigh.plot = FALSE,
neigh.proj = FALSE,
pred.plot = FALSE,
pred.rEDM = FALSE,
true.val = FALSE,
legend.plot = TRUE,
legend.inc.rEDM = TRUE,
legend.bg = "white",
font.main = 1
)
obj |
list object of class 'pbsEDM', an output from 'pbsEDM()' |
tstar |
the time index, 't*' for 'x(t*)' of the target point for which to make a projection from |
x.lab |
label for x axis |
y.lab |
label for x axis |
main |
main title |
tstar.col |
colour for 'x(t*)' |
tstar.pch |
pch value (point style) for 'x(t*)' |
tstar.cex |
cex value (size) for 'x(t*)' |
lib.remove |
if TRUE then shows which values to exclude from library |
neigh.plot |
if TRUE then highlight neighbours to 'x(t*)' |
neigh.proj |
if TRUE then highlight projections of neighbours to 'x(t*)' |
pred.plot |
if TRUE then highlight forecasted value 'x(t*+1)' |
pred.rEDM |
if TRUE then show predictions from 'rEDM' for 'NY_lags_example' saved values; obj must be 'NY_lags_example' |
true.val |
if TRUE then plot the true value of 'x(t*+1)' |
legend.plot |
if TRUE then do a legend and print value of 't*' |
legend.inc.rEDM |
if TRUE then include 'rEDM' in the legend (not wanted for first manuscript Figure). |
legend.bg |
background colour for legend (default white overrides the grey lines, seems better) |
font.main |
font for title, can't have bold with subscripts it seems, so set this for all plots. |
single plot that explains one part of EDM, link together in a movie using 'pbs_explain_edm_movie()' and 'pbs_explain_edm_movie_save()'
Andrew Edwards
aa <- pbsEDM(NY_lags_example,
lags = list(N_t = 0:1),
first_difference = TRUE)
plot_explain_edm(aa,
tstar = 15,
main = paste0(
"See where neighbours go"),
tstar.pch = 19,
tstar.cex = 1.2,
neigh.plot = TRUE,
neigh.proj = TRUE)
# Type plot_explain_edm_movie to see other examples
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.