Home » date » 2009 » Jun » 01 »

Classical decomposition - Koers BEL 20 van Januari 2000 tot Januari 2009 - Claus Wesley

*Unverified author*
R Software Module: rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Mon, 01 Jun 2009 03:21:25 -0600
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2009/Jun/01/t1243848135wpktbb437dudg7n.htm/, Retrieved Mon, 01 Jun 2009 11:22:19 +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/2009/Jun/01/t1243848135wpktbb437dudg7n.htm/},
    year = {2009},
}
@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 = {2009},
    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 «
3030,29 2803,47 2767,63 2882,6 2863,36 2897,06 3012,61 3142,95 3032,93 3045,78 3110,52 3013,24 2987,1 2995,55 2833,18 2848,96 2794,83 2845,26 2915,02 2892,63 2604,42 2641,65 2659,81 2638,53 2720,25 2745,88 2735,7 2811,7 2799,43 2555,28 2304,98 2214,95 2065,81 1940,49 2042 1995,37 1946,81 1765,9 1635,25 1833,42 1910,43 1959,67 1969,6 2061,41 2091,48 2120,88 2174,56 2196,72 2350,44 2440,25 2408,64 2472,81 2407,6 2452,62 2448,05 2497,84 2645,64 2756,76 2849,27 2921,44 2981,85 3080,58 3106,22 3119,31 3061,26 3097,31 3161,69 3257,16 3277,01 3295,32 3363,99 3494,17 3667,03 3813,06 3917,96 3895,51 3801,06 3570,12 3701,61 3862,27 3970,1 4138,52 4199,75 4290,89 4443,91 4502,64 4356,98 4591,27 4696,96 4621,4 4562,84 4202,52 4296,49 4435,23 4105,18 4116,68 3844,49 3720,98 3674,4 3857,62 3801,06 3504,37 3032,6 3047,03 2962,34 2197,82 2014,45 1862,83 1905,41
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time1 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
13030.29NANA20.4275824652778NA
22803.47NANA36.1930512152779NA
32767.63NANA-12.503459201389NA
42882.6NANA87.5644053819447NA
52863.36NANA77.9433116319444NA
62897.06NANA6.31872829861102NA
73012.612919.309665798612965.07041666667-45.760750868055693.3003342013894
83142.952915.494613715282971.27416666667-55.7795529513891227.455386284722
93032.932928.857842881942982.00875-53.1509071180558104.072157118056
103045.782952.695811631942983.33833333333-30.642521701388993.0841883680564
113110.522947.598311631942979.08125-31.4829383680555162.921688368056
123013.242974.940551215282974.06750.87305121527789438.2994487847218
132987.12988.270499131942967.8429166666720.4275824652778-1.17049913194433
142995.552989.539717881952953.3466666666736.19305121527796.01028211805487
152833.182912.558624131942925.06208333333-12.503459201389-79.3786241319444
162848.962977.933155381942890.3687587.5644053819447-128.973155381945
172794.832932.693728298612854.7504166666777.9433116319444-137.863728298612
182845.262826.676644965282820.357916666676.3187282986110218.5833550347224
192915.022747.865499131942793.62625-45.7607508680556167.154500868056
202892.632716.325030381942772.10458333333-55.7795529513891176.304969618056
212604.422704.489092881942757.64-53.1509071180558-100.069092881944
222641.652721.383311631942752.02583333333-30.6425217013889-79.7333116319446
232659.812719.182061631952750.665-31.4829383680555-59.3720616319451
242638.532739.647217881942738.774166666670.873051215277894-101.117217881945
252720.252721.700915798612701.2733333333320.4275824652778-1.45091579861037
262745.882683.811384548612647.6183333333336.193051215277962.0686154513892
272735.72584.436124131942596.93958333333-12.503459201389151.263875868056
282811.72632.846905381942545.282587.5644053819447178.853094618056
292799.432568.268728298612490.3254166666777.9433116319444231.161271701389
302555.282444.103728298612437.7856.31872829861102111.176271701389
312304.982332.999249131942378.76-45.7607508680556-28.0192491319444
322214.952249.921280381942305.70083333333-55.7795529513891-34.9712803819448
332065.812165.865342881942219.01625-53.1509071180558-100.055342881944
341940.492101.759978298612132.4025-30.6425217013889-161.269978298611
3520422023.116228298612054.59916666667-31.482938368055518.8837717013889
361995.371993.613467881941992.740416666670.8730512152778941.75653211805547
371946.811974.376749131941953.9491666666720.4275824652778-27.5667491319443
381765.91969.770551215281933.577536.1930512152779-203.870551215278
391635.251915.746124131941928.24958333333-12.503459201389-280.496124131944
401833.422024.399822048611936.8354166666787.5644053819447-190.979822048611
411910.432027.818311631941949.87577.9433116319444-117.388311631944
421959.671970.106644965281963.787916666676.31872829861102-10.4366449652771
431969.61943.234665798611988.99541666667-45.760750868055626.3653342013890
442061.411978.131697048612033.91125-55.779552951389183.2783029513892
452091.482041.082842881942094.23375-53.150907118055850.3971571180559
462120.882122.457061631942153.09958333333-30.6425217013889-1.57706163194371
472174.562168.973311631942200.45625-31.48293836805555.58668836805509
482196.722242.584301215282241.711250.873051215277894-45.8643012152775
492350.442302.613832465282282.1862520.427582465277847.8261675347221
502440.252356.499301215282320.3062536.193051215277983.7506987847223
512408.642349.077374131942361.58083333333-12.50345920138959.5626258680559
522472.812498.730238715282411.1658333333387.5644053819447-25.9202387152777
532407.62543.717061631942465.7737577.9433116319444-136.117061631945
542452.622530.402061631942524.083333333336.31872829861102-77.7820616319445
552448.052534.827999131942580.58875-45.7607508680556-86.777999131944
562497.842577.798363715282633.57791666667-55.7795529513891-79.9583637152773
572645.642636.173259548612689.32416666667-53.15090711805589.46674045138889
582756.762714.684978298612745.3275-30.642521701388942.0750217013892
592849.272768.017894965282799.50083333333-31.482938368055581.2521050347227
602921.442854.471801215282853.598750.87305121527789466.9681987847225
612981.852930.623415798612910.1958333333320.427582465277851.2265842013894
623080.583007.762217881942971.5691666666736.193051215277972.8177821180557
633106.223017.011124131943029.51458333333-12.50345920138989.2088758680552
643119.313165.826072048613078.2616666666787.5644053819447-46.516072048611
653061.263200.091644965283122.1483333333377.9433116319444-138.831644965278
663097.313173.777478298613167.458756.31872829861102-76.4674782986108
673161.693174.110915798613219.87166666667-45.7607508680556-12.4209157986111
683257.163223.161280381943278.94083333333-55.779552951389133.9987196180559
693277.013290.132426215283343.28333333333-53.1509071180558-13.1224262152773
703295.323378.804978298613409.4475-30.6425217013889-83.4849782986107
713363.993441.131228298613472.61416666667-31.4829383680555-77.1412282986112
723494.173524.012634548613523.139583333330.873051215277894-29.8426345486114
733667.033585.764249131943565.3366666666720.427582465277881.2657508680559
743813.063649.239301215283613.0462536.1930512152779163.820698784722
753917.963654.634457465283667.13791666667-12.503459201389263.325542534722
763895.513818.714405381943731.1587.564405381944776.7955946180555
773801.063879.049978298613801.1066666666777.9433116319444-77.9899782986113
783570.123875.445394965283869.126666666676.31872829861102-305.325394965278
793701.613888.932582465283934.69333333333-45.7607508680556-187.322582465278
803862.273940.016280381943995.79583333333-55.7795529513891-77.7462803819449
813970.13989.669926215284042.82083333333-53.1509071180558-19.5699262152780
824138.524059.460811631944090.10333333333-30.642521701388979.0591883680563
834199.754124.939561631944156.4225-31.482938368055574.8104383680557
844290.894238.428051215284237.5550.87305121527789452.4619487847231
854443.914337.670499131944317.2429166666720.4275824652778106.239500868056
864502.644403.497634548614367.3045833333336.193051215277999.14236545139
874356.984382.577790798614395.08125-12.503459201389-25.5977907986116
884591.274508.608155381944421.0437587.564405381944782.6618446180555
894696.964507.409561631944429.4662577.9433116319444189.550438368056
904621.44424.585811631954418.267083333336.31872829861102196.814188368055
914562.844340.271749131944386.0325-45.7607508680556222.568250868057
924202.524272.707947048614328.4875-55.7795529513891-70.187947048611
934296.494214.326592881944267.4775-53.150907118055882.1634071180551
944435.234177.825394965284208.46791666667-30.6425217013889257.404605034721
954105.184109.087061631954140.57-31.4829383680555-3.907061631945
964116.684057.570967881944056.697916666670.87305121527789459.1090321180554
973844.493966.822582465283946.39520.4275824652778-122.332582465278
983720.983870.682634548613834.4895833333336.1930512152779-149.702634548612
993674.43718.251124131943730.75458333333-12.503459201389-43.8511241319443
1003857.623669.503988715283581.9395833333387.5644053819447188.116011284722
1013801.063479.543728298613401.6004166666777.9433116319444321.516271701389
1023504.373226.894978298613220.576256.31872829861102277.47502170139
1033032.63000.110082465283045.87083333333-45.760750868055632.4899175347227
1043047.03NANA-55.7795529513891NA
1052962.34NANA-53.1509071180558NA
1062197.82NANA-30.6425217013889NA
1072014.45NANA-31.4829383680555NA
1081862.83NANA0.873051215277894NA
1091905.41NANANANA
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/01/t1243848135wpktbb437dudg7n/1cob71243848083.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/01/t1243848135wpktbb437dudg7n/1cob71243848083.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/01/t1243848135wpktbb437dudg7n/298vv1243848083.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/01/t1243848135wpktbb437dudg7n/298vv1243848083.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/01/t1243848135wpktbb437dudg7n/3kei31243848083.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/01/t1243848135wpktbb437dudg7n/3kei31243848083.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/01/t1243848135wpktbb437dudg7n/4z1ix1243848083.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/01/t1243848135wpktbb437dudg7n/4z1ix1243848083.ps (open in new window)


 
Parameters (Session):
par1 = additive ; par2 = 12 ;
 
Parameters (R input):
par1 = additive ; 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