Estimate coefficients in nonparametric autoregression using the difference-based approach by if(!exists(".Rdpack.currefs")) .Rdpack.currefs <-new.env();Rdpack::insert_citeOnly(keys="Hall_VanKeilegom_2003;textual",package="funtimes",cached_env=.Rdpack.currefs) .
HVK(X, m1 =NULL, m2 =NULL, ar.order =1)
Arguments
X: univariate time series. Missing values are not allowed.
ar.order: order of the nonparametric autoregression (specified by user).
Returns
Vector of length ar.order with estimated autoregression coefficients.
Details
First, autocovariances are estimated using formula (2.6) by if(!exists(".Rdpack.currefs")) .Rdpack.currefs <-new.env();Rdpack::insert_citeOnly(keys="Hall_VanKeilegom_2003;textual",package="funtimes",cached_env=.Rdpack.currefs) :
where n = length(X) is sample size, Dj is a difference operator such that (DjX)i=Xi−Xi−j. Then, Yule--Walker method is used to derive autoregression coefficients.
Examples
X <- arima.sim(n =300, list(order = c(1,0,0), ar = c(0.6)))HVK(as.vector(X), ar.order =1)