simulate_rw | R Documentation |
simulate data from a second order random walk
simulate_rw(
sigma = NULL,
tau = NULL,
length = 10,
start = 1,
order = 1,
n_sim = 1000
)
sigma |
the standard deviation of the random walk process |
tau |
the precision of the random walk process |
length |
the length of the time series |
start |
the starting values of the time series |
order |
1 for first order random walk or 2 for second order random walk |
n_sim |
the number of simulations |
a data.frame with simulated time series from the random walk
Other priors:
plot.sim_iid()
,
plot.sim_rw()
,
select_change()
,
select_divergence()
,
select_poly()
,
select_quantile()
,
simulate_iid()
set.seed(20181202)
x <- simulate_rw(sigma = 0.1, start = -10, length = 40)
head(x)
y <- simulate_rw(sigma = 0.001, start = -10, length = 40, order = 2)
head(y)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.