Home » date » 2011 » Jan » 16 »

*Unverified author*
R Software Module: /rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Sun, 16 Jan 2011 14:38:54 +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/Jan/16/t1295188653u07gubtdzmtmnks.htm/, Retrieved Sun, 16 Jan 2011 15:37:34 +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/2011/Jan/16/t1295188653u07gubtdzmtmnks.htm/},
    year = {2011},
}
@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 = {2011},
    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 «
52347 52407 50570 50442 50590 50040 50476 50268 50595 48708 48547 48196 48375 47915 46462 46132 46308 46532 46817 46824 46263 45992 46404 46995 48102 48719 47912 48430 50141 50608 51005 51857 52513 52406 53634 55165 57294 58026 56701 58706 60103 61153 62395 63850 64534 65765 66954 65741 65474 60687 59227 59373 59995 59532 59696 59507 60210 58782 59372 58827 60481 59508 56565 56201 56193 56431 56316 55316 54795 53310 51848 50618 52026 50120 46825 46374 45441 45392 45032 44302 42880 42101 41886 41415 43228 41633 39375 38603 37847 36881 36700 36477 35684 35896 37109 37612 39570 39518 37970 38343 37966 38942 39304 39438 38999 38110 40024 41050 42239 42313 41159 42067 42515 43554 45018 45797 46749 47291 48800 50566 54884 54002 51813 52751 54461 55364 56900 57795
 
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'RServer@AstonUniversity' @ vre.aston.ac.uk


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
152347NANA1.0338633448719NA
252407NANA1.01763637602028NA
350570NANA0.98087814587542NA
450442NANA0.985352539285359NA
550590NANA0.989129409340085NA
650040NANA0.994498961152158NA
75047650141.1170331518501001.000820699264511.00667880946144
85026849825.736855720849747.33333333331.001576034676311.00887619877173
95059549247.2236831033493890.9971293948673441.02736755934851
104870848497.46660416249038.250.9889722125924561.00434112151788
114854748828.266088912348680.251.003040577830070.994239687143505
124819648699.103322293148355.66666666671.007102304224110.989669146083379
134837549684.413842148148057.04166666671.03386334487190.973645380092272
144791548603.41575813647761.08333333331.017636376020280.985836062190326
154646246529.998345737847437.08333333330.980878145875420.99853861276262
164613246452.885323087747143.41666666670.9853525392853590.993092241292314
174630846430.682390107546940.95833333330.9891294093400850.997357730194944
184653246544.167442732846801.6250.9944989611521580.999738582868674
194681746778.567987935446740.20833333331.000820699264511.00082157307754
204682446836.03239221246762.33333333331.001576034676310.999743095399045
214626346721.74420825346856.250.9971293948673440.990181355254884
224599246493.973730151847012.41666666670.9889722125924560.98920346681776
234640447411.596652799647267.8751.003040577830070.978747886088327
244699547935.468000115147597.41666666671.007102304224110.980380539935213
254810249565.218014012247941.751.03386334487190.970478935175902
264871949178.253106040448325.95833333331.017636376020280.990661459546963
274791247863.011745982548796.08333333330.980878145875421.00102350964201
284843048601.282309576249323.750.9853525392853590.996475765629286
295014149349.891773147849892.250.9891294093400851.01603059699682
305060850255.927627949750533.91666666670.9944989611521581.00700558896568
315100551299.400189100651257.33333333331.000820699264510.994261137790786
325185752110.123129143652028.1251.001576034676310.995142534426252
335251352630.608361062552782.1250.9971293948673440.99776539993124
345240652985.669747959753576.50.9889722125924560.989059876930554
355363454585.21748536854419.751.003040577830070.982573716306562
365516555666.782576663655274.20833333331.007102304224110.990985960505755
375729458090.885932219656188.16666666671.03386334487190.986282083334908
385802658170.596942743657162.45833333331.017636376020280.997514260634355
395670157050.856468474858163.04166666670.980878145875420.99386763862751
405870658353.111109104459220.54166666670.9853525392853591.00604747346265
416010359676.320379207560332.16666666670.9891294093400851.00714989828597
426115360990.466539712761327.83333333330.9944989611521581.00266489944263
436239562160.30641751962109.33333333331.000820699264511.0037756181719
446385062659.640037719762561.04166666671.001576034676311.01899723588523
456453462596.958209819862777.16666666670.9971293948673441.0309446632165
466576562216.447930069162910.20833333330.9889722125924561.05703559409112
476695463124.854204868862933.51.003040577830071.06065987547003
486574163307.91953438862861.45833333331.007102304224111.03843248180491
496547464804.062173948462681.45833333331.03386334487191.01033789863749
506068763488.34062866962388.04166666671.017636376020280.955876297900847
515922760840.847014369162026.91666666670.980878145875420.973474284242164
525937360654.155626470561555.79166666670.9853525392853590.9788776941458
535999560286.36594241860948.91666666670.9891294093400850.995166967889617
545953260012.956935813560344.91666666670.9944989611521580.991985781731636
555969659897.909525969159848.79166666671.000820699264510.996629105630447
565950759685.543467417959591.6251.001576034676310.997008597776857
576021059260.978725174859431.58333333330.9971293948673441.01601426934284
585878258535.781805028659188.50.9889722125924561.0042062852392
595937259077.000366320758897.91666666671.003040577830071.00499347684971
605882759026.559788747258610.29166666671.007102304224110.99661915264143
616048160315.846005662658340.251.03386334487191.0027381526626
625950859048.138710998558024.79166666671.017636376020281.00778790490336
635656556522.653586920857624.54166666670.980878145875421.00074919364877
645620156333.507910771657170.91666666670.9853525392853590.997647795855683
655619356013.821458773556629.41666666670.9891294093400851.00319882729941
665643155665.960539160755973.8750.9944989611521581.01374339818139
675631655324.909545854855279.54166666671.000820699264511.01791400044358
685531654622.03409177754536.08333333331.001576034676311.01270487120741
695479553584.819644892553739.08333333330.9971293948673441.02258438795031
705331052340.159343365552923.79166666670.9889722125924561.01852957019622
715184852224.645072159852066.33333333331.003040577830070.992787982155946
725061851521.717342861251158.3751.007102304224110.98245948719358
735202651929.146552061850228.251.03386334487191.00186510763933
745012050168.625307486549299.16666666671.017636376020280.99903076260933
754682547419.368734587548343.79166666670.980878145875420.987465697025317
764637446686.290705830947380.29166666670.9853525392853590.993310869184304
774544145992.704130396846498.16666666670.9891294093400850.988004529395953
784539245448.229587543245699.6250.9944989611521580.998762777163083
794503244986.473423314944949.58333333331.000820699264511.00101200590357
804430244299.082028711744229.3751.001576034676311.00006586979131
814288043440.274463860843565.33333333330.9971293948673440.987102418877972
824210142457.689680333342931.1250.9889722125924560.991598938071788
834188642419.505490296742290.91666666671.003040577830070.987423109153906
844141541915.472014019541619.8751.007102304224110.98805996950596
854322842303.70650074740918.08333333331.03386334487191.02184899564857
864163340954.648748389240244.8751.017636376020281.01656347380192
873937538861.4112614382396190.980878145875421.01321590549315
883860338488.486029823239060.6250.9853525392853591.00297527863497
893784738183.403802480738603.04166666670.9891294093400850.991189790092553
903688138035.151456201638245.54166666670.9944989611521580.96965566293247
913670037965.799619699337934.66666666671.000820699264510.966659476887654
923647737753.532248093337694.1251.001576034676310.966187740005234
933568437439.674406723537547.45833333330.9971293948673440.953106579195886
943589637064.782997891137478.08333333330.9889722125924560.968466482106273
953710937586.145499235537472.20833333331.003040577830070.987305282494445
963761237829.825816166337563.04166666671.007102304224110.994241955613943
973957039036.009088721937757.41666666671.03386334487191.01367944428091
983951838659.285099244137989.29166666671.017636376020281.02221238438713
993797037519.365608266938250.79166666670.980878145875421.01201071458505
1003834337917.515289663138481.16666666670.9853525392853591.01122132363069
1013796638274.238853238438694.8750.9891294093400850.991946571310788
1023894238745.265151920938959.58333333330.9944989611521581.00507764877354
1033930439246.224601820839214.04166666671.000820699264511.00147212626859
1043943839503.869833359739441.70833333331.001576034676310.998332572640666
1053899939577.104358737939691.04166666670.9971293948673440.985392959689578
1063811039538.202501584939979.08333333330.9889722125924560.963877910192614
1074002440446.399293632740323.79166666671.003040577830070.989556566196011
1084105040994.602844594640705.51.007102304224111.00135132801787
1094223942528.744088814141135.751.03386334487190.99318709980692
1104231342373.149053530141638.79166666671.017636376020280.998580491304667
1114115941419.214506499442226.66666666670.980878145875420.993717541252296
1124206742303.278385666442932.1250.9853525392853590.994414655443194
1134251543205.50230977843680.33333333330.9891294093400850.984018185812835
1144355444198.020081004844442.50.9944989611521580.985428757219794
1154501845403.106740246245365.8751.000820699264510.991518053104837
1164579746452.887826613546379.79166666671.001576034676310.985880580146886
1174674947174.939518220247310.750.9971293948673440.990971063819685
1184729147668.295818254348199.83333333330.9889722125924560.99208497363336
1194880049292.172356158749142.751.003040577830070.990015202563957
1205056650488.640191707350132.58333333331.007102304224111.00153222206023
12154884NA51119.75NANA
12254002NA52114.75NANA
12351813NANANANA
12452751NANANANA
12554461NANANANA
12655364NANANANA
12756900NANANANA
12857795NANANANA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2011/Jan/16/t1295188653u07gubtdzmtmnks/1o7m41295188730.png (open in new window)
http://www.freestatistics.org/blog/date/2011/Jan/16/t1295188653u07gubtdzmtmnks/1o7m41295188730.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/Jan/16/t1295188653u07gubtdzmtmnks/2ywtr1295188730.png (open in new window)
http://www.freestatistics.org/blog/date/2011/Jan/16/t1295188653u07gubtdzmtmnks/2ywtr1295188730.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/Jan/16/t1295188653u07gubtdzmtmnks/39e6f1295188730.png (open in new window)
http://www.freestatistics.org/blog/date/2011/Jan/16/t1295188653u07gubtdzmtmnks/39e6f1295188730.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/Jan/16/t1295188653u07gubtdzmtmnks/4cuds1295188730.png (open in new window)
http://www.freestatistics.org/blog/date/2011/Jan/16/t1295188653u07gubtdzmtmnks/4cuds1295188730.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