Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_decompose.wasp
Title produced by softwareClassical Decomposition
Date of computationSat, 26 Nov 2016 10:27:54 +0000
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2016/Nov/26/t1480156089sxlno23yj0z5leo.htm/, Retrieved Fri, 03 May 2024 18:58:53 +0200
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=, Retrieved Fri, 03 May 2024 18:58:53 +0200
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact0
Dataseries X:
2322
2347
2963
1900
2723
2555
2176
2444
1944
2089
1978
2081
2435
2246
2641
1966
2398
2334
2333
2421
1531
2215
1927
1698
2482
1974
2369
2097
2264
1938
2360
2176
1478
2158
1690
1886
2450
1811
2196
1997
2199
1970
2239
1937
1311
2149
1673
2378
2770
1764
2310
1971
1899
2554
1948
2138
1469
2059
1771
1761




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time1 seconds
R Server'Gertrude Mary Cox' @ cox.wessa.net

\begin{tabular}{lllllllll}
\hline
Summary of computational transaction \tabularnewline
Raw Input & view raw input (R code)  \tabularnewline
Raw Output & view raw output of R engine  \tabularnewline
Computing time & 1 seconds \tabularnewline
R Server & 'Gertrude Mary Cox' @ cox.wessa.net \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=&T=0

[TABLE]
[ROW][C]Summary of computational transaction[/C][/ROW]
[ROW][C]Raw Input[/C][C]view raw input (R code) [/C][/ROW]
[ROW][C]Raw Output[/C][C]view raw output of R engine [/C][/ROW]
[ROW][C]Computing time[/C][C]1 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'Gertrude Mary Cox' @ cox.wessa.net[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=&T=0

As an alternative you can also use a QR Code:  

The GUIDs for individual cells are displayed in the table below:

Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time1 seconds
R Server'Gertrude Mary Cox' @ cox.wessa.net







Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
12322NANA427.641NA
22347NANA-152.297NA
32963NANA286.089NA
41900NANA-79.901NA
52723NANA104.818NA
62555NANA119.307NA
721762429.432298.21131.224-253.432
824442398.842298.71100.1345.1615
919441715.592281.08-565.495228.411
1020892297.732270.4227.3177-208.734
1119781959.042259.62-300.58918.9635
1220812138.632236.88-98.2448-57.6302
1324352661.852234.21427.641-226.849
1422462087.492239.79-152.297158.505
1526412507.712221.62286.089133.286
1619662129.772209.67-79.901-163.766
1723982317.612212.79104.81880.3906
1823342314.022194.71119.30719.9844
1923332311.932180.71131.22421.0677
2024212271.462171.33100.13149.536
2115311583.172148.67-565.495-52.1719
2222152170.112142.7927.317744.8906
2319271842.082142.67-300.58984.9219
2416982022.342120.58-98.2448-324.339
2524822532.852105.21427.641-50.849
2619741943.832096.12-152.29730.1719
2723692369.82083.71286.089-0.796875
2820971999.222079.12-79.90197.776
2922642171.692066.88104.81892.3073
3019382184.142064.83119.307-246.141
3123602202.562071.33131.224157.443
3221762163.342063.21100.1312.6615
3314781483.712049.21-565.495-5.71354
3421582065.152037.8327.317792.849
3516901730.372030.96-300.589-40.3698
3618861931.342029.58-98.2448-45.3385
3724502453.522025.87427.641-3.51562
3818111858.582010.88-152.297-47.5781
3921962280.051993.96286.089-84.0469
4019971906.721986.63-79.90190.276
4121992090.361985.54104.818108.641
4219702124.642005.33119.307-154.641
4322392170.392039.17131.22468.6094
4419372150.672050.54100.13-213.672
4513111487.842053.33-565.495-176.839
4621492084.32205727.317764.6823
4716731742.832043.42-300.589-69.8281
4823781957.012055.25-98.2448420.995
4927702495.12067.46427.641274.901
5017641911.412063.71-152.297-147.411
5123102364.762078.67286.089-54.7552
5219712001.62081.5-79.901-30.599
5318992186.652081.83104.818-287.651
5425542179.522060.21119.307374.484
551948NANA131.224NA
562138NANA100.13NA
571469NANA-565.495NA
582059NANA27.3177NA
591771NANA-300.589NA
601761NANA-98.2448NA

\begin{tabular}{lllllllll}
\hline
Classical Decomposition by Moving Averages \tabularnewline
t & Observations & Fit & Trend & Seasonal & Random \tabularnewline
1 & 2322 & NA & NA & 427.641 & NA \tabularnewline
2 & 2347 & NA & NA & -152.297 & NA \tabularnewline
3 & 2963 & NA & NA & 286.089 & NA \tabularnewline
4 & 1900 & NA & NA & -79.901 & NA \tabularnewline
5 & 2723 & NA & NA & 104.818 & NA \tabularnewline
6 & 2555 & NA & NA & 119.307 & NA \tabularnewline
7 & 2176 & 2429.43 & 2298.21 & 131.224 & -253.432 \tabularnewline
8 & 2444 & 2398.84 & 2298.71 & 100.13 & 45.1615 \tabularnewline
9 & 1944 & 1715.59 & 2281.08 & -565.495 & 228.411 \tabularnewline
10 & 2089 & 2297.73 & 2270.42 & 27.3177 & -208.734 \tabularnewline
11 & 1978 & 1959.04 & 2259.62 & -300.589 & 18.9635 \tabularnewline
12 & 2081 & 2138.63 & 2236.88 & -98.2448 & -57.6302 \tabularnewline
13 & 2435 & 2661.85 & 2234.21 & 427.641 & -226.849 \tabularnewline
14 & 2246 & 2087.49 & 2239.79 & -152.297 & 158.505 \tabularnewline
15 & 2641 & 2507.71 & 2221.62 & 286.089 & 133.286 \tabularnewline
16 & 1966 & 2129.77 & 2209.67 & -79.901 & -163.766 \tabularnewline
17 & 2398 & 2317.61 & 2212.79 & 104.818 & 80.3906 \tabularnewline
18 & 2334 & 2314.02 & 2194.71 & 119.307 & 19.9844 \tabularnewline
19 & 2333 & 2311.93 & 2180.71 & 131.224 & 21.0677 \tabularnewline
20 & 2421 & 2271.46 & 2171.33 & 100.13 & 149.536 \tabularnewline
21 & 1531 & 1583.17 & 2148.67 & -565.495 & -52.1719 \tabularnewline
22 & 2215 & 2170.11 & 2142.79 & 27.3177 & 44.8906 \tabularnewline
23 & 1927 & 1842.08 & 2142.67 & -300.589 & 84.9219 \tabularnewline
24 & 1698 & 2022.34 & 2120.58 & -98.2448 & -324.339 \tabularnewline
25 & 2482 & 2532.85 & 2105.21 & 427.641 & -50.849 \tabularnewline
26 & 1974 & 1943.83 & 2096.12 & -152.297 & 30.1719 \tabularnewline
27 & 2369 & 2369.8 & 2083.71 & 286.089 & -0.796875 \tabularnewline
28 & 2097 & 1999.22 & 2079.12 & -79.901 & 97.776 \tabularnewline
29 & 2264 & 2171.69 & 2066.88 & 104.818 & 92.3073 \tabularnewline
30 & 1938 & 2184.14 & 2064.83 & 119.307 & -246.141 \tabularnewline
31 & 2360 & 2202.56 & 2071.33 & 131.224 & 157.443 \tabularnewline
32 & 2176 & 2163.34 & 2063.21 & 100.13 & 12.6615 \tabularnewline
33 & 1478 & 1483.71 & 2049.21 & -565.495 & -5.71354 \tabularnewline
34 & 2158 & 2065.15 & 2037.83 & 27.3177 & 92.849 \tabularnewline
35 & 1690 & 1730.37 & 2030.96 & -300.589 & -40.3698 \tabularnewline
36 & 1886 & 1931.34 & 2029.58 & -98.2448 & -45.3385 \tabularnewline
37 & 2450 & 2453.52 & 2025.87 & 427.641 & -3.51562 \tabularnewline
38 & 1811 & 1858.58 & 2010.88 & -152.297 & -47.5781 \tabularnewline
39 & 2196 & 2280.05 & 1993.96 & 286.089 & -84.0469 \tabularnewline
40 & 1997 & 1906.72 & 1986.63 & -79.901 & 90.276 \tabularnewline
41 & 2199 & 2090.36 & 1985.54 & 104.818 & 108.641 \tabularnewline
42 & 1970 & 2124.64 & 2005.33 & 119.307 & -154.641 \tabularnewline
43 & 2239 & 2170.39 & 2039.17 & 131.224 & 68.6094 \tabularnewline
44 & 1937 & 2150.67 & 2050.54 & 100.13 & -213.672 \tabularnewline
45 & 1311 & 1487.84 & 2053.33 & -565.495 & -176.839 \tabularnewline
46 & 2149 & 2084.32 & 2057 & 27.3177 & 64.6823 \tabularnewline
47 & 1673 & 1742.83 & 2043.42 & -300.589 & -69.8281 \tabularnewline
48 & 2378 & 1957.01 & 2055.25 & -98.2448 & 420.995 \tabularnewline
49 & 2770 & 2495.1 & 2067.46 & 427.641 & 274.901 \tabularnewline
50 & 1764 & 1911.41 & 2063.71 & -152.297 & -147.411 \tabularnewline
51 & 2310 & 2364.76 & 2078.67 & 286.089 & -54.7552 \tabularnewline
52 & 1971 & 2001.6 & 2081.5 & -79.901 & -30.599 \tabularnewline
53 & 1899 & 2186.65 & 2081.83 & 104.818 & -287.651 \tabularnewline
54 & 2554 & 2179.52 & 2060.21 & 119.307 & 374.484 \tabularnewline
55 & 1948 & NA & NA & 131.224 & NA \tabularnewline
56 & 2138 & NA & NA & 100.13 & NA \tabularnewline
57 & 1469 & NA & NA & -565.495 & NA \tabularnewline
58 & 2059 & NA & NA & 27.3177 & NA \tabularnewline
59 & 1771 & NA & NA & -300.589 & NA \tabularnewline
60 & 1761 & NA & NA & -98.2448 & NA \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=&T=1

[TABLE]
[ROW][C]Classical Decomposition by Moving Averages[/C][/ROW]
[ROW][C]t[/C][C]Observations[/C][C]Fit[/C][C]Trend[/C][C]Seasonal[/C][C]Random[/C][/ROW]
[ROW][C]1[/C][C]2322[/C][C]NA[/C][C]NA[/C][C]427.641[/C][C]NA[/C][/ROW]
[ROW][C]2[/C][C]2347[/C][C]NA[/C][C]NA[/C][C]-152.297[/C][C]NA[/C][/ROW]
[ROW][C]3[/C][C]2963[/C][C]NA[/C][C]NA[/C][C]286.089[/C][C]NA[/C][/ROW]
[ROW][C]4[/C][C]1900[/C][C]NA[/C][C]NA[/C][C]-79.901[/C][C]NA[/C][/ROW]
[ROW][C]5[/C][C]2723[/C][C]NA[/C][C]NA[/C][C]104.818[/C][C]NA[/C][/ROW]
[ROW][C]6[/C][C]2555[/C][C]NA[/C][C]NA[/C][C]119.307[/C][C]NA[/C][/ROW]
[ROW][C]7[/C][C]2176[/C][C]2429.43[/C][C]2298.21[/C][C]131.224[/C][C]-253.432[/C][/ROW]
[ROW][C]8[/C][C]2444[/C][C]2398.84[/C][C]2298.71[/C][C]100.13[/C][C]45.1615[/C][/ROW]
[ROW][C]9[/C][C]1944[/C][C]1715.59[/C][C]2281.08[/C][C]-565.495[/C][C]228.411[/C][/ROW]
[ROW][C]10[/C][C]2089[/C][C]2297.73[/C][C]2270.42[/C][C]27.3177[/C][C]-208.734[/C][/ROW]
[ROW][C]11[/C][C]1978[/C][C]1959.04[/C][C]2259.62[/C][C]-300.589[/C][C]18.9635[/C][/ROW]
[ROW][C]12[/C][C]2081[/C][C]2138.63[/C][C]2236.88[/C][C]-98.2448[/C][C]-57.6302[/C][/ROW]
[ROW][C]13[/C][C]2435[/C][C]2661.85[/C][C]2234.21[/C][C]427.641[/C][C]-226.849[/C][/ROW]
[ROW][C]14[/C][C]2246[/C][C]2087.49[/C][C]2239.79[/C][C]-152.297[/C][C]158.505[/C][/ROW]
[ROW][C]15[/C][C]2641[/C][C]2507.71[/C][C]2221.62[/C][C]286.089[/C][C]133.286[/C][/ROW]
[ROW][C]16[/C][C]1966[/C][C]2129.77[/C][C]2209.67[/C][C]-79.901[/C][C]-163.766[/C][/ROW]
[ROW][C]17[/C][C]2398[/C][C]2317.61[/C][C]2212.79[/C][C]104.818[/C][C]80.3906[/C][/ROW]
[ROW][C]18[/C][C]2334[/C][C]2314.02[/C][C]2194.71[/C][C]119.307[/C][C]19.9844[/C][/ROW]
[ROW][C]19[/C][C]2333[/C][C]2311.93[/C][C]2180.71[/C][C]131.224[/C][C]21.0677[/C][/ROW]
[ROW][C]20[/C][C]2421[/C][C]2271.46[/C][C]2171.33[/C][C]100.13[/C][C]149.536[/C][/ROW]
[ROW][C]21[/C][C]1531[/C][C]1583.17[/C][C]2148.67[/C][C]-565.495[/C][C]-52.1719[/C][/ROW]
[ROW][C]22[/C][C]2215[/C][C]2170.11[/C][C]2142.79[/C][C]27.3177[/C][C]44.8906[/C][/ROW]
[ROW][C]23[/C][C]1927[/C][C]1842.08[/C][C]2142.67[/C][C]-300.589[/C][C]84.9219[/C][/ROW]
[ROW][C]24[/C][C]1698[/C][C]2022.34[/C][C]2120.58[/C][C]-98.2448[/C][C]-324.339[/C][/ROW]
[ROW][C]25[/C][C]2482[/C][C]2532.85[/C][C]2105.21[/C][C]427.641[/C][C]-50.849[/C][/ROW]
[ROW][C]26[/C][C]1974[/C][C]1943.83[/C][C]2096.12[/C][C]-152.297[/C][C]30.1719[/C][/ROW]
[ROW][C]27[/C][C]2369[/C][C]2369.8[/C][C]2083.71[/C][C]286.089[/C][C]-0.796875[/C][/ROW]
[ROW][C]28[/C][C]2097[/C][C]1999.22[/C][C]2079.12[/C][C]-79.901[/C][C]97.776[/C][/ROW]
[ROW][C]29[/C][C]2264[/C][C]2171.69[/C][C]2066.88[/C][C]104.818[/C][C]92.3073[/C][/ROW]
[ROW][C]30[/C][C]1938[/C][C]2184.14[/C][C]2064.83[/C][C]119.307[/C][C]-246.141[/C][/ROW]
[ROW][C]31[/C][C]2360[/C][C]2202.56[/C][C]2071.33[/C][C]131.224[/C][C]157.443[/C][/ROW]
[ROW][C]32[/C][C]2176[/C][C]2163.34[/C][C]2063.21[/C][C]100.13[/C][C]12.6615[/C][/ROW]
[ROW][C]33[/C][C]1478[/C][C]1483.71[/C][C]2049.21[/C][C]-565.495[/C][C]-5.71354[/C][/ROW]
[ROW][C]34[/C][C]2158[/C][C]2065.15[/C][C]2037.83[/C][C]27.3177[/C][C]92.849[/C][/ROW]
[ROW][C]35[/C][C]1690[/C][C]1730.37[/C][C]2030.96[/C][C]-300.589[/C][C]-40.3698[/C][/ROW]
[ROW][C]36[/C][C]1886[/C][C]1931.34[/C][C]2029.58[/C][C]-98.2448[/C][C]-45.3385[/C][/ROW]
[ROW][C]37[/C][C]2450[/C][C]2453.52[/C][C]2025.87[/C][C]427.641[/C][C]-3.51562[/C][/ROW]
[ROW][C]38[/C][C]1811[/C][C]1858.58[/C][C]2010.88[/C][C]-152.297[/C][C]-47.5781[/C][/ROW]
[ROW][C]39[/C][C]2196[/C][C]2280.05[/C][C]1993.96[/C][C]286.089[/C][C]-84.0469[/C][/ROW]
[ROW][C]40[/C][C]1997[/C][C]1906.72[/C][C]1986.63[/C][C]-79.901[/C][C]90.276[/C][/ROW]
[ROW][C]41[/C][C]2199[/C][C]2090.36[/C][C]1985.54[/C][C]104.818[/C][C]108.641[/C][/ROW]
[ROW][C]42[/C][C]1970[/C][C]2124.64[/C][C]2005.33[/C][C]119.307[/C][C]-154.641[/C][/ROW]
[ROW][C]43[/C][C]2239[/C][C]2170.39[/C][C]2039.17[/C][C]131.224[/C][C]68.6094[/C][/ROW]
[ROW][C]44[/C][C]1937[/C][C]2150.67[/C][C]2050.54[/C][C]100.13[/C][C]-213.672[/C][/ROW]
[ROW][C]45[/C][C]1311[/C][C]1487.84[/C][C]2053.33[/C][C]-565.495[/C][C]-176.839[/C][/ROW]
[ROW][C]46[/C][C]2149[/C][C]2084.32[/C][C]2057[/C][C]27.3177[/C][C]64.6823[/C][/ROW]
[ROW][C]47[/C][C]1673[/C][C]1742.83[/C][C]2043.42[/C][C]-300.589[/C][C]-69.8281[/C][/ROW]
[ROW][C]48[/C][C]2378[/C][C]1957.01[/C][C]2055.25[/C][C]-98.2448[/C][C]420.995[/C][/ROW]
[ROW][C]49[/C][C]2770[/C][C]2495.1[/C][C]2067.46[/C][C]427.641[/C][C]274.901[/C][/ROW]
[ROW][C]50[/C][C]1764[/C][C]1911.41[/C][C]2063.71[/C][C]-152.297[/C][C]-147.411[/C][/ROW]
[ROW][C]51[/C][C]2310[/C][C]2364.76[/C][C]2078.67[/C][C]286.089[/C][C]-54.7552[/C][/ROW]
[ROW][C]52[/C][C]1971[/C][C]2001.6[/C][C]2081.5[/C][C]-79.901[/C][C]-30.599[/C][/ROW]
[ROW][C]53[/C][C]1899[/C][C]2186.65[/C][C]2081.83[/C][C]104.818[/C][C]-287.651[/C][/ROW]
[ROW][C]54[/C][C]2554[/C][C]2179.52[/C][C]2060.21[/C][C]119.307[/C][C]374.484[/C][/ROW]
[ROW][C]55[/C][C]1948[/C][C]NA[/C][C]NA[/C][C]131.224[/C][C]NA[/C][/ROW]
[ROW][C]56[/C][C]2138[/C][C]NA[/C][C]NA[/C][C]100.13[/C][C]NA[/C][/ROW]
[ROW][C]57[/C][C]1469[/C][C]NA[/C][C]NA[/C][C]-565.495[/C][C]NA[/C][/ROW]
[ROW][C]58[/C][C]2059[/C][C]NA[/C][C]NA[/C][C]27.3177[/C][C]NA[/C][/ROW]
[ROW][C]59[/C][C]1771[/C][C]NA[/C][C]NA[/C][C]-300.589[/C][C]NA[/C][/ROW]
[ROW][C]60[/C][C]1761[/C][C]NA[/C][C]NA[/C][C]-98.2448[/C][C]NA[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=&T=1

As an alternative you can also use a QR Code:  

The GUIDs for individual cells are displayed in the table below:

Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
12322NANA427.641NA
22347NANA-152.297NA
32963NANA286.089NA
41900NANA-79.901NA
52723NANA104.818NA
62555NANA119.307NA
721762429.432298.21131.224-253.432
824442398.842298.71100.1345.1615
919441715.592281.08-565.495228.411
1020892297.732270.4227.3177-208.734
1119781959.042259.62-300.58918.9635
1220812138.632236.88-98.2448-57.6302
1324352661.852234.21427.641-226.849
1422462087.492239.79-152.297158.505
1526412507.712221.62286.089133.286
1619662129.772209.67-79.901-163.766
1723982317.612212.79104.81880.3906
1823342314.022194.71119.30719.9844
1923332311.932180.71131.22421.0677
2024212271.462171.33100.13149.536
2115311583.172148.67-565.495-52.1719
2222152170.112142.7927.317744.8906
2319271842.082142.67-300.58984.9219
2416982022.342120.58-98.2448-324.339
2524822532.852105.21427.641-50.849
2619741943.832096.12-152.29730.1719
2723692369.82083.71286.089-0.796875
2820971999.222079.12-79.90197.776
2922642171.692066.88104.81892.3073
3019382184.142064.83119.307-246.141
3123602202.562071.33131.224157.443
3221762163.342063.21100.1312.6615
3314781483.712049.21-565.495-5.71354
3421582065.152037.8327.317792.849
3516901730.372030.96-300.589-40.3698
3618861931.342029.58-98.2448-45.3385
3724502453.522025.87427.641-3.51562
3818111858.582010.88-152.297-47.5781
3921962280.051993.96286.089-84.0469
4019971906.721986.63-79.90190.276
4121992090.361985.54104.818108.641
4219702124.642005.33119.307-154.641
4322392170.392039.17131.22468.6094
4419372150.672050.54100.13-213.672
4513111487.842053.33-565.495-176.839
4621492084.32205727.317764.6823
4716731742.832043.42-300.589-69.8281
4823781957.012055.25-98.2448420.995
4927702495.12067.46427.641274.901
5017641911.412063.71-152.297-147.411
5123102364.762078.67286.089-54.7552
5219712001.62081.5-79.901-30.599
5318992186.652081.83104.818-287.651
5425542179.522060.21119.307374.484
551948NANA131.224NA
562138NANA100.13NA
571469NANA-565.495NA
582059NANA27.3177NA
591771NANA-300.589NA
601761NANA-98.2448NA



Parameters (Session):
par1 = additive ; par2 = 12 ;
Parameters (R input):
par1 = additive ; par2 = 12 ;
R code (references can be found in the software module):
par2 <- as.numeric(par2)
x <- ts(x,freq=par2)
m <- decompose(x,type=par1)
m$figure
bitmap(file='test1.png')
plot(m)
dev.off()
mylagmax <- length(x)/2
bitmap(file='test2.png')
op <- par(mfrow = c(2,2))
acf(as.numeric(x),lag.max = mylagmax,main='Observed')
acf(as.numeric(m$trend),na.action=na.pass,lag.max = mylagmax,main='Trend')
acf(as.numeric(m$seasonal),na.action=na.pass,lag.max = mylagmax,main='Seasonal')
acf(as.numeric(m$random),na.action=na.pass,lag.max = mylagmax,main='Random')
par(op)
dev.off()
bitmap(file='test3.png')
op <- par(mfrow = c(2,2))
spectrum(as.numeric(x),main='Observed')
spectrum(as.numeric(m$trend[!is.na(m$trend)]),main='Trend')
spectrum(as.numeric(m$seasonal[!is.na(m$seasonal)]),main='Seasonal')
spectrum(as.numeric(m$random[!is.na(m$random)]),main='Random')
par(op)
dev.off()
bitmap(file='test4.png')
op <- par(mfrow = c(2,2))
cpgram(as.numeric(x),main='Observed')
cpgram(as.numeric(m$trend[!is.na(m$trend)]),main='Trend')
cpgram(as.numeric(m$seasonal[!is.na(m$seasonal)]),main='Seasonal')
cpgram(as.numeric(m$random[!is.na(m$random)]),main='Random')
par(op)
dev.off()
load(file='createtable')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Classical Decomposition by Moving Averages',6,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'t',header=TRUE)
a<-table.element(a,'Observations',header=TRUE)
a<-table.element(a,'Fit',header=TRUE)
a<-table.element(a,'Trend',header=TRUE)
a<-table.element(a,'Seasonal',header=TRUE)
a<-table.element(a,'Random',header=TRUE)
a<-table.row.end(a)
for (i in 1:length(m$trend)) {
a<-table.row.start(a)
a<-table.element(a,i,header=TRUE)
a<-table.element(a,x[i])
if (par1 == 'additive') a<-table.element(a,signif(m$trend[i]+m$seasonal[i],6)) else a<-table.element(a,signif(m$trend[i]*m$seasonal[i],6))
a<-table.element(a,signif(m$trend[i],6))
a<-table.element(a,signif(m$seasonal[i],6))
a<-table.element(a,signif(m$random[i],6))
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable.tab')