nonLinearPrediction: Nonlinear time series prediction

View source: R/nonLinearPrediction.R

nonLinearPredictionR Documentation

Nonlinear time series prediction

Description

Function for predicting futures values of a given time series using previous values and nonlinear analysis techniques.

Usage

nonLinearPrediction(
  time.series,
  embedding.dim,
  time.lag,
  prediction.step,
  radius,
  radius.increment
)

Arguments

time.series

Previous values of the time series that the algorithm will use to make the prediction.

embedding.dim

Integer denoting the dimension in which we shall embed the time.series.

time.lag

Integer denoting the number of time steps that will be use to construct the Takens' vectors.

prediction.step

Integer denoting the number of time steps ahead for the forecasting.

radius

The radius used to looking for neighbours in the phase space (see details).

radius.increment

The increment used when no neighbours are found (see details).

Details

Using time.series measurements, an embedding in embedding.dim-dimensional phase space with time lag time.lag is used to predict the value following the given time series after prediction.steps sample steps. This is done by finding all the neighbours of the last Takens' vector in a radius of size radius (the max norm is used). If no neighbours are found within a distance radius, the neighbourhood size is increased until succesful using radius.increment(radius = radius + radius.increment).

Value

The predicted value prediction.step time steps ahead.

Author(s)

Constantino A. Garcia

References

H. Kantz and T. Schreiber: Nonlinear Time series Analysis (Cambridge university press)

Examples

## Not run: 
h=henon(n.sample=5000,start=c(0.324,-0.8233))
predic=nonLinearPrediction(time.series=h$x[10:2000],embedding.dim=2,
                           time.lag=1,
                           prediction.step=3,radius=0.03,
                           radius.increment=0.03/2)
cat("real value: ",h$x[2003],"Vs Forecast:",predic)

## End(Not run)

nonlinearTseries documentation built on Sept. 23, 2024, 5:10 p.m.