Home » date » 2009 » Aug » 18 »

Opgave 9 - Robbert Van Hees

*Unverified author*
R Software Module: rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Tue, 18 Aug 2009 03:48:34 -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/Aug/18/t1250589122irmufisq66eytru.htm/, Retrieved Tue, 18 Aug 2009 11:52:08 +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/Aug/18/t1250589122irmufisq66eytru.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 «
12.11 11.42 11.71 12.04 12.21 12 12.36 12.32 12.96 12.79 13.19 12.34 13.25 12.54 12.77 12.96 13 13.61 13.8 14.16 14.27 14.69 15.01 15.09 15.14 14.2 13.83 14.31 14.04 14.9 14.92 15.36 15.5 15.65 16.18 15.44 15.58 15.24 15.33 16.07 15.82 15.87 15.72 17.07 16.83 17.52 17.76 17.36 17.95 16.71 17.14 16.72 17.26 17.24 17.69 18.13 18.08 18.18 18.18 17.64 17.89 16.82 16.61 16.66 17.02 16.91 17.18 18.06 17.58 17.48 17.54 17.44 17.79 16.79 16.19 16.62 16.39 16.54 17.26 18 17.29 18.16 17.82 17.48 18.31 17.04 17.03 16.97 17.11 17.12 17.69 18.5 18.27 18.45 18.35 18.03 18.49 18.07 17.8 17.88 18.12 18.68 18.8 19.64 19.56 19.3 20.07 19.82 20.29 19.36 18.74 18.87 18.87 18.91 19.31 20.06 20.72 20.42 20.58 20.58 21.18 19.87 19.83 19.48 19.49 19.4 19.89 20.44 20.07 19.75 19.54 19.07
 
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'Gwilym Jenkins' @ 72.249.127.135


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
112.11NANA0.584180555555554NA
211.42NANA-0.404027777777779NA
311.71NANA-0.604486111111112NA
412.04NANA-0.536111111111112NA
512.21NANA-0.533569444444444NA
612NANA-0.382069444444444NA
712.3612.196763888888912.335-0.1382361111111100.163236111111111
812.3212.874930555555612.42916666666670.445763888888889-0.554930555555556
912.9612.872722222222212.520.3527222222222210.0872777777777802
1012.7913.048388888888912.60250.44588888888889-0.258388888888891
1113.1913.262305555555612.673750.588555555555556-0.0723055555555554
1212.3412.955138888888912.773750.181388888888890-0.61513888888889
1313.2513.485013888888912.90083333333330.584180555555554-0.23501388888889
1412.5412.633472222222213.0375-0.404027777777779-0.0934722222222213
1512.7712.564263888888913.16875-0.6044861111111120.205736111111111
1612.9612.766388888888913.3025-0.5361111111111120.193611111111114
171312.923930555555613.4575-0.5335694444444440.0760694444444461
1813.6113.265847222222213.6479166666667-0.3820694444444440.344152777777778
1913.813.703013888888913.84125-0.1382361111111100.096986111111109
2014.1614.434930555555613.98916666666670.445763888888889-0.274930555555558
2114.2714.455222222222214.10250.352722222222221-0.185222222222222
2214.6914.648805555555614.20291666666670.445888888888890.041194444444443
2315.0114.891055555555614.30250.5885555555555560.118944444444443
2415.0914.580972222222214.39958333333330.1813888888888900.509027777777778
2515.1415.084180555555614.50.5841805555555540.0558194444444471
2614.214.192638888888914.5966666666667-0.4040277777777790.0073611111111127
2713.8314.093430555555614.6979166666667-0.604486111111112-0.263430555555553
2814.3114.253055555555614.7891666666667-0.5361111111111120.0569444444444471
2914.0414.344347222222214.8779166666667-0.533569444444444-0.304347222222221
3014.914.559180555555614.94125-0.3820694444444440.340819444444444
3114.9214.835930555555614.9741666666667-0.1382361111111100.0840694444444434
3215.3615.481597222222215.03583333333330.445763888888889-0.121597222222224
3315.515.494388888888915.14166666666670.3527222222222210.00561111111111146
3415.6515.723388888888915.27750.44588888888889-0.0733888888888892
3516.1816.013555555555615.4250.5885555555555560.166444444444442
3615.4415.720972222222215.53958333333330.181388888888890-0.280972222222223
3715.5816.197513888888915.61333333333330.584180555555554-0.617513888888887
3815.2415.313888888888915.7179166666667-0.404027777777779-0.073888888888888
3915.3315.240097222222215.8445833333333-0.6044861111111120.0899027777777768
4016.0715.441805555555615.9779166666667-0.5361111111111120.628194444444444
4115.8215.588097222222216.1216666666667-0.5335694444444440.231902777777773
4215.8715.885430555555616.2675-0.382069444444444-0.0154305555555574
4315.7216.308013888888916.44625-0.138236111111110-0.588013888888888
4417.0717.052013888888916.606250.4457638888888890.0179861111111101
4516.8317.095638888888916.74291666666670.352722222222221-0.265638888888891
4617.5217.291305555555616.84541666666670.445888888888890.228694444444447
4717.7617.521055555555616.93250.5885555555555560.238944444444446
4817.3617.230972222222217.04958333333330.1813888888888900.129027777777779
4917.9517.772930555555617.188750.5841805555555540.177069444444442
5016.7116.910972222222217.315-0.404027777777779-0.200972222222223
5117.1416.806763888888917.41125-0.6044861111111120.333236111111109
5216.7216.954722222222217.4908333333333-0.536111111111112-0.234722222222221
5317.2617.002263888888917.5358333333333-0.5335694444444440.257736111111114
5417.2417.182930555555617.565-0.3820694444444440.0570694444444477
5517.6917.435930555555617.5741666666667-0.1382361111111100.254069444444450
5618.1318.022013888888917.576250.4457638888888890.107986111111117
5718.0817.911472222222217.558750.3527222222222210.168527777777776
5818.1817.980055555555617.53416666666670.445888888888890.199944444444444
5918.1818.110222222222217.52166666666670.5885555555555560.0697777777777802
6017.6417.679305555555617.49791666666670.181388888888890-0.0393055555555542
6117.8918.047097222222217.46291666666670.584180555555554-0.157097222222223
6216.8217.034722222222217.43875-0.404027777777779-0.214722222222221
6316.6116.810513888888917.415-0.604486111111112-0.200513888888892
6416.6616.828888888888917.365-0.536111111111112-0.168888888888890
6517.0216.775597222222217.3091666666667-0.5335694444444440.244402777777776
6616.9116.892097222222217.2741666666667-0.3820694444444440.0179027777777740
6717.1817.123430555555617.2616666666667-0.1382361111111100.0565694444444418
6818.0617.702013888888917.256250.4457638888888890.357986111111114
6917.5817.590222222222217.23750.352722222222221-0.0102222222222217
7017.4817.664222222222217.21833333333330.44588888888889-0.184222222222225
7117.5417.778972222222217.19041666666670.588555555555556-0.238972222222223
7217.4417.330138888888917.148750.1813888888888900.109861111111112
7317.7917.720847222222217.13666666666670.5841805555555540.0691527777777807
7416.7916.733472222222217.1375-0.4040277777777790.0565277777777773
7516.1916.518430555555617.1229166666667-0.604486111111112-0.328430555555549
7616.6216.603055555555617.1391666666667-0.5361111111111120.016944444444448
7716.3916.645597222222217.1791666666667-0.533569444444444-0.255597222222224
7816.5416.810430555555617.1925-0.382069444444444-0.270430555555556
7917.2617.077597222222217.2158333333333-0.1382361111111100.182402777777778
801817.693680555555617.24791666666670.4457638888888890.306319444444448
8117.2917.646055555555617.29333333333330.352722222222221-0.356055555555557
8218.1617.788805555555617.34291666666670.445888888888890.371194444444441
8317.8217.976055555555617.38750.588555555555556-0.156055555555554
8417.4817.623055555555617.44166666666670.181388888888890-0.143055555555556
8518.3118.067930555555617.483750.5841805555555540.242069444444443
8617.0417.118472222222217.5225-0.404027777777779-0.0784722222222243
8717.0316.979680555555617.5841666666667-0.6044861111111120.0503194444444475
8816.9717.100972222222217.6370833333333-0.536111111111112-0.130972222222226
8917.1117.137680555555617.67125-0.533569444444444-0.0276805555555555
9017.1217.334180555555617.71625-0.382069444444444-0.214180555555554
9117.6917.608430555555617.7466666666667-0.1382361111111100.0815694444444439
9218.518.242847222222217.79708333333330.4457638888888890.257152777777780
9318.2718.224805555555617.87208333333330.3527222222222210.0451944444444443
9418.4518.387972222222217.94208333333330.445888888888890.0620277777777751
9518.3518.610638888888918.02208333333330.588555555555556-0.260638888888888
9618.0318.310555555555618.12916666666670.181388888888890-0.280555555555555
9718.4918.824597222222218.24041666666670.584180555555554-0.334597222222225
9818.0717.930138888888918.3341666666667-0.4040277777777790.139861111111109
9917.817.830930555555618.4354166666667-0.604486111111112-0.0309305555555568
10017.8817.988472222222218.5245833333333-0.536111111111112-0.108472222222225
10118.1218.098097222222218.6316666666667-0.5335694444444440.0219027777777754
10218.6818.395847222222218.7779166666667-0.3820694444444440.284152777777781
10318.818.789263888888918.9275-0.1382361111111100.0107361111111111
10419.6419.502013888888919.056250.4457638888888890.137986111111115
10519.5619.501888888888919.14916666666670.3527222222222210.0581111111111134
10619.319.675472222222219.22958333333330.44588888888889-0.375472222222221
10720.0719.890638888888919.30208333333330.5885555555555560.179361111111113
10819.8219.524305555555619.34291666666670.1813888888888900.295694444444447
10920.2919.957930555555619.373750.5841805555555540.332069444444443
11019.3619.008472222222219.4125-0.4040277777777790.351527777777775
11118.7418.873847222222219.4783333333333-0.604486111111112-0.133847222222226
11218.8719.037222222222219.5733333333333-0.536111111111112-0.167222222222222
11318.8719.107680555555619.64125-0.533569444444444-0.237680555555556
11418.9119.312097222222219.6941666666667-0.382069444444444-0.402097222222221
11519.3119.624680555555619.7629166666667-0.138236111111110-0.314680555555558
11620.0620.267013888888919.821250.445763888888889-0.207013888888888
11720.7220.240638888888919.88791666666670.3527222222222210.479361111111107
11820.4220.404638888888919.958750.445888888888890.0153611111111154
11920.5820.598555555555520.010.588555555555556-0.018555555555551
12020.5820.237638888888920.056250.1813888888888900.34236111111111
12121.1820.685013888888920.10083333333330.5841805555555540.494986111111110
12219.8719.736805555555620.1408333333333-0.4040277777777790.133194444444445
12319.8319.525097222222220.1295833333333-0.6044861111111120.304902777777777
12419.4819.538472222222220.0745833333333-0.536111111111112-0.0584722222222211
12519.4919.469763888888920.0033333333333-0.5335694444444440.0202361111111102
12619.419.515013888888919.8970833333333-0.382069444444444-0.115013888888893
12719.89NANA-0.138236111111110NA
12820.44NANA0.445763888888889NA
12920.07NANA0.352722222222221NA
13019.75NANA0.44588888888889NA
13119.54NANA0.588555555555556NA
13219.07NANA0.181388888888890NA
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Aug/18/t1250589122irmufisq66eytru/1843f1250588912.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Aug/18/t1250589122irmufisq66eytru/1843f1250588912.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Aug/18/t1250589122irmufisq66eytru/26axj1250588912.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Aug/18/t1250589122irmufisq66eytru/26axj1250588912.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Aug/18/t1250589122irmufisq66eytru/3w9qs1250588912.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Aug/18/t1250589122irmufisq66eytru/3w9qs1250588912.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Aug/18/t1250589122irmufisq66eytru/4gc3d1250588912.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Aug/18/t1250589122irmufisq66eytru/4gc3d1250588912.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