-
Notifications
You must be signed in to change notification settings - Fork 46
/
Copy pathstlez.3
82 lines (82 loc) · 2.42 KB
/
stlez.3
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
.SA 0
.PH "'STLEZ'Seasonal-Trend Decomposition with Defaults'STLEZ'"
.P
PURPOSE
.P
STLEZ offers easy use of the STL procedure by defaulting most parameters values.
.nf
.P
SYNOPSIS
.P
stlez(y, n, np, ns, isdeg, itdeg, robust, no, rw, season,
trend, work)
integer n, np, ns, no isdeg, itdeg
real y(n), rw(n), season(n), trend(n), work(n+2*np,7)
logical robust
.fi
.P
ARGUMENTS
.P
.in +8
.ti -8
y input, time series to be decomposed.
.ti -8
n input, number of values in y.
.ti -8
np input, the period of the seasonal component. For example, if the
time series is monthly with a yearly cycle, then np=12.
.ti -8
ns input, length of the seasonal smoother.
The value of ns should be an odd integer greater than or equal to 3;
ns>6 is recommended.
As ns increases
the values of the seasonal component at a given point in the seasonal cycle
(e.g., January values of a monthly series with a yearly cycle)
become smoother.
.ti -8
isdeg input, degree of locally-fitted polynomial in seasonal smoothing.
The value is 0 or 1.
.ti -8
itdeg input, degree of locally-fitted polynomial in trend smoothing.
The value is 0 or 1.
.ti -8
robust input, .true. if robustness iterations are to be used, .false. otherwise.
.ti -8
rw output, final robustness weights.
All rw are 1 if robust=.false.
.ti -8
season output, seasonal component.
.ti -8
trend output, trend component.
.ti -8
no output, number of robustness iterations. The iterations end
if a convergence criterion is met or if the number is 15.
.ti -8
work workspace of (n+2*np)*7 locations.
.in -8
.P
REFERENCES
.P
R.B. Cleveland, W.S.Cleveland, J.E. McRae, and I. Terpenning,
STL: A Seasonal-Trend Decomposition Procedure Based on Loess, Statistics Research
Report, AT&T Bell Laboratories.
.P
STLEZ sets parameters to the values recommended in the above reference.
Thus if you call STLEZ, you will be using the values summarized below.
See documentation for STL for definitions of the parameters.
.br
nt = smallest odd integer greater than or equal to
.ce
(1.5*np) / (1-(1.5/ns)).
.br
nl = smallest odd integer greater than or equal to np.
.br
nsjump = ns/10; ntjump = nt/10; nljump = nl/10.
.br
ni = 2 if robust=.false.; else ni=1.
.br
no = 0 if robust=.false.; else robustness iterations are carried out
until convergence of both seasonal and trend components,
with 15 iterations maximum.
Convergence occurs if the maximum changes in individual seasonal and trend fits
are less than 1% of the component's range after the previous iteration.