Generate a Random Walk without Drift
Generates a random walk without drift.
gen_rw(N, sigma2 = 1)
N |
An |
sigma2 |
A |
grw A vec
containing the random walk without drift.
Random Walk (RW) with parameter gamma in R^{+}. This process is defined as:
X[t] = sum(gamma*Z[t])
and is often called Rate Random Walk in the engineering literature.
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.
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.