Home » date » 2009 » May » 30 »

Classical decomposition-ruwe aardolie-Katrijn Kempenaers

*Unverified author*
R Software Module: rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Sat, 30 May 2009 02:08:11 -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/May/30/t12436709725bdyaxrcfanosbb.htm/, Retrieved Sat, 30 May 2009 10:09:55 +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/May/30/t12436709725bdyaxrcfanosbb.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 «
88.6 95 96.3 83.3 96.9 103.4 99.3 103.8 113.4 111.5 114.2 90.6 90.8 96.4 90 92.1 97.2 95.1 88.5 91 90.5 75 66.3 66 68.4 70.6 83.9 90.1 90.6 87.1 90.8 94.1 99.8 96.8 87 96.3 107.1 115.2 106.1 89.5 91.3 97.6 100.7 104.6 94.7 101.8 102.5 105.3 110.3 109.8 117.3 118.8 131.3 125.9 133.1 147 145.8 164.4 149.8 137.7 151.7 156.8 180 180.4 170.4 191.6 199.5 218.2 217.5 205 194 199.3 219.3 211.1 215.2 240.2 242.2 240.7 255.4 253 218.2 203.7 205.6 215.6 188.5 202.9 214 230.3 230 241 259.6 247.8 270.3 289.7 322.7 315 320.2 329.5 360.6 382.2 435.4 464 468.8 403 351.6 252 188 146.5 152.9
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 seconds
R Server'George Udny Yule' @ 72.249.76.132


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
188.6NANA-12.0525607638889NA
295NANA-11.0353732638889NA
396.3NANA-4.48433159722221NA
483.3NANA0.605772569444436NA
596.9NANA7.5896267361111NA
6103.4NANA13.7391059027778NA
799.3119.58285590277899.783333333333319.7995225694445-20.2828559027778
8103.8104.03181423611199.93333333333334.09848090277779-0.23181423611112
9113.499.385460069444499.7291666666667-0.34370659722222314.0145399305556
10111.597.744835069444499.8333333333333-2.0884982638889013.7551649305556
11114.293.5385850694445100.2125-6.6739149305555620.6614149305556
1290.690.725043402777899.8791666666667-9.1541232638889-0.125043402777777
1390.887.030772569444499.0833333333333-12.05256076388893.76922743055556
1496.487.064626736111198.1-11.03537326388899.3353732638889
159092.128168402777896.6125-4.48433159722221-2.12816840277777
1692.194.743272569444494.13750.605772569444436-2.64327256944443
1797.298.210460069444490.62083333333337.5896267361111-1.01046006944443
1895.1101.33910590277887.613.7391059027778-6.23910590277778
1988.5105.44118923611185.641666666666719.7995225694445-16.9411892361111
209187.731814236111183.63333333333334.098480902777793.26818576388888
2190.581.960460069444482.3041666666667-0.3437065972222238.53953993055556
227579.878168402777881.9666666666667-2.08849826388890-4.87816840277777
2366.374.934418402777881.6083333333333-6.67391493055556-8.63441840277777
246671.845876736111181-9.1541232638889-5.84587673611111
2568.468.709939236111180.7625-12.0525607638889-0.309939236111106
2670.669.952126736111180.9875-11.03537326388890.647873263888869
2783.977.019835069444581.5041666666667-4.484331597222216.88016493055554
2890.183.405772569444482.80.6057725694444366.69422743055556
2990.692.160460069444484.57083333333337.5896267361111-1.56046006944443
3087.1100.43493923611186.695833333333313.7391059027778-13.3349392361111
3190.8109.37035590277889.570833333333319.7995225694445-18.5703559027778
3294.197.140147569444593.04166666666674.09848090277779-3.04014756944446
3399.895.481293402777895.825-0.3437065972222234.31870659722223
3496.894.636501736111196.725-2.088498263888902.16349826388891
358790.055251736111196.7291666666667-6.67391493055556-3.05525173611110
3696.388.041710069444497.1958333333333-9.15412326388898.25828993055558
37107.185.993272569444498.0458333333333-12.052560763888921.1067274305556
38115.287.860460069444498.8958333333333-11.035373263888927.3395399305556
39106.194.636501736111199.1208333333333-4.4843315972222111.4634982638889
4089.599.722439236111199.11666666666660.605772569444436-10.2224392361111
4191.3107.56046006944499.97083333333337.5896267361111-16.2604600694444
4297.6114.730772569444100.99166666666713.7391059027778-17.1307725694444
43100.7121.299522569444101.519.7995225694445-20.5995225694444
44104.6105.506814236111101.4083333333334.09848090277779-0.906814236111117
4594.7101.306293402778101.65-0.343706597222223-6.60629340277777
46101.8101.249001736111103.3375-2.088498263888900.550998263888886
47102.599.5510850694444106.225-6.673914930555562.94891493055557
48105.399.9167100694444109.070833333333-9.15412326388895.38328993055556
49110.399.5474392361111111.6-12.052560763888910.7525607638889
50109.8103.681293402778114.716666666667-11.03537326388896.11870659722221
51117.3114.128168402778118.6125-4.484331597222213.17183159722221
52118.8123.955772569444123.350.605772569444436-5.15577256944447
53131.3135.518793402778127.9291666666677.5896267361111-4.21879340277778
54125.9144.989105902778131.2513.7391059027778-19.0891059027778
55133.1154.124522569444134.32519.7995225694445-21.0245225694445
56147142.106814236111138.0083333333334.098480902777794.89318576388888
57145.8142.235460069444142.579166666667-0.3437065972222233.56453993055558
58164.4145.669835069444147.758333333333-2.0884982638889018.7301649305556
59149.8145.280251736111151.954166666667-6.673914930555564.51974826388889
60137.7147.166710069444156.320833333333-9.1541232638889-9.46671006944447
61151.7149.772439236111161.825-12.05256076388891.92756076388892
62156.8156.522960069444167.558333333333-11.03537326388890.277039930555588
63180169.028168402778173.5125-4.4843315972222110.9718315972223
64180.4178.797439236111178.1916666666670.6057725694444361.60256076388893
65170.4189.314626736111181.7257.5896267361111-18.9146267361111
66191.6199.872439236111186.13333333333313.7391059027778-8.2724392361111
67199.5211.316189236111191.51666666666719.7995225694445-11.8161892361111
68218.2200.694314236111196.5958333333334.0984809027777917.5056857638889
69217.5199.981293402778200.325-0.34370659722222317.5187065972223
70205202.194835069444204.283333333333-2.088498263888902.80516493055561
71194203.092751736111209.766666666667-6.67391493055556-9.09275173611113
72199.3205.650043402778214.804166666667-9.1541232638889-6.35004340277777
73219.3207.126605902778219.179166666667-12.052560763888912.1733940972222
74211.1211.922960069444222.958333333333-11.0353732638889-0.822960069444463
75215.2219.953168402778224.4375-4.48433159722221-4.75316840277779
76240.2225.018272569444224.41250.60577256944443615.1817274305555
77242.2232.431293402778224.8416666666677.58962673611119.7687065972222
78240.7239.743272569444226.00416666666713.73910590277780.956727430555532
79255.4245.199522569444225.419.799522569444510.2004774305556
80253227.873480902778223.7754.0984809027777925.1265190972223
81218.2223.039626736111223.383333333333-0.343706597222223-4.83962673611114
82203.7220.832335069444222.920833333333-2.08849826388890-17.1323350694445
83205.6215.326085069444222-6.67391493055556-9.72608506944445
84215.6212.350043402778221.504166666667-9.15412326388893.24995659722222
85188.5209.639105902778221.691666666667-12.0525607638889-21.1391059027778
86202.9210.614626736111221.65-11.0353732638889-7.71462673611109
87214219.119835069444223.604166666667-4.48433159722221-5.11983506944443
88230.3229.964105902778229.3583333333330.6057725694444360.335894097222223
89230245.410460069444237.8208333333337.5896267361111-15.4104600694444
90241260.580772569444246.84166666666713.7391059027778-19.5807725694445
91259.6276.270355902778256.47083333333319.7995225694445-16.6703559027778
92247.8271.331814236111267.2333333333334.09848090277779-23.5318142361111
93270.3278.272960069444278.616666666667-0.343706597222223-7.97296006944441
94289.7288.965668402778291.054166666667-2.088498263888900.734331597222194
95322.7299.267751736111305.941666666667-6.6739149305555623.4322482638889
96315314.637543402778323.791666666667-9.15412326388890.362456597222263
97320.2329.747439236111341.8-12.0525607638889-9.54743923611107
98329.5345.947960069444356.983333333333-11.0353732638889-16.4479600694444
99360.6362.353168402778366.8375-4.48433159722221-1.75316840277770
100382.2369.259939236111368.6541666666670.60577256944443612.9400607638889
101435.4369.060460069444361.4708333333337.589626736111166.3395399305556
102464362.576605902778348.837513.7391059027778101.423394097222
103468.8354.645355902778334.84583333333319.7995225694445114.154644097222
104403NANA4.09848090277779NA
105351.6NANA-0.343706597222223NA
106252NANA-2.08849826388890NA
107188NANA-6.67391493055556NA
108146.5NANA-9.1541232638889NA
109152.9NANANANA
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/May/30/t12436709725bdyaxrcfanosbb/1j2h11243670888.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/May/30/t12436709725bdyaxrcfanosbb/1j2h11243670888.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/May/30/t12436709725bdyaxrcfanosbb/2y7y41243670888.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/May/30/t12436709725bdyaxrcfanosbb/2y7y41243670888.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/May/30/t12436709725bdyaxrcfanosbb/3f1k81243670889.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/May/30/t12436709725bdyaxrcfanosbb/3f1k81243670889.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/May/30/t12436709725bdyaxrcfanosbb/4gwwi1243670889.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/May/30/t12436709725bdyaxrcfanosbb/4gwwi1243670889.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