Claudia D'Aniello <kikki_80 <at> yahoo.it> writes: > > Dear R users, > someone knows how to remove auto-correlation from a frequencies time series? > I've tried by differencing (lag 1) the cumulative series (in order to have only positive numbers) , but I > can't remove all auto-correlation. > If it's useful I can send my db. > > x <- # autocorrelated series > new1<-cumsum(x) > new2<-diff(new1,lag=1,differences = 1) > acf(new2) # remains autocorrelated >
This might come close to what your want ar = arima(lh, order = c(1,0,0)) plot(ar$residuals) Dieter ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.