lfo.ar {RTisean} | R Documentation |
Makes a local linear ansatz and estimates the one step prediction error of the model.
lfo.ar(series, l, x = 0, c = 1, m = c(1,2), d = 1, i, r, R, f = 1.2, s = 1, C)
series |
a vector or a matrix. |
l |
number of points to use. |
x |
number of lines to be ignored. |
c |
column to be read. |
m |
no. of components, embedding dimension |
d |
delay for the embedding. |
i |
number of points for which the error should be calculated. |
r |
neighborhood size to start with. |
R |
neighborhood size to end with. |
f |
factor to increase the neighborhood size if not enough neighbors were found. |
s |
steps to be forecasted. |
C |
width of causality window. |
A matrix containing: the neighborhood size in column 1; the relative forecast error in columnn 2; the fraction of points for which neighbors were found for the corresponding neighborhood size in column 3; the average number of neighbors found per point in column 4; the variance of the fraction of points for which neighbors were found in column 5.
M. Casdagli, Chaos and deterministic versus stochastic nonlinear modeling, J. Roy. Stat. Soc. 54, 303 (1991).
## Not run: dat <- logistic(iter=1000,r=3.6) +runif(1000)/10 ll_aroutput <- lfo.ar(dat) par(mfrow=c(2,2)) plot(ll_aroutput[,1],ll_aroutput[,2],xlab="Neighborhood size",ylab="Relative forecast error",t="l") plot(ll_aroutput[,1],ll_aroutput[,3],xlab="Neighborhood size", ylab="Fraction of points with neighbors",t="l" ) plot(ll_aroutput[,1],ll_aroutput[,4],xlab="Neighborhood size",ylab="Average number of neighbors",t="l") plot(ll_aroutput[,1],ll_aroutput[,5],xlab="Neighborhood size",ylab="Variance of points with neighbors",t="l") ## End(Not run)