GetAR: Simulate time series of fluctuations based on ARMA process

Description Usage Arguments Value See Also Examples

View source: R/getarma.R

Description

Simulate a time series of fluctuations based on AR(1)

Usage

1
GetAR(nyears, rho, sigma, eps0.t = NULL, ystart = NULL, seed = 123)

Arguments

nyears

number of years of observation period

rho

value of autocorrelation. Must be value between -1 and 1.

sigma

standard deviation of distortions

eps0.t

values of distortions. Default is NULL. If NULL, they are drawn random from N(0,1)

ystart

value of first observation. Default is NULL. If NULL, it is drawn randomly from other parameters

seed

value of random seed

Value

A vector of values.

See Also

GetARMA

Examples

1
2
y.ar <- GetAR(50, 0.8, 1)
ggplot(data = NULL, aes(x = 1:50, y = y.ar)) + geom_line() + geom_point() + theme_bw() + xlab("time")

MJAlexander/distortr documentation built on July 17, 2020, 4:06 p.m.