.BG
.FN sabl
.TL
Seasonal Decomposition
.CS
sabl(x, power, calendar=FALSE, trend=11,
     seasonal=15, revisions=FALSE)
.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', 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.
.AG seasonal
number of points in the seasonal smoothing window, an odd
integer greater than 2.
.AG revisions
if `FALSE', 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
list 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 REFERENCE
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.
.SA
`sablplot' and `monthplot'.
.EX
h <- sabl(hstart)   #decomposition of housing starts series
tsplot(hstart, h$adjusted, type="pl")
.KW ts
.KW robust
.WR
