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

http://www.stat.pitt.edu/stoffer/tsa2/R_time_series_quick_fix.htm

R commands to explore time series data …