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

sm.ts.pdf

Nonparametric density estimation of stationary time series data


Description

This function estimates the density function of a time series x, assumed to be stationary. The univariate marginal density is estimated in all cases; bivariate densities of pairs of lagged values are estimated depending on the parameter lags.

Usage

sm.ts.pdf(x, h = hnorm(x), lags, maxlag = 1, ask = TRUE)

Arguments

x

a vector containing a time series

h

bandwidth

lags

for each value, k say, in the vector lags a density estimate is produced of the joint distribution of the pair (x(t-k),x(t)).

maxlag

if lags is not given, it is assigned the value 1:maxlag (default=1).

ask

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

Details

see Section 7.2 of the reference below.

Value

a list of two elements, containing the outcome of the estimation of the marginal density and the last bivariate density, as produced by sm.density.

Side Effects

plots are produced on the current graphical 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

with(geyser, {
   sm.ts.pdf(geyser$duration, lags=1:2)
})

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.