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, 19 Dec 2016 12:38: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/19/t1482147537eym10q5nx4d0fnu.htm/, Retrieved Tue, 21 May 2024 06:03:08 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=301306, Retrieved Tue, 21 May 2024 06:03:08 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact113
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [Classical Decomposition] [n1176..] [2016-12-19 11:38:20] [b7f10b15eba379294ac5bdad7f2e1205] [Current]
Feedback Forum

Post a new message
Dataseries X:
1788
1936
3952
2476
1980
2208
4354
2760
1948
2328
4732
3072
1974
2916
5932
3502




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=301306&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
11788NANA-966.833NA
21936NANA-575.417NA
339524145.7525621583.75-193.75
424762578.52620-41.5-102.5
519801737.422704.25-966.833242.583
622082214.582790-575.417-6.58333
743544405.252821.51583.75-51.25
8276027912832.5-41.5-31
919481927.922894.75-966.83320.0833
1023282405.582981-575.417-77.5833
11473246073023.251583.75125
1230723058.53100-41.513.5
1319742356.673323.5-966.833-382.667
1429162951.833527.25-575.417-35.8333
155932NANA1583.75NA
163502NANA-41.5NA

\begin{tabular}{lllllllll}
\hline
Classical Decomposition by Moving Averages \tabularnewline
t & Observations & Fit & Trend & Seasonal & Random \tabularnewline
1 & 1788 & NA & NA & -966.833 & NA \tabularnewline
2 & 1936 & NA & NA & -575.417 & NA \tabularnewline
3 & 3952 & 4145.75 & 2562 & 1583.75 & -193.75 \tabularnewline
4 & 2476 & 2578.5 & 2620 & -41.5 & -102.5 \tabularnewline
5 & 1980 & 1737.42 & 2704.25 & -966.833 & 242.583 \tabularnewline
6 & 2208 & 2214.58 & 2790 & -575.417 & -6.58333 \tabularnewline
7 & 4354 & 4405.25 & 2821.5 & 1583.75 & -51.25 \tabularnewline
8 & 2760 & 2791 & 2832.5 & -41.5 & -31 \tabularnewline
9 & 1948 & 1927.92 & 2894.75 & -966.833 & 20.0833 \tabularnewline
10 & 2328 & 2405.58 & 2981 & -575.417 & -77.5833 \tabularnewline
11 & 4732 & 4607 & 3023.25 & 1583.75 & 125 \tabularnewline
12 & 3072 & 3058.5 & 3100 & -41.5 & 13.5 \tabularnewline
13 & 1974 & 2356.67 & 3323.5 & -966.833 & -382.667 \tabularnewline
14 & 2916 & 2951.83 & 3527.25 & -575.417 & -35.8333 \tabularnewline
15 & 5932 & NA & NA & 1583.75 & NA \tabularnewline
16 & 3502 & NA & NA & -41.5 & NA \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=301306&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]1788[/C][C]NA[/C][C]NA[/C][C]-966.833[/C][C]NA[/C][/ROW]
[ROW][C]2[/C][C]1936[/C][C]NA[/C][C]NA[/C][C]-575.417[/C][C]NA[/C][/ROW]
[ROW][C]3[/C][C]3952[/C][C]4145.75[/C][C]2562[/C][C]1583.75[/C][C]-193.75[/C][/ROW]
[ROW][C]4[/C][C]2476[/C][C]2578.5[/C][C]2620[/C][C]-41.5[/C][C]-102.5[/C][/ROW]
[ROW][C]5[/C][C]1980[/C][C]1737.42[/C][C]2704.25[/C][C]-966.833[/C][C]242.583[/C][/ROW]
[ROW][C]6[/C][C]2208[/C][C]2214.58[/C][C]2790[/C][C]-575.417[/C][C]-6.58333[/C][/ROW]
[ROW][C]7[/C][C]4354[/C][C]4405.25[/C][C]2821.5[/C][C]1583.75[/C][C]-51.25[/C][/ROW]
[ROW][C]8[/C][C]2760[/C][C]2791[/C][C]2832.5[/C][C]-41.5[/C][C]-31[/C][/ROW]
[ROW][C]9[/C][C]1948[/C][C]1927.92[/C][C]2894.75[/C][C]-966.833[/C][C]20.0833[/C][/ROW]
[ROW][C]10[/C][C]2328[/C][C]2405.58[/C][C]2981[/C][C]-575.417[/C][C]-77.5833[/C][/ROW]
[ROW][C]11[/C][C]4732[/C][C]4607[/C][C]3023.25[/C][C]1583.75[/C][C]125[/C][/ROW]
[ROW][C]12[/C][C]3072[/C][C]3058.5[/C][C]3100[/C][C]-41.5[/C][C]13.5[/C][/ROW]
[ROW][C]13[/C][C]1974[/C][C]2356.67[/C][C]3323.5[/C][C]-966.833[/C][C]-382.667[/C][/ROW]
[ROW][C]14[/C][C]2916[/C][C]2951.83[/C][C]3527.25[/C][C]-575.417[/C][C]-35.8333[/C][/ROW]
[ROW][C]15[/C][C]5932[/C][C]NA[/C][C]NA[/C][C]1583.75[/C][C]NA[/C][/ROW]
[ROW][C]16[/C][C]3502[/C][C]NA[/C][C]NA[/C][C]-41.5[/C][C]NA[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=301306&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=301306&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
11788NANA-966.833NA
21936NANA-575.417NA
339524145.7525621583.75-193.75
424762578.52620-41.5-102.5
519801737.422704.25-966.833242.583
622082214.582790-575.417-6.58333
743544405.252821.51583.75-51.25
8276027912832.5-41.5-31
919481927.922894.75-966.83320.0833
1023282405.582981-575.417-77.5833
11473246073023.251583.75125
1230723058.53100-41.513.5
1319742356.673323.5-966.833-382.667
1429162951.833527.25-575.417-35.8333
155932NANA1583.75NA
163502NANA-41.5NA



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