Home » date » 2010 » Dec » 14 »

*Unverified author*
R Software Module: /rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Tue, 14 Dec 2010 16:04:07 +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/Dec/14/t1292342623fd8i4vstpvd93gs.htm/, Retrieved Tue, 14 Dec 2010 17:03:44 +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/Dec/14/t1292342623fd8i4vstpvd93gs.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:
KDGP2W92
 
Dataseries X:
» Textbox « » Textfile « » CSV «
97 100,7 101,4 101,5 101,8 101,5 102,2 101,8 98,5 98,4 97,5 97,7 98,3 99,6 99,4 96,7 96,9 96,1 97,9 99,2 97,8 94,9 93,3 91,5 89,1 92,3 91,8 92,1 94,4 92,8 92,6 92,3 92,1 89,8 87,4 87,7 86,3 89,1 90,4 87,1 86,7 84,4 88,4 88,9 88,5 87,2 86,2 83,4 87,5 85,7 87,4 86,8 87,9 85,9 87,7 87 86,8 86,2 86,1 87,5 85,7 88,9 89,8 91,4 95,2 94,1 96,8 96,1 96,6 94,2 93,9 96,5 93,4 95 95,2 94 97 96,9 96,3 96,3 97,3 95,7 96,4 95,1 94,6 95,9 96,2 94,3 98,3 95,9 92,1 94,6 94,7 96,7 97,5 96,2 97,1 95,9 94,5 99,4 101,3 101,4 100,9 101,4 103,1 102,4 101,1 102 103,9 101,7 101,2 101,9 101,1 103,1 103,3 101,4 102,8 103 102,6 102,2
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time3 seconds
R Server'RServer@AstonUniversity' @ vre.aston.ac.uk


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
197NANA0.986147503752455NA
2100.7NANA0.996202677715282NA
3101.4NANA0.998625060712167NA
4101.5NANA0.995219215413027NA
5101.8NANA1.01267669230203NA
6101.5NANA1.00190558733225NA
7102.2101.030275125606100.0541666666671.009755800197621.01157796386222
8101.8101.310655960317100.06251.012473763500981.00483013395821
998.5100.92348555689499.93333333333331.009908127654040.975986901923561
1098.499.455056804359599.650.9980437210673310.989391622324092
1197.598.326013548692199.24583333333330.9907319052725180.991599236876587
1297.797.661494406351898.81666666666670.9883099450803021.00039427610526
1398.397.049241213038598.41250.9861475037524551.01288787806404
1499.697.75238775081298.1250.9962026777152821.01890094238821
1599.497.852773136533597.98750.9986250607121671.01581178349752
1696.797.344879507586797.81250.9952192154130270.99337531146118
1796.998.727538527011697.49166666666671.012676692302030.981489070280916
1896.197.243286463822597.05833333333331.001905587332250.988243029360718
1997.997.357288402387196.41666666666671.009755800197621.00557443214082
2099.296.92326965181395.72916666666671.012473763500981.02349002831174
2197.896.05067884096395.10833333333331.009908127654041.01821248095428
2294.994.414936012969594.60.9980437210673311.00513757682327
2393.393.430146716803794.30416666666660.9907319052725180.998607015814733
2491.592.962904209115894.06250.9883099450803020.98426357027503
2589.192.406130049537393.70416666666670.9861475037524550.964221745378094
2692.392.841938718573893.19583333333330.9962026777152820.994162781108907
2791.892.543416563747192.67083333333330.9986250607121670.991966834688505
2892.191.779945394735692.22083333333330.9952192154130271.00348719542039
2994.492.925744977364691.76251.012676692302031.01586487171014
3092.891.532424616028791.35833333333331.001905587332251.01384837547228
3192.691.971924134666591.08333333333331.009755800197621.00682899560103
3292.391.966366851339390.83333333333331.012473763500981.00362777350115
3392.191.53975587077590.64166666666671.009908127654041.00612022747817
3489.890.1982012914690.3750.9980437210673310.995585263500174
3587.489.013133639130489.84583333333330.9907319052725180.981877577238543
3687.788.132539352535989.1750.9883099450803020.995092171907067
3786.387.421976207655188.650.9861475037524550.987165970659482
3889.187.997903198183288.33333333333330.9962026777152821.01252412570939
3990.487.920614720200488.04166666666670.9986250607121671.02820027234443
4087.187.363660126340287.78333333333330.9952192154130270.99698203891688
4186.788.73579516296587.6251.012676692302030.977057790948667
4284.487.562373726224687.39583333333331.001905587332250.96388433077303
4388.488.11802283057987.26666666666671.009755800197621.00319999428452
4488.988.262400333198287.1751.012473763500981.00722391034455
4588.587.769432194199986.90833333333331.009908127654041.00832371575771
4687.286.601085380113286.77083333333330.9980437210673311.00691578653152
4786.286.003785476865186.80833333333330.9907319052725181.00228146379891
4883.485.904724018000786.92083333333330.9883099450803020.970843000235053
4987.585.749634399208386.95416666666670.9861475037524551.02041251386149
5085.786.516051715081786.84583333333330.9962026777152820.990567626481971
5187.486.57663182599286.69583333333330.9986250607121671.00951028189296
5286.886.169397067844686.58333333333330.9952192154130271.00731817737635
5387.987.634509260086586.53751.012676692302031.00302952275485
5485.986.869389028319886.70416666666671.001905587332250.988840844408336
5587.787.646803457153486.81.009755800197621.00060694219011
568787.94178364142386.85833333333331.012473763500980.989290828518296
5786.887.954582017603187.09166666666671.009908127654040.986872974765862
5886.287.21238715926787.38333333333330.9980437210673310.988391704524518
5986.187.064694225427887.87916666666670.9907319052725180.988919799994588
6087.587.490137888233788.5250.9883099450803021.0001127225537
6185.788.009555761974389.24583333333330.9861475037524550.973757897742143
6288.989.662391838865890.00416666666670.9962026777152820.99149708341223
6389.890.666833637158890.79166666666670.9986250607121670.990439352491035
6491.491.095732184139191.53333333333330.9952192154130271.00334008859214
6595.293.36035205781192.19166666666671.012676692302031.01970480939328
6694.193.068679849938192.89166666666671.001905587332251.01108128053094
6796.894.500520950994793.58751.009755800197621.02433297748906
6896.195.337060755661494.16251.012473763500981.00800254631611
6996.695.579388381391194.64166666666671.009908127654041.01067815599046
7094.294.789202408369894.9750.9980437210673310.993784076736595
7193.994.276396885890795.15833333333330.9907319052725180.996007517275546
7296.594.235353263406795.350.9883099450803021.02403181670326
7393.494.123670285239595.44583333333330.9861475037524550.992311495258882
749595.070942209961795.43333333333330.9962026777152820.999253797129674
7595.295.339566733741295.47083333333330.9986250607121670.998536108999415
769495.105636272907495.56250.9952192154130270.98837465037577
779796.942695856829395.72916666666671.012676692302031.00059111357142
7896.995.957507626746195.7751.001905587332251.00982197637854
7996.396.700947132258795.76666666666671.009755800197620.99585374141465
8096.397.049828872250595.85416666666671.012473763500980.992273774400596
8197.396.883853046277695.93333333333331.009908127654041.00429531795689
8295.795.799721675950595.98750.9980437210673310.99895906090116
8396.495.163927551030696.05416666666670.9907319052725181.01298887594048
8495.194.94364205738196.06666666666670.9883099450803021.00164685006
8594.694.522238234672895.850.9861475037524551.00082268222568
8695.995.241126834071495.60416666666670.9962026777152821.0069179480318
8796.295.293796418458595.4250.9986250607121671.00950957581291
8894.394.90244568309495.35833333333330.9952192154130270.993651947757957
8998.396.655770794010495.44583333333331.012676692302031.01701118507961
9095.995.719555049754795.53751.001905587332251.00188514196657
9192.196.621008131409795.68751.009755800197620.953208849515823
9294.696.986549262031795.79166666666671.012473763500980.975392987169964
9394.796.66924756915195.72083333333331.009908127654040.979629017307263
9496.795.67496621081795.86250.9980437210673311.01071370944542
9597.595.308409287216296.20.9907319052725181.02299472553549
9696.295.425443155607696.55416666666670.9883099450803021.00811687972074
9797.195.80422998955197.150.9861475037524551.01352518579389
9895.997.428621880554597.80.9962026777152820.984310340728943
9994.598.29799347610198.43333333333330.9986250607121670.961362451645319
10099.498.54743605954499.02083333333330.9952192154130271.00865130514345
101101.3100.66850218725799.40833333333331.012676692302031.00627304269977
102101.499.990177615758499.81.001905587332251.01409960876017
103100.9101.303750654826100.3251.009755800197620.996014455020507
104101.4102.107979049074100.851.012473763500980.993066368998118
105103.1102.375228490396101.3708333333331.009908127654041.00707955938454
106102.4101.555107134105101.7541666666670.9980437210673311.00831955073199
107101.1100.906044552006101.850.9907319052725181.00192213904385
108102100.721137277996101.91250.9883099450803021.01269706395862
109103.9100.669224341396102.0833333333330.9861475037524551.03209298253503
110101.7101.79531028454102.1833333333330.9962026777152820.999063706527605
111101.2102.030354640513102.1708333333330.9986250607121670.99186169014664
112101.9101.694816828288102.1833333333330.9952192154130271.00201763647462
113101.1103.567289218972102.2708333333331.012676692302030.97617694508007
114103.1102.536687650228102.3416666666671.001905587332251.00549376386815
115103.3NANA1.00975580019762NA
116101.4NANA1.01247376350098NA
117102.8NANA1.00990812765404NA
118103NANA0.998043721067331NA
119102.6NANA0.990731905272518NA
120102.2NANA0.988309945080302NA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292342623fd8i4vstpvd93gs/1gtk71292342643.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292342623fd8i4vstpvd93gs/1gtk71292342643.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292342623fd8i4vstpvd93gs/2gtk71292342643.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292342623fd8i4vstpvd93gs/2gtk71292342643.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292342623fd8i4vstpvd93gs/3qk1s1292342643.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292342623fd8i4vstpvd93gs/3qk1s1292342643.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292342623fd8i4vstpvd93gs/4qk1s1292342643.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292342623fd8i4vstpvd93gs/4qk1s1292342643.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