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 computationThu, 15 Dec 2016 10:00:20 +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/15/t1481793680qasuac1654sn1pf.htm/, Retrieved Sat, 18 May 2024 05:44:05 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=299783, Retrieved Sat, 18 May 2024 05:44:05 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywordsf1competitie
Estimated Impact111
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [Classical Decomposition] [Classical Decompo...] [2016-12-15 09:00:20] [d92250bd36540c2281a4ec15b45df1dd] [Current]
Feedback Forum

Post a new message
Dataseries X:
649
655
618
640
707
730
768
753
773
797
810
794
809
828
828
849
865
879
908
961




Summary of computational transaction
Raw Input view raw input (R code)
Raw Outputview raw output of R engine
Computing time1 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 time1 seconds \tabularnewline
R ServerBig Analytics Cloud Computing Center \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=299783&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]1 seconds[/C][/ROW] [ROW]R Server[/C]Big Analytics Cloud Computing Center[/C][/ROW] [/TABLE] Source: https://freestatistics.org/blog/index.php?pk=299783&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=299783&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 time1 seconds
R ServerBig Analytics Cloud Computing Center







Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
1649NANA3.80469NA
2655NANA4.71094NA
3618648.867647.751.11719-30.8672
4640654.742664.375-9.63281-14.7422
5707696.305692.53.8046910.6953
6730730.086725.3754.71094-0.0859375
7768748.867747.751.1171919.1328
8753754.742764.375-9.63281-1.74219
9773781.8057783.80469-8.80469
10797793.086788.3754.710943.91406
11810799.1177981.1171910.8828
12794796.742806.375-9.63281-2.74219
13809816.305812.53.80469-7.30469
14828826.336821.6254.710941.66406
15828836.617835.51.11719-8.61719
16849839.242848.875-9.632819.75781
17865869.055865.253.80469-4.05469
18879893.961889.254.71094-14.9609
19908NANA1.11719NA
20961NANA-9.63281NA

\begin{tabular}{lllllllll}
\hline
Classical Decomposition by Moving Averages \tabularnewline
t & Observations & Fit & Trend & Seasonal & Random \tabularnewline
1 & 649 & NA & NA & 3.80469 & NA \tabularnewline
2 & 655 & NA & NA & 4.71094 & NA \tabularnewline
3 & 618 & 648.867 & 647.75 & 1.11719 & -30.8672 \tabularnewline
4 & 640 & 654.742 & 664.375 & -9.63281 & -14.7422 \tabularnewline
5 & 707 & 696.305 & 692.5 & 3.80469 & 10.6953 \tabularnewline
6 & 730 & 730.086 & 725.375 & 4.71094 & -0.0859375 \tabularnewline
7 & 768 & 748.867 & 747.75 & 1.11719 & 19.1328 \tabularnewline
8 & 753 & 754.742 & 764.375 & -9.63281 & -1.74219 \tabularnewline
9 & 773 & 781.805 & 778 & 3.80469 & -8.80469 \tabularnewline
10 & 797 & 793.086 & 788.375 & 4.71094 & 3.91406 \tabularnewline
11 & 810 & 799.117 & 798 & 1.11719 & 10.8828 \tabularnewline
12 & 794 & 796.742 & 806.375 & -9.63281 & -2.74219 \tabularnewline
13 & 809 & 816.305 & 812.5 & 3.80469 & -7.30469 \tabularnewline
14 & 828 & 826.336 & 821.625 & 4.71094 & 1.66406 \tabularnewline
15 & 828 & 836.617 & 835.5 & 1.11719 & -8.61719 \tabularnewline
16 & 849 & 839.242 & 848.875 & -9.63281 & 9.75781 \tabularnewline
17 & 865 & 869.055 & 865.25 & 3.80469 & -4.05469 \tabularnewline
18 & 879 & 893.961 & 889.25 & 4.71094 & -14.9609 \tabularnewline
19 & 908 & NA & NA & 1.11719 & NA \tabularnewline
20 & 961 & NA & NA & -9.63281 & NA \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=299783&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]649[/C][C]NA[/C][C]NA[/C][C]3.80469[/C][C]NA[/C][/ROW]
[ROW][C]2[/C][C]655[/C][C]NA[/C][C]NA[/C][C]4.71094[/C][C]NA[/C][/ROW]
[ROW][C]3[/C][C]618[/C][C]648.867[/C][C]647.75[/C][C]1.11719[/C][C]-30.8672[/C][/ROW]
[ROW][C]4[/C][C]640[/C][C]654.742[/C][C]664.375[/C][C]-9.63281[/C][C]-14.7422[/C][/ROW]
[ROW][C]5[/C][C]707[/C][C]696.305[/C][C]692.5[/C][C]3.80469[/C][C]10.6953[/C][/ROW]
[ROW][C]6[/C][C]730[/C][C]730.086[/C][C]725.375[/C][C]4.71094[/C][C]-0.0859375[/C][/ROW]
[ROW][C]7[/C][C]768[/C][C]748.867[/C][C]747.75[/C][C]1.11719[/C][C]19.1328[/C][/ROW]
[ROW][C]8[/C][C]753[/C][C]754.742[/C][C]764.375[/C][C]-9.63281[/C][C]-1.74219[/C][/ROW]
[ROW][C]9[/C][C]773[/C][C]781.805[/C][C]778[/C][C]3.80469[/C][C]-8.80469[/C][/ROW]
[ROW][C]10[/C][C]797[/C][C]793.086[/C][C]788.375[/C][C]4.71094[/C][C]3.91406[/C][/ROW]
[ROW][C]11[/C][C]810[/C][C]799.117[/C][C]798[/C][C]1.11719[/C][C]10.8828[/C][/ROW]
[ROW][C]12[/C][C]794[/C][C]796.742[/C][C]806.375[/C][C]-9.63281[/C][C]-2.74219[/C][/ROW]
[ROW][C]13[/C][C]809[/C][C]816.305[/C][C]812.5[/C][C]3.80469[/C][C]-7.30469[/C][/ROW]
[ROW][C]14[/C][C]828[/C][C]826.336[/C][C]821.625[/C][C]4.71094[/C][C]1.66406[/C][/ROW]
[ROW][C]15[/C][C]828[/C][C]836.617[/C][C]835.5[/C][C]1.11719[/C][C]-8.61719[/C][/ROW]
[ROW][C]16[/C][C]849[/C][C]839.242[/C][C]848.875[/C][C]-9.63281[/C][C]9.75781[/C][/ROW]
[ROW][C]17[/C][C]865[/C][C]869.055[/C][C]865.25[/C][C]3.80469[/C][C]-4.05469[/C][/ROW]
[ROW][C]18[/C][C]879[/C][C]893.961[/C][C]889.25[/C][C]4.71094[/C][C]-14.9609[/C][/ROW]
[ROW][C]19[/C][C]908[/C][C]NA[/C][C]NA[/C][C]1.11719[/C][C]NA[/C][/ROW]
[ROW][C]20[/C][C]961[/C][C]NA[/C][C]NA[/C][C]-9.63281[/C][C]NA[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=299783&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=299783&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
1649NANA3.80469NA
2655NANA4.71094NA
3618648.867647.751.11719-30.8672
4640654.742664.375-9.63281-14.7422
5707696.305692.53.8046910.6953
6730730.086725.3754.71094-0.0859375
7768748.867747.751.1171919.1328
8753754.742764.375-9.63281-1.74219
9773781.8057783.80469-8.80469
10797793.086788.3754.710943.91406
11810799.1177981.1171910.8828
12794796.742806.375-9.63281-2.74219
13809816.305812.53.80469-7.30469
14828826.336821.6254.710941.66406
15828836.617835.51.11719-8.61719
16849839.242848.875-9.632819.75781
17865869.055865.253.80469-4.05469
18879893.961889.254.71094-14.9609
19908NANA1.11719NA
20961NANA-9.63281NA



Parameters (Session):
par4 = 12 ;
Parameters (R input):
par1 = additive ; par2 = 4 ;
R code (references can be found in the software module):
par2 <- '12'
par1 <- 'additive'
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')