colored_noise: Generate Autocorrelated Noise

View source: R/RcppExports.R

colored_noiseR 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

colorednoise documentation built on May 29, 2024, 9:21 a.m.