Home » date » 2011 » May » 12 »

*Unverified author*
R Software Module: /rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Thu, 12 May 2011 17:52: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/2011/May/12/t1305222542nubd9qbqkgviyjv.htm/, Retrieved Thu, 12 May 2011 19:49:06 +0200
 
Original text written by user:
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
KDGP2W92
 
Dataseries X:
» Textbox « » Textfile « » CSV «
12544 12264 13783 11214 11453 10883 10381 10348 10024 10805 10796 11907 12261 11377 12689 11474 10992 10764 12164 10409 10398 10349 10865 11630 12221 10884 12019 11021 10799 10423 10484 10450 9906 11049 11281 12485 12849 11380 12079 11366 11328 10444 10854 10434 10137 10992 10906 12367 14371 11695 11546 10922 10670 10254 10573 10239 10253 11176 10719 11817 12503 11510 12012 10941 11252 10662 11114 10415 10626 11411 10936 12513
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time4 seconds
R Server'Gwilym Jenkins' @ www.wessa.org


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
112544NANA1676.90625NA
212264NANA198.439583333333NA
313783NANA892.664583333334NA
411214NANA-41.6020833333331NA
511453NANA-184.418750000001NA
610883NANA-689.435416666668NA
71038111034.247916666711355.0416666667-320.79375-653.247916666665
81034810476.922916666711306.2916666667-829.36875-128.922916666666
91002410183.022916666711223.75-1040.72708333333-159.022916666665
101080510895.9062511189-293.09375-90.9062499999982
111079610930.6812511180.625-249.943750000001-134.68125
121190712037.8312511156.4583333333881.372916666667-130.831250000003
131226112902.697916666711225.79166666671676.90625-641.697916666666
141137711501.064583333311302.625198.439583333333-124.064583333333
151268912213.414583333311320.75892.664583333334475.585416666669
161147411275.7312511317.3333333333-41.6020833333331198.268750000001
171099211116.789583333311301.2083333333-184.418750000001-124.789583333333
181076410603.1062511292.5416666667-689.435416666668160.893749999999
191216410958.539583333311279.3333333333-320.793751205.46041666667
201040910427.7562511257.125-829.36875-18.7562499999985
211039810167.939583333311208.6666666667-1040.72708333333230.060416666665
221034910868.7812511161.875-293.09375-519.781250000002
231086510885.014583333311134.9583333333-249.943750000001-20.0145833333336
241163011994.0812511112.7083333333881.372916666667-364.081249999999
251222112705.4062511028.51676.90625-484.40625
261088411158.647916666710960.2083333333198.439583333333-274.647916666667
271201911834.0812510941.4166666667892.664583333334184.918750000003
281102110908.4812510950.0833333333-41.6020833333331112.518750000001
291079910812.164583333310996.5833333333-184.418750000001-13.1645833333332
301042310360.1062511049.5416666667-689.43541666666862.8937499999993
311048410790.539583333311111.3333333333-320.79375-306.539583333333
321045010328.797916666711158.1666666667-829.36875121.202083333334
33990610140.6062511181.3333333333-1040.72708333333-234.606249999999
341104910905.114583333311198.2083333333-293.09375143.885416666668
351128110984.6812511234.625-249.943750000001296.31875
361248512138.914583333311257.5416666667881.372916666667346.085416666667
371284912950.739583333311273.83333333331676.90625-101.739583333334
381138011487.022916666711288.5833333333198.439583333333-107.022916666665
391207912190.2062511297.5416666667892.664583333334-111.206249999999
401136611263.189583333311304.7916666667-41.6020833333331102.810416666667
411132811102.372916666711286.7916666667-184.418750000001225.627083333335
421044410576.814583333311266.25-689.435416666668-132.814583333335
431085411003.9562511324.75-320.79375-149.956249999999
441043410571.922916666711401.2916666667-829.36875-137.922916666666
451013710351.4812511392.2083333333-1040.72708333333-214.481249999999
461099211058.4062511351.5-293.09375-66.40625
471090611055.639583333311305.5833333333-249.943750000001-149.639583333334
481236712151.622916666711270.25881.372916666667215.377083333335
491437112927.5312511250.6251676.906251443.46875
501169511429.2312511230.7916666667198.439583333333265.768750000001
511154612120.164583333311227.5892.664583333334-574.164583333333
521092211198.397916666711240-41.6020833333331-276.397916666669
531067011055.4562511239.875-184.418750000001-385.456250000001
541025410519.7312511209.1666666667-689.435416666668-265.731250000001
551057310787.622916666711108.4166666667-320.79375-214.622916666665
561023910193.5062511022.875-829.3687545.4937500000015
57102539993.8562511034.5833333333-1040.72708333333259.143750000001
581117610761.697916666711054.7916666667-293.09375414.302083333334
591071910829.889583333311079.8333333333-249.943750000001-110.889583333334
601181712002.4562511121.0833333333881.372916666667-185.456250000001
611250312837.5312511160.6251676.90625-334.53125
621151011388.939583333311190.5198.439583333333121.060416666667
631201212106.039583333311213.375892.664583333334-94.039583333335
641094111197.1062511238.7083333333-41.6020833333331-256.106249999999
651125211073.122916666711257.5416666667-184.418750000001178.877083333335
661066210606.147916666711295.5833333333-689.43541666666855.852083333335
6711114NANA-320.79375NA
6810415NANA-829.36875NA
6910626NANA-1040.72708333333NA
7011411NANA-293.09375NA
7110936NANA-249.943750000001NA
7212513NANA881.372916666667NA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2011/May/12/t1305222542nubd9qbqkgviyjv/1ok5k1305222764.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/12/t1305222542nubd9qbqkgviyjv/1ok5k1305222764.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/May/12/t1305222542nubd9qbqkgviyjv/2d6h41305222764.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/12/t1305222542nubd9qbqkgviyjv/2d6h41305222764.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/May/12/t1305222542nubd9qbqkgviyjv/3lxra1305222764.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/12/t1305222542nubd9qbqkgviyjv/3lxra1305222764.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/May/12/t1305222542nubd9qbqkgviyjv/43xn11305222764.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/12/t1305222542nubd9qbqkgviyjv/43xn11305222764.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