Free Statistics

of Irreproducible Research!

Author's title

Author*The author of this computation has been verified*
R Software Modulerwasp_decompose.wasp
Title produced by softwareClassical Decomposition
Date of computationMon, 12 Dec 2016 19:50:37 +0100
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/Dec/12/t1481568649ukvve2zg4du3546.htm/, Retrieved Fri, 03 May 2024 15:33:45 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=298970, Retrieved Fri, 03 May 2024 15:33:45 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact62
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [Classical Decomposition] [classical decompo...] [2016-12-12 18:50:37] [130d73899007e5ff8a4f636b9bcfb397] [Current]
Feedback Forum

Post a new message
Dataseries X:
1000
1583.33
2500
2916.67
3083.33
4062.5
4333.33
4500
3687.5
3333.33
7062.5
9625
7750
7541.67
6166.67
6333.33
10958.33
12000
11333.33
12729.17
9270.83
7833.33
6979.17
6500




Summary of computational transaction
Raw Input view raw input (R code)
Raw Outputview raw output of R engine
Computing time2 seconds
R ServerBig Analytics Cloud Computing Center

\begin{tabular}{lllllllll}
\hline
Summary of computational transaction \tabularnewline
Raw Input view raw input (R code)  \tabularnewline
Raw Outputview raw output of R engine  \tabularnewline
Computing time2 seconds \tabularnewline
R ServerBig Analytics Cloud Computing Center \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=298970&T=0

[TABLE]
[ROW]
Summary of computational transaction[/C][/ROW] [ROW]Raw Input[/C] view raw input (R code) [/C][/ROW] [ROW]Raw Output[/C]view raw output of R engine [/C][/ROW] [ROW]Computing time[/C]2 seconds[/C][/ROW] [ROW]R Server[/C]Big Analytics Cloud Computing Center[/C][/ROW] [/TABLE] Source: https://freestatistics.org/blog/index.php?pk=298970&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=298970&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 Input view raw input (R code)
Raw Outputview raw output of R engine
Computing time2 seconds
R ServerBig Analytics Cloud Computing Center







Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
11000NANA462.53NA
21583.33NANA-380.349NA
32500NANA-2330.87NA
42916.67NANA-2584.35NA
53083.33NANA1856.62NA
64062.5NANA3031.97NA
74333.334278.54255.2123.290454.8321
845004445.174784.72-339.55454.8321
93687.53632.675185.76-1553.154.8321
103333.333278.55480.9-2202.454.8321
117062.57007.675951.391056.2854.8321
1296259570.176610.242959.9354.8321
1377507695.177232.64462.5354.8321
147541.677486.847867.19-380.34954.8321
156166.676111.848442.71-2330.8754.8321
166333.336278.58862.85-2584.3554.8321
1710958.3310903.59046.871856.6254.8321
181200011945.28913.193031.9754.8321
1911333.33NANA23.2904NA
2012729.17NANA-339.554NA
219270.83NANA-1553.1NA
227833.33NANA-2202.4NA
236979.17NANA1056.28NA
246500NANA2959.93NA

\begin{tabular}{lllllllll}
\hline
Classical Decomposition by Moving Averages \tabularnewline
t & Observations & Fit & Trend & Seasonal & Random \tabularnewline
1 & 1000 & NA & NA & 462.53 & NA \tabularnewline
2 & 1583.33 & NA & NA & -380.349 & NA \tabularnewline
3 & 2500 & NA & NA & -2330.87 & NA \tabularnewline
4 & 2916.67 & NA & NA & -2584.35 & NA \tabularnewline
5 & 3083.33 & NA & NA & 1856.62 & NA \tabularnewline
6 & 4062.5 & NA & NA & 3031.97 & NA \tabularnewline
7 & 4333.33 & 4278.5 & 4255.21 & 23.2904 & 54.8321 \tabularnewline
8 & 4500 & 4445.17 & 4784.72 & -339.554 & 54.8321 \tabularnewline
9 & 3687.5 & 3632.67 & 5185.76 & -1553.1 & 54.8321 \tabularnewline
10 & 3333.33 & 3278.5 & 5480.9 & -2202.4 & 54.8321 \tabularnewline
11 & 7062.5 & 7007.67 & 5951.39 & 1056.28 & 54.8321 \tabularnewline
12 & 9625 & 9570.17 & 6610.24 & 2959.93 & 54.8321 \tabularnewline
13 & 7750 & 7695.17 & 7232.64 & 462.53 & 54.8321 \tabularnewline
14 & 7541.67 & 7486.84 & 7867.19 & -380.349 & 54.8321 \tabularnewline
15 & 6166.67 & 6111.84 & 8442.71 & -2330.87 & 54.8321 \tabularnewline
16 & 6333.33 & 6278.5 & 8862.85 & -2584.35 & 54.8321 \tabularnewline
17 & 10958.33 & 10903.5 & 9046.87 & 1856.62 & 54.8321 \tabularnewline
18 & 12000 & 11945.2 & 8913.19 & 3031.97 & 54.8321 \tabularnewline
19 & 11333.33 & NA & NA & 23.2904 & NA \tabularnewline
20 & 12729.17 & NA & NA & -339.554 & NA \tabularnewline
21 & 9270.83 & NA & NA & -1553.1 & NA \tabularnewline
22 & 7833.33 & NA & NA & -2202.4 & NA \tabularnewline
23 & 6979.17 & NA & NA & 1056.28 & NA \tabularnewline
24 & 6500 & NA & NA & 2959.93 & NA \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=298970&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]1000[/C][C]NA[/C][C]NA[/C][C]462.53[/C][C]NA[/C][/ROW]
[ROW][C]2[/C][C]1583.33[/C][C]NA[/C][C]NA[/C][C]-380.349[/C][C]NA[/C][/ROW]
[ROW][C]3[/C][C]2500[/C][C]NA[/C][C]NA[/C][C]-2330.87[/C][C]NA[/C][/ROW]
[ROW][C]4[/C][C]2916.67[/C][C]NA[/C][C]NA[/C][C]-2584.35[/C][C]NA[/C][/ROW]
[ROW][C]5[/C][C]3083.33[/C][C]NA[/C][C]NA[/C][C]1856.62[/C][C]NA[/C][/ROW]
[ROW][C]6[/C][C]4062.5[/C][C]NA[/C][C]NA[/C][C]3031.97[/C][C]NA[/C][/ROW]
[ROW][C]7[/C][C]4333.33[/C][C]4278.5[/C][C]4255.21[/C][C]23.2904[/C][C]54.8321[/C][/ROW]
[ROW][C]8[/C][C]4500[/C][C]4445.17[/C][C]4784.72[/C][C]-339.554[/C][C]54.8321[/C][/ROW]
[ROW][C]9[/C][C]3687.5[/C][C]3632.67[/C][C]5185.76[/C][C]-1553.1[/C][C]54.8321[/C][/ROW]
[ROW][C]10[/C][C]3333.33[/C][C]3278.5[/C][C]5480.9[/C][C]-2202.4[/C][C]54.8321[/C][/ROW]
[ROW][C]11[/C][C]7062.5[/C][C]7007.67[/C][C]5951.39[/C][C]1056.28[/C][C]54.8321[/C][/ROW]
[ROW][C]12[/C][C]9625[/C][C]9570.17[/C][C]6610.24[/C][C]2959.93[/C][C]54.8321[/C][/ROW]
[ROW][C]13[/C][C]7750[/C][C]7695.17[/C][C]7232.64[/C][C]462.53[/C][C]54.8321[/C][/ROW]
[ROW][C]14[/C][C]7541.67[/C][C]7486.84[/C][C]7867.19[/C][C]-380.349[/C][C]54.8321[/C][/ROW]
[ROW][C]15[/C][C]6166.67[/C][C]6111.84[/C][C]8442.71[/C][C]-2330.87[/C][C]54.8321[/C][/ROW]
[ROW][C]16[/C][C]6333.33[/C][C]6278.5[/C][C]8862.85[/C][C]-2584.35[/C][C]54.8321[/C][/ROW]
[ROW][C]17[/C][C]10958.33[/C][C]10903.5[/C][C]9046.87[/C][C]1856.62[/C][C]54.8321[/C][/ROW]
[ROW][C]18[/C][C]12000[/C][C]11945.2[/C][C]8913.19[/C][C]3031.97[/C][C]54.8321[/C][/ROW]
[ROW][C]19[/C][C]11333.33[/C][C]NA[/C][C]NA[/C][C]23.2904[/C][C]NA[/C][/ROW]
[ROW][C]20[/C][C]12729.17[/C][C]NA[/C][C]NA[/C][C]-339.554[/C][C]NA[/C][/ROW]
[ROW][C]21[/C][C]9270.83[/C][C]NA[/C][C]NA[/C][C]-1553.1[/C][C]NA[/C][/ROW]
[ROW][C]22[/C][C]7833.33[/C][C]NA[/C][C]NA[/C][C]-2202.4[/C][C]NA[/C][/ROW]
[ROW][C]23[/C][C]6979.17[/C][C]NA[/C][C]NA[/C][C]1056.28[/C][C]NA[/C][/ROW]
[ROW][C]24[/C][C]6500[/C][C]NA[/C][C]NA[/C][C]2959.93[/C][C]NA[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=298970&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=298970&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
11000NANA462.53NA
21583.33NANA-380.349NA
32500NANA-2330.87NA
42916.67NANA-2584.35NA
53083.33NANA1856.62NA
64062.5NANA3031.97NA
74333.334278.54255.2123.290454.8321
845004445.174784.72-339.55454.8321
93687.53632.675185.76-1553.154.8321
103333.333278.55480.9-2202.454.8321
117062.57007.675951.391056.2854.8321
1296259570.176610.242959.9354.8321
1377507695.177232.64462.5354.8321
147541.677486.847867.19-380.34954.8321
156166.676111.848442.71-2330.8754.8321
166333.336278.58862.85-2584.3554.8321
1710958.3310903.59046.871856.6254.8321
181200011945.28913.193031.9754.8321
1911333.33NANA23.2904NA
2012729.17NANA-339.554NA
219270.83NANA-1553.1NA
227833.33NANA-2202.4NA
236979.17NANA1056.28NA
246500NANA2959.93NA



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')