GenSeries: Generates An AR1 Time Series

View source: R/GenSeries.R

GenSeriesR Documentation

Generates An AR1 Time Series

Description

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.

Usage

GenSeries(n, alpha, mean, std)

Arguments

n

Length of the timeseries to be generated.

alpha

Autocorrelation at lag 1.

mean

Mean of the data.

std

Standard deviation of the data.

Value

AR1 timeseries.

Author(s)

History:
0.1 - 2012-04 (L. Auger) - Original code
1.0 - 2012-04 (N. Manubens) - Formatting to CRAN

Examples

series <- GenSeries(1000, 0.35, 2, 1)
plot(series, type = 'l')


s2dverification documentation built on April 20, 2022, 9:06 a.m.