plot.sim_rw: Plot Simulated Random Walks

View source: R/simulate_rw.R

plot.sim_rwR Documentation

Plot Simulated Random Walks

Description

Plot Simulated Random Walks

Usage

## S3 method for class 'sim_rw'
plot(
  x,
  y,
  ...,
  link = c("identity", "log", "logit"),
  baseline,
  center = c("start", "mean", "bottom", "top")
)

Arguments

x

An sim_rw object. Which is the output of \link{simulate_rw}

y

Currently ignored.

...

Currently ignored.

link

Which link to use for back transformation.

baseline

Optional baseline for the time series.

center

Defines how to centre the time series to the baseline. Options are: start all time series start at the baseline; mean the average of the time series is the baseline; bottom the lowest value of the time series equals the baseline; top the highest value of the time series equals the baseline.

Value

A \link[ggplot2]{ggplot} object.

See Also

Other priors: plot.sim_iid(), select_change(), select_divergence(), select_poly(), select_quantile(), simulate_iid(), simulate_rw()

Examples


set.seed(20181202)
x <- simulate_rw(sigma = 0.05, start = -10, length = 40)
plot(x)
plot(select_quantile(x))
plot(select_quantile(x), link = "log")
plot(select_quantile(x), link = "logit")
x <- simulate_rw(sigma = 0.001, start = -10, length = 40, order = 2)
plot(x)
plot(select_quantile(x))
plot(select_quantile(x), link = "log")
plot(select_quantile(x), link = "logit")


inbo/inlatools documentation built on Sept. 17, 2022, 2:13 p.m.