Home » date » 2010 » Dec » 10 »

paper classical decomposition

*The author of this computation has been verified*
R Software Module: /rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Fri, 10 Dec 2010 11:47:05 +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/10/t1291981509aet3kvnw5ysr4f3.htm/, Retrieved Fri, 10 Dec 2010 12:45:10 +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/10/t1291981509aet3kvnw5ysr4f3.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:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
1.579 2.146 2.462 3.695 4.831 5.134 6.250 5.760 6.249 2.917 1.741 2.359 1.511 2.059 2.635 2.867 4.403 5.720 4.502 5.749 5.627 2.846 1.762 2.429 1.169 2.154 2.249 2.687 4.359 5.382 4.459 6.398 4.596 3.024 1.887 2.070 1.351 2.218 2.461 3.028 4.784 4.975 4.607 6.249 4.809 3.157 1.910 2.228 1.594 2.467 2.222 3.607 4.685 4.962 5.770 5.480 5.000 3.228 1.993 2.288 1.580 2.111 2.192 3.601 4.665 4.876 5.813 5.589 5.331 3.075 2.002 2.306 1.507 1.992 2.487 3.490 4.647 5.594 5.611 5.788 6.204 3.013 1.931 2.549 1.504 2.090 2.702 2.939 4.500 6.208 6.415 5.657 5.964 3.163 1.997 2.422 1.376 2.202 2.683 3.303 5.202 5.231 4.880 7.998 4.977 3.531 2.025 2.205 1.442 2.238 2.179 3.218 5.139 4.990 4.914 6.084 5.672 3.548 1.793 2.086
 
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
11.579NANA0.40011901419982NA
22.146NANA0.601339586447101NA
32.462NANA0.670637515584853NA
43.695NANA0.883688483330432NA
54.831NANA1.30295056315214NA
65.134NANA1.47419090742475NA
76.255.544083871550243.757416666666671.475504146434891.12732782273952
85.766.281366839968813.750958333333331.674603203173090.916997867939934
96.2495.598803448232133.754541666666671.491208234000721.1161313408802
102.9173.194986578640383.727250.8571967479080770.912992880627788
111.7411.94405609154973.674916666666670.5290068504636480.895550291767643
122.3592.354520804321943.68150.6395547478804671.00190238101521
131.5111.453665721839133.633083333333330.400119014199821.03944117089611
142.0592.140643648671173.559791666666670.6013395864471010.961860233616253
152.6352.369641774859453.533416666666670.6706375155848531.11198242196599
162.8673.096923110184973.504541666666670.8836884833304320.925757565814658
174.4034.563530057833563.502458333333331.302950563152140.964823271502726
185.725.168881869158043.506251.474190907424751.10662231112891
194.5025.156764033111083.494916666666671.475504146434890.873028118233276
205.7495.835364186857043.4846251.674603203173090.985199863437562
215.6275.178220592567513.47251.491208234000721.08666672255652
222.8462.956400150472633.448916666666670.8571967479080770.962657236891636
231.7621.819563146073923.439583333333330.5290068504636480.968364304257246
242.4292.189622271826763.423666666666670.6395547478804671.10932375471936
251.1691.363522242265033.407791666666670.400119014199820.857338416466242
262.1542.0644238560893.433041666666670.6013395864471011.04339038402739
272.2492.291652220442893.4171250.6706375155848530.981388004662135
282.6872.98826624708883.381583333333330.8836884833304320.899183599392357
294.3594.422485659372343.394208333333331.302950563152140.9856448015297
305.3824.989337701557943.384458333333331.474190907424751.07870028487337
314.4594.98290046118953.377083333333331.475504146434890.894860339822154
326.3985.6724392502153.387333333333331.674603203173091.12790983169322
334.5965.068368252662793.398833333333331.491208234000720.906800723800086
343.0242.933220121747953.4218750.8571967479080771.0309488802354
351.8871.827079451740933.453791666666670.5290068504636481.03279580874383
362.072.209368524667573.454541666666670.6395547478804670.936919294761593
371.3511.377909855150633.443750.400119014199820.980470525666071
382.2182.07083814501113.443708333333330.6013395864471011.07106390972343
392.4612.311268367773753.4463750.6706375155848531.06478331738277
403.0283.058261739039273.460791666666670.8836884833304320.990104921808042
414.7844.517709629696043.467291666666671.302950563152141.05894366662115
424.9755.122567704816453.474833333333331.474190907424750.971192629688877
434.6075.151784206616863.491541666666671.475504146434890.894253294631956
446.2495.881276224677373.512041666666671.674603203173091.06252448639968
454.8095.237806788251133.512458333333331.491208234000720.918132377617865
463.1573.023011481091323.5266250.8571967479080771.04432286140717
471.911.876188921025643.5466250.5290068504636481.01802114840113
482.2282.265276268878123.541958333333330.6395547478804670.983544493274288
491.5941.436377246100583.5898750.400119014199821.10973632054346
502.4672.168605939440963.606291666666670.6013395864471011.13759717942853
512.2222.402363296974023.582208333333330.6706375155848530.924922555551358
523.6073.175203181666663.5931250.8836884833304321.13599029530661
534.6854.690024841672913.599541666666671.302950563152140.998928610861873
544.9625.315195316719953.60551.474190907424750.93354988938809
555.775.3227582495853.607416666666671.475504146434891.08402443422071
565.486.015174705797753.5921.674603203173090.911029233235417
5755.332436377433753.575916666666671.491208234000720.93765769455017
583.2283.063978342335093.574416666666670.8571967479080771.05353225099493
591.9931.890317812323443.573333333333330.5290068504636481.05432006565624
602.2882.28251759895643.568916666666670.6395547478804671.00240190964841
611.581.427274538527533.5671250.400119014199821.10700496460199
622.1112.148861956352613.573458333333330.6013395864471010.982380461322477
632.1922.408790239831713.591791666666670.6706375155848530.910000366056424
643.6013.180578953273593.599208333333330.8836884833304321.13218381084164
654.6654.681772821439623.593208333333331.302950563152140.996417420904575
664.8765.298733518253713.594333333333331.474190907424750.92021989466022
675.8135.300072373333563.592041666666671.475504146434891.09677747595432
685.5896.001847655305833.584041666666671.674603203173090.93121323981943
695.3315.355487971384353.5913751.491208234000720.995427499507945
703.0753.085086812252333.599041666666670.8571967479080770.9967304608051
712.0021.901074284949533.593666666666670.5290068504636481.05308878030147
722.3062.317000259112953.622833333333330.6395547478804670.995252370357022
731.5071.458167060748883.644333333333330.400119014199821.03348926235245
741.9922.191406732093753.644208333333330.6013395864471010.909005147618933
752.4872.473897965303083.6888750.6706375155848531.0052961095731
763.493.289677660611423.722666666666670.8836884833304321.06089421519534
774.6474.843230112056893.7171251.302950563152140.959483628174432
785.5945.490316911597783.724291666666671.474190907424751.01888471832713
795.6115.509962838163933.734291666666671.475504146434891.0183371766387
805.7886.260085424261823.738251.674603203173090.92458802200491
816.2045.593957021471633.751291666666671.491208234000721.10905392661881
823.0133.203594262650623.737291666666670.8571967479080770.940506116872326
831.9311.961667611279723.708208333333330.5290068504636480.984366560826421
842.5492.384046915182423.727666666666670.6395547478804671.0691903685985
851.5041.515150677021173.786750.400119014199820.99264054909503
862.092.293985243215183.814791666666670.6013395864471010.911078223446076
872.7022.547975467545393.799333333333330.6706375155848531.06044977057923
882.9393.35411327918763.795583333333330.8836884833304320.876237549350705
894.54.95718399672593.804583333333331.302950563152140.90777344616866
906.2085.604935254650063.802041666666671.474190907424751.1075953098387
916.4155.594251012529023.791416666666671.475504146434891.14671293541044
925.6576.34800209242843.790751.674603203173090.891146524155592
935.9645.6585760449453.7946251.491208234000721.05397540876522
943.1633.265062412781863.8090.8571967479080770.968741053040115
951.9972.038483814357463.853416666666670.5290068504636480.979649671944764
962.4222.457142693242263.841958333333330.6395547478804670.985697740168322
971.3761.495361457443873.737291666666670.400119014199820.920178859198428
982.2022.267576413043713.7708750.6013395864471010.971080836497285
992.6832.566725374751953.827291666666670.6706375155848531.0453007658676
1003.3033.359341769380643.80150.8836884833304320.983228330652696
1015.2024.974665250114863.8181.302950563152141.04569850200069
1025.2315.616851631151743.8101251.474190907424750.931304642442083
1034.885.612571855680593.803833333333331.475504146434890.869476618826868
1047.9986.377028547950073.808083333333331.674603203173091.25418914779219
1054.9775.649566661864583.788583333333331.491208234000720.880952522181126
1063.5313.226524275657163.764041666666670.8571967479080771.09436647560348
1072.0251.987941618186083.7578750.5290068504636481.01864158457919
1082.2052.395265771384823.745208333333330.6395547478804670.920565903935235
1091.4421.495078039808813.736583333333330.400119014199820.964498147658165
1102.2382.199850542120113.658250.6013395864471011.01734184079757
1112.1792.419296894242543.607458333333330.6706375155848530.900674904839335
1123.2183.21408547493323.6371250.8836884833304321.00121792811589
1135.1394.727321801543143.628166666666671.302950563152141.08708486871414
1144.995.327050268600493.613541666666671.474190907424750.936728536130552
1154.914NANA1.47550414643489NA
1166.084NANA1.67460320317309NA
1175.672NANA1.49120823400072NA
1183.548NANA0.857196747908077NA
1191.793NANA0.529006850463648NA
1202.086NANA0.639554747880467NA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/10/t1291981509aet3kvnw5ysr4f3/1tz5w1291981620.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/10/t1291981509aet3kvnw5ysr4f3/1tz5w1291981620.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/10/t1291981509aet3kvnw5ysr4f3/2tz5w1291981620.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/10/t1291981509aet3kvnw5ysr4f3/2tz5w1291981620.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/10/t1291981509aet3kvnw5ysr4f3/34rmh1291981620.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/10/t1291981509aet3kvnw5ysr4f3/34rmh1291981620.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/10/t1291981509aet3kvnw5ysr4f3/44rmh1291981620.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/10/t1291981509aet3kvnw5ysr4f3/44rmh1291981620.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