Learn R Programming

gmwm (version 2.0.0)

gen_ar1: Generate an AR(1) sequence

Description

Generate an AR sequence given phi and sig2.

Usage

gen_ar1(N, phi = 0.3, sigma2 = 1)

Arguments

N
An integer for signal length.
phi
A double that contains autocorrection.
sigma2
A double that contains process variance.

Value

gm A vec containing the AR(1) process.

Details

This needs to be extended to AR(p) see arima.sim and filter.

Examples

Run this code
gen_ar1(10, 5, 1.2)

Run the code above in your browser using DataLab