powered by
This function generates AR1 processes containing n data points, where alpha is the autocorrelation at lag 1, and the mean and standard deviation are specified by the mean and std arguments.
GenSeries(n, alpha, mean, std)
Length of the timeseries to be generated.
Autocorrelation at lag 1.
Mean of the data.
Standard deviation of the data.
AR1 timeseries.
# NOT RUN { series <- GenSeries(1000, 0.35, 2, 1) plot(series, type = 'l') # }
Run the code above in your browser using DataLab