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 computationFri, 14 Nov 2014 14:32:19 +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/2014/Nov/14/t14159755666gdwx5t7q9odv90.htm/, Retrieved Sun, 19 May 2024 12:57:03 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=254790, Retrieved Sun, 19 May 2024 12:57:03 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact82
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [Classical Decomposition] [] [2014-11-14 14:32:19] [c4557137b9b718365486b3b7af9cd43b] [Current]
Feedback Forum

Post a new message
Dataseries X:
26,6
25,0
24,2
24,2
24,8
24,5
24,3
21,6
22,4
23,5
23,4
23,4
23,0
22,0
21,7
22,2
22,8
22,2
19,9
16,1
15,8
16,8
18,4
19,3
18,6




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 seconds
R Server'Sir Maurice George Kendall' @ kendall.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 & 2 seconds \tabularnewline
R Server & 'Sir Maurice George Kendall' @ kendall.wessa.net \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=254790&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]2 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'Sir Maurice George Kendall' @ kendall.wessa.net[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=254790&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=254790&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 time2 seconds
R Server'Sir Maurice George Kendall' @ kendall.wessa.net







Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
126.6NANA0.0944444NA
225NANA-0.493056NA
324.2NANA-0.288889NA
424.2NANA0.765278NA
524.8NANA1.85278NA
624.5NANA1.63194NA
724.323.723623.8417-0.1180560.576389
821.621.219423.5667-2.347220.380556
922.422.019423.3375-1.318060.380556
1023.523.119423.15-0.03055560.380556
1123.423.019422.98330.03611110.380556
1223.423.019422.80420.2152780.380556
132322.619422.5250.09444440.380556
142221.619422.1125-0.4930560.380556
1521.721.319421.6083-0.2888890.380556
1622.221.819421.05420.7652780.380556
1722.822.419420.56671.852780.380556
1822.221.819420.18751.631940.380556
1919.919.715319.8333-0.1180560.184722
2016.1NANA-2.34722NA
2115.8NANA-1.31806NA
2216.8NANA-0.0305556NA
2318.4NANA0.0361111NA
2419.3NANA0.215278NA
2518.6NANA0.0944444NA

\begin{tabular}{lllllllll}
\hline
Classical Decomposition by Moving Averages \tabularnewline
t & Observations & Fit & Trend & Seasonal & Random \tabularnewline
1 & 26.6 & NA & NA & 0.0944444 & NA \tabularnewline
2 & 25 & NA & NA & -0.493056 & NA \tabularnewline
3 & 24.2 & NA & NA & -0.288889 & NA \tabularnewline
4 & 24.2 & NA & NA & 0.765278 & NA \tabularnewline
5 & 24.8 & NA & NA & 1.85278 & NA \tabularnewline
6 & 24.5 & NA & NA & 1.63194 & NA \tabularnewline
7 & 24.3 & 23.7236 & 23.8417 & -0.118056 & 0.576389 \tabularnewline
8 & 21.6 & 21.2194 & 23.5667 & -2.34722 & 0.380556 \tabularnewline
9 & 22.4 & 22.0194 & 23.3375 & -1.31806 & 0.380556 \tabularnewline
10 & 23.5 & 23.1194 & 23.15 & -0.0305556 & 0.380556 \tabularnewline
11 & 23.4 & 23.0194 & 22.9833 & 0.0361111 & 0.380556 \tabularnewline
12 & 23.4 & 23.0194 & 22.8042 & 0.215278 & 0.380556 \tabularnewline
13 & 23 & 22.6194 & 22.525 & 0.0944444 & 0.380556 \tabularnewline
14 & 22 & 21.6194 & 22.1125 & -0.493056 & 0.380556 \tabularnewline
15 & 21.7 & 21.3194 & 21.6083 & -0.288889 & 0.380556 \tabularnewline
16 & 22.2 & 21.8194 & 21.0542 & 0.765278 & 0.380556 \tabularnewline
17 & 22.8 & 22.4194 & 20.5667 & 1.85278 & 0.380556 \tabularnewline
18 & 22.2 & 21.8194 & 20.1875 & 1.63194 & 0.380556 \tabularnewline
19 & 19.9 & 19.7153 & 19.8333 & -0.118056 & 0.184722 \tabularnewline
20 & 16.1 & NA & NA & -2.34722 & NA \tabularnewline
21 & 15.8 & NA & NA & -1.31806 & NA \tabularnewline
22 & 16.8 & NA & NA & -0.0305556 & NA \tabularnewline
23 & 18.4 & NA & NA & 0.0361111 & NA \tabularnewline
24 & 19.3 & NA & NA & 0.215278 & NA \tabularnewline
25 & 18.6 & NA & NA & 0.0944444 & NA \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=254790&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]26.6[/C][C]NA[/C][C]NA[/C][C]0.0944444[/C][C]NA[/C][/ROW]
[ROW][C]2[/C][C]25[/C][C]NA[/C][C]NA[/C][C]-0.493056[/C][C]NA[/C][/ROW]
[ROW][C]3[/C][C]24.2[/C][C]NA[/C][C]NA[/C][C]-0.288889[/C][C]NA[/C][/ROW]
[ROW][C]4[/C][C]24.2[/C][C]NA[/C][C]NA[/C][C]0.765278[/C][C]NA[/C][/ROW]
[ROW][C]5[/C][C]24.8[/C][C]NA[/C][C]NA[/C][C]1.85278[/C][C]NA[/C][/ROW]
[ROW][C]6[/C][C]24.5[/C][C]NA[/C][C]NA[/C][C]1.63194[/C][C]NA[/C][/ROW]
[ROW][C]7[/C][C]24.3[/C][C]23.7236[/C][C]23.8417[/C][C]-0.118056[/C][C]0.576389[/C][/ROW]
[ROW][C]8[/C][C]21.6[/C][C]21.2194[/C][C]23.5667[/C][C]-2.34722[/C][C]0.380556[/C][/ROW]
[ROW][C]9[/C][C]22.4[/C][C]22.0194[/C][C]23.3375[/C][C]-1.31806[/C][C]0.380556[/C][/ROW]
[ROW][C]10[/C][C]23.5[/C][C]23.1194[/C][C]23.15[/C][C]-0.0305556[/C][C]0.380556[/C][/ROW]
[ROW][C]11[/C][C]23.4[/C][C]23.0194[/C][C]22.9833[/C][C]0.0361111[/C][C]0.380556[/C][/ROW]
[ROW][C]12[/C][C]23.4[/C][C]23.0194[/C][C]22.8042[/C][C]0.215278[/C][C]0.380556[/C][/ROW]
[ROW][C]13[/C][C]23[/C][C]22.6194[/C][C]22.525[/C][C]0.0944444[/C][C]0.380556[/C][/ROW]
[ROW][C]14[/C][C]22[/C][C]21.6194[/C][C]22.1125[/C][C]-0.493056[/C][C]0.380556[/C][/ROW]
[ROW][C]15[/C][C]21.7[/C][C]21.3194[/C][C]21.6083[/C][C]-0.288889[/C][C]0.380556[/C][/ROW]
[ROW][C]16[/C][C]22.2[/C][C]21.8194[/C][C]21.0542[/C][C]0.765278[/C][C]0.380556[/C][/ROW]
[ROW][C]17[/C][C]22.8[/C][C]22.4194[/C][C]20.5667[/C][C]1.85278[/C][C]0.380556[/C][/ROW]
[ROW][C]18[/C][C]22.2[/C][C]21.8194[/C][C]20.1875[/C][C]1.63194[/C][C]0.380556[/C][/ROW]
[ROW][C]19[/C][C]19.9[/C][C]19.7153[/C][C]19.8333[/C][C]-0.118056[/C][C]0.184722[/C][/ROW]
[ROW][C]20[/C][C]16.1[/C][C]NA[/C][C]NA[/C][C]-2.34722[/C][C]NA[/C][/ROW]
[ROW][C]21[/C][C]15.8[/C][C]NA[/C][C]NA[/C][C]-1.31806[/C][C]NA[/C][/ROW]
[ROW][C]22[/C][C]16.8[/C][C]NA[/C][C]NA[/C][C]-0.0305556[/C][C]NA[/C][/ROW]
[ROW][C]23[/C][C]18.4[/C][C]NA[/C][C]NA[/C][C]0.0361111[/C][C]NA[/C][/ROW]
[ROW][C]24[/C][C]19.3[/C][C]NA[/C][C]NA[/C][C]0.215278[/C][C]NA[/C][/ROW]
[ROW][C]25[/C][C]18.6[/C][C]NA[/C][C]NA[/C][C]0.0944444[/C][C]NA[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=254790&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=254790&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
126.6NANA0.0944444NA
225NANA-0.493056NA
324.2NANA-0.288889NA
424.2NANA0.765278NA
524.8NANA1.85278NA
624.5NANA1.63194NA
724.323.723623.8417-0.1180560.576389
821.621.219423.5667-2.347220.380556
922.422.019423.3375-1.318060.380556
1023.523.119423.15-0.03055560.380556
1123.423.019422.98330.03611110.380556
1223.423.019422.80420.2152780.380556
132322.619422.5250.09444440.380556
142221.619422.1125-0.4930560.380556
1521.721.319421.6083-0.2888890.380556
1622.221.819421.05420.7652780.380556
1722.822.419420.56671.852780.380556
1822.221.819420.18751.631940.380556
1919.919.715319.8333-0.1180560.184722
2016.1NANA-2.34722NA
2115.8NANA-1.31806NA
2216.8NANA-0.0305556NA
2318.4NANA0.0361111NA
2419.3NANA0.215278NA
2518.6NANA0.0944444NA



Parameters (Session):
par1 = additive ; par2 = 12 ;
Parameters (R input):
par1 = additive ; par2 = 12 ;
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')