Generate noise series with power law scaling exponent
Usage
noise_powerlaw(
y = NULL,
alpha = -1,
N = 512,
standardise = FALSE,
randomPower = FALSE,
seed = NA
)Arguments
- y
Time series to use as a 'model'. If specified,
Nwill beN = length(y), and the series will be constructed based onstats::fft(y).- alpha
The log-log spectral slope, the scaling exponent. Use
0for white noise, negative numbers for anti-persistant noises:-1for \(\frac{1}{f}\) noise, positive numbers for persistent noises, e.g.1for blue noise.- N
Length of the time series
- standardise
Forces scaling of the output to the range
[-1, 1], consequently the power law will not necessarily extend right down to0Hz.- randomPower
If
TRUEphases will be deterministic, uniformly distributed in[-pi,pi]. IfFALSE, the spectrum will be stochastic with a Chi-square distribution. Ifyis notNULLthis argument will be ignored.- seed
Provide an integer number to set the seed for the random number generator in order to get reproducible results. If
NA(default) no user defined seed will be set,
