Displaying 2 results from an estimated 2 matches for "undiff".
2011 Jun 21
2
function to undo the DIFF command in ARIMA command
...n R.
I'm workiing with Time series and I would like to know how can I do to undo
the command DIFF(X), for exemple:
If I have the model: m=arima(X, order=c(0,1,1),
seasonal=list(order=c(0,0,1))) (note that have d=1 one difference), to find,
in the same scale, the original numbers (like one "unDiff"), after the
forecast, I need to develop some function or in R there is some command
ready or function?
Thanks
Flávio
[[alternative HTML version deleted]]
2007 Jul 02
0
ARIMA prediction
...p <- temp + coefs[j] * (series.diff[l.s - j + 1] -
intercept)
}
}
if(MA > 0){
for(j in (1:MA)){
temp <- temp + coefs[j + AR] * innov[l.s - j + 1]
}
}
innov <- c(innov, 0)
series.diff <- c(series.diff, temp)
}
if(d==0){
series.undiff <- series.diff
}
else {
series.undiff <- diffinv(series.diff, lag=1, differences=d, xi =
series[1:d])
}
return(list(series = series.undiff, innov = innov))
}