Home » date » 2010 » May » 25 »

Time Series Analysis Champagne Classical Decompostion

*Unverified author*
R Software Module: /rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Tue, 25 May 2010 15:58:18 +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/May/25/t1274803240ks4ejk6ktgef2hi.htm/, Retrieved Tue, 25 May 2010 18:00:40 +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/May/25/t1274803240ks4ejk6ktgef2hi.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:
KDGP2W52
 
Dataseries X:
» Textbox « » Textfile « » CSV «
2851 2672 2755 2721 2946 3036 2282 2212 2922 4301 5764 7132 2541 2475 3031 3266 3776 3230 3028 1759 3595 4474 6838 8357 3113 3006 4047 3523 3937 3986 3260 1573 3528 5211 7614 9254 5375 3088 3718 4514 4520 4539 3663 1643 4739 5428 8314 10651 3633 4292 4154 4121 4647 4753 3965 1723 5048 6922 9858 11331 4016 3975 4510 4276 4968 4677 3523 1821 5222 6873 10803 13916 2639 2899 3370 3740 2927 3986 4217 1738 5221 6424 9842 13076 3934 3162 4286 4676 5010 4874 4633 1659 5951 6981 9851 12670
 
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'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
12851NANA0.75498520482829NA
22672NANA0.682668841284181NA
32755NANA0.809272328644709NA
42721NANA0.831010018388069NA
52946NANA0.87544764499555NA
63036NANA0.867001671303797NA
722822521.513434154343453.250.7301856031721820.905012033285214
822121353.722873736603432.1250.3944270309900131.63401242818211
929223133.64974510283435.416666666670.9121600228316230.932459029464424
1043014143.206030256293469.6251.194136550853851.03808499229616
1157646212.940225526413526.916666666671.761578401963870.927741100150634
1271327807.130947471953569.583333333332.187126680743860.913523808936422
1325412724.552857924093608.750.754985204828290.9326300984067
1424752471.915429754963620.958333333330.6826688412841811.00124784618758
1530312937.759712021373630.1250.8092723286447091.03173856854156
1632663045.963346149173665.3750.8310100183880691.07223877271176
1737763254.330712330133717.333333333330.875447644995551.16030002288746
1832303305.985747890293813.1250.8670016713037970.977015706150947
1930282838.9616251334438880.7301856031721821.06658715397665
2017591551.659505455093933.958333333330.3944270309900131.1336249955715
2135953647.195837957013998.416666666670.9121600228316230.985688775630364
2244744837.994480094754051.458333333331.194136550853850.924763353577116
2368387167.642320290754068.8751.761578401963870.954009658188778
2483578982.711538371784107.083333333332.187126680743860.930342688207352
2531133131.867375928954148.250.754985204828290.993975678512454
2630062833.189469469564150.166666666670.6826688412841811.06099504900489
2740473350.083963465854139.6250.8092723286447091.20802942377992
2835233463.268877049714167.541666666670.8310100183880691.01724703598560
2939373703.654216124094230.583333333330.875447644995551.06300420348639
3039863728.360062093794300.291666666670.8670016713037971.06910275124059
3132603236.121744458854431.916666666670.7301856031721821.00737866416245
3215731786.590105788514529.583333333330.3944270309900130.880448176055332
3335284122.317189849434519.291666666670.9121600228316230.855829340034085
3452115429.58962966364546.8751.194136550853850.959741040378195
3576148125.206979958284612.458333333331.761578401963870.937083820606758
36925410191.55468087464659.791666666672.187126680743860.908006706510244
3753753548.147343241154699.6250.754985204828291.51487508269317
3830883221.741818300484719.333333333330.6826688412841810.958487729357833
3937183862.420786858674772.708333333330.8092723286447090.962608738190815
4045144015.613535938314832.208333333330.8310100183880691.12411215860324
4145204263.794800980414870.416666666670.875447644995551.06008853872627
4245394298.413660976044957.791666666670.8670016713037971.05597095998651
4336633609.611680481424943.416666666670.7301856031721821.01479059916812
4416431940.9754195018549210.3944270309900130.846481610994162
4547394551.070407247914989.333333333330.9121600228316231.04129349272488
4654285960.084792380424991.1251.194136550853850.91072529822719
4783148772.733840880164980.041666666671.761578401963870.947709135008462
481065110923.05742530504994.252.187126680743860.9750932898444
4936333786.817041117495015.750.754985204828290.959380915569107
5042923434.962053061575031.666666666670.6826688412841811.24950434202746
5141544085.105555957415047.8750.8092723286447091.01686478919550
5241214257.2643242020751230.8310100183880690.967992514952049
5346474595.735366374565249.583333333330.875447644995551.01115482714704
5447534631.739678522715342.250.8670016713037971.02618029723034
5539653933.175175887095386.541666666670.7301856031721821.00809138232846
5617232125.682311222555389.291666666670.3944270309900130.810563267569858
5750484917.378669750045390.916666666670.9121600228316231.02656320349163
5869226462.915791669135412.208333333331.194136550853851.07103360512954
5998589568.967278567835432.041666666671.761578401963871.03020521577909
601133111902.89017827835442.252.187126680743860.951953670939353
6140164092.523133639225420.666666666670.754985204828290.98130172239951
6239753690.735312262715406.333333333330.6826688412841811.07702115261227
6345104384.367719154155417.666666666670.8092723286447091.02865459489107
6442764506.46345346625422.8750.8310100183880690.948859353715843
6549684780.126526601755460.208333333330.875447644995551.03930303358138
6646774861.531246487855607.291666666670.8670016713037970.962042567016068
6735234131.116323147025657.6250.7301856031721820.852796126862929
6818212191.206501745775555.416666666670.3944270309900130.831049012746713
6952224983.206218064395463.083333333330.9121600228316231.04791970700911
7068736440.276952892525393.251.194136550853851.06719013021841
71108039311.483235480785285.8751.761578401963871.16018036297761
721391611311.91032308565172.041666666672.187126680743861.23020777238659
7326393904.909310239395172.166666666670.754985204828290.675815951238626
7428993548.256636179695197.6250.6826688412841810.817020947819962
7533704203.46163402175194.1250.8092723286447090.80172017575327
7637404300.788473915155175.3750.8310100183880690.869607985299345
7729274479.337306575365116.6250.875447644995550.653444873576135
7839864371.061176017375041.583333333330.8670016713037970.911906706286776
7942173695.134669252965060.541666666670.7301856031721821.14123039549531
8017382021.619312879695125.458333333330.3944270309900130.85970686415946
8152214720.048051477475174.583333333330.9121600228316231.10613280692465
8264246271.30663094675251.751.194136550853851.02434793545253
8398429472.96125566085377.541666666671.761578401963871.03895706256781
841307612032.11291299895501.333333333332.187126680743861.08675841845478
8539344194.446136291035555.666666666670.754985204828290.937906906459565
8631623802.266334207515569.708333333330.6826688412841810.831609288269134
8742864529.362344702995596.833333333330.8092723286447090.946270064926998
8846764695.587483484355650.458333333330.8310100183880690.995828534011294
8950104967.326414689965674.041666666670.875447644995551.00859085587447
9048744905.061955401235657.50.8670016713037970.993667367367903
914633NANA0.730185603172182NA
921659NANA0.394427030990013NA
935951NANA0.912160022831623NA
946981NANA1.19413655085385NA
959851NANA1.76157840196387NA
9612670NANA2.18712668074386NA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/May/25/t1274803240ks4ejk6ktgef2hi/1f5q41274803095.png (open in new window)
http://www.freestatistics.org/blog/date/2010/May/25/t1274803240ks4ejk6ktgef2hi/1f5q41274803095.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/May/25/t1274803240ks4ejk6ktgef2hi/2f5q41274803095.png (open in new window)
http://www.freestatistics.org/blog/date/2010/May/25/t1274803240ks4ejk6ktgef2hi/2f5q41274803095.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/May/25/t1274803240ks4ejk6ktgef2hi/37w771274803095.png (open in new window)
http://www.freestatistics.org/blog/date/2010/May/25/t1274803240ks4ejk6ktgef2hi/37w771274803095.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/May/25/t1274803240ks4ejk6ktgef2hi/47w771274803095.png (open in new window)
http://www.freestatistics.org/blog/date/2010/May/25/t1274803240ks4ejk6ktgef2hi/47w771274803095.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