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, 22 Jan 2016 09:34:53 +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/2016/Jan/22/t1453455323whome00djgs8mhy.htm/, Retrieved Tue, 07 May 2024 04:43:14 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=290840, Retrieved Tue, 07 May 2024 04:43:14 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact64
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [Classical Decomposition] [vraag 6 clasical ...] [2016-01-22 09:34:53] [f12d840abf8f1e86044c0db0de22a744] [Current]
Feedback Forum

Post a new message
Dataseries X:
0.7923
-2.468
-2.996
3.119
0.04315
0.731
2.45
2.119
-1.429
-1.644
-3.065
-1.461
1.141
1.329
0.3396
0.8429
2.225
-1.924
0.4999
-0.6433




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=290840&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 time1 seconds
R Server'Gwilym Jenkins' @ jenkins.wessa.net







Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
10.7923NANA-0.101018NA
2-2.468-1.68391-1.784920.101018-0.784093
3-2.996-1.43627-1.33525-0.101018-1.55973
43.1190.9223060.8212880.1010182.19669
50.043150.8830570.984075-0.101018-0.839907
60.7311.089810.9887870.101018-0.358806
72.451.836481.9375-0.1010180.613518
82.1191.415771.314750.1010180.703232
9-1.429-0.696768-0.59575-0.101018-0.732232
10-1.644-1.84448-1.94550.1010180.200482
11-3.065-2.40977-2.30875-0.101018-0.655232
12-1.461-1.11048-1.21150.101018-0.350518
131.1410.4364820.5375-0.1010180.704518
141.3291.135671.034650.1010180.193332
150.33960.6117570.712775-0.101018-0.272157
160.84291.163621.06260.101018-0.320718
172.2250.7412070.842225-0.1010181.48379
18-1.924-0.179757-0.2807750.101018-1.74424
190.4999-0.492893-0.391875-0.1010180.992793
20-0.6433NANA0.101018NA

\begin{tabular}{lllllllll}
\hline
Classical Decomposition by Moving Averages \tabularnewline
t & Observations & Fit & Trend & Seasonal & Random \tabularnewline
1 & 0.7923 & NA & NA & -0.101018 & NA \tabularnewline
2 & -2.468 & -1.68391 & -1.78492 & 0.101018 & -0.784093 \tabularnewline
3 & -2.996 & -1.43627 & -1.33525 & -0.101018 & -1.55973 \tabularnewline
4 & 3.119 & 0.922306 & 0.821288 & 0.101018 & 2.19669 \tabularnewline
5 & 0.04315 & 0.883057 & 0.984075 & -0.101018 & -0.839907 \tabularnewline
6 & 0.731 & 1.08981 & 0.988787 & 0.101018 & -0.358806 \tabularnewline
7 & 2.45 & 1.83648 & 1.9375 & -0.101018 & 0.613518 \tabularnewline
8 & 2.119 & 1.41577 & 1.31475 & 0.101018 & 0.703232 \tabularnewline
9 & -1.429 & -0.696768 & -0.59575 & -0.101018 & -0.732232 \tabularnewline
10 & -1.644 & -1.84448 & -1.9455 & 0.101018 & 0.200482 \tabularnewline
11 & -3.065 & -2.40977 & -2.30875 & -0.101018 & -0.655232 \tabularnewline
12 & -1.461 & -1.11048 & -1.2115 & 0.101018 & -0.350518 \tabularnewline
13 & 1.141 & 0.436482 & 0.5375 & -0.101018 & 0.704518 \tabularnewline
14 & 1.329 & 1.13567 & 1.03465 & 0.101018 & 0.193332 \tabularnewline
15 & 0.3396 & 0.611757 & 0.712775 & -0.101018 & -0.272157 \tabularnewline
16 & 0.8429 & 1.16362 & 1.0626 & 0.101018 & -0.320718 \tabularnewline
17 & 2.225 & 0.741207 & 0.842225 & -0.101018 & 1.48379 \tabularnewline
18 & -1.924 & -0.179757 & -0.280775 & 0.101018 & -1.74424 \tabularnewline
19 & 0.4999 & -0.492893 & -0.391875 & -0.101018 & 0.992793 \tabularnewline
20 & -0.6433 & NA & NA & 0.101018 & NA \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=290840&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]0.7923[/C][C]NA[/C][C]NA[/C][C]-0.101018[/C][C]NA[/C][/ROW]
[ROW][C]2[/C][C]-2.468[/C][C]-1.68391[/C][C]-1.78492[/C][C]0.101018[/C][C]-0.784093[/C][/ROW]
[ROW][C]3[/C][C]-2.996[/C][C]-1.43627[/C][C]-1.33525[/C][C]-0.101018[/C][C]-1.55973[/C][/ROW]
[ROW][C]4[/C][C]3.119[/C][C]0.922306[/C][C]0.821288[/C][C]0.101018[/C][C]2.19669[/C][/ROW]
[ROW][C]5[/C][C]0.04315[/C][C]0.883057[/C][C]0.984075[/C][C]-0.101018[/C][C]-0.839907[/C][/ROW]
[ROW][C]6[/C][C]0.731[/C][C]1.08981[/C][C]0.988787[/C][C]0.101018[/C][C]-0.358806[/C][/ROW]
[ROW][C]7[/C][C]2.45[/C][C]1.83648[/C][C]1.9375[/C][C]-0.101018[/C][C]0.613518[/C][/ROW]
[ROW][C]8[/C][C]2.119[/C][C]1.41577[/C][C]1.31475[/C][C]0.101018[/C][C]0.703232[/C][/ROW]
[ROW][C]9[/C][C]-1.429[/C][C]-0.696768[/C][C]-0.59575[/C][C]-0.101018[/C][C]-0.732232[/C][/ROW]
[ROW][C]10[/C][C]-1.644[/C][C]-1.84448[/C][C]-1.9455[/C][C]0.101018[/C][C]0.200482[/C][/ROW]
[ROW][C]11[/C][C]-3.065[/C][C]-2.40977[/C][C]-2.30875[/C][C]-0.101018[/C][C]-0.655232[/C][/ROW]
[ROW][C]12[/C][C]-1.461[/C][C]-1.11048[/C][C]-1.2115[/C][C]0.101018[/C][C]-0.350518[/C][/ROW]
[ROW][C]13[/C][C]1.141[/C][C]0.436482[/C][C]0.5375[/C][C]-0.101018[/C][C]0.704518[/C][/ROW]
[ROW][C]14[/C][C]1.329[/C][C]1.13567[/C][C]1.03465[/C][C]0.101018[/C][C]0.193332[/C][/ROW]
[ROW][C]15[/C][C]0.3396[/C][C]0.611757[/C][C]0.712775[/C][C]-0.101018[/C][C]-0.272157[/C][/ROW]
[ROW][C]16[/C][C]0.8429[/C][C]1.16362[/C][C]1.0626[/C][C]0.101018[/C][C]-0.320718[/C][/ROW]
[ROW][C]17[/C][C]2.225[/C][C]0.741207[/C][C]0.842225[/C][C]-0.101018[/C][C]1.48379[/C][/ROW]
[ROW][C]18[/C][C]-1.924[/C][C]-0.179757[/C][C]-0.280775[/C][C]0.101018[/C][C]-1.74424[/C][/ROW]
[ROW][C]19[/C][C]0.4999[/C][C]-0.492893[/C][C]-0.391875[/C][C]-0.101018[/C][C]0.992793[/C][/ROW]
[ROW][C]20[/C][C]-0.6433[/C][C]NA[/C][C]NA[/C][C]0.101018[/C][C]NA[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=290840&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=290840&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
10.7923NANA-0.101018NA
2-2.468-1.68391-1.784920.101018-0.784093
3-2.996-1.43627-1.33525-0.101018-1.55973
43.1190.9223060.8212880.1010182.19669
50.043150.8830570.984075-0.101018-0.839907
60.7311.089810.9887870.101018-0.358806
72.451.836481.9375-0.1010180.613518
82.1191.415771.314750.1010180.703232
9-1.429-0.696768-0.59575-0.101018-0.732232
10-1.644-1.84448-1.94550.1010180.200482
11-3.065-2.40977-2.30875-0.101018-0.655232
12-1.461-1.11048-1.21150.101018-0.350518
131.1410.4364820.5375-0.1010180.704518
141.3291.135671.034650.1010180.193332
150.33960.6117570.712775-0.101018-0.272157
160.84291.163621.06260.101018-0.320718
172.2250.7412070.842225-0.1010181.48379
18-1.924-0.179757-0.2807750.101018-1.74424
190.4999-0.492893-0.391875-0.1010180.992793
20-0.6433NANA0.101018NA



Parameters (Session):
par1 = 1 ; par2 = Do not include Seasonal Dummies ; par3 = No Linear Trend ; par5 = 12 ;
Parameters (R input):
par1 = additive ; par2 = 2 ;
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')