xzero {RTisean}R Documentation

Zeroth order model

Description

Takes two data sets and fits a zeroth order model of one data set to predict another data set. It then computes the error of the model.

Usage

xzero(series, l, x = 0, c, m = 3, d = 1, n, k = 30, r, f = 1.2, s = 1)

Arguments

series a matrix containing the two time series.
l number of data to use.
x number of lines to be ignored.
c column to be read.
m embedding dimension.
d delay for the embedding.
n number of points for which the error should be calculated.
k minimal numbers of neighbors for the fit.
r neighborhood size to start with.
f factor to increase the neighborhood size if not enough neighbors were found.
s steps to be forecasted.

Value

The output consists of a matrix with s rows, containing the steps forecasted in first column and the relative forecast error in the second column. Relative means that the forecast error is divided by the standard deviation of the second (the one which is forecasted) data set.

Examples

## Not run: 

dat <- as.vector(sunspot.month)
dat<- cbind(dat, dat + 10*rnorm(2988))
xzeroo <- xzero(dat,s=100)
plot(xzeroo,t="l",xlab="Time steps",ylab="Relative Error",
main="Cross prediction accuracy of a zeroth order model")

## End(Not run)

[Package RTisean version 3.0.10 Index]