gen_rw {simts} | R Documentation |
Generate a Random Walk without Drift
Description
Generates a random walk without drift.
Usage
gen_rw(N, sigma2 = 1)
Arguments
N |
An |
sigma2 |
A |
Value
grw A vec
containing the random walk without drift.
Process Definition
Random Walk (RW) with parameter \gamma^2 \in {\rm I\!R}^{+}
. This process is defined as:
{X_t} = \sum\limits_{t = 1}^T {\gamma {Z_t}}
and is often called Rate Random Walk in the engineering literature.
Generation Algorithm
To generate we first obtain the standard deviation from the variance by taking a square root. Then, we
sample N
times from a N(0,\sigma^2)
distribution. Lastly, we take the
cumulative sum over the vector.
[Package simts version 0.2.2 Index]