Home » date » 2011 » May » 19 »

oef 9.2 Thomas Simons

*Unverified author*
R Software Module: /rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Thu, 19 May 2011 21:32:58 +0000
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2011/May/19/t1305840552kzrhzg8irc7juot.htm/, Retrieved Thu, 19 May 2011 23:29:16 +0200
 
Original text written by user:
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
KDGP2W92
 
Dataseries X:
» Textbox « » Textfile « » CSV «
17,1 13,4 15,3 14 9,7 13,7 13,7 12,5 9,8 7 -1,9 -2,9 -6,8 -10,4 -17,2 -19,8 -16,8 -23,2 -21,7 -17,6 -13 -12,6 -4 -0,2 3,1 6,5 19,2 26,6 26,6 31,4 31,2 26,4 20,7 20,7 15 13,3 8,7 10,2 4,3 -0,1 -4,6 -3,9 -3,5 -3,4 -2,5 -1,1 0,3 -0,9 3,6 2,7 -0,2 -1 5,8 6,4 9,6 13,2 10,6 10,9 12,9 15,9 12,2 9,1 9 17,4 14,7 17 13,7 9,5 14,8 13,6 12,6 8,9 10,2 12,7 16 10,4 9,9 9,5 8,6 10 3,5 -4,2 -4,4 -1,5 -0,1 0,8 -2,4 -1,2 0,2 -1,9 -1,6 -4,2 -2,2 6,2 5,7 3,1 1,1 -0,9 0,1 -4 -4 -5,3 -8 -6,3 -3,6 -3,5 -5,1 -3,3
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 seconds
R Server'Herman Ole Andreas Wold' @ www.yougetit.org


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
117.1NANA-0.375434027777778NA
213.4NANA-0.326996527777777NA
315.3NANA-0.396788194444443NA
414NANA-0.334809027777778NA
59.7NANA0.17404513888889NA
613.7NANA-0.0322048611111111NA
713.79.963628472222229.120833333333330.8427951388888893.73637152777778
812.57.683940972222227.133333333333330.5506076388888884.81605902777778
99.84.904253472222224.78750.1167534722222224.89574652777778
1072.164670138888892.0250.1396701388888894.83532986111111
11-1.9-0.720225694444445-0.4875-0.232725694444445-1.17977430555556
12-2.9-3.25407986111111-3.12916666666667-0.1249131944444450.354079861111112
13-6.8-6.51710069444445-6.14166666666667-0.375434027777778-0.282899305555555
14-10.4-9.19782986111111-8.87083333333333-0.326996527777777-1.20217013888889
15-17.2-11.4717881944444-11.075-0.396788194444443-5.72821180555555
16-19.8-13.1764756944444-12.8416666666667-0.334809027777778-6.62352430555556
17-16.8-13.5717881944444-13.74583333333330.17404513888889-3.22821180555555
18-23.2-13.7530381944444-13.7208333333333-0.0322048611111111-9.44696180555555
19-21.7-12.3530381944444-13.19583333333330.842795138888889-9.34696180555555
20-17.6-11.5285590277778-12.07916666666670.550607638888888-6.07144097222222
21-13-9.74157986111111-9.858333333333330.116753472222222-3.25842013888889
22-12.6-6.26866319444444-6.408333333333330.139670138888889-6.33133680555555
23-4-2.89939236111111-2.66666666666667-0.232725694444445-1.10060763888889
24-0.21.291753472222221.41666666666667-0.124913194444445-1.49175347222222
253.15.520399305555555.89583333333333-0.375434027777778-2.42039930555555
266.59.606336805555559.93333333333333-0.326996527777777-3.10633680555555
2719.212.774045138888913.1708333333333-0.3967881944444436.42595486111111
2826.615.627690972222215.9625-0.33480902777777810.9723090277778
2926.618.315711805555618.14166666666670.174045138888898.28428819444445
3031.419.463628472222219.4958333333333-0.032204861111111111.9363715277778
3131.221.134461805555620.29166666666670.84279513888888910.0655381944444
3226.421.229774305555620.67916666666670.5506076388888885.17022569444444
3320.720.329253472222220.21250.1167534722222220.370746527777776
3420.718.618836805555618.47916666666670.1396701388888892.08116319444445
351515.833940972222216.0666666666667-0.232725694444445-0.833940972222221
3613.313.170920138888913.2958333333333-0.1249131944444450.129079861111112
378.710.003732638888910.3791666666667-0.375434027777778-1.30373263888889
3810.27.364670138888897.69166666666667-0.3269965277777772.83532986111111
394.35.086545138888895.48333333333333-0.396788194444443-0.78654513888889
40-0.13.273524305555553.60833333333333-0.334809027777778-3.37352430555555
41-4.62.261545138888892.08750.17404513888889-6.86154513888889
42-3.90.8511284722222220.883333333333333-0.0322048611111111-4.75112847222222
43-3.50.9219618055555550.07916666666666650.842795138888889-4.42196180555556
44-3.40.104774305555555-0.4458333333333330.550607638888888-3.50477430555555
45-2.5-0.829079861111111-0.9458333333333330.116753472222222-1.67092013888889
46-1.1-1.03116319444444-1.170833333333330.139670138888889-0.0688368055555562
470.3-1.00772569444444-0.775-0.2327256944444451.30772569444444
48-0.9-0.03741319444444470.0875-0.124913194444445-0.862586805555555
493.60.6870659722222231.0625-0.3754340277777782.91293402777778
502.71.973003472222222.3-0.3269965277777770.726996527777778
51-0.23.140711805555563.5375-0.396788194444443-3.34071180555556
52-14.248524305555554.58333333333333-0.334809027777778-5.24852430555555
535.85.782378472222225.608333333333330.174045138888890.017621527777778
546.46.801128472222226.83333333333333-0.0322048611111111-0.401128472222221
559.68.734461805555557.891666666666670.8427951388888890.865538194444445
5613.29.067274305555558.516666666666670.5506076388888884.13272569444445
5710.69.283420138888899.166666666666670.1167534722222221.31657986111111
5810.910.456336805555610.31666666666670.1396701388888890.443663194444445
5912.911.221440972222211.4541666666667-0.2327256944444451.67855902777778
6015.912.141753472222212.2666666666667-0.1249131944444453.75824652777778
6112.212.503732638888912.8791666666667-0.375434027777778-0.303732638888889
629.112.568836805555612.8958333333333-0.326996527777777-3.46883680555555
63912.519878472222212.9166666666667-0.396788194444443-3.51987847222222
6417.412.869357638888913.2041666666667-0.3348090277777784.53064236111111
6514.713.478211805555613.30416666666670.174045138888891.22178819444445
661712.967795138888913-0.03220486111111114.03220486111111
6713.713.467795138888912.6250.8427951388888890.232204861111112
689.513.242274305555612.69166666666670.550607638888888-3.74227430555555
6914.813.250086805555613.13333333333330.1167534722222221.54991319444445
7013.613.273003472222213.13333333333330.1396701388888890.32699652777778
7112.612.408940972222212.6416666666667-0.2327256944444450.191059027777778
728.912.004253472222212.1291666666667-0.124913194444445-3.10425347222222
7310.211.228732638888911.6041666666667-0.375434027777778-1.02873263888889
7412.711.085503472222211.4125-0.3269965277777771.61449652777778
751610.565711805555610.9625-0.3967881944444435.43428819444444
7610.49.415190972222229.75-0.3348090277777780.984809027777779
779.98.474045138888898.30.174045138888891.42595486111111
789.57.126128472222227.15833333333333-0.03220486111111112.37387152777778
798.67.138628472222226.295833333333330.8427951388888891.46137152777778
80105.921440972222225.370833333333330.5506076388888884.07855902777778
813.54.225086805555564.108333333333330.116753472222222-0.725086805555556
82-4.22.998003472222222.858333333333330.139670138888889-7.19800347222222
83-4.41.738107638888891.97083333333333-0.232725694444445-6.13810763888889
84-1.50.9667534722222221.09166666666667-0.124913194444445-2.46675347222222
85-0.1-0.1837673611111110.191666666666667-0.3754340277777780.083767361111111
860.8-1.15199652777778-0.825-0.3269965277777771.95199652777778
87-2.4-2.05095486111111-1.65416666666667-0.396788194444443-0.34904513888889
88-1.2-1.79314236111111-1.45833333333333-0.3348090277777780.593142361111111
890.2-0.430121527777777-0.6041666666666670.174045138888890.630121527777777
90-1.9-0.02387152777777790.0083333333333332-0.0322048611111111-1.87612847222222
91-1.61.092795138888890.250.842795138888889-2.69279513888889
92-4.20.7797743055555550.2291666666666670.550607638888888-4.97977430555556
93-2.20.3792534722222220.26250.116753472222222-2.57925347222222
946.20.3896701388888890.250.1396701388888895.81032986111111
955.7-0.274392361111112-0.0416666666666667-0.2327256944444455.97439236111111
963.1-0.483246527777778-0.358333333333333-0.1249131944444453.58324652777778
971.1-1.14210069444444-0.766666666666667-0.3754340277777782.24210069444444
98-0.9-1.44782986111111-1.12083333333333-0.3269965277777770.54782986111111
990.1-1.66345486111111-1.26666666666667-0.3967881944444431.76345486111111
100-4-2.06397569444445-1.72916666666667-0.334809027777778-1.93602430555555
101-4-2.40928819444444-2.583333333333330.17404513888889-1.59071180555556
102-5.3-3.33220486111111-3.3-0.0322048611111111-1.96779513888889
103-8NANA0.842795138888889NA
104-6.3NANA0.550607638888888NA
105-3.6NANA0.116753472222222NA
106-3.5NANA0.139670138888889NA
107-5.1NANA-0.232725694444445NA
108-3.3NANA-0.124913194444445NA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2011/May/19/t1305840552kzrhzg8irc7juot/131741305840776.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/19/t1305840552kzrhzg8irc7juot/131741305840776.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/May/19/t1305840552kzrhzg8irc7juot/2ntv71305840776.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/19/t1305840552kzrhzg8irc7juot/2ntv71305840776.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/May/19/t1305840552kzrhzg8irc7juot/3c1h21305840776.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/19/t1305840552kzrhzg8irc7juot/3c1h21305840776.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/May/19/t1305840552kzrhzg8irc7juot/4m4c91305840776.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/19/t1305840552kzrhzg8irc7juot/4m4c91305840776.ps (open in new window)


 
Parameters (Session):
par1 = additive ; par2 = 12 ;
 
Parameters (R input):
par1 = additive ; par2 = 12 ;
 
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,m$trend[i]+m$seasonal[i]) else a<-table.element(a,m$trend[i]*m$seasonal[i])
a<-table.element(a,m$trend[i])
a<-table.element(a,m$seasonal[i])
a<-table.element(a,m$random[i])
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable.tab')
 





Copyright

Creative Commons License

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 License.

Software written by Ed van Stee & Patrick Wessa


Disclaimer

Information provided on this web site is provided "AS IS" without warranty of any kind, either express or implied, including, without limitation, warranties of merchantability, fitness for a particular purpose, and noninfringement. We use reasonable efforts to include accurate and timely information and periodically update the information, and software without notice. However, we make no warranties or representations as to the accuracy or completeness of such information (or software), and we assume no liability or responsibility for errors or omissions in the content of this web site, or any software bugs in online applications. Your use of this web site is AT YOUR OWN RISK. Under no circumstances and under no legal theory shall we be liable to you or any other person for any direct, indirect, special, incidental, exemplary, or consequential damages arising from your access to, or use of, this web site.


Privacy Policy

We may request personal information to be submitted to our servers in order to be able to:

  • personalize online software applications according to your needs
  • enforce strict security rules with respect to the data that you upload (e.g. statistical data)
  • manage user sessions of online applications
  • alert you about important changes or upgrades in resources or applications

We NEVER allow other companies to directly offer registered users information about their products and services. Banner references and hyperlinks of third parties NEVER contain any personal data of the visitor.

We do NOT sell, nor transmit by any means, personal information, nor statistical data series uploaded by you to third parties.

We carefully protect your data from loss, misuse, alteration, and destruction. However, at any time, and under any circumstance you are solely responsible for managing your passwords, and keeping them secret.

We store a unique ANONYMOUS USER ID in the form of a small 'Cookie' on your computer. This allows us to track your progress when using this website which is necessary to create state-dependent features. The cookie is used for NO OTHER PURPOSE. At any time you may opt to disallow cookies from this website - this will not affect other features of this website.

We examine cookies that are used by third-parties (banner and online ads) very closely: abuse from third-parties automatically results in termination of the advertising contract without refund. We have very good reason to believe that the cookies that are produced by third parties (banner ads) do NOT cause any privacy or security risk.

FreeStatistics.org is safe. There is no need to download any software to use the applications and services contained in this website. Hence, your system's security is not compromised by their use, and your personal data - other than data you submit in the account application form, and the user-agent information that is transmitted by your browser - is never transmitted to our servers.

As a general rule, we do not log on-line behavior of individuals (other than normal logging of webserver 'hits'). However, in cases of abuse, hacking, unauthorized access, Denial of Service attacks, illegal copying, hotlinking, non-compliance with international webstandards (such as robots.txt), or any other harmful behavior, our system engineers are empowered to log, track, identify, publish, and ban misbehaving individuals - even if this leads to ban entire blocks of IP addresses, or disclosing user's identity.


FreeStatistics.org is powered by