prep.detrend.sfsm: Detrend with "substracting full-season means" method

Description Usage Arguments Details Value Examples

Description

Performs "substracting full-season means" method to go for a totally automatic approach.

Usage

1

Arguments

tserie

a ts object

Details

Under this detrending scheme, a series is first split into segments. The length of the segments is equal to the length of seasonality(12 for monthly). The mean of the historical observations within each of these segments is substacted from every historical observation in the segment. To get the detrended serie we do: ds = xi - m Being xi the actual values on the time series and m the mean of the segment of xi

Value

A list is returned containing:

tserie

Transformed ts object.

means

Vector containing the historical means.

Examples

1

Example output

$tserie
             Jan         Feb         Mar         Apr         May         Jun
1949 -14.6666667  -8.6666667   5.3333333   2.3333333  -5.6666667   8.3333333
1950 -24.6666667 -13.6666667   1.3333333  -4.6666667 -14.6666667   9.3333333
1951 -25.1666667 -20.1666667   7.8333333  -7.1666667   1.8333333   7.8333333
1952 -26.0000000 -17.0000000  -4.0000000 -16.0000000 -14.0000000  21.0000000
1953 -29.0000000 -29.0000000  11.0000000  10.0000000   4.0000000  18.0000000
1954 -34.9166667 -50.9166667  -3.9166667 -11.9166667  -4.9166667  25.0833333
1955 -42.0000000 -51.0000000 -17.0000000 -15.0000000 -14.0000000  31.0000000
1956 -44.2500000 -51.2500000 -11.2500000 -15.2500000 -10.2500000  45.7500000
1957 -53.4166667 -67.4166667 -12.4166667 -20.4166667 -13.4166667  53.5833333
1958 -41.0000000 -63.0000000 -19.0000000 -33.0000000 -18.0000000  54.0000000
1959 -68.3333333 -86.3333333 -22.3333333 -32.3333333  -8.3333333  43.6666667
1960 -59.1666667 -85.1666667 -57.1666667 -15.1666667  -4.1666667  58.8333333
             Jul         Aug         Sep         Oct         Nov         Dec
1949  21.3333333  21.3333333   9.3333333  -7.6666667 -22.6666667  -8.6666667
1950  30.3333333  30.3333333  18.3333333  -6.6666667 -25.6666667   0.3333333
1951  28.8333333  28.8333333  13.8333333  -8.1666667 -24.1666667  -4.1666667
1952  33.0000000  45.0000000  12.0000000  -6.0000000 -25.0000000  -3.0000000
1953  39.0000000  47.0000000  12.0000000 -14.0000000 -45.0000000 -24.0000000
1954  63.0833333  54.0833333  20.0833333  -9.9166667 -35.9166667  -9.9166667
1955  80.0000000  63.0000000  28.0000000 -10.0000000 -47.0000000  -6.0000000
1956  84.7500000  76.7500000  26.7500000 -22.2500000 -57.2500000 -22.2500000
1957  96.5833333  98.5833333  35.5833333 -21.4166667 -63.4166667 -32.4166667
1958 110.0000000 124.0000000  23.0000000 -22.0000000 -71.0000000 -44.0000000
1959 119.6666667 130.6666667  34.6666667 -21.3333333 -66.3333333 -23.3333333
1960 145.8333333 129.8333333  31.8333333 -15.1666667 -86.1666667 -44.1666667

$means
 [1] 126.6667 139.6667 170.1667 197.0000 225.0000 238.9167 284.0000 328.2500
 [9] 368.4167 381.0000 428.3333 476.1667

predtoolsTS documentation built on May 2, 2019, 5:54 a.m.