Home » date » 2008 » May » 19 » attachments

Hans Van de Paer classical decomposition

R Software Module: rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Mon, 19 May 2008 13:12:07 -0600
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2008/May/19/t12112244896kzelgynn01aa4p.htm/, Retrieved Mon, 19 May 2008 21:14:49 +0200
 
User-defined keywords:
classical decomposition gem prijs kinderfiets jan 00 - dec 05
 
Dataseries X:
» Textbox « » Textfile « » CSV «
217,8 218,79 218,99 219,53 219,55 219,74 219,74 219,74 219,8 219,97 220,07 220,07 220,1 225,8 233,17 233,83 233,63 233,63 233,65 233,8 233,84 233,74 233,88 233,88 233,81 234,68 236,14 236,91 236,87 236,78 236,78 236,9 236,94 236,97 236,96 236,94 236,99 237,24 237,62 237,54 237,41 237,4 237,41 237,28 237,17 237,18 237,18 237,18 236,77 239,23 240,23 240,33 240,33 240,34 240,34 240,27 240,29 240,29 240,29 240,29 240,31 239,95 242,33 242,11 241,53 241,53 241,53 241,41 241,41 241,66 241,8 241,99
 
Text written by user:
 
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'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
1217.8NANA-2.33953124999998NA
2218.79NANA-0.447968749999971NA
3218.99NANA1.67723958333333NA
4219.53NANA1.61463541666665NA
5219.55NANA1.09984374999999NA
6219.74NANA0.656093749999991NA
7219.74219.82078125219.5783333333330.242447916666671-0.0807812499999727
8219.74219.86828125219.96625-0.0979687499999914-0.128281250000015
9219.8220.505885416667220.849166666667-0.343281250000003-0.705885416666689
10219.97221.495885416667222.035833333333-0.539947916666675-1.52588541666668
11220.07222.54234375223.218333333333-0.675989583333339-2.47234375000002
12220.07223.538177083333224.38375-0.845572916666667-3.46817708333333
13220.1223.202552083333225.542083333333-2.33953124999998-3.10255208333336
14225.8226.25953125226.7075-0.447968749999971-0.459531250000026
15233.17229.555572916667227.8783333333331.677239583333333.61442708333337
16233.83230.65171875229.0370833333331.614635416666653.17828125000003
17233.63231.28609375230.186251.099843749999992.34390625000003
18233.63231.993177083333231.3370833333330.6560937499999911.63682291666669
19233.65232.726197916667232.483750.2424479166666710.923802083333385
20233.8233.32703125233.425-0.09796874999999140.472968750000007
21233.84233.57546875233.91875-0.3432812500000030.264531250000005
22233.74233.630885416667234.170833333333-0.5399479166666750.109114583333337
23233.88233.758177083333234.434166666667-0.6759895833333390.121822916666673
24233.88233.85484375234.700416666667-0.8455729166666670.0251562499999807
25233.81232.622552083333234.962083333333-2.339531249999981.18744791666671
26234.68234.773697916667235.221666666667-0.447968749999971-0.093697916666656
27236.14237.157239583333235.481.67723958333333-1.01723958333338
28236.91237.358385416667235.743751.61463541666665-0.448385416666696
29236.87237.106510416667236.0066666666671.09984374999999-0.236510416666704
30236.78236.91859375236.26250.656093749999991-0.138593750000041
31236.78236.764947916667236.52250.2424479166666710.0150520833333303
32236.9236.663697916667236.761666666667-0.09796874999999140.236302083333300
33236.94236.58671875236.93-0.3432812500000030.353281249999981
34236.97236.47796875237.017916666667-0.5399479166666750.492031249999997
35236.96236.390677083333237.066666666667-0.6759895833333390.569322916666692
36236.94236.269427083333237.115-0.8455729166666670.670572916666657
37236.99234.827552083333237.167083333333-2.339531249999982.16244791666665
38237.24236.761197916667237.209166666667-0.4479687499999710.478802083333306
39237.62238.911822916667237.2345833333331.67723958333333-1.29182291666666
40237.54238.867552083333237.2529166666671.61463541666665-1.32755208333336
41237.41238.370677083333237.2708333333331.09984374999999-0.960677083333337
42237.4237.94609375237.290.656093749999991-0.546093749999983
43237.41237.53328125237.2908333333330.242447916666671-0.123281249999991
44237.28237.266614583333237.364583333333-0.09796874999999140.0133854166666652
45237.17237.21296875237.55625-0.343281250000003-0.04296875
46237.18237.241302083333237.78125-0.539947916666675-0.0613020833333167
47237.18237.343177083333238.019166666667-0.675989583333339-0.163177083333295
48237.18237.417760416667238.263333333333-0.845572916666667-0.237760416666589
49236.77236.168385416667238.507916666667-2.339531249999980.601614583333372
50239.23238.306614583333238.754583333333-0.4479687499999710.923385416666719
51240.23240.68640625239.0091666666671.67723958333333-0.456406249999958
52240.33240.883385416667239.268751.61463541666665-0.553385416666657
53240.33240.627760416667239.5279166666671.09984374999999-0.297760416666648
54240.34240.443177083333239.7870833333330.656093749999991-0.103177083333350
55240.34240.306614583333240.0641666666670.2424479166666710.0333854166666470
56240.27240.143697916667240.241666666667-0.09796874999999140.126302083333314
57240.29240.015885416667240.359166666667-0.3432812500000030.274114583333301
58240.29239.980885416667240.520833333333-0.5399479166666750.309114583333326
59240.29239.969010416667240.645-0.6759895833333390.320989583333301
60240.29239.899010416667240.744583333333-0.8455729166666670.390989583333294
61240.31238.50421875240.84375-2.339531249999981.80578124999997
62239.95240.492864583333240.940833333333-0.447968749999971-0.542864583333397
63242.33242.712239583333241.0351.67723958333333-0.382239583333302
64242.11242.753385416667241.138751.61463541666665-0.64338541666666
65241.53242.35859375241.258751.09984374999999-0.828593749999982
66241.53242.04859375241.39250.656093749999991-0.51859374999998
67241.53NANA0.242447916666671NA
68241.41NANA-0.0979687499999914NA
69241.41NANA-0.343281250000003NA
70241.66NANA-0.539947916666675NA
71241.8NANA-0.675989583333339NA
72241.99NANA-0.845572916666667NA
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/19/t12112244896kzelgynn01aa4p/1b8xh1211224322.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/19/t12112244896kzelgynn01aa4p/1b8xh1211224322.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/19/t12112244896kzelgynn01aa4p/2de1d1211224322.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/19/t12112244896kzelgynn01aa4p/2de1d1211224322.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/19/t12112244896kzelgynn01aa4p/3kp741211224322.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/19/t12112244896kzelgynn01aa4p/3kp741211224322.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/19/t12112244896kzelgynn01aa4p/4nxq31211224322.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/19/t12112244896kzelgynn01aa4p/4nxq31211224322.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