Produce a plot in which the output of dc_win() and dc_ccp() on the same multivariate timeseries data is combined with the output of ts_level() on a state variable of the same length as the multivariate data.

plotDC_lvl(
  df_win,
  df_ccp = NA,
  df_lvl,
  win,
  useVarNames = TRUE,
  colOrder = TRUE,
  useTimeVector = NA,
  timeStamp = "31-01-1999",
  doPlot = TRUE,
  title = "Peaks versus Levels Plot",
  subtitle = "",
  xlabel = "Time",
  ylabel = "",
  levelName = "State variable"
)

Arguments

df_win

A data frame containing series of Dynamic Complexity values obtained by running function dc_win()

df_ccp

If an object generated by dc_ccp(), the levels shown in the plot will only be displayed if there is an cumulative complexity peak at that time point (default = NA )

df_lvl

A dataframe generated by ts_level() of a variable that is considered a state variable.

win

Size of window in which to calculate Dynamic Complexity. If win < NROW(df) the window will move along the time series with a stepsize of 1 (default = NROW(df))

useVarNames

Use the column names of df as variable names in the Complexity Resonance Diagram (default = TRUE)

colOrder

If TRUE, the order of the columns in df determines the of variables on the y-axis. Use FALSE for alphabetic/numeric order. Use NA to sort by by mean value of Dynamic Complexity (default = TRUE)

useTimeVector

Parameter used for plotting. A vector of length NROW(df), containing date/time information (default = NA)

timeStamp

If useTimeVector is not NA, a character string that can be passed to lubridate::stamp() to format the the dates/times passed in useTimeVector (default = "01-01-1999")

doPlot

If TRUE shows a Complexity Resonance Diagram of the Dynamic Complexity and returns an invisible ggplot2::ggplot() object. (default = FALSE)

title

A title for the plot.

subtitle

A subtitle for the plot.

xlabel

A label for the x-axis.

ylabel

A label for the y-axis.

levelName

A name for the state variable.

Value

An invisible ggplot2 object.

See also

Other Dynamic Complexity functions: dc_ccp(), dc_d(), dc_f(), dc_win(), plotDC_ccp(), plotDC_res()