predictiveDFT {cspec}R Documentation

Predictive DFT.

Description

Function to calculate the predictive DFT.

Usage

predictiveDFT(x, freq = 2 * pi * (1:length(x))/length(x), taper = FALSE, ar = NULL, ...)

Arguments

x

time series vector.

freq

frequency vector.

taper

logical vector. If TRUE, use the tapered time series to estimate an AR coefficients. Default is FALSE.

ar

predetermined AR coefficients to evaluate the predictive DFT. Default is NULL.

...

Arguments passing ar() function.

Details

If ar vector is predetermined, then we evaluate the predictive DFT using the this AR coefficient vector (see eq (2.2) of the reference). If ar is not specified (default), then we fit the best fitting AR(p) model using AIC and Yule-Walker estimator.

Value

The complex valued predictive DFT vector.

Author(s)

Junho Yang

References

S. Das, S. Subba Rao, and J. Yang. Spectral methods for small sample time series: A complete periodogram approach. Submitted, 2020.

See Also

complete.pgram, tapered.complete.pgram

Examples

set.seed(123)
x <- arima.sim(model=list(ar=0.7), n=100)

v1 <- predictiveDFT(x) #default
v2 <- predictiveDFT(x,ar=c(0.7)) #predictive DFT using AR(1) model with coefficient: 0.7.
v3 <- predictiveDFT(x,taper=TRUE) #Using tapered time series to fit the best AR model. 
v4 <- predictiveDFT(x, method="ols") #Using ols method to fit the best AR model.


[Package cspec version 0.1.2 Index]