flowfield: Flow Field Forecasting

Description Usage Arguments Value Note Author(s) References Examples

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

1
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.

Note

If data is too sparse, a WARNING will be given to the issue to indicate that forecasts may be inaccurate.

Author(s)

Kyle A. Caudle

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

1
2
3
4
5
6
7
8
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)

Example output

t		forecast		error
727.5		-0.712730055935565		0.0812264516527921
742.5		-0.722317027023134		0.0812264880312493
757.5		-0.731903998110703		0.0812265470293509
772.5		-0.741490969198272		0.0812266099433412
787.5		-0.751077940285841		0.0812266731327481
802.5		-0.76066491137341		0.0812267354625358
817.5		-0.770251882460979		0.08122679650866
832.5		-0.779838853548548		0.081226856109396
847.5		-0.789425824636117		0.081226914215902
862.5		-0.799012795723686		0.0812269708326339
NULL

flowfield documentation built on May 2, 2019, 10:21 a.m.