tvAR: Estimate Time-Varying Coefficient AR Models

Description Usage Arguments Value Examples

Description

Estimate time-varying coefficient AR models.

Usage

1
tvAR(x, lags = c(1), include.mean = TRUE)

Arguments

x

a time series of data.

lags

the lagged variables used, e.g. lags=c(1,3) means lag-1 and lag-3 are used as regressors. It is more flexible than specifying an order.

include.mean

a logical value indicating whether the constant terms are included.

Value

trAR function returns the value from function dlmMLE.

Examples

1
2
3
4
x1=rnorm(100)
x2=arima.sim(n = 63, list(ar = c(0.8897, -0.4858)),sd = sqrt(0.1796))
x=c(x1,x2)
est=tvAR(x,2)

ConvFuncTimeSeries/test3 documentation built on May 29, 2019, 11:41 a.m.