powered by
Given a time series in the vector x, and AR coefs phi1 and phi2, for example, artrans.wge computes y(t)=x(t)-phi1X(t-1)-phi2x(t-2), for t=3, ..., n
artrans.wge(x,phi.tr, lag.max=25, plottr = "TRUE")
Transformed data
Vector containing original realization
Coefficients of the transformation
Max lag (k) for sample autocorrelations
If plottr=TRUE then plots of the data, transformed data, and sample autocorelations of original and transformed data
Wayne Woodward
"Applied Time Series Analysis with R, 2nd edition" by Woodward, Gray, and Elliott"
data(wtcrude) difdata=artrans.wge(wtcrude,phi.tr=1,lag.max=30,plottr=TRUE)
Run the code above in your browser using DataLab