.BG
.VE $Header: /usr3/s/current/s/.help/RCS/sabl,v 1.2 83/12/30 19:33:54 rab Exp $
.FN sabl
.TL
sabl: Seasonal Decomposition
.CS
sabl(x, power, calendar, trend, seasonal, revisions)
.PP
.AG x
the time-series to be decomposed.
.AG power
 vector of powers for transforming `x'. Sabl will pick the value from
`power' that minimizes a measure of the interaction between
trend and seasonal components. For a value `p' in `power',
`p>0' corresponds to the transformation `x^p';
`p==0' to `log(x)'; and `p<0' to `\-x^p'.
If `x' has any zero or negative values,
no transformation is made and `power' defaults to 1.
Otherwise, the default is `c(\-1,\-.5,\-.25,0,.25,.5,1)'
.AG calendar
if FALSE, (default) no calendar component is computed.
Calendar computation can be done only for monthly data.
.AG trend
number of points in the trend smoothing window, an odd integer 
greater than 2.  Default 11.
.AG seasonal
number of points in the seasonal smoothing window, an odd 
integer greater than 2. Default 15.
.AG revisions
if FALSE, (default) no revisions are calculated.
The series must be at least 7 cycles long
for revisions to be calculated.
A maximum
of 5 cycles of revisions are calculated.
.RT
structure with the following components:
.RC trend
time-series giving the long term change in level.
.RC seasonal
time-series giving the part of `x' that   
repeats or nearly repeats every `nper(x)' time units.
This series contains predicted seasonal values for one additional cycle.
.RC irregular
time-series giving the noisy variation not explained by `trend' or `seasonal'
(or `calendar' if computed).
.RC transformed
the series `x' after power transformation and month length correction,
from which the components are extracted.
.RC adjusted
time-series with the seasonal component and calendar component
(if computed) removed, on the original (untransformed) scale.
.RC calendar
time-series of variation due to day-of-the-week effect.
Returned if argument `calendar' is TRUE.
This series contains predicted calendar values for one additional cycle.
.RC power
power that was actually used in transforming the time-series `x'.
.RC tstat
vector of t statistics used to pick the power actually used to transform `x'.
Only returned if length of the argument `power' is >1.
.RC revisions
time-series of revisions, if computed.
.RC weights
time-series of final robustness weights used in the decomposition.
.PP
The components returned by `sabl' are related as follows:
.PP
.NF
`transformed' equals `trend' + `seasonal' + `irregular'
     (if no calendar component was computed)

                  or

`transformed' equals `trend' + `seasonal' + `calendar' + `irregular'
     (if calendar component was computed)
.fi
.SH REFERENCES
William S. Cleveland, Susan J. Devlin, and Irma J. Terpenning (1981),
"The SABL Statistical and Graphical Methods",
and
"The Details of the SABL Transformation, Decomposition, and Calendar
Methods",
Bell Laboratories Memoranda.
.PP
William S. Cleveland and Susan J. Devlin,
"Calendar Effects in Monthly Time Series: Modeling and Adjustment",
.ul
Journal of the American Statistical Association,
Vol 77, No. 379, pp. 520-528,
September 1982.
.SH SEE ALSO
`?sablplot', and `monthplot'.
.EX
h <- sabl(hstart)   #decomposition of housing starts series
tsplot(hstart, h$adjusted, type="pl")
.KW ts*
.KW seasonal adjustment
.KW robust
.WR
