hindcast: Interpolate process values from a set of data, and an...

View source: R/hindcast.R

hindcastR Documentation

Interpolate process values from a set of data, and an expectation and variance specification for the process's log spectrum.

Description

This function computes an approximate expectation for a (second-order stationary) process's autocovariance function from the first two moments of its log-spectrum, as encoded in an expectation vector and variance matrix for the coefficients of a basis representation. It then uses this autocovariance to interpolate values of a process and to calculate variances for them.

The function is really here to facilitate the reproduction of an example from Nason, Powell, Elliott and Smith (2016). It may be studied as an example, but is not recommended for general use. Instead, custom Kriging-type estimates ought to be produced by manipulating by hand variance matrices populated with autocovariance function values, which can be computed with the function logspec2cov.

Usage

hindcast(Dhigh, hightimes, Dlow, lowtimes, predtimes, filter=c(1),
    ebeta, vbeta, SARIMA)

Arguments

Dhigh

Vector. The high frequency data.

hightimes

Vector. Integer time points at which the high frequency observations are made.

Dlow

Vector. The low frequency data.

lowtimes

Vector. Integer time points at which the low frequency observations are made.

predtimes

Vector. Integer time points at which hindcasts are required.

filter

Vector. A known vector of filter coefficients arising from the observation process prior to any subsampling. The default is NULL, which corresponds to direct observation and a filter vector of (1,0,0,...). If the data are produced by taking a linear combination of the current and previous process values, for example, one would set this vector to be (w_{t},w_{t-1}).

ebeta

Vector. Expectations for basis coefficients of the log spectrum.

vbeta

Vector. The variance for the basis coefficients of the log spectrum.

SARIMA

List. A list encoding the SARIMA model that acts as an intercept, or base line, for the non-parametric estimate of the log-spectrum. The default is white noise with variance one. The log-spectrum basis coefficients parameterize a deviation away from the SARIMA model's log-spectrum. The contents of the SARIMA list are formatted in line with the format used by the package TSA (see the Examples section for examples).

Value

hindcast

A vector of hindcast expectations

var.hindcast

A covariance matrix for the hindcast values.

Author(s)

Ben Powell

References

Nason, G.P., Powell, B., Elliott, D. and Smith, P. (2016) Should We Sample a Time Series More Frequently? Decision Support via Multirate Spectrum Estimation. Journal of the Royal Statistical Society, Series A., 179, (to appear).

Examples

#
# See example in \code{\link{travel}} help file
#

regspec documentation built on Sept. 20, 2023, 5:07 p.m.