Learn R Programming

locits (version 1.7.7)

tvar1sim: 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)

Value

A realization of the aforementioned TVAR(1) process.

Arguments

sd

This is the standard deviation of the Gaussian innovation.

Author

Guy Nason.

Details

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

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. tools:::Rd_expr_doi("10.1111/rssb.12015")

See Also

Rvarlacf

Examples

Run this code
#
# Generate realization from the TVAR(1) process
#
x <- tvar1sim()
#
# Maybe plot it
#
if (FALSE) ts.plot(x)

Run the code above in your browser using DataLab