Last chance! 50% off unlimited learning
Sale ends in
This function estimates nonparametrically the autoregression function
(conditional mean given the past values) of a time series x
,
assumed to be stationary.
sm.autoregression(x, h = hnorm(x), d = 1, maxlag = d, lags,
se = FALSE, ask = TRUE)
a list with the outcome of the final estimation (corresponding to
the last value or pairs of values of lags), as returned by sm.regression
.
vector containing the time series values.
the bandwidth used for kernel smoothing.
number of past observations used for conditioning; it must be 1 (default value) or 2.
maximum of the lagged values to be considered (default value is d
).
if d==1
, this is a vector containing the lags considered for conditioning;
if d==2
, this is a matrix with two columns, whose rows contains pair of
values considered for conditioning.
if se==T
, pointwise confidence bands are computed of approximate level 95%.
if ask==TRUE
, the program pauses after each plot until <Enter> is pressed.
graphical output is produced on the current device.
see Section 7.3 of the reference below.
Bowman, A.W. and Azzalini, A. (1997). Applied Smoothing Techniques for Data Analysis: the Kernel Approach with S-Plus Illustrations. Oxford University Press, Oxford.
sm.regression
, sm.ts.pdf
sm.autoregression(log(lynx), maxlag=3, se=TRUE)
sm.autoregression(log(lynx), lags=cbind(2:3,4:5))
Run the code above in your browser using DataLab