This preview shows pages 1–2. Sign up to view the full content.
R functions for time series analysis by Vito Ricci (
vito_ricci@yahoo.com
) R.0.5 26/11/04
R FUNCTIONS FOR TIME SERIES ANALYSIS
Here are some helpful R functions for time series analysis. They belong from
stats
,
tseries
,
ast
and
lmtes
t
packages and grouped by their goal.
INPUT
cycle()
: gives the positions in the cycle of each observation (stats)
deltat():
returns the time interval between observations (stats)
end()
:
extracts and encodes the times the last observation were taken (stats)
frequency()
: returns the number of samples per unit time (stats)
read.ts():
reads a time series file (tseries)
start()
: extracts and encodes the times the first observation were taken (stats)
time()
: creates the vector of times at which a time series was sampled (stats)
ts():
creates timeseries objects (stats)
window():
is a generic function which extracts the subset of the object 'x' observed between the times 'start'
and 'end'. If a frequency is specified, the series is then resampled at the new frequency (stats)
TS DECOMPOSITION
decompose()
:
decomposes a time series into seasonal, trend and irregular components using moving
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
This is the end of the preview. Sign up
to
access the rest of the document.
 Three '11
 kim

Click to edit the document details