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

Description Usage Arguments Details Author(s) See Also Examples

View source: R/plotTimeSeries.R

Description

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

Usage

1
2
3
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
# 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 Dec. 10, 2019, 1:08 a.m.