[R] Seasonality in STL Decomposition

From: vioravis <vioravis_at_gmail.com>
Date: Thu, 10 Mar 2011 21:14:10 -0800 (PST)


I having issues with interpreting the results of STL decomposition. The following is the data used as well as the decompsed seasonality, trend and the remainder components. It is a weekly data.

The original data doesn't appear to be seasonal. But there seems to be a periodic peak in the seasonal component. Can some one please let me know how to interpret the seasonality plot in this???

Also, what does the negative values mean in the seasonality and the remainder components???

Thank you.

Ravi

input <-
c(2152.787,1686.4335,1856.3705,1719.872,1755.1917,1705.3385,1701.6683,1610.2746,1554.6005,1463.85,

1429.2155,1453.1788,1385.1424,1346.8169,1425.896,1388.6765,1349.8714,1293.0909,1279.1281,1264.8579,
1270.9211,1278.4987,1271.3811,1270.448,1243.3399,1279.2172,1337.455,1316.6042,1288.9275,1287.403,
1290.0595,1317.4027,1365.4406,1302.6746,1254.4507,1274.5924,1281.1415,1282.0631,1249.1892,1312.9578,
1253.104,1256.7432,1253.802,1294.004,1252.422,1259.6932,1281.6017,1274.6644,1267.9903,1229.1065,
1259.2091,1275.5516,1220.9909,1217.682,1252.5307,1251.7036,1237.4322,1269.2433,1253.5857,1209.1975,
1188.7189,1203.7423,1267.6006,1208.4465,1219.0118,1214.3023,1209.4117,1203.1483,1214.807,1165.5629,
1189.984,1230.2438,1265.8107,1206.4665,1197.2052,1189.0741,1191.9008,1209.7856,1203.7599,1206.3015,
1164.3207,1197.648,1175.555,1188.6788,1206.7764,1210.7119,1209.0285,1205.9406,1202.4434,1222.4249,
1233.8498,1244.0629,1228.476,1235.1948,1264.1828,1242.6138,1241.0844,1313.3505,1317.6045,1260.7927,
1255.9414,1303.2353,1329.5308,1322.976,1324.9601,1366.406,1319.9496,1357.3928,1334.4911,1302.5362,
1336.5733,1293.3127,1366.4449,1364.4946,1339.0855,1371.0803,1337.266,1349.3965,1308.6867,1402.4016)

timeSeries <- ts(input, start = c(2004, 20),frequency = 52) stlDecompose <- stl(timeSeries, s.window = "periodic",s.degree = 1) plot(stlDecompose)

Decomposition Results:

           seasonal trend remainder

2004.365 215.915141 1585.077  3.517953e+02
2004.385  75.846356 1576.654  3.393327e+01
2004.404 131.292835 1568.231  1.568465e+02
2004.423 100.668748 1559.809  5.939475e+01
2004.442 102.720994 1551.386  1.010849e+02
2004.462  88.423662 1542.963  7.395170e+01
2004.481  95.695097 1534.540  7.143275e+01
2004.500  38.382598 1526.118  4.577424e+01
2004.519  39.744099 1517.695 -2.838678e+00
2004.538  16.208476 1509.559 -6.191717e+01
2004.558  19.836887 1501.422 -9.204370e+01
2004.577  21.128396 1493.286 -6.123552e+01
2004.596  -6.943227 1485.150 -9.306392e+01
2004.615 -15.429798 1477.013 -1.147665e+02
2004.635  -2.455302 1468.877 -4.052547e+01
2004.654  16.103626 1460.740 -8.816752e+01
2004.673 -43.781184 1452.604 -5.895142e+01
2004.692 -93.469553 1444.576 -5.801584e+01
2004.712 -84.916472 1436.549 -7.250401e+01
2004.731 -68.597741 1428.521 -9.506523e+01
2004.750 -44.458760 1420.493 -1.051133e+02
2004.769 -67.619804 1412.465 -6.634695e+01
2004.788 -73.086998 1404.438 -5.996964e+01
2004.808 -74.896842 1396.410 -5.106519e+01
2004.827 -84.315286 1388.382 -6.072713e+01
2004.846 -54.710480 1380.497 -4.656974e+01
2004.865 -25.880674 1372.613 -9.276842e+00
2004.885 -32.311518 1364.728 -1.581190e+01
2004.904 -64.416512 1356.843 -3.498703e+00
2004.923 -45.672884 1348.958 -1.588193e+01
2004.942 -52.548907 1341.073  1.535493e+00
2004.962 -29.473180 1333.188  1.368787e+01
2004.981   6.436797 1325.303  3.370069e+01
2005.000 -20.697564 1318.761  4.611184e+00
2005.019 -43.370325 1312.219 -1.439782e+01
2005.038 -32.562537 1305.677  1.478221e+00
2005.058 -28.755698 1299.135  1.076261e+01
2005.077 -16.133184 1292.592  5.603832e+00
2005.096 -24.686719 1286.050 -1.217440e+01
2005.115  14.475095 1279.508  1.897452e+01
2005.135 -21.074291 1272.966  1.212235e+00
2005.154 -15.042155 1269.978  1.807456e+00
2005.173  -1.165620 1266.990 -1.202212e+01
2005.192   9.004016 1264.002  2.099840e+01
2005.212 -11.698548 1261.013  3.107118e+00
2005.231  28.962729 1258.025 -2.729480e+01
2005.250  42.936605 1255.037 -1.637202e+01
2005.269  11.954682 1252.049  1.066076e+01
2005.288   7.084609 1249.061  1.184488e+01
2005.308  11.654557 1247.216 -2.976370e+01
2005.327  40.218506 1245.370 -2.637988e+01
2005.346  45.477254 1243.525 -1.345096e+01
2005.365 215.915141 1241.680 -2.366044e+02
2005.385  75.846356 1239.835 -9.799933e+01
2005.404 131.292835 1237.990 -1.167519e+02
2005.423 100.668748 1236.145 -8.510978e+01
2005.442 102.720994 1234.299 -9.958826e+01
2005.462  88.423662 1233.257 -5.243698e+01
2005.481  95.695097 1232.214 -7.432316e+01
2005.500  38.382598 1231.171 -6.035601e+01
2005.519  39.744099 1230.128 -8.115327e+01
2005.538  16.208476 1229.085 -4.155139e+01
2005.558  19.836887 1228.042  1.972135e+01
2005.577  21.128396 1227.000 -3.968141e+01
2005.596  -6.943227 1225.957 -1.638219e-03
2005.615 -15.429798 1226.144  3.587887e+00
2005.635  -2.455302 1226.332 -1.446475e+01
2005.654  16.103626 1226.519 -3.947463e+01
2005.673 -43.781184 1226.707  3.188134e+01
2005.692 -93.469553 1226.894  3.213806e+01
2005.712 -84.916472 1227.082  4.781853e+01
2005.731 -68.597741 1227.269  7.157206e+01
2005.750 -44.458760 1227.457  8.281243e+01
2005.769 -67.619804 1228.609  4.547694e+01
2005.788 -73.086998 1229.762  4.053050e+01
2005.808 -74.896842 1230.914  3.305692e+01
2005.827 -84.315286 1232.066  4.414973e+01
2005.846 -54.710480 1233.219  3.127739e+01
2005.865 -25.880674 1234.371 -4.730446e+00
2005.885 -32.311518 1235.523  3.089666e+00
2005.904 -64.416512 1236.676 -7.938471e+00
2005.923 -45.672884 1238.179  5.142109e+00
2005.942 -52.548907 1239.682 -1.157796e+01
2005.962 -29.473180 1241.185 -2.303298e+01
2005.981   6.436797 1242.688 -4.234845e+01
2006.000 -20.697564 1244.191 -1.278168e+01
2006.019 -43.370325 1245.694  6.704587e+00
2006.038 -32.562537 1247.197 -8.694195e+00
2006.058 -28.755698 1248.700 -1.750133e+01
2006.077 -16.133184 1250.416 -1.185828e+01
2006.096 -24.686719 1252.132  6.404223e+00
2006.115  14.475095 1253.848 -2.426043e+01
2006.135 -21.074291 1255.564 -6.013877e+00
2006.154 -15.042155 1257.280 -7.043149e+00
2006.173  -1.165620 1258.996  6.352380e+00
2006.192   9.004016 1260.712 -2.710219e+01
2006.212 -11.698548 1262.428 -9.644963e+00
2006.231  28.962729 1264.100  2.028744e+01
2006.250  42.936605 1265.773  8.895150e+00
2006.269  11.954682 1267.445 -1.860714e+01
2006.288   7.084609 1269.118 -2.026079e+01
2006.308  11.654557 1270.790  2.079075e+01
2006.327  40.218506 1272.462  1.684988e+01
2006.346  45.477254 1274.135  3.363918e+00
2006.365 215.915141 1275.807 -1.667623e+02
2006.385  75.846356 1277.454  1.310554e+01
2006.404 131.292835 1279.101 -9.044420e+01
2006.423 100.668748 1280.748 -2.402378e+01
2006.442 102.720994 1282.395 -5.062459e+01
2006.462  88.423662 1284.042 -6.992902e+01
2006.481  95.695097 1285.688 -4.481021e+01
2006.500  38.382598 1287.335 -3.240518e+01
2006.519  39.744099 1288.982  3.771866e+01
2006.538  16.208476 1290.687  5.759918e+01
2006.558  19.836887 1292.392  2.685686e+01
2006.577  21.128396 1294.097  5.585535e+01
2006.596  -6.943227 1295.801  4.840787e+01
2006.615 -15.429798 1297.506  6.732014e+01
2006.635  -2.455302 1299.211  1.193104e+01
2006.654  16.103626 1300.916  8.538221e+01


--
View this message in context: http://r.789695.n4.nabble.com/Seasonality-in-STL-Decomposition-tp3347489p3347489.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Received on Fri 11 Mar 2011 - 06:35:18 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 11 Mar 2011 - 07:10:21 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive