plot_X: Plot states

Description Usage Arguments Value See Also

View source: R/plot.r

Description

Function to plot state trajectories contained in the X_*.csv files generated by SSM. Pipeable.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
plot_X(
  ssm,
  path = NULL,
  id = NULL,
  stat = c("none", "median", "mean"),
  hat = NULL,
  scales = "free_y",
  fit_only = FALSE,
  ran_only = FALSE,
  collapse_erlang = TRUE
)

Arguments

ssm

a ssm object, returned by new_ssm.

path

character, where to find X_*.csv. If NULL (default), use the path of the last block (e.g. /pmcmc).

id

numeric, indicate which X_*.csv to choose. If NULL (default), use the id of the last block (default to 0 in SSM).

stat

character, whether to plot a summary statistics of the state. Either "mean" or "median". Default to "none".

hat

numeric, vector of credible intervals, between 0 and 1, e.g. hat=c(0.5, 0.95) for 50 and 95% credible intervals.

scales

character, should scales be "fixed", "free", or free in one dimension: "free_x", "free_y" (the default).

fit_only

logical, whether to show only the fit to the data.

ran_only

logical, whether to show only the randomly generated data.

Value

a ssm object updated with latest SSM output and ready to be piped into another SSM block.

See Also

plot_theta


StateSpaceModels/ssminr documentation built on Feb. 7, 2020, 8:20 p.m.