Home » date » 2009 » Dec » 04 »

workshop 9

*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, 04 Dec 2009 06:42:20 -0700
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2009/Dec/04/t12599341844tekx53eslwh5ul.htm/, Retrieved Fri, 04 Dec 2009 14:43:09 +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/2009/Dec/04/t12599341844tekx53eslwh5ul.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 «
6.9 6.8 6.7 6.6 6.5 6.5 7.0 7.5 7.6 7.6 7.6 7.8 8.0 8.0 8.0 7.9 7.9 8.0 8.5 9.2 9.4 9.5 9.5 9.6 9.7 9.7 9.6 9.5 9.4 9.3 9.6 10.2 10.2 10.1 9.9 9.8 9.8 9.7 9.5 9.3 9.1 9.0 9.5 10.0 10.2 10.1 10.0 9.9 10.0 9.9 9.7 9.5 9.2 9.0 9.3 9.8 9.8 9.6 9.4 9.3 9.2 9.2 9.0 8.8 8.7 8.7 9.1 9.7 9.8 9.6 9.4 9.4 9.5 9.4 9.3 9.2 9.0 8.9 9.2 9.8 9.9 9.6 9.2 9.1 9.1 9.0 8.9 8.7 8.5 8.3 8.5 8.7 8.4 8.1 7.8 7.7 7.5 7.2 6.8 6.7 6.4 6.3 6.8 7.3 7.1 7.0 6.8 6.6 6.3 6.1 6.1 6.3 6.3 6.0 6.2 6.4 6.8 7.5 7.5 7.6 7.6 7.4 7.3 7.1 6.9 6.8 7.5 7.6 7.8 8.0 8.1 8.2 8.3 8.2 8.0 7.9 7.6 7.6 8.3 8.4 8.4 8.4 8.4 8.6 8.9 8.8 8.3 7.5 7.2 7.4 8.8 9.3 9.3 8.7 8.2 8.3 8.5 8.6 8.5 8.2 8.1 7.9 8.6 8.7 8.7 8.5 8.4 8.5 8.7 8.7 8.6 8.5 8.3 8.0 8.2 8.1 8.1 8.0 7.9 7.9
 
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'Gwilym Jenkins' @ 72.249.127.135


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
16.9NANA1.01974448045995NA
26.8NANA1.00796884363558NA
36.7NANA0.98808873736485NA
46.6NANA0.967491765333229NA
56.5NANA0.94612213517204NA
66.5NANA0.933518932021864NA
777.0751662798567.13750.991266729226760.989376040522185
87.57.505589916667617.233333333333331.037639158986310.999255232869145
97.67.653723959191817.33751.043096962070430.992980677186915
107.67.699446369510037.445833333333331.034061068093120.987083958412408
117.67.673177128572867.558333333333331.015194327925850.990463255657116
127.87.800550176856577.679166666666661.015806859710030.999929469480473
1387.958255882922847.804166666666661.019744480459951.00524538513102
1488.00075269635747.93751.007968843635580.999905921806865
1587.987050627032548.083333333333330.988088737364851.00162129596670
167.97.969713416932478.23750.9674917653332290.991252707182123
177.97.943483759881928.395833333333330.946122135172040.99452585777269
1887.981586868786948.550.9335189320218641.00230695117597
198.58.619890266234368.695833333333330.991266729226760.986091439388272
209.29.170136067541478.83751.037639158986311.00325665096336
219.49.361795234582148.9751.043096962070431.00408092299186
229.59.418572895214849.108333333333331.034061068093121.00864537607672
239.59.377857604215019.23751.015194327925851.01302455218877
249.69.502026666870879.354166666666671.015806859710031.01031078280076
259.79.640834275681769.454166666666671.019744480459951.00613699215508
269.79.617702716356139.541666666666671.007968843635581.00855685459106
279.69.502120024325319.616666666666670.988088737364851.01030085659033
289.59.360482829598999.6750.9674917653332291.01490491173808
299.49.193153413421669.716666666666670.946122135172041.02250006904882
309.39.094030262779669.741666666666670.9335189320218641.02264889507388
319.69.668980887999359.754166666666670.991266729226760.992865754023264
3210.210.12562879310809.758333333333331.037639158986311.00734484824711
3310.210.17454161752879.754166666666671.043096962070431.00250216505355
3410.110.07347823834059.741666666666671.034061068093121.00263283059059
359.99.86853486271259.720833333333331.015194327925851.00318843047375
369.89.849094010605139.695833333333331.015806859710030.995015378008143
379.89.870276783785259.679166666666671.019744480459950.99287995814862
389.79.743698821810589.666666666666671.007968843635580.995515171126517
399.59.543290388382189.658333333333330.988088737364850.995463787999695
409.39.344357966843439.658333333333330.9674917653332290.995252967940566
419.19.141905131099849.66250.946122135172040.995416148986573
4299.027906005094789.670833333333330.9335189320218640.99690891718644
439.59.598766161345799.683333333333330.991266729226760.989710535741196
441010.06509984216729.71.037639158986310.99353212156978
4510.210.13542548145119.716666666666671.043096962070431.00637116997872
4610.110.06486106277309.733333333333331.034061068093121.00349124910993
47109.893914720910659.745833333333331.015194327925851.01072227546748
489.99.904116882172759.751.015806859710030.999584326172467
49109.9340108138149.741666666666671.019744480459951.00664275360907
509.99.802497004355999.7251.007968843635581.00994675087385
519.79.584460752439059.70.988088737364851.01205485113302
529.59.348389182532329.66250.9674917653332291.01621785470282
539.29.098541199904459.616666666666670.946122135172041.01115110630005
5498.930664449675839.566666666666670.9335189320218641.007763761668
559.39.42529448373119.508333333333330.991266729226760.986706570924933
569.89.80136655592489.445833333333331.037639158986310.99986057495993
579.89.79207273143629.38751.043096962070431.00080955981243
589.69.646928047752079.329166666666671.034061068093120.99513544130113
599.49.42015736787869.279166666666671.015194327925850.997860187776977
609.39.391980923735629.245833333333331.015806859710030.990206440528094
619.29.407142832243029.2251.019744480459950.977980260751114
629.29.285912971992769.21251.007968843635580.99074803174961
6399.0986504565689.208333333333330.988088737364850.989157682555353
648.88.908986672443489.208333333333330.9674917653332290.98776665894219
658.78.71220799470929.208333333333330.946122135172040.998598748478386
668.78.600043161251429.21250.9335189320218641.0116228298945
679.19.14856585515539.229166666666660.991266729226760.994691424216187
689.79.598162220623329.251.037639158986311.01061013317298
699.89.670378085861319.270833333333331.043096962070431.01340401719434
709.69.616767933266029.31.034061068093120.998256385785497
719.49.470917084274889.329166666666671.015194327925850.992512120669641
729.49.497794138288749.351.015806859710030.989703489371863
739.59.547357698306269.36251.019744480459950.995039706293327
749.49.445508038901729.370833333333331.007968843635580.99518204434168
759.39.267448949201169.379166666666670.988088737364851.00351240680982
769.29.07829773137689.383333333333330.9674917653332291.01340584680348
7798.869895017237889.3750.946122135172041.01466815362631
788.98.732291676621199.354166666666670.9335189320218641.01920553384947
799.29.243562250039539.3250.991266729226760.995287287642884
809.89.641397185581099.291666666666671.037639158986311.01645018988079
819.99.657339373835439.258333333333331.043096962070431.02512706831263
829.69.534904765375319.220833333333331.034061068093121.00682704612437
839.29.318637935086019.179166666666671.015194327925850.987268747223313
849.19.277702652018249.133333333333331.015806859710030.980846265645345
859.19.258430095509289.079166666666671.019744480459950.98288801731234
8699.0759194629029.004166666666661.007968843635580.991635066484191
878.98.789872726141478.895833333333330.988088737364851.01252888150826
888.78.485709025110198.770833333333330.9674917653332291.02525316084439
898.58.183956469238158.650.946122135172041.03861745012327
908.37.96602821991998.533333333333330.9335189320218641.04192450376274
918.58.334901081581678.408333333333330.991266729226761.01980814370829
928.78.577817047620128.266666666666671.037639158986311.01424406136218
938.48.453431630112478.104166666666661.043096962070430.99367929706533
948.18.203551140205427.933333333333331.034061068093120.987377278639988
957.87.880445970524397.76251.015194327925850.98979169823316
967.77.711667076631957.591666666666671.015806859710030.998487087614648
977.57.584349573420867.43751.019744480459950.988878469721851
987.27.366572298903357.308333333333331.007968843635580.977388086053517
996.87.110121872621237.195833333333330.988088737364850.956383044035376
1006.76.865160318177047.095833333333330.9674917653332290.975942248902806
1016.46.630739297330727.008333333333330.946122135172040.965201573009573
1026.36.460728942034656.920833333333330.9335189320218640.975122166016141
1036.86.765395426972636.8250.991266729226761.00511493724216
1047.36.982446840678686.729166666666671.037639158986311.04547877936876
1057.16.940941035110356.654166666666671.043096962070431.02291605188476
10676.833420224982046.608333333333331.034061068093121.02437721807434
1076.86.687592635211526.58751.015194327925851.01680834508320
1086.66.67469757401136.570833333333331.015806859710030.988808845167437
1096.36.662330605671666.533333333333331.019744480459950.94561503667152
1106.16.522398392358556.470833333333331.007968843635580.935238793010035
1116.16.344353101163476.420833333333330.988088737364850.961484946176993
1126.36.220165807954886.429166666666670.9674917653332291.01283473696843
1136.36.130083000802186.479166666666670.946122135172041.02771854788517
11466.114549004743216.550.9335189320218640.981266156399376
1156.26.58779347131956.645833333333330.991266729226760.941134543302276
1166.47.008387819653346.754166666666671.037639158986310.913191473515883
1176.87.15390666486646.858333333333331.043096962070430.950529594325788
1187.57.178107247679746.941666666666671.034061068093121.04484368110052
1197.57.1063602954809371.015194327925851.05539259032073
1207.67.169903418119937.058333333333331.015806859710031.05998638430653
1217.67.286924099953387.145833333333331.019744480459951.04296406765766
1227.47.307774116357947.251.007968843635581.01262024279536
1237.37.254218146820277.341666666666670.988088737364851.00631106650684
1247.17.163470279154787.404166666666670.9674917653332290.991139730231104
1256.97.04860990703177.450.946122135172040.978916423381092
1266.87.001391990163987.50.9335189320218640.971235435689516
1277.57.488194083700487.554166666666670.991266729226761.00157660394049
1287.67.903351594279027.616666666666671.037639158986310.961617347949114
1297.88.010115421232547.679166666666671.043096962070430.973768739876633
13088.005356102154247.741666666666671.034061068093120.999330935178162
1318.17.922745734187977.804166666666671.015194327925851.02237283282324
1328.27.99101396305227.866666666666671.015806859710031.02615263068167
1338.38.089972878315597.933333333333331.019744480459951.02596141233642
1348.28.0637507490846281.007968843635581.01689651071257
13587.962348408598428.058333333333330.988088737364851.00472870433061
1367.97.836683299199158.10.9674917653332291.00807952782873
1377.67.691184523836058.129166666666670.946122135172040.988144280825216
1387.67.61595862041178.158333333333330.9335189320218640.997904581523206
1398.38.128387179659438.20.991266729226761.02111277631681
1408.48.560523061637028.251.037639158986310.9812484517031
1418.48.644666073158728.28751.043096962070430.971697452384147
1428.48.565472514038028.283333333333331.034061068093120.980681449416034
1438.48.375353205388248.251.015194327925851.00294277674115
1448.68.355011421114968.2251.015806859710031.0293223511659
1458.98.400145157788828.23751.019744480459951.05950550053861
1468.88.361941531993488.295833333333331.007968843635581.05238717184645
1478.38.271126139024938.370833333333330.988088737364851.00349092257690
1487.58.147086907243568.420833333333330.9674917653332290.920574444017746
1497.27.971078988824448.4250.946122135172040.90326541865844
1507.47.845448691200418.404166666666670.9335189320218640.943222024802732
1518.88.301858857274118.3750.991266729226761.06000356682641
1529.38.664286977535658.351.037639158986311.07337164894383
1539.38.709859633288128.351.043096962070431.06775543941678
1548.78.673187208631058.38751.034061068093121.00309145769876
1558.28.582622047339778.454166666666671.015194327925850.955418979744265
1568.38.64705589328168.51251.015806859710030.959864270849545
1578.58.693321695921068.5251.019744480459950.97776204508666
1588.68.559335430538788.491666666666671.007968843635581.00475090265958
1598.58.34111575792168.441666666666660.988088737364851.01904831999574
1608.28.13499326017698.408333333333330.9674917653332291.00799100106712
1618.17.955310286571578.408333333333330.946122135172041.01818781520975
1627.97.86489700228428.4250.9335189320218641.00446324951307
1638.68.367943305889238.441666666666660.991266729226761.02773162838561
1648.78.772374389930058.454166666666671.037639158986310.991749737674998
1658.78.827208041521048.46251.043096962070430.985589096697088
1668.58.767976139872928.479166666666671.034061068093120.969436944672525
1678.48.62915178736978.51.015194327925850.973444459778178
1688.58.64705589328168.51251.015806859710030.982993530388088
1698.78.667828083909558.51.019744480459951.00371164676768
1708.78.525736469084268.458333333333331.007968843635581.02043970412968
1718.68.308179466676118.408333333333330.988088737364851.03512448599532
1728.58.090649887599128.36250.9674917653332291.05059545501138
1738.37.872524599744028.320833333333330.946122135172041.05429965887561
17487.724869162480928.2750.9335189320218641.03561624562593
1758.2NANA0.99126672922676NA
1768.1NANA1.03763915898631NA
1778.1NANA1.04309696207043NA
1788NANA1.03406106809312NA
1797.9NANA1.01519432792585NA
1807.9NANA1.01580685971003NA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/04/t12599341844tekx53eslwh5ul/1o3w01259934137.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t12599341844tekx53eslwh5ul/1o3w01259934137.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/04/t12599341844tekx53eslwh5ul/2dgfo1259934137.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t12599341844tekx53eslwh5ul/2dgfo1259934137.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/04/t12599341844tekx53eslwh5ul/3l4qp1259934137.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t12599341844tekx53eslwh5ul/3l4qp1259934137.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/04/t12599341844tekx53eslwh5ul/44hy71259934137.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t12599341844tekx53eslwh5ul/44hy71259934137.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