plot_phase_2d: Plot 2d phase plot of 'N_t' vs 'N_t-1' or 'Y_t' vs 'Y_t-1'

plot_phase_2dR Documentation

Plot 2d phase plot of 'N_t' vs 'N_t-1' or 'Y_t' vs 'Y_t-1'

Description

Shows the values in two-dimensional phase space (first differenced or not) with lag of 1. Cobwebbing shows how one point iterates to the next point in the time series.

Usage

plot_phase_2d(
  values,
  X.or.N = "X",
  par.mar.phase = c(3, 0, 1, 0),
  axis.range = NA,
  start = 1,
  last.time.to.plot = NULL,
  pt.type = "p",
  cobwebbing = TRUE,
  late.col = "red",
  early.col = "black",
  early.col.lines = "lightgrey",
  late.num = 3,
  label = NULL,
  label.cex = 0.7
)

Arguments

values

vector of 'N_t' or 'Y_t' values

X.or.N

"N" if raw non-differenced data, "X" for differenced data

par.mar.phase

'par(mar)' values

axis.range

range of axes, if NA then calculated from values

start

first time step to plot (currently must be 1)

last.time.to.plot

last time value of N[t] to use when plotting, so final Y[t] used will be Y[t-1] (since Y[t] uses N[t+1])

pt.type

'type' value for 'points()'

cobwebbing

if TRUE then add cobwebbing lines to phase plot

late.col

colour in which to plot final 'late.num' time steps

early.col

colour in which to plot earlier time step points

early.col.lines

colour in which to plot earlier time step points

late.num

final number of 'N[t]' time steps to plot in a different colour

label

label to annotate plot, such as '(a)' etc. for six-panel figure

label.cex

size of label annotation

Value

Plots figure to current device

Author(s)

Andrew Edwards

Examples


  plot_phase_2d(NY_lags_example$N_t, X.or.N = "N")
  plot_phase_2d(NY_lags_example$Y_t, X.or.N = "X")


luke-a-rogers/pbsedm documentation built on June 3, 2024, 5:20 a.m.