Home » date » 2008 » May » 31 »

Classical Decomposition - Niels Braspennincx - Gem p badpak

R Software Module: rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Sat, 31 May 2008 14:24:45 -0600
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2008/May/31/t121226584675fykq61bp1anp8.htm/, Retrieved Sat, 31 May 2008 20:30:51 +0000
 
User-defined keywords:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
38 38 37,93 38 38,02 38,02 38,02 37,96 37,96 37,99 38 38 38 38,01 38,06 38,02 38,05 38,05 38,05 38,05 38,03 37,98 38,03 38,04 38,04 38,08 38,14 38,37 38,49 38,55 38,55 38,55 38,48 38,51 38,48 38,48 38,48 38,43 38,43 38,45 38,48 38,47 38,47 38,42 38,55 38,56 38,57 38,57 38,57 38,57 38,62 38,73 38,74 38,68 38,69 38,69 38,61 38,77 38,78 38,81 38,81 38,81 38,76 38,93 38,95 38,97 38,97 38,96 38,92 38,95 38,95 38,97 38,97 39,05 39,08 38,83 38,86 38,87 38,87 38,75 38,86 38,93 38,96 38,95
 
Text written by user:
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time6 seconds
R Server'Herman Ole Andreas Wold' @ 193.190.124.10:1001


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
138NANA0.99909714446951NA
238NANA0.998677364269339NA
337.93NANA0.998831856288834NA
438NANA1.00095573525070NA
538.02NANA1.00163610137355NA
638.02NANA1.00127309669591NA
738.0238.026030359410737.99166666666671.000904506060380.999841414963548
837.9637.998112491360837.99208333333331.000158695114840.998996989880236
937.9637.971378214542137.99791666666670.9993015813904390.999700347601875
1037.9937.99772881271338.00416666666670.9998306013651050.999796598034817
113837.994419793594638.006250.9996887299745341.00014686910435
123837.995241224523638.008750.9996445877468641.00012524661834
133837.976931332716738.011250.999097144469511.00060743894975
1438.0137.965968349404338.016250.9986773642693391.00115976629887
1538.0637.978500435682338.02291666666670.9988318562888341.00214593950216
1638.0238.061758897797438.02541666666671.000955735250700.998902864738607
1738.0538.088464799855938.026251.001636101373550.998990119448026
1838.0538.077581473098338.02916666666671.001273096695910.999275650605126
1938.0538.066900626741538.03251.000904506060380.999556028295889
2038.0538.043119632640938.03708333333331.000158695114841.00018085707548
2138.0338.016763161363638.04333333333330.9993015813904391.0003481842623
2237.9838.054802476207638.061250.9998306013651050.998034348588345
2338.0338.082309094438238.09416666666670.9996887299745340.998626420096835
2438.0438.119780279413738.13333333333330.9996445877468640.997907115968955
2538.0438.140533490123538.1750.999097144469510.997364129944602
2638.0838.166119937826638.21666666666670.9986773642693390.997743550091891
2738.1438.211561202149738.256250.9988318562888340.998127236891183
2838.3738.333685205873938.29708333333331.000955735250701.00094733375962
2938.4938.40064138478438.33791666666671.001636101373551.00232700840386
3038.5538.423855085705638.3751.001273096695911.00328298433390
3138.5538.446410251956038.41166666666671.000904506060381.00269439324413
3238.5538.450684300900238.44458333333331.000158695114841.00258293710256
3338.4838.444380963066938.471250.9993015813904391.00092650827093
3438.5138.480147077871738.48666666666670.9998306013651051.00077580062436
3538.4838.47760267974938.48958333333330.9996887299745341.00006230430391
3638.4838.472154996594538.48583333333330.9996445877468641.00020391380223
3738.4838.44442553823338.47916666666670.999097144469511.00092534772646
3838.4338.419534319009938.47041666666670.9986773642693391.00027240520156
3938.4338.422980611730838.46791666666670.9988318562888341.00018268723970
4038.4538.509686589322138.47291666666671.000955735250700.99845008893584
4138.4838.541705135727438.478751.001636101373550.998399003481809
4238.4738.535246717713138.486251.001273096695910.998306830154974
4338.4738.528567830161838.493751.000904506060380.998479885615785
4438.4238.509443624238238.50333333333331.000158695114840.997677358699051
4538.5538.490182285547338.51708333333330.9993015813904391.00155410317387
4638.5638.530138607939938.53666666666670.9998306013651051.00077501387586
4738.5738.547164353876438.55916666666670.9996887299745341.0005924079373
4838.5738.565038639539338.578750.9996445877468641.00012864917645
4938.5738.561819452708238.59666666666670.999097144469511.00021214111284
5038.5738.566006999102838.61708333333330.9986773642693391.00010353679854
5138.6238.585706968317938.63083333333330.9988318562888341.00088874960125
5238.7338.679014934535438.64208333333331.000955735250701.00131815832308
5338.7438.722834330725838.65958333333331.001636101373551.00044329578583
5438.6838.727574591703438.67833333333331.001273096695910.998771557676798
5538.6938.7333362103638.69833333333331.000904506060380.998881165047992
5638.6938.724477743687938.71833333333331.000158695114840.999109665366797
5738.6138.707114003840838.73416666666670.9993015813904390.997491055421203
5838.7738.741769418562238.74833333333330.9998306013651051.00072868590830
5938.7838.753350154433638.76541666666670.9996887299745341.00068767849644
6038.8138.772464891496838.786250.9996445877468641.00096808672361
6138.8138.774960176861738.810.999097144469511.00090367141523
6238.8138.781554863557538.83291666666670.9986773642693391.00073347075801
6338.7638.811692675803238.85708333333330.9988318562888340.998668115914577
6438.9338.91465659720938.87751.000955735250701.00039428339173
6538.9538.955714724295238.89208333333331.001636101373550.999853302029352
6638.9738.955364221201738.90583333333331.001273096695911.00037570637808
6738.9738.954369288781738.91916666666671.000904506060381.00040125694508
6838.9638.942012259875438.93583333333331.000158695114841.00046191090498
6938.9238.931956859653738.95916666666670.9993015813904390.999692878020574
7038.9538.961732150862538.96833333333330.9998306013651050.999698880152014
7138.9538.948289456778738.96041666666670.9996887299745341.00004391831439
7238.9738.938655804209738.95250.9996445877468641.00080496347763
7338.9738.909005710411338.94416666666670.999097144469511.00156761367902
7439.0538.879758137710738.931250.9986773642693391.00437867596003
7539.0838.874535846761438.920.9988318562888341.00528531463497
7638.8338.953860696839638.91666666666671.000955735250700.996820322950694
7738.8638.979920930078438.916251.001636101373550.996923520437779
7838.8738.965376952168738.91583333333331.001273096695910.997552264096257
7938.87NANA1.00090450606038NA
8038.75NANA1.00015869511484NA
8138.86NANA0.999301581390439NA
8238.93NANA0.999830601365105NA
8338.96NANA0.999688729974534NA
8438.95NANA0.999644587746864NA
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/31/t121226584675fykq61bp1anp8/1d8cd1212265477.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/31/t121226584675fykq61bp1anp8/1d8cd1212265477.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/31/t121226584675fykq61bp1anp8/2vj9e1212265477.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/31/t121226584675fykq61bp1anp8/2vj9e1212265477.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/31/t121226584675fykq61bp1anp8/3y1lo1212265477.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/31/t121226584675fykq61bp1anp8/3y1lo1212265477.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/31/t121226584675fykq61bp1anp8/40wzq1212265477.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/31/t121226584675fykq61bp1anp8/40wzq1212265477.ps (open in new window)


 
Parameters (Session):
par1 = multiplicative ; par2 = 12 ;
 
Parameters (R input):
par1 = multiplicative ; 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