Home » date » 2010 » Jan » 13 »

*Unverified author*
R Software Module: /rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Wed, 13 Jan 2010 14:25:25 -0700
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2010/Jan/13/t1263418134kwyuxnvuycg18ed.htm/, Retrieved Wed, 13 Jan 2010 22:29:00 +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/2010/Jan/13/t1263418134kwyuxnvuycg18ed.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 «
2,46 2,46 2,45 2,45 2,46 2,43 2,44 2,44 2,43 2,43 2,42 2,43 2,43 2,42 2,41 2,42 2,39 2,4 2,39 2,4 2,41 2,41 2,41 2,41 2,42 2,43 2,43 2,43 2,44 2,42 2,44 2,42 2,42 2,42 2,43 2,44 2,43 2,44 2,44 2,45 2,45 2,43 2,44 2,45 2,46 2,44 2,43 2,42 2,41 2,43 2,41 2,43 2,43 2,44 2,43 2,44 2,43 2,44 2,44 2,43 2,43 2,43 2,43 2,44 2,47 2,48 2,49 2,5 2,51 2,49 2,49 2,48 2,48 2,48 2,5 2,5 2,5 2,5 2,5 2,48 2,49 2,48 2,5 2,5 2,49 2,48 2,47 2,46 2,43 2,42 2,43 2,45 2,45 2,46 2,44 2,45 2,45 2,42 2,41 2,39 2,39 2,38 2,37 2,37 2,38 2,39 2,41 2,42 2,48 2,53 2,56 2,56 2,53 2,57 2,56 2,57 2,58 2,57 2,6 2,63 2,72 2,83 2,9 2,92 2,94 2,95 2,98 3,02 3,16 3,2 3,18 3,17 3,19
 
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' @ 72.249.127.135


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
12.46NANA1.00038099740714NA
22.46NANA1.00423298008805NA
32.45NANA1.00464201592201NA
42.45NANA1.00387415701602NA
52.46NANA1.00026090084290NA
62.43NANA0.998734111352019NA
72.442.435426365121482.440416666666670.9979551436386451.00187796064953
82.442.43566917286762.43750.999248891432861.00177808512775
92.432.434005098435012.434166666666670.9999336248278030.998354523399484
102.432.423743848725872.431250.9969126370080681.00258119325498
112.422.420588018285932.427083333333330.9973238186929160.999757076263499
122.432.414438207125682.422916666666670.996500721771561.00644530592185
132.432.42050518830972.419583333333331.000380997407141.00392265702885
142.422.426059507729372.415833333333331.004232980088050.997502325186143
152.412.424536065091792.413333333333331.004642015922010.994004599353634
162.422.421009842003642.411666666666671.003874157016020.999582883974233
172.392.411045546406742.410416666666671.000260900842900.99127119500579
182.42.406116929932242.409166666666670.9987341113520190.9974577586583
192.392.402992822953222.407916666666670.9979551436386450.994593066267567
202.42.406108059829382.407916666666670.999248891432860.997461435780316
212.412.409006757814322.409166666666670.9999336248278031.00041230361121
222.412.402974835454862.410416666666670.9969126370080681.00292352813749
232.412.406459264187782.412916666666670.9973238186929161.00147134666475
242.412.407379660346462.415833333333330.996500721771561.00108846132444
252.422.419671537478532.418751.000380997407141.00013574673933
262.432.431917533446552.421666666666671.004232980088050.999211513786885
272.432.434163884411042.422916666666671.004642015922010.998289398492144
282.432.433139988067582.423751.003874157016020.99870949140494
292.442.425632684544042.4251.000260900842901.00592312082019
302.422.424010916093962.427083333333330.9987341113520190.998345339095904
312.442.423783555112362.428750.9979551436386451.00669054992697
322.422.427758452477092.429583333333330.999248891432860.996804273312622
332.422.430255347341912.430416666666670.9999336248278030.99578013588032
342.422.424159228991282.431666666666670.9969126370080680.99828425916023
352.432.426405740561642.432916666666670.9973238186929161.00148131014458
362.442.425233631611542.433750.996500721771561.00608863748053
372.432.435094077855222.434166666666671.000380997407140.99790805706377
382.442.445725736922762.435416666666671.004232980088050.99765888021035
392.442.449652115489842.438333333333331.004642015922010.996059801541286
402.452.450289504916612.440833333333331.003874157016020.999881848689297
412.452.442303699558082.441666666666671.000260900842901.00315124627756
422.432.437743510125052.440833333333330.9987341113520190.996823492671444
432.442.434178921191932.439166666666670.9979551436386451.00239139315413
442.452.436085526572362.437916666666670.999248891432861.00571181646780
452.462.436088293486742.436250.9999336248278031.00981561570539
462.442.426651510583812.434166666666670.9969126370080681.00550078548897
472.432.425990188970522.43250.9973238186929161.00165285541867
482.422.423572797075252.432083333333330.996500721771560.998525814005025
492.412.433009950777292.432083333333331.000380997407140.990542598985286
502.432.441541432839062.431251.004232980088050.995272890853364
512.412.440861497850522.429583333333331.004642015922010.987356309287644
522.432.437741077953912.428333333333331.003874157016020.99682448721732
532.432.429383662922202.428751.000260900842901.00025370100541
542.442.426507751372342.429583333333330.9987341113520191.00556035669782
552.432.425862628328272.430833333333330.9979551436386451.00170552595329
562.442.429840221000912.431666666666670.999248891432861.00418125394060
572.432.432338542393632.43250.9999336248278030.999038562127404
582.442.426236130318392.433750.9969126370080681.00567293080406
592.442.429314601699492.435833333333330.9973238186929161.00439852388531
602.432.430631343854462.439166666666670.996500721771560.999740255199102
612.432.444264236998122.443333333333331.000380997407140.994164200096615
622.432.458697079582242.448333333333331.004232980088050.988328338687777
632.432.465558947408602.454166666666671.004642015922010.985577733825437
642.442.469112145360662.459583333333331.003874157016020.988209468162327
652.472.46439279445172.463751.000260900842901.00227528889101
662.482.464792558974172.467916666666670.9987341113520191.00616986649463
672.492.467028278003372.472083333333330.9979551436386451.00931149521124
682.52.474390067410622.476250.999248891432861.01034999813759
692.512.481085306603992.481250.9999336248278031.01165405047503
702.492.478989424026732.486666666666670.9969126370080681.00444155826828
712.492.483751860136482.490416666666670.9973238186929161.00251560550947
722.482.483778049015612.49250.996500721771560.998478910377233
732.482.494700112284072.493751.000380997407140.994107463172956
742.482.503887563686202.493333333333331.004232980088050.99045980976437
752.52.503233023005682.491666666666671.004642015922010.998708461027813
762.52.500064931868652.490416666666671.003874157016020.999974027927105
772.52.491066418474182.490416666666671.000260900842901.00358624782526
782.52.488512494118782.491666666666670.9987341113520191.00461621386606
792.52.487819010162512.492916666666670.9979551436386451.00489625241536
802.482.491460569305932.493333333333330.999248891432860.995400059929857
812.492.491917920872952.492083333333330.9999336248278030.999230343480863
822.482.481481705619252.489166666666670.9969126370080680.999402894804385
832.52.477934137860772.484583333333330.9973238186929161.00890494295311
842.52.469660955457182.478333333333330.996500721771561.01228470024429
852.492.473025190673582.472083333333331.000380997407141.00686398561181
862.482.478363308775632.467916666666671.004232980088051.00066039196859
872.472.476442569247762.4651.004642015922010.997398458043097
882.462.472040111651962.46251.003874157016020.995129483702467
892.432.459808265322842.459166666666671.000260900842900.987881874476536
902.422.451476104156142.454583333333330.9987341113520190.987160346330613
912.432.445821731201052.450833333333330.9979551436386450.993531118397056
922.452.44482895437242.446666666666670.999248891432861.00211509505332
932.452.441504600621222.441666666666670.9999336248278031.00347957541289
942.462.428728411910912.436250.9969126370080681.01287570398392
952.442.425159085788272.431666666666670.9973238186929161.00611956316544
962.452.419835919368612.428333333333330.996500721771561.01246534130267
972.452.425090267881152.424166666666671.000380997407141.01027167213063
982.422.428570090179592.418333333333331.004232980088050.99647113739305
992.412.423280262571892.412083333333331.004642015922010.994519716610166
1002.392.415572190319802.406251.003874157016020.989413609569492
1012.392.402710038899722.402083333333331.000260900842900.994710123696183
1022.382.396545728031782.399583333333330.9987341113520190.993096009878614
1032.372.394676530089572.399583333333330.9979551436386450.989695255380215
1042.372.403609937600792.405416666666670.999248891432860.986016891894555
1052.382.416089620990182.416250.9999336248278030.985062797059908
1062.392.422082327664192.429583333333330.9969126370080680.986754237336299
1072.412.435963427157452.44250.9973238186929160.98934161865158
1082.422.447654897851402.456250.996500721771560.988701471814645
1092.482.473025190673582.472083333333331.000380997407141.00282035514750
1102.532.498866398785762.488333333333331.004232980088051.01245908994149
1112.562.516628249884642.5051.004642015922011.01723407107003
1122.562.530599437477892.520833333333331.003874157016021.01161802302122
1132.532.536911709762812.536251.000260900842900.997275541858153
1142.572.549684958439092.552916666666670.9987341113520191.00796766733618
1152.562.566407977724052.571666666666670.9979551436386450.997503133648403
1162.572.592218165858752.594166666666670.999248891432860.99142889817247
1172.582.620659375069532.620833333333330.9999336248278030.984485059196808
1182.572.641818488071382.650.9969126370080680.9728147530212
1192.62.674905592052632.682083333333330.9973238186929160.97199692120904
1202.632.705499459609792.7150.996500721771560.972094076995056
1212.722.74938044120732.748333333333331.000380997407140.989313795658487
1222.832.796370419136842.784583333333331.004232980088051.01202615384322
1232.92.840625300019492.82751.004642015922011.02090198238399
1242.922.889066167712362.877916666666671.003874157016021.01070720796683
1252.942.92909733796832.928333333333331.000260900842901.00372219177915
1262.952.971233981272262.9750.9987341113520190.99285348060567
1272.983.010913831286433.017083333333330.9979551436386450.989732741281002
1283.02NANA0.99924889143286NA
1293.16NANA0.999933624827803NA
1303.2NANA0.996912637008068NA
1313.18NANA0.997323818692916NA
1323.17NANA0.99650072177156NA
1333.19NANANANA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Jan/13/t1263418134kwyuxnvuycg18ed/1cxxw1263417920.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/13/t1263418134kwyuxnvuycg18ed/1cxxw1263417920.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jan/13/t1263418134kwyuxnvuycg18ed/20bdd1263417920.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/13/t1263418134kwyuxnvuycg18ed/20bdd1263417920.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jan/13/t1263418134kwyuxnvuycg18ed/3w69p1263417920.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/13/t1263418134kwyuxnvuycg18ed/3w69p1263417920.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jan/13/t1263418134kwyuxnvuycg18ed/4f6lu1263417920.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/13/t1263418134kwyuxnvuycg18ed/4f6lu1263417920.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