Home » date » 2010 » Dec » 19 »

paper - classical decomposition

*The author of this computation has been verified*
R Software Module: /rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Sun, 19 Dec 2010 20:01:07 +0000
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2010/Dec/19/t1292788742ark8kfduch0l5pc.htm/, Retrieved Sun, 19 Dec 2010 20:59:07 +0100
 
BibTeX entries for LaTeX users:
@Manual{KEY,
    author = {{YOUR NAME}},
    publisher = {Office for Research Development and Education},
    title = {Statistical Computations at FreeStatistics.org, URL http://www.freestatistics.org/blog/date/2010/Dec/19/t1292788742ark8kfduch0l5pc.htm/},
    year = {2010},
}
@Manual{R,
    title = {R: A Language and Environment for Statistical Computing},
    author = {{R Development Core Team}},
    organization = {R Foundation for Statistical Computing},
    address = {Vienna, Austria},
    year = {2010},
    note = {{ISBN} 3-900051-07-0},
    url = {http://www.R-project.org},
}
 
Original text written by user:
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
631 923 654 294 671 833 586 840 600 969 625 568 558 110 630 577 628 654 603 184 656 255 600 730 670 326 678 423 641 502 625 311 628 177 589 767 582 471 636 248 599 885 621 694 637 406 595 994 696 308 674 201 648 861 649 605 672 392 598 396 613 177 638 104 615 632 634 465 638 686 604 243 706 669 677 185 644 328 644 825 605 707 600 136 612 166 599 659 634 210 618 234 613 576 627 200 668 973 651 479 619 661 644 260 579 936 601 752 595 376 588 902 634 341 594 305 606 200 610 926 633 685 639 696 659 451 593 248 606 677 599 434 569 578 629 873 613 438 604 172 658 328 612 633 707 372 739 770 777 535 685 030 730 234 714 154 630 872 719 492 677 023 679 272 718 317 645 672
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time3 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
1631923NANA45739.3680555555NA
2654294NANA40853.4444444444NA
3671833NANA28330.75NA
4586840NANA2623.29861111113NA
5600969NANA-1528.74305555555NA
6625568NANA-22185.8263888889NA
7558110584082.361111111622344.875-38262.5138888889-25972.3611111111
8630577617651.159722222624950.375-7299.2152777777612925.8402777778
9628654616531.284722222624691.958333333-8160.673611111112122.7152777779
10603184607103.534722222625031.125-17927.5902777778-3919.53472222213
11656255630660.111111111627767.752892.3611111110625594.8888888891
12600730602335.048611111627409.708333333-25074.6597222222-1605.04861111101
13670326672672.409722222626933.04166666745739.3680555555-2346.40972222225
14678423669037.819444444628184.37540853.44444444449385.18055555562
15641502655552.708333333627221.95833333328330.75-14050.7083333333
16625311629417.798611111626794.52623.29861111113-4106.79861111101
17628177625251.631944444626780.375-1528.743055555552925.36805555550
18589767603611.840277778625797.666666667-22185.8263888889-13844.8402777778
19582471588420.402777778626682.916666667-38262.5138888889-5949.40277777775
20636248620290.368055556627589.583333333-7299.2152777777615957.6319444445
21599885619559.618055556627720.291666667-8160.6736111111-19674.6180555555
22621694611111.576388889629039.166666667-17927.590277777810582.4236111111
23637406634786.069444444631893.7083333332892.361111111062619.93055555562
24595994609020.881944444634095.541666667-25074.6597222222-13026.8819444444
25696308681473.868055556635734.545739.368055555514834.1319444445
26674201677944.694444444637091.2540853.4444444444-3743.69444444450
27648861666155.458333333637824.70833333328330.75-17294.4583333335
28649605641636.256944444639012.9583333332623.298611111137968.74305555562
29672392638069.673611111639598.416666667-1528.7430555555534322.3263888889
30598396617809.631944444639995.458333333-22185.8263888889-19413.6319444444
31613177602508.361111111640770.875-38262.513888888910668.6388888889
32638104634027.701388889641326.916666667-7299.215277777764076.29861111112
33615632633101.701388889641262.375-8160.6736111111-17469.7013888888
34634465622946.743055556640874.333333333-17927.590277777811518.2569444445
35638686640788.986111111637896.6252892.36111111106-2102.98611111101
36604243610115.923611111635190.583333333-25074.6597222222-5872.92361111101
37706669680960.326388889635220.95833333345739.368055555525708.6736111112
38677185674430.402777778633576.95833333340853.44444444442754.59722222248
39644328661079.916666667632749.16666666728330.75-16751.9166666667
40644825635470.256944444632846.9583333332623.298611111139354.74305555562
41605707629595.673611111631124.416666667-1528.74305555555-23888.6736111111
42600136608848.881944444631034.708333333-22185.8263888889-8712.88194444438
43612166592158.069444444630420.583333333-38262.513888888920007.9305555556
44599659620479.618055555627778.833333333-7299.21527777776-20820.6180555554
45634210617519.284722222625679.958333333-8160.673611111116690.7152777779
46618234606701.034722222624628.625-17927.590277777811532.9652777778
47613576626423.652777778623531.2916666672892.36111111106-12847.6527777776
48627200597450.173611111622524.833333333-25074.659722222229749.826388889
49668973667631.951388889621892.58333333345739.36805555551341.04861111112
50651479661598.236111111620744.79166666740853.4444444444-10119.2361111111
51619661648632.791666667620302.04166666728330.75-28971.7916666666
52644260621933.756944444619310.4583333332623.2986111111322326.2430555555
53579936616477.340277778618006.083333333-1528.74305555555-36541.3402777778
54601752594834.840277778617020.666666667-22185.82638888896917.15972222225
55595376576609.736111111614872.25-38262.513888888918766.263888889
56588902605611.743055556612910.958333333-7299.21527777776-16709.7430555556
57634341605917.243055556614077.916666667-8160.673611111128423.7569444444
58594305595682.743055556613610.333333333-17927.5902777778-1377.74305555562
59606200615491.402777778612599.0416666672892.36111111106-9291.40277777775
60610926588542.006944444613616.666666667-25074.659722222222383.9930555556
61633685658184.534722222612445.16666666745739.3680555555-24499.5347222222
62639696653930.819444444613077.37540853.4444444444-14234.8194444444
63659451642244.291666667613913.54166666728330.7517206.7083333334
64593248616077.006944444613453.7083333332623.29861111113-22829.0069444444
65606677614508.090277778616036.833333333-1528.74305555555-7831.09027777787
66599434596094.131944444618279.958333333-22185.82638888893339.86805555550
67569578583158.861111111621421.375-38262.5138888889-13580.861111111
68629873621362.201388889628661.416666667-7299.215277777768510.79861111112
69613438629590.659722222637751.333333333-8160.6736111111-16152.6597222221
70604172628568.159722222646495.75-17927.5902777778-24396.1597222221
71658328658360.569444444655468.2083333332892.36111111106-32.5694444444962
72612633640321.756944444665396.416666667-25074.6597222222-27688.7569444444
73707372718469.701388889672730.33333333345739.3680555555-11097.7013888888
74739770719871.819444444679018.37540853.444444444419898.1805555556
75777535713732.625685401.87528330.7563802.3750000001
76685030693803.715277778691180.4166666672623.29861111113-8773.71527777775
77730234695280.381944444696809.125-1528.7430555555534953.6180555556
78714154678499.465277778700685.291666667-22185.826388888935654.5347222224
79630872NANA-38262.5138888889NA
80719492NANA-7299.21527777776NA
81677023NANA-8160.6736111111NA
82679272NANA-17927.5902777778NA
83718317NANA2892.36111111106NA
84645672NANA-25074.6597222222NA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/19/t1292788742ark8kfduch0l5pc/1qyys1292788863.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/19/t1292788742ark8kfduch0l5pc/1qyys1292788863.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/19/t1292788742ark8kfduch0l5pc/2qyys1292788863.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/19/t1292788742ark8kfduch0l5pc/2qyys1292788863.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/19/t1292788742ark8kfduch0l5pc/317fe1292788863.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/19/t1292788742ark8kfduch0l5pc/317fe1292788863.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/19/t1292788742ark8kfduch0l5pc/4tyxy1292788863.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/19/t1292788742ark8kfduch0l5pc/4tyxy1292788863.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