plotPosteriorFit.Rd
Plot posterior distribution of observation generated under model's posterior parameter distribution.
a data.frame
with one column per estimated parameter, as
returned by burnAndThin
a fitmodel
object
named numeric vector. Initial values of the state
variables. Names should match fitmodel$stateNames
.
data frame. Observation times and observed data. The time column
must be named "time"
and the observation column must be named
"obs"
.
character. Set to "sample"
to plot
trajectories from a sample of the posterior (default). Set to
"median"
, "mean"
or "max"
to plot trajectories
corresponding to the median, mean and maximum of the posterior density.
logical, if TRUE
trajectories are summarised by their
mean, median, 50% and 95% quantile distributions. Otherwise, the
trajectories are plotted.
number of theta sampled from posterior distribution (if
posterior.summary == "sample"
). Otherwise, number of replicated
simulations.
character vector. Names of the infected states which must
be non-zero so the epidemic is still ongoing. When the names of these
states are provided, the extinction probability is plotted by computing the
proportion of faded-out epidemics over time. An epidemic has faded-out
when all the infected states (whose names are provided) are equal to 0.
This is only relevant for stochastic models. In addition, if summary
== TRUE
, the summaries of the trajectories conditioned on non-extinction
are shown. Default to NULL
.
transparency of the trajectories (between 0 and 1).
if TRUE
the plot is displayed, and returned otherwise.
logical, if FALSE
only the observations are plotted.
Otherwise, all state variables are plotted.
character. Date of the first point of the time series
(default to NULL
). If provided, the x-axis will be in calendar
format. NB: currently only works if the unit of time is the day.
If plot == FALSE
, a list of 2 elements is returned:
theta
the theta
(s) used for plotting (either a
vector
or a data.frame
)
traj
a data.frame
with the trajectories (and
observations) sampled from the posterior distribution.
plot
the plot of the fit displayed.