R commands to explore time series data

ts(data) # create time series objects
time(ts.data) # returns the time

diff(ts.data, lag=1) # difference at the specified lag
lag.plot(ts.data, 9, do.lines=FALSE) # plot with specified lags

plot(stl(ts.data, “per”)) # decomposition of time series data

spec.pgram(ts.data, spans=c(3,3), log=”no”) # non-parametric spectral analysis
spec.ar(ts.data, spans=c(3,3), log=”no”) # parametric estimation


R commands to explore time series data …
Tagged on:     

Leave a Reply

Your email address will not be published. Required fields are marked *