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 computationSat, 17 Dec 2016 14:14:25 +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/17/t1481980471u9qtcyqp2vcw2vl.htm/, Retrieved Thu, 02 May 2024 06:50:09 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=300772, Retrieved Thu, 02 May 2024 06:50:09 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact55
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [Classical Decomposition] [] [2016-12-17 13:14:25] [6e17bb30248b72d8119c893128a7a697] [Current]
Feedback Forum

Post a new message
Dataseries X:
3228
3480.8
3621.8
3667.6
3458.4
3594.2
3780.8
3807.8
3595.4
3798
3966
3985.4
3755.4
3972
4189.6
4142.8




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=300772&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=300772&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=300772&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
13228NANA-168.975NA
23480.8NANA-27.4333NA
33621.83632.413528.35104.058-10.6083
43667.63663.683571.3292.353.925
53458.43436.43605.38-168.97522
63594.23615.343642.78-27.4333-21.1417
73780.83781.483677.42104.058-0.683333
83807.83812.383720.0292.35-4.575
93595.43599.683768.65-168.975-4.275
1037983786.573814-27.433311.4333
1139663960.263856.2104.0585.74167
123985.43990.33897.9592.35-4.9
133755.43778.683947.65-168.975-23.275
1439723967.843995.28-27.43334.15833
154189.6NANA104.058NA
164142.8NANA92.35NA

\begin{tabular}{lllllllll}
\hline
Classical Decomposition by Moving Averages \tabularnewline
t & Observations & Fit & Trend & Seasonal & Random \tabularnewline
1 & 3228 & NA & NA & -168.975 & NA \tabularnewline
2 & 3480.8 & NA & NA & -27.4333 & NA \tabularnewline
3 & 3621.8 & 3632.41 & 3528.35 & 104.058 & -10.6083 \tabularnewline
4 & 3667.6 & 3663.68 & 3571.32 & 92.35 & 3.925 \tabularnewline
5 & 3458.4 & 3436.4 & 3605.38 & -168.975 & 22 \tabularnewline
6 & 3594.2 & 3615.34 & 3642.78 & -27.4333 & -21.1417 \tabularnewline
7 & 3780.8 & 3781.48 & 3677.42 & 104.058 & -0.683333 \tabularnewline
8 & 3807.8 & 3812.38 & 3720.02 & 92.35 & -4.575 \tabularnewline
9 & 3595.4 & 3599.68 & 3768.65 & -168.975 & -4.275 \tabularnewline
10 & 3798 & 3786.57 & 3814 & -27.4333 & 11.4333 \tabularnewline
11 & 3966 & 3960.26 & 3856.2 & 104.058 & 5.74167 \tabularnewline
12 & 3985.4 & 3990.3 & 3897.95 & 92.35 & -4.9 \tabularnewline
13 & 3755.4 & 3778.68 & 3947.65 & -168.975 & -23.275 \tabularnewline
14 & 3972 & 3967.84 & 3995.28 & -27.4333 & 4.15833 \tabularnewline
15 & 4189.6 & NA & NA & 104.058 & NA \tabularnewline
16 & 4142.8 & NA & NA & 92.35 & NA \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=300772&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]3228[/C][C]NA[/C][C]NA[/C][C]-168.975[/C][C]NA[/C][/ROW]
[ROW][C]2[/C][C]3480.8[/C][C]NA[/C][C]NA[/C][C]-27.4333[/C][C]NA[/C][/ROW]
[ROW][C]3[/C][C]3621.8[/C][C]3632.41[/C][C]3528.35[/C][C]104.058[/C][C]-10.6083[/C][/ROW]
[ROW][C]4[/C][C]3667.6[/C][C]3663.68[/C][C]3571.32[/C][C]92.35[/C][C]3.925[/C][/ROW]
[ROW][C]5[/C][C]3458.4[/C][C]3436.4[/C][C]3605.38[/C][C]-168.975[/C][C]22[/C][/ROW]
[ROW][C]6[/C][C]3594.2[/C][C]3615.34[/C][C]3642.78[/C][C]-27.4333[/C][C]-21.1417[/C][/ROW]
[ROW][C]7[/C][C]3780.8[/C][C]3781.48[/C][C]3677.42[/C][C]104.058[/C][C]-0.683333[/C][/ROW]
[ROW][C]8[/C][C]3807.8[/C][C]3812.38[/C][C]3720.02[/C][C]92.35[/C][C]-4.575[/C][/ROW]
[ROW][C]9[/C][C]3595.4[/C][C]3599.68[/C][C]3768.65[/C][C]-168.975[/C][C]-4.275[/C][/ROW]
[ROW][C]10[/C][C]3798[/C][C]3786.57[/C][C]3814[/C][C]-27.4333[/C][C]11.4333[/C][/ROW]
[ROW][C]11[/C][C]3966[/C][C]3960.26[/C][C]3856.2[/C][C]104.058[/C][C]5.74167[/C][/ROW]
[ROW][C]12[/C][C]3985.4[/C][C]3990.3[/C][C]3897.95[/C][C]92.35[/C][C]-4.9[/C][/ROW]
[ROW][C]13[/C][C]3755.4[/C][C]3778.68[/C][C]3947.65[/C][C]-168.975[/C][C]-23.275[/C][/ROW]
[ROW][C]14[/C][C]3972[/C][C]3967.84[/C][C]3995.28[/C][C]-27.4333[/C][C]4.15833[/C][/ROW]
[ROW][C]15[/C][C]4189.6[/C][C]NA[/C][C]NA[/C][C]104.058[/C][C]NA[/C][/ROW]
[ROW][C]16[/C][C]4142.8[/C][C]NA[/C][C]NA[/C][C]92.35[/C][C]NA[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=300772&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=300772&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
13228NANA-168.975NA
23480.8NANA-27.4333NA
33621.83632.413528.35104.058-10.6083
43667.63663.683571.3292.353.925
53458.43436.43605.38-168.97522
63594.23615.343642.78-27.4333-21.1417
73780.83781.483677.42104.058-0.683333
83807.83812.383720.0292.35-4.575
93595.43599.683768.65-168.975-4.275
1037983786.573814-27.433311.4333
1139663960.263856.2104.0585.74167
123985.43990.33897.9592.35-4.9
133755.43778.683947.65-168.975-23.275
1439723967.843995.28-27.43334.15833
154189.6NANA104.058NA
164142.8NANA92.35NA



Parameters (Session):
par1 = FALSE ; par2 = 1 ; par3 = 1 ; par4 = 0 ; par5 = 4 ; par6 = 3 ; par7 = 1 ; par8 = 2 ; par9 = 1 ;
Parameters (R input):
par1 = additive ; par2 = 4 ;
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')