Home » date » 2010 » Dec » 09 »

Workshop 8 - classical decomposition (jonas poels)

*Unverified author*
R Software Module: /rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Thu, 09 Dec 2010 13:55:12 +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/09/t12919029576ashhiwzfcc23nw.htm/, Retrieved Thu, 09 Dec 2010 14:56:02 +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/09/t12919029576ashhiwzfcc23nw.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 «
9700 9081 9084 9743 8587 9731 9563 9998 9437 10038 9918 9252 9737 9035 9133 9487 8700 9627 8947 9283 8829 9947 9628 9318 9605 8640 9214 9567 8547 9185 9470 9123 9278 10170 9434 9655 9429 8739 9552 9687 9019 9672 9206 9069 9788 10312 10105 9863 9656 9295 9946 9701 9049 10190 9706 9765 9893 9994 10433 10073 10112 9266 9820 10097 9115 10411 9678 10408 10153 10368 10581 10597 10680 9738 9556
 
Output produced by software:


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


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
19700NANA171.438194444444NA
29081NANA-545.736805555555NA
39084NANA-17.1201388888899NA
49743NANA148.963194444444NA
58587NANA-681.111805555555NA
69731NANA233.154861111111NA
795639311.029861111119512.54166666667-201.511805555556251.97013888889
899989425.138194444459512.16666666667-87.028472222222572.861805555554
994379474.479861111119512.29166666667-37.8118055555545-37.4798611111128
10100389986.771527777789503.66666666667483.10486111111151.2284722222212
1199189894.746527777789497.70833333333397.03819444444523.2534722222226
1292529634.704861111119498.08333333333136.621527777777-382.704861111111
1397379639.521527777789468.08333333333171.43819444444497.4784722222212
1490358866.888194444459412.625-545.736805555555168.111805555554
1591339340.379861111119357.5-17.1201388888899-207.379861111112
1694879477.338194444449328.375148.9631944444449.66180555555547
1787008631.388194444459312.5-681.11180555555568.6118055555544
1896279536.321527777789303.16666666667233.15486111111190.6784722222219
1989479098.904861111119300.41666666667-201.511805555556-151.904861111110
2092839191.429861111119278.45833333333-87.02847222222291.5701388888901
2188299227.563194444449265.375-37.8118055555545-398.563194444443
2299479755.188194444449272.08333333333483.104861111111191.811805555557
2396289666.079861111119269.04166666667397.038194444445-38.0798611111113
2493189380.871527777789244.25136.621527777777-62.8715277777774
2596059419.063194444449247.625171.438194444444185.936805555555
2686408717.013194444449262.75-545.736805555555-77.0131944444438
2792149257.671527777789274.79166666667-17.1201388888899-43.6715277777766
2895679451.754861111119302.79166666667148.963194444444115.245138888888
2985478622.888194444449304-681.111805555555-75.8881944444438
3091859543.113194444459309.95833333333233.154861111111-358.113194444446
3194709115.154861111119316.66666666667-201.511805555556354.845138888888
3291239226.429861111119313.45833333333-87.028472222222-103.429861111112
3392789293.854861111119331.66666666667-37.8118055555545-15.8548611111109
34101709833.854861111119350.75483.104861111111336.145138888889
3594349772.454861111119375.41666666667397.038194444445-338.454861111111
3696559551.996527777789415.375136.621527777777103.003472222223
3794299596.104861111119424.66666666667171.438194444444-167.104861111111
3887398865.679861111119411.41666666667-545.736805555555-126.679861111112
3995529413.296527777789430.41666666667-17.1201388888899138.703472222223
4096879606.546527777789457.58333333333148.96319444444480.4534722222234
4190198810.346527777789491.45833333333-681.111805555555208.653472222220
4296729761.238194444449528.08333333333233.154861111111-89.2381944444442
4392069344.696527777789546.20833333333-201.511805555556-138.696527777776
4490699491.80486111119578.83333333333-87.028472222222-422.80486111111
4597889580.604861111119618.41666666667-37.8118055555545207.395138888889
461031210118.52152777789635.41666666667483.104861111111193.478472222223
471010510034.28819444449637.25397.03819444444570.7118055555566
4898639796.704861111119660.08333333333136.62152777777766.2951388888905
4996569873.938194444449702.5171.438194444444-217.938194444445
5092959206.596527777789752.33333333333-545.73680555555588.4034722222223
5199469768.588194444449785.70833333333-17.1201388888899177.411805555555
5297019925.796527777789776.83333333333148.963194444444-224.796527777777
5390499096.138194444449777.25-681.111805555555-47.1381944444438
541019010032.82152777789799.66666666667233.154861111111157.178472222222
5597069625.904861111119827.41666666667-201.51180555555680.095138888888
5697659758.179861111119845.20833333333-87.0284722222226.82013888889014
5798939800.938194444449838.75-37.811805555554592.0618055555569
58999410333.10486111119850483.104861111111-339.104861111111
591043310266.28819444449869.25397.038194444445166.711805555557
601007310017.82986111119881.20833333334136.62152777777755.1701388888869
611011210060.68819444449889.25171.43819444444451.3118055555551
6292669369.138194444459914.875-545.736805555555-103.138194444446
6398209935.379861111119952.5-17.1201388888899-115.379861111112
641009710127.87986111119978.91666666667148.963194444444-30.8798611111106
6591159319.5548611111110000.6666666667-681.111805555555-204.554861111112
661041110261.821527777810028.6666666667233.154861111111149.178472222222
6796789872.6548611111110074.1666666667-201.511805555556-194.654861111110
681040810030.471527777810117.5-87.028472222222377.528472222222
691015310088.354861111110126.1666666667-37.811805555554564.6451388888909
7010368NANA483.104861111111NA
7110581NANA397.038194444445NA
7210597NANA136.621527777777NA
7310680NANANANA
749738NANANANA
759556NANANANA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/09/t12919029576ashhiwzfcc23nw/1tka61291902897.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/09/t12919029576ashhiwzfcc23nw/1tka61291902897.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/09/t12919029576ashhiwzfcc23nw/2tka61291902897.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/09/t12919029576ashhiwzfcc23nw/2tka61291902897.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/09/t12919029576ashhiwzfcc23nw/34crr1291902897.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/09/t12919029576ashhiwzfcc23nw/34crr1291902897.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/09/t12919029576ashhiwzfcc23nw/44crr1291902897.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/09/t12919029576ashhiwzfcc23nw/44crr1291902897.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