tvar1sim: Simulate a realization from a particular TVAR(1) model.

View source: R/tvar1sim.R

tvar1simR Documentation

Simulate a realization from a particular TVAR(1) model.

Description

Simulates a realization from a TVAR(1) model where the AR(1) parameter moves from 0.9 to -0.9 in equal steps over 512 time points. The realization is also of length 512. The innovations are normally distributed with mean zero and standard deviation of sd.

Usage

tvar1sim(sd = 1)

Arguments

sd

This is the standard deviation of the Gaussian innovation.

Details

This function is easily converted into one that does the same thing but for a different sample size.

Value

A realization of the aforementioned TVAR(1) process.

Author(s)

Guy Nason.

References

Nason, G.P. (2013) A test for second-order stationarity and approximate confidence intervals for localized autocovariances for locally stationary time series. J. R. Statist. Soc. B, 75, 879-904. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1111/rssb.12015")}

See Also

Rvarlacf

Examples

#
# Generate realization from the TVAR(1) process
#
x <- tvar1sim()
#
# Maybe plot it
#
## Not run: ts.plot(x)

locits documentation built on Sept. 8, 2023, 5:07 p.m.