Home » date » 2010 » May » 30 »

*Unverified author*
R Software Module: /rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Sun, 30 May 2010 11:10:50 +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/30/t1275218008vq1ht1vka8wtv5s.htm/, Retrieved Sun, 30 May 2010 13:13:29 +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/30/t1275218008vq1ht1vka8wtv5s.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:
KDGP2W51
 
Dataseries X:
» Textbox « » Textfile « » CSV «
41086 39690 43129 37863 35953 29133 24693 22205 21725 27192 21790 13253 37702 30364 32609 30212 29965 28352 25814 22414 20506 28806 22228 13971 36845 35338 35022 34777 26887 23970 22780 17351 21382 24561 17409 11514 31514 27071 29462 26105 22397 23843 21705 18089 20764 25316 17704 15548 28029 29383 36438 32034 22679 24319 18004 17537 20366 22782 19169 13807 29743 25591 29096 26482 22405 27044 17970 18730 19684 19785 18479 10698
 
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
141086NANA1.32718577010684NA
239690NANA1.20084764006351NA
343129NANA1.32843407985928NA
437863NANA1.22345091771013NA
535953NANA1.01798223782367NA
629133NANA1.05339554978969NA
72469326076.929973288729668.33333333330.8789482604333040.94692895311272
82220522272.198147166529138.750.7643498141535420.996982868654342
92172523606.1062038528311.83333333330.8337893885542550.92031272808799
102719228306.413163973127554.70833333331.027280449553170.960630364662682
112179021346.144864911926986.41666666670.7909958972536871.02079322228426
121325314776.598720938226704.3750.5533399946989280.896891108047804
133770235460.468298006626718.54166666671.327185770106841.06321212915621
143036432151.444679742126773.95833333331.200847640063510.944405463034502
153260935511.533768538226731.8751.328434079859280.918265040663781
163021232725.27296388326748.33333333331.223450917710130.923200855599989
172996527316.365706054126833.83333333331.017982237823671.09696144510757
182835228317.3791694465268821.053395549789691.0012226000982
192581423622.796561626426876.20833333330.8789482604333041.0927580031711
202241420673.942685771527047.750.7643498141535421.08416668947361
212050622808.760359820527355.54166666670.8337893885542550.899040529888816
222880628400.494931811327646.29166666671.027280449553171.01427809864449
232222821917.112070079527708.250.7909958972536871.01418471233466
241397115160.086393097627397.41666666670.5533399946989280.921564669074773
253684535951.361134724827088.41666666671.327185770106841.02485688544382
263533832123.925254657326751.04166666671.200847640063511.100052366573
273502235305.239026220126576.58333333331.328434079859280.99197742221743
283477732343.403346192826436.20833333331.223450917710131.07524244210663
292688726527.132560254726058.54166666671.017982237823671.01356601354963
302397027130.597408164725755.3751.053395549789690.883504319473128
312278022352.423342546825430.8750.8789482604333041.01912887255671
321735119005.016714476124864.29166666670.7643498141535420.912969468044915
332138220251.215634103824288.16666666670.8337893885542551.05583785123456
342456124341.581465570623695.16666666671.027280449553171.00901414457149
351740918308.984284756823146.750.7909958972536870.950844663430834
361151412701.573740817222954.3750.5533399946989280.906501842602318
373151430398.249974376622904.29166666671.327185770106841.0367044164241
382707127487.702692963822890.251.200847640063510.984840395808325
392946230414.830366898122895.251.328434079859280.968672178821844
402610528018.19848935822900.95833333331.223450917710130.931715863527603
412239723357.305535378122944.70833333331.017982237823670.958886287892942
422384324359.859871849123125.08333333331.053395549789690.978782313421826
432170520345.857709665923147.95833333330.8789482604333041.06680191662249
441808917655.780052950523099.08333333330.7643498141535421.02453700407177
452076419582.447062034323486.08333333330.8337893885542551.06033734876049
462531624679.17150330524023.79166666671.027280449553171.02580428992966
471770419207.423791387424282.58333333330.7909958972536870.921726942263774
481554813454.000854442224314.16666666670.5533399946989281.15564137153049
492802932091.075424147824179.79166666671.327185770106840.873420402075675
502938328823.445551261124002.58333333331.200847640063511.01941317000925
513643831833.2658556679239631.328434079859281.1446516409975
523203429168.089420640823840.83333333331.223450917710131.0982549984001
532267924224.202242738123796.29166666671.017982237823670.936212461105861
542431925054.793694341623784.79166666671.053395549789690.970632618120188
551800420904.612443392223783.66666666670.8789482604333040.861245337542286
561753718112.861241814323697.08333333330.7643498141535420.968207052760668
572036619371.567829179123233.16666666670.8337893885542551.05133462503345
582278223315.071476354522695.91666666671.027280449553170.97713618519698
591916917760.362713686622453.16666666670.7909958972536871.07931354269178
601380712480.744971266122555.29166666670.5533399946989281.10626409174991
612974330083.872845082522667.41666666671.327185770106840.988669249905494
622559127278.104744454422715.70833333331.200847640063510.938151687580225
632909630204.6056737604227371.328434079859280.963296800304747
642648227630.058685714522583.70833333331.223450917710130.958448923370978
652240522833.426426238122430.08333333331.017982237823670.981236875349299
662704423461.006227509822271.79166666671.053395549789691.15272123189196
6717970NANA0.878948260433304NA
6818730NANA0.764349814153542NA
6919684NANA0.833789388554255NA
7019785NANA1.02728044955317NA
7118479NANA0.790995897253687NA
7210698NANA0.553339994698928NA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/May/30/t1275218008vq1ht1vka8wtv5s/1flax1275217846.png (open in new window)
http://www.freestatistics.org/blog/date/2010/May/30/t1275218008vq1ht1vka8wtv5s/1flax1275217846.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/May/30/t1275218008vq1ht1vka8wtv5s/2flax1275217846.png (open in new window)
http://www.freestatistics.org/blog/date/2010/May/30/t1275218008vq1ht1vka8wtv5s/2flax1275217846.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/May/30/t1275218008vq1ht1vka8wtv5s/3pur01275217846.png (open in new window)
http://www.freestatistics.org/blog/date/2010/May/30/t1275218008vq1ht1vka8wtv5s/3pur01275217846.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/May/30/t1275218008vq1ht1vka8wtv5s/4pur01275217846.png (open in new window)
http://www.freestatistics.org/blog/date/2010/May/30/t1275218008vq1ht1vka8wtv5s/4pur01275217846.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