Home » date » 2010 » Jun » 05 »

*Unverified author*
R Software Module: /rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Sat, 05 Jun 2010 13:24:48 +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/Jun/05/t1275744569cnk9bjbavme3v4u.htm/, Retrieved Sat, 05 Jun 2010 15:29:34 +0200
 
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/Jun/05/t1275744569cnk9bjbavme3v4u.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:
KDGP2W92
 
Dataseries X:
» Textbox « » Textfile « » CSV «
1664.81 2397.53 2840.71 3547.29 3752.96 3714.74 4349.61 3566.34 5021.82 6423.48 7600.60 19756.21 2499.81 5198.24 7225.14 4806.03 5900.88 4951.34 6179.12 4752.15 5496.43 5835.10 12600.08 28541.72 4717.02 5702.63 9957.58 5304.78 6492.43 6630.80 7349.62 8176.62 8573.17 9690.50 15151.84 34061.01 5921.10 5814.58 12421.25 6369.77 7609.12 7224.75 8121.22 7979.25 8093.06 8476.70 17914.66 30114.41 4826.64 6470.23 9638.77 8821.17 8722.37 10209.48 11276.55 12552.22 11637.39 13606.89 21822.11 45060.69 7615.03 9849.69 14558.40 11587.33 9332.56 13082.09 16732.78 19888.61 23933.38 25391.35 36024.80 80721.71 10243.24 11266.88 21826.84 17357.33 15997.79 18601.53 26155.15 28586.52 30505.41 30821.33 46634.38 104660.67
 
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'Gwilym Jenkins' @ 72.249.127.135


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
11664.81NANA-6650.1614988426NA
22397.53NANA-5562.1051099537NA
32840.71NANA-691.870734953703NA
43547.29NANA-4601.86462384259NA
53752.96NANA-5074.23872106481NA
63714.74NANA-4827.4476099537NA
74349.612968.497459490745421.13333333333-2452.635873842591381.11254050926
83566.343483.201903935185572.62125-2089.4193460648283.1380960648166
95021.824562.485237268525872.00208333333-1309.51684606481459.334762731482
106423.485681.327806712966107.13416666667-425.806359953704742.152193287037
117600.612590.68037615746249.078333333336341.60204282407-4990.08037615741
1219756.2133733.56468171306390.127343.4646817130-13977.3546817130
132499.81-132.3069155092616517.85458333333-6650.16149884262632.11691550926
145198.241081.387806712966643.49291666667-5562.10510995374116.85219328704
157225.146020.806348379636712.67708333333-691.8707349537031204.33365162037
164806.032106.072042824076707.93666666667-4601.864623842592699.95795717593
175900.881817.493778935196891.7325-5074.238721064814083.38622106481
184951.342638.659473379637466.10708333333-4827.44760995372312.68052662037
196179.125471.91787615747924.55375-2452.63587384259707.202123842596
204752.155948.534403935188037.95375-2089.41934606482-1196.38440393518
215496.436863.304820601858172.82166666666-1309.51684606481-1366.87482060185
225835.17881.648223379638307.45458333333-425.806359953704-2046.54822337963
2312600.0814694.48579282418352.883756341.60204282407-2094.40579282407
2428541.7235790.97384837968447.5091666666727343.4646817130-7249.25384837963
254717.021916.096001157418566.2575-6650.16149884262800.92399884259
265702.633195.609473379638757.71458333333-5562.10510995372507.02052662037
279957.588336.727598379639028.59833333333-691.8707349537031620.85240162037
285304.784715.572876157419317.4375-4601.86462384259589.207123842592
296492.434510.163778935199584.4025-5074.238721064811982.26622106481
306630.85093.24864004639920.69625-4827.44760995371537.55135995371
317349.627748.2007928240710200.8366666667-2452.63587384259-398.580792824072
328176.628166.2519039351910255.67125-2089.4193460648210.3680960648144
338573.179053.4719039351910362.98875-1309.51684606481-480.301903935186
349690.510084.209890046310510.01625-425.806359953704-393.709890046293
3515151.8416942.521626157410600.91958333336341.60204282407-1790.68162615741
3634061.0138015.660931713010672.1962527343.4646817130-3954.65093171296
375921.14078.9326678240710729.0941666667-6650.16149884261842.16733217593
385814.585190.9153067129610753.0204166667-5562.1051099537623.664693287039
3912421.2510032.921348379610724.7920833333-691.8707349537032388.32865162037
406369.776052.3478761574110654.2125-4601.86462384259317.422123842594
417609.125644.5162789351910718.755-5074.238721064811964.60372106482
427224.755841.9832233796310669.4308333333-4827.44760995371382.76677662037
438121.228006.7507928240710459.3866666667-2452.63587384259114.469207175927
447979.258351.6835706018510441.1029166667-2089.41934606482-372.433570601848
458093.069042.9681539351810352.485-1309.51684606481-949.908153935183
468476.79912.883640046310338.69-425.806359953704-1436.18364004630
4717914.6616828.819126157410487.21708333336341.602042824071085.84087384259
4830114.4138001.430931713010657.9662527343.4646817130-7887.02093171296
494826.644263.6405844907410913.8020833333-6650.1614988426562.999415509259
506470.235673.7094733796311235.8145833333-5562.1051099537796.52052662037
519638.7710882.164681713011574.0354166667-691.870734953703-1243.39468171296
528821.177333.6091261574111935.47375-4601.864623842591487.56087384259
538722.377237.8033622685212312.0420833333-5074.238721064811484.56663773148
5410209.488270.1665567129613097.6141666667-4827.44760995371939.31344328704
5511276.5511383.922876157413836.55875-2452.63587384259-107.372876157406
5612552.2212004.133153935214093.5525-2089.41934606482548.086846064816
5711637.3913129.831070601914439.3479166667-1309.51684606481-1492.44107060185
5813606.8914333.782806713014759.5891666667-425.806359953704-726.89280671296
5921822.1121241.872459490714900.27041666676341.60204282407580.237540509264
6045060.6942388.851765046315045.387083333327343.46468171302671.83823495370
617615.038742.2605844907415392.4220833333-6650.1614988426-1127.23058449074
629849.6910363.342806713015925.4479166667-5562.1051099537-513.652806712958
6314558.416051.593015046316743.46375-691.870734953703-1493.19301504630
6411587.3313144.951209490717746.8158333333-4601.86462384259-1557.62120949074
659332.5613755.375028935218829.61375-5074.23872106481-4422.81502893518
6613082.0916079.820723379620907.2683333333-4827.4476099537-2997.73072337963
6716732.7820050.017042824122502.6529166667-2452.63587384259-3317.23704282408
6819888.6120581.791903935222671.21125-2089.41934606482-693.181903935183
6923933.3821723.595653935223033.1125-1309.516846064812209.78434606482
7025391.3523150.574473379623576.3808333333-425.8063599537042240.77552662037
7136024.830436.117459490724094.51541666676341.602042824075588.68254050926
7280721.7151945.67468171324602.2127343.464681713028776.0353182870
7310243.2418574.623917824125224.7854166667-6650.1614988426-8331.38391782407
7411266.8820417.691973379625979.7970833333-5562.1051099537-9150.81197337963
7521826.8425924.173848379626616.0445833333-691.870734953703-4097.33384837963
7617357.3322514.263709490727116.1283333333-4601.86462384259-5156.93370949074
7715997.7922710.204612268527784.4433333333-5074.23872106481-6712.41461226851
7818601.5324396.518223379629223.9658333333-4827.4476099537-5794.98822337962
7926155.15NANA-2452.63587384259NA
8028586.52NANA-2089.41934606482NA
8130505.41NANA-1309.51684606481NA
8230821.33NANA-425.806359953704NA
8346634.38NANA6341.60204282407NA
84104660.67NANA27343.4646817130NA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Jun/05/t1275744569cnk9bjbavme3v4u/1ysth1275744286.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jun/05/t1275744569cnk9bjbavme3v4u/1ysth1275744286.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jun/05/t1275744569cnk9bjbavme3v4u/2ysth1275744286.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jun/05/t1275744569cnk9bjbavme3v4u/2ysth1275744286.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jun/05/t1275744569cnk9bjbavme3v4u/39jsk1275744286.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jun/05/t1275744569cnk9bjbavme3v4u/39jsk1275744286.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jun/05/t1275744569cnk9bjbavme3v4u/4kbr51275744286.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jun/05/t1275744569cnk9bjbavme3v4u/4kbr51275744286.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