10
Stata Technical Bulletin
STB-8
Remarks
A smoother separates a data sequence yt, t = 1,2,...,N, into a smooth, zt = S(yt), and a rough, rt = yt — zt. A
compound smoother applies smoothers sequentially from left to right; thus, if A and B are smoothers, the smoother AB is
defined as zt = B (A(j⅛)).
Running median smoothers of odd span
The smoother 3 defines zt = median(s⅛-ι,s⅛,j⅛+ι). The smoother 5 defines zt = median(yt-2,yt-ι,yt,yt+ι,yt+2), and so
on. The smoother 1 defines zt = median{yt) and so does nothing.
In all cases, the end-points are handled by using smoothers of shorter, odd span. Thus, in the case of 3,
Zi = У1
m = median(ÿi,ÿ2,ÿ3)
zjv-ι = median^-?, W-ь W)
ZN = У N
In the case of 5,
Zi = У1
m = median(ÿi,ÿ2,ÿ3)
z3 = median (î/i, î/2, Уз, У4, y s)
z4 = median{y2, y3, y4, y5, ye}
zjv-2 = median(yjv-4,W-3, W-2, W-ьж)
Zjv-I = median(yjv-2,W-b w)
zn = У N
and so on.
Running median smoothers of even span
Define the median() function as returning the linearly interpolated value when given an even number of arguments.
Thus, the smoother 2 defines zt+,3 = (yt + j⅛+ι)∕2. The smoother 4 defines zt+,3 as the linearly interpolated median of
(î/t_i,î/t,î/t+i,î/t+2), and so on. In all cases, end-points are handled by using smoothers of shorter, even span. Thus, in the
case of 4,
zι.5 = median(ÿi,ÿ2) = (j∕ι + y2)∕2
z2.5 = median(ÿi,ÿ2,ÿ3,ÿ4)
zjv-2.5 = median(w-4,W-3, W-2, W-ι)
zjv-i.5 = median(yjv-2,W-ι)
zjv-.5 = median(yjv-ι,w)
Z N+.5 = У N
nlsm keeps track of the number of even smoothers applied to the data; it is recommended that such smoothers always be applied
in pairs. After all smoothers have been applied, the data is then shifted forward one position for each pair of even smoothers.
Thus, the smoother 4253 or 4523 would result in values for z2 through zjv; z4 would be missing. The physical shifting of the
data is not performed if noshift is specified.
The repeat operator
R indicates that a smoother is to be repeated until convergence, that is, until repeated applications of the smoother produce
the same series. Thus, 3 applies the smoother of running medians of span 3. 33 applies the smoother twice. 3R produces the
More intriguing information
1. The open method of co-ordination: Some remarks regarding old-age security within an enlarged European Union2. The name is absent
3. The name is absent
4. International Financial Integration*
5. Poverty transition through targeted programme: the case of Bangladesh Poultry Model
6. Economic Evaluation of Positron Emission Tomography (PET) in Non Small Cell Lung Cancer (NSCLC), CHERE Working Paper 2007/6
7. ANTI-COMPETITIVE FINANCIAL CONTRACTING: THE DESIGN OF FINANCIAL CLAIMS.
8. The name is absent
9. The name is absent
10. The name is absent