Learn R Programming

flowfield (version 1.0)

flowfield: Flow Field Forecasting

Description

Flow field forecasting draws information from an interpolated flow field of the observed time series to incrementally build a forecast. The time series need not have uniformly spaced observations. Flow field forecasting works best on relatively long time series (i.e. > 1000 observations) where forecasts must be made autonomously.

Usage

flowfield(t,y,steps,plot)

Arguments

t
A vector of time series observation times.
y
A vector of time series response values
steps
Number of steps to forecast. Forecasts > 10 steps are not allowed, a warning will occur. Forecasts occur in knot intervals of the penalized spline regression. Knots are evenly spaced within the range of data appoximately one knot for every 10 data points.
plot
If a plot is required, set plot = TRUE otherwise set plot = FALSE

Value

This function returns the flow field forecasts and the associated prediction errors. A plot of the original data, the penalized spline regression, the forecast values and the prediction bands is also provided upon request.

References

1. Frey, MR and Caudle, KA "Flow field forecasting for univariate time series," Statistical Analysis and Data Mining, 2013.

2. C. E. Rasmussen and C. K. I. Williams, Gaussian Processes for Machine Learning, Cambridge, MA, MIT Press, 2006.

3. D. Ruppert, M. P. Wand and R. J. Carroll, Semiparametric Regression. New York, NY: Cambidge University Press, 2003.

Examples

Run this code
library(SemiPar)
data(lidar)

t <- lidar$range
y <- lidar$logratio

steps <- 10 # number of forecast steps (steps must be 10 or less)
flowfield(t,y,steps,TRUE)

Run the code above in your browser using DataLab