plotTimeSeries: Plots a time series, with the option to include confidence...

View source: R/plotTimeSeries.R

plotTimeSeriesR Documentation

Plots a time series, with the option to include confidence and prediction band

Description

Plots a time series, with the option to include confidence and prediction band

Usage

plotTimeSeries(
  observed = NULL,
  predicted = NULL,
  x = NULL,
  confidenceBand = NULL,
  predictionBand = NULL,
  xlab = "Time",
  ylab = "Observed / predicted values",
  ...
)

Arguments

observed

observed values

predicted

predicted values

x

optional values for x axis (time)

confidenceBand

matrix with confidenceBand

predictionBand

matrix with predictionBand

xlab

a title for the x axis

ylab

a title for the y axis

...

further arguments passed to plot

Details

Values for confidence and prediction bands can be generated with getPredictiveIntervals. For a more elaborate version of this plot, see plotTimeSeriesResults

Author(s)

Florian Hartig

See Also

marginalPlot, tracePlot, correlationPlot

Examples

# Create time series
ts <- VSEMcreatePAR(1:100)

# create fake "predictions"
pred <- ts + rnorm(length(ts), mean = 0, sd = 2)

# plot time series
par(mfrow=c(1,2))

plotTimeSeries(observed = ts, main="Observed")
plotTimeSeries(observed = ts, predicted = pred, main = "Observed and predicted")

par(mfrow=c(1,1))


BayesianTools documentation built on Feb. 16, 2023, 8:44 p.m.