|
MOVING (LET)Name:
Although this command is most commonly used for a location statistic, it can in fact be used for any supported statistic (enter HELP STATISTIC for a list of supported statistics). The "local" area is defined by the FILTER WIDTH command. For example,
says that 5 points will be used to compute the specified statistic. The command
defines the direction of the local region:
The other issue is how the "end points" will be handled. This is specified with the command
where
The default is a FILTER WIDTH of 3, MOVING DIRECTION of CENTER, and a MOVING END POINT of SKIP.
<SUBSET/EXCEPT/FOR qualification> where <y1> ... <yk> is a list of one to three response variables (depending on what <stat> is); <stat> is one of the supported statistics (HELP STATISTICS for a list); <yout> is a variable where the computed values are stored; and where the <SUBSET/EXCEPT/FOR qualification> is optional.
LET Y2 = MOVING MEDIAN Y LET Y2 = MOVING MINIMUM Y LET Y2 = MOVING SD Y
skip 25
read mavro.dat y
.
let n = size y
let x = sequence 1 1 n
set write decimals 6
filter width
.
set moving end point skip
let yskip = moving average y
.
set moving end point symmetric
let ysymm = moving average y
.
set moving end point partial
let ypart = moving average y
.
print x y yskip ysymm ypart
The following values are generated:
---------------------------------------------------------------------------
X Y YSKIP YSYMM YPART
---------------------------------------------------------------------------
1.000000 2.001799 2.001766 2.001799 2.001749
2.000000 2.001700 2.001799 2.001766 2.001766
3.000000 2.001799 2.001833 2.001799 2.001799
4.000000 2.001900 2.001799 2.001833 2.001833
5.000000 2.001799 2.001666 2.001799 2.001799
6.000000 2.001700 2.001533 2.001666 2.001666
7.000000 2.001500 2.001466 2.001533 2.001533
8.000000 2.001399 2.001466 2.001466 2.001466
9.000000 2.001500 2.001566 2.001466 2.001466
10.000000 2.001500 2.001666 2.001566 2.001566
11.000000 2.001700 2.001766 2.001666 2.001666
12.000000 2.001799 2.001833 2.001766 2.001766
13.000000 2.001799 2.001866 2.001833 2.001833
14.000000 2.001900 2.001966 2.001866 2.001866
15.000000 2.001900 2.001999 2.001966 2.001966
16.000000 2.002099 2.001899 2.001999 2.001999
17.000000 2.001999 2.001666 2.001899 2.001899
18.000000 2.001599 2.001433 2.001666 2.001666
19.000000 2.001399 2.001333 2.001433 2.001433
20.000000 2.001300 2.001366 2.001333 2.001333
21.000000 2.001300 2.001433 2.001366 2.001366
22.000000 2.001500 2.001533 2.001433 2.001433
23.000000 2.001500 2.001533 2.001533 2.001533
24.000000 2.001599 2.001500 2.001533 2.001533
25.000000 2.001500 2.001400 2.001500 2.001500
26.000000 2.001399 2.001366 2.001400 2.001400
27.000000 2.001300 2.001399 2.001366 2.001366
28.000000 2.001399 2.001433 2.001399 2.001399
29.000000 2.001500 2.001466 2.001433 2.001433
30.000000 2.001399 2.001500 2.001466 2.001466
31.000000 2.001500 2.001533 2.001500 2.001500
32.000000 2.001599 2.001566 2.001533 2.001533
33.000000 2.001500 2.001666 2.001566 2.001566
34.000000 2.001599 2.001833 2.001666 2.001666
35.000000 2.001900 2.001966 2.001833 2.001833
36.000000 2.001999 2.002033 2.001966 2.001966
37.000000 2.001999 2.002099 2.002033 2.002033
38.000000 2.002099 2.002200 2.002099 2.002099
39.000000 2.002200 2.002299 2.002200 2.002200
40.000000 2.002299 2.002399 2.002299 2.002299
41.000000 2.002400 2.002533 2.002399 2.002399
42.000000 2.002499 2.002600 2.002533 2.002533
43.000000 2.002699 2.002633 2.002600 2.002600
44.000000 2.002600 2.002600 2.002633 2.002633
45.000000 2.002600 2.002633 2.002600 2.002600
46.000000 2.002600 2.002633 2.002633 2.002633
47.000000 2.002699 2.002599 2.002633 2.002633
48.000000 2.002600 2.002499 2.002599 2.002599
49.000000 2.002499 0.000000 2.002499 2.002499
50.000000 2.002400 0.000000 2.002400 2.002450
Date created: 10/5/2010 |