Plot the observation generated by the filtered trajectories together with the data.

plotSMC(
  smc,
  fitmodel,
  theta,
  data = NULL,
  summary = TRUE,
  alpha = 1,
  allVars = FALSE,
  plot = TRUE
)

Arguments

smc

output of particleFilter

fitmodel

a fitmodel object

theta

named numeric vector. Values of the parameters. Names should match fitmodel$thetaNames.

data

data frame. Observation times and observed data. The time column must be named as given by timeColumn, whereas the name of the data column should match one of fitmodel$stateNames.

summary

logical. If TRUE, the mean, median as well as the 50th and 95th percentile of the trajectories are plotted (default). If FALSE, all individual trajectories are plotted (transparency can be set with alpha).

alpha

transparency of the trajectories (between 0 and 1).

allVars

logical, if FALSE only the observations are plotted. Otherwise, all state variables are plotted.

plot

if TRUE the plot is displayed, and returned otherwise.

See also

particleFilter