Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

sm.autoregression

Nonparametric estimation of the autoregression function


Description

This function estimates nonparametrically the autoregression function (conditional mean given the past values) of a time series x, assumed to be stationary.

Usage

sm.autoregression(x, h = hnorm(x), d = 1, maxlag = d, lags,
                  se = FALSE, ask = TRUE)

Arguments

x

vector containing the time series values.

h

the bandwidth used for kernel smoothing.

d

number of past observations used for conditioning; it must be 1 (default value) or 2.

maxlag

maximum of the lagged values to be considered (default value is d).

lags

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.

se

if se==T, pointwise confidence bands are computed of approximate level 95%.

ask

if ask==TRUE, the program pauses after each plot until <Enter> is pressed.

Details

see Section 7.3 of the reference below.

Value

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.

Side Effects

graphical output is producved on the current device.

References

Bowman, A.W. and Azzalini, A. (1997). Applied Smoothing Techniques for Data Analysis: the Kernel Approach with S-Plus Illustrations. Oxford University Press, Oxford.

See Also

Examples

sm.autoregression(log(lynx), maxlag=3, se=TRUE)
sm.autoregression(log(lynx), lags=cbind(2:3,4:5))

sm

Smoothing Methods for Nonparametric Regression and Density Estimation

v2.2-5.6
GPL (>= 2)
Authors
Adrian Bowman and Adelchi Azzalini. Ported to R by B. D. Ripley <ripley@stats.ox.ac.uk> up to version 2.0, version 2.1 by Adrian Bowman and Adelchi Azzalini, version 2.2 by Adrian Bowman.
Initial release
2018-09-27

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.