Home » date » 2008 » May » 25 »

Joeri Van de Velde opgave 9 oef 2

R Software Module: rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Sun, 25 May 2008 10:17:20 -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/25/t1211732311vmn50t6o52bi338.htm/, Retrieved Sun, 25 May 2008 18:18:31 +0200
 
User-defined keywords:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
105,18 105,18 105,18 105,18 105,18 105,18 105,18 105,18 105,18 105,18 97,82 97,83 97,82 97,83 97,82 97,82 97,8 97,8 97,44 97,44 97,44 97,44 97,7 97,7 97,7 97,7 97,7 97,7 97,7 97,7 97,7 97,7 97,7 89,38 89,38 89,38 89,38 87,69 89,21 89,21 89,21 89,21 89,21 89,21 89,21 89,21 89,21 89,21 89,21 89,21 89,21 89,21 89,21 89,21 89,21 89,21 89,21 89,21 89,21 89,21 89,21 89,21 89,21 89,21 89,21 89,21 89,21 89,21 89,21 89,21 92,07 92,07 92,07 92,07 92,07 92,07 92,07 92,07 92,07 92,07 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94
 
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 time6 seconds
R Server'Herman Ole Andreas Wold' @ 193.190.124.10:1001


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
1105.18NANA-0.385312500000002NA
2105.18NANA-0.483229166666662NA
3105.18NANA-0.0628819444444433NA
4105.18NANA0.0923958333333353NA
5105.18NANA0.193229166666665NA
6105.18NANA0.246354166666664NA
7105.18103.886979166667103.64750.2394791666666681.29302083333333
8105.18103.3271875103.0345833333330.2926041666666691.85281250000001
9105.18103.0890625102.4216666666670.6673958333333332.09093750000000
10105.18101.142118055556101.808333333333-0.6662152777777824.03788194444445
1197.82101.100868055556101.194166666667-0.0932986111111131-3.28086805555556
1297.83100.538645833333100.579166666667-0.0405208333333312-2.70864583333332
1397.8299.563854166666799.9491666666667-0.385312500000002-1.74385416666667
1497.8398.820937599.3041666666666-0.483229166666662-0.990937499999987
1597.8298.596284722222298.6591666666667-0.0628819444444433-0.776284722222229
1697.8298.106562598.01416666666670.0923958333333353-0.286562500000002
1797.897.879895833333397.68666666666670.193229166666665-0.0798958333333388
1897.897.922604166666797.676250.246354166666664-0.122604166666662
1997.4497.905312597.66583333333330.239479166666668-0.46531250000001
2097.4497.948020833333397.65541666666670.292604166666669-0.508020833333319
2197.4498.312395833333397.6450.667395833333333-0.872395833333329
2297.4496.968784722222297.635-0.6662152777777820.471215277777773
2397.797.532534722222297.6258333333333-0.09329861111111310.167465277777765
2497.797.576979166666797.6175-0.04052083333333120.123020833333328
2597.797.238854166666797.6241666666667-0.3853125000000020.461145833333333
2697.797.162604166666797.6458333333333-0.4832291666666620.537395833333335
2797.797.604618055555597.6675-0.06288194444444330.0953819444444548
2897.797.434895833333397.34250.09239583333333530.265104166666674
2997.796.853229166666796.660.1932291666666650.846770833333338
3097.796.213020833333395.96666666666670.2463541666666641.48697916666667
3197.795.512812595.27333333333330.2394791666666682.18718750000002
3297.794.802187594.50958333333330.2926041666666692.89781250000001
3397.794.406145833333393.738750.6673958333333333.29385416666669
3489.3892.365034722222293.03125-0.666215277777782-2.98503472222222
3589.3892.230451388888992.32375-0.0932986111111131-2.85045138888889
3689.3891.575729166666691.61625-0.0405208333333312-2.19572916666665
3789.3890.523437590.90875-0.385312500000002-1.14343750000000
3887.6989.718020833333390.20125-0.483229166666662-2.02802083333333
3989.2189.430868055555689.49375-0.0628819444444433-0.22086805555557
4089.2189.225312589.13291666666670.0923958333333353-0.0153125000000216
4189.2189.311979166666789.118750.193229166666665-0.101979166666695
4289.2189.350937589.10458333333340.246354166666664-0.140937500000021
4389.2189.329895833333489.09041666666670.239479166666668-0.119895833333359
4489.2189.439270833333489.14666666666670.292604166666669-0.229270833333359
4589.2189.877395833333489.210.667395833333333-0.667395833333359
4689.2188.543784722222289.21-0.6662152777777820.666215277777752
4789.2189.11670138888989.21-0.09329861111111310.0932986111110807
4889.2189.169479166666789.21-0.04052083333333120.0405208333333036
4989.2188.824687589.21-0.3853125000000020.385312499999969
5089.2188.726770833333489.21-0.4832291666666620.483229166666632
5189.2189.147118055555689.21-0.06288194444444330.0628819444444133
5289.2189.302395833333489.210.0923958333333353-0.09239583333337
5389.2189.403229166666789.210.193229166666665-0.193229166666697
5489.2189.456354166666789.210.246354166666664-0.246354166666691
5589.2189.449479166666789.210.239479166666668-0.239479166666698
5689.2189.502604166666789.210.292604166666669-0.292604166666692
5789.2189.877395833333489.210.667395833333333-0.667395833333359
5889.2188.543784722222289.21-0.6662152777777820.666215277777752
5989.2189.11670138888989.21-0.09329861111111310.0932986111110807
6089.2189.169479166666789.21-0.04052083333333120.0405208333333036
6189.2188.824687589.21-0.3853125000000020.385312499999969
6289.2188.726770833333489.21-0.4832291666666620.483229166666632
6389.2189.147118055555689.21-0.06288194444444330.0628819444444133
6489.2189.302395833333489.210.0923958333333353-0.09239583333337
6589.2189.522395833333389.32916666666670.193229166666665-0.312395833333355
6689.2189.813854166666789.56750.246354166666664-0.603854166666693
6789.2190.045312589.80583333333340.239479166666668-0.835312500000029
6889.2190.336770833333390.04416666666670.292604166666669-1.12677083333335
6989.2190.949895833333390.28250.667395833333333-1.73989583333335
7089.2189.854618055555690.5208333333333-0.666215277777782-0.644618055555569
7192.0790.665868055555690.7591666666667-0.09329861111111311.40413194444443
7292.0790.956979166666790.9975-0.04052083333333121.11302083333332
7392.0790.850520833333391.2358333333333-0.3853125000000021.21947916666664
7492.0790.990937591.4741666666667-0.4832291666666621.07906249999998
7592.0791.730034722222291.7929166666667-0.06288194444444330.339965277777779
7692.0792.284479166666792.19208333333330.0923958333333353-0.214479166666678
7792.0792.665312592.47208333333330.193229166666665-0.595312500000006
7892.0792.879270833333392.63291666666670.246354166666664-0.809270833333329
7992.0793.033229166666792.793750.239479166666668-0.963229166666665
8092.0793.247187592.95458333333330.292604166666669-1.17718749999999
819493.782812593.11541666666670.6673958333333330.217187499999994
829492.610034722222293.27625-0.6662152777777821.38996527777778
839493.343784722222293.4370833333333-0.09329861111111310.656215277777775
849493.557395833333393.5979166666667-0.04052083333333120.442604166666669
859493.373437593.75875-0.3853125000000020.626562500000006
869493.436354166666793.9195833333333-0.4832291666666620.563645833333339
879493.937118055555694-0.06288194444444330.0628819444444417
889494.0923958333333940.0923958333333353-0.0923958333333417
899494.1932291666667940.193229166666665-0.193229166666669
909494.2463541666667940.246354166666664-0.246354166666663
9194NANA0.239479166666668NA
9294NANA0.292604166666669NA
9394NANA0.667395833333333NA
9494NANA-0.666215277777782NA
9594NANA-0.0932986111111131NA
9694NANA-0.0405208333333312NA
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/25/t1211732311vmn50t6o52bi338/1cy8v1211732232.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/25/t1211732311vmn50t6o52bi338/1cy8v1211732232.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/25/t1211732311vmn50t6o52bi338/2jdev1211732232.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/25/t1211732311vmn50t6o52bi338/2jdev1211732232.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/25/t1211732311vmn50t6o52bi338/369er1211732232.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/25/t1211732311vmn50t6o52bi338/369er1211732232.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/25/t1211732311vmn50t6o52bi338/42lge1211732232.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/25/t1211732311vmn50t6o52bi338/42lge1211732232.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