colored_noise {colorednoise} | R Documentation |
Generate Autocorrelated Noise
Description
Generates temporally autocorrelated random numbers with a mean, standard deviation, and autocorrelation you specify.
Usage
colored_noise(timesteps, mean, sd, phi)
Arguments
timesteps |
The number of temporally autocorrelated random numbers (one per timestep) you want. |
mean |
The mean of the temporally autocorrelated random numbers. |
sd |
The standard deviation of the temporally autocorrelated random numbers. |
phi |
The temporal autocorrelation. 0 is white noise (uncorrelated), positive values are red noise (directly correlated) and negative values are blue noise (inversely correlated). |
Value
A vector of temporally autocorrelated random numbers.
Examples
rednoise <- colored_noise(timesteps = 30, mean = 0.5, sd = 0.2, phi = 0.3)
rednoise
[Package colorednoise version 1.1.2 Index]