Home » date » 2011 » May » 17 »

opgave 9 oef2-Stien Philipsen

*Unverified author*
R Software Module: /rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Tue, 17 May 2011 13:08:24 +0000
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2011/May/17/t1305637488ayjiher778r1mtu.htm/, Retrieved Tue, 17 May 2011 15:04:52 +0200
 
Original text written by user:
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
KDGP2W92
 
Dataseries X:
» Textbox « » Textfile « » CSV «
112 118 129 99 116 168 118 129 205 147 150 267 126 129 124 97 102 127 222 214 118 141 154 226 89 77 82 97 127 121 117 117 106 112 134 169 75 108 115 85 101 108 109 124 105 95 135 164 88 85 112 87 91 87 87 142 95 108 139 159 61 82 124 93 108 75 87 103 90 108 123 129 57 65 67 71 76 67 110 118 99 85 107 141 58 65 70 86 93 74 87 73 101 100 96 157 63 115 70 66 67 83 79 77 102 116 100 135 71 60 89 74 73 91 86 74 87 87 109 137 43 69 73 77 69 76 78 70 83 65 110 132 54 55 66 65 60 65 96 55 71 63 74 106 34 47 56 53 53 55 67 52 46 51 58 91 33 40 46 45 41 55 57 54 46 52 48 77 77 35 42 48 44 45 0 0 46 51 63 84 30 39 45 52 28 40 62
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time4 seconds
R Server'Gwilym Jenkins' @ www.wessa.org


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
1112NANA-25.031994047619NA
2118NANA-16.9397321428571NA
3129NANA-8.65401785714286NA
499NANA-14.4665178571429NA
5116NANA-9.56473214285714NA
6168NANA-7.046875NA
7118151.795386904762147.0833333333334.71205357142857-33.7953869047619
8129152.747767857143148.1254.62276785714286-23.7477678571428
9205147.92931547619148.375-0.44568452380952457.0706845238095
10147150.792410714286148.0833333333332.70907738095238-3.79241071428569
11150165.908482142857147.41666666666718.4918154761905-15.9084821428571
12267196.738839285714145.12551.613839285714370.2611607142857
13126122.718005952381147.75-25.0319940476193.28199404761904
14129138.685267857143155.625-16.9397321428571-9.68526785714286
15124146.887648809524155.541666666667-8.65401785714286-22.8876488095238
1697137.200148809524151.666666666667-14.4665178571429-40.2001488095238
17102142.018601190476151.583333333333-9.56473214285714-40.0186011904762
18127142.994791666667150.041666666667-7.046875-15.9947916666666
19222151.503720238095146.7916666666674.7120535714285770.4962797619048
20214147.706101190476143.0833333333334.6227678571428666.2938988095238
21118138.720982142857139.166666666667-0.445684523809524-20.7209821428571
22141140.125744047619137.4166666666672.709077380952380.874255952380992
23154156.950148809524138.45833333333318.4918154761905-2.9501488095238
24226190.863839285714139.2551.613839285714335.1361607142858
2589109.593005952381134.625-25.031994047619-20.5930059523809
2677109.268601190476126.208333333333-16.9397321428571-32.2686011904762
2782113.012648809524121.666666666667-8.65401785714286-31.0126488095238
2897105.49181547619119.958333333333-14.4665178571429-8.49181547619045
29127108.35193452381117.916666666667-9.5647321428571418.6480654761905
30121107.661458333333114.708333333333-7.04687513.3385416666667
31117116.462053571429111.754.712053571428570.537946428571459
32117117.081101190476112.4583333333334.62276785714286-0.0811011904761614
33106114.67931547619115.125-0.445684523809524-8.67931547619047
34112118.7090773809521162.70907738095238-6.70907738095237
35134132.908482142857114.41666666666718.49181547619051.09151785714288
36169164.405505952381112.79166666666751.61383928571434.59449404761907
377586.8846726190476111.916666666667-25.031994047619-11.8846726190476
3810894.9352678571428111.875-16.939732142857113.0647321428572
39115103.470982142857112.125-8.6540178571428611.5290178571429
408596.9084821428571111.375-14.4665178571429-11.9084821428571
41101101.143601190476110.708333333333-9.56473214285714-0.143601190476176
42108103.494791666667110.541666666667-7.0468754.50520833333334
43109115.587053571429110.8754.71205357142857-6.58705357142856
44124115.081101190476110.4583333333334.622767857142868.91889880952382
45105108.92931547619109.375-0.445684523809524-3.92931547619048
4695112.042410714286109.3333333333332.70907738095238-17.0424107142857
47135127.4918154761910918.49181547619057.50818452380955
48164159.322172619048107.70833333333351.61383928571434.67782738095239
498880.8846726190476105.916666666667-25.0319940476197.11532738095238
508588.8102678571429105.75-16.9397321428571-3.81026785714288
5111297.4293154761905106.083333333333-8.6540178571428614.5706845238095
528791.7418154761905106.208333333333-14.4665178571429-4.74181547619047
539197.3519345238095106.916666666667-9.56473214285714-6.35193452380952
548799.828125106.875-7.046875-12.828125
5587110.253720238095105.5416666666674.71205357142857-23.2537202380952
56142108.91443452381104.2916666666674.6227678571428633.0855654761905
5795104.220982142857104.666666666667-0.445684523809524-9.22098214285714
58108108.125744047619105.4166666666672.70907738095238-0.125744047619037
59139124.86681547619106.37518.491815476190514.1331845238095
60159158.197172619048106.58333333333351.61383928571430.802827380952394
616181.0513392857143106.083333333333-25.031994047619-20.0513392857143
628287.5186011904762104.458333333333-16.9397321428571-5.5186011904762
6312493.970982142857102.625-8.6540178571428630.0290178571429
649387.9501488095238102.416666666667-14.46651785714295.04985119047622
6510892.1852678571428101.75-9.5647321428571415.8147321428572
667592.786458333333399.8333333333333-7.046875-17.7864583333333
6787103.12872023809598.41666666666674.71205357142857-16.1287202380952
68103102.1644345238197.54166666666674.622767857142860.835565476190482
699094.012648809523894.4583333333333-0.445684523809524-4.01264880952381
7010893.87574404761991.16666666666672.7090773809523814.124255952381
71123107.40848214285788.916666666666718.491815476190515.5915178571429
72129138.86383928571487.2551.6138392857143-9.86383928571426
735762.84300595238187.875-25.031994047619-5.84300595238093
746572.518601190476289.4583333333333-16.9397321428571-7.51860119047619
756781.804315476190590.4583333333333-8.65401785714286-14.8043154761905
767175.408482142857189.875-14.4665178571429-4.40848214285714
777678.685267857142988.25-9.56473214285714-2.68526785714286
786781.036458333333388.0833333333333-7.046875-14.0364583333333
7911093.337053571428688.6254.7120535714285716.6629464285714
8011893.289434523809588.66666666666674.6227678571428624.7105654761905
819988.345982142857288.7916666666667-0.44568452380952410.6540178571428
828592.25074404761989.54166666666672.70907738095238-7.25074404761904
83107109.3668154761990.87518.4918154761905-2.36681547619047
84141143.48883928571491.87551.6138392857143-2.48883928571429
855866.176339285714391.2083333333333-25.031994047619-8.17633928571426
866571.435267857142988.375-16.9397321428571-6.43526785714286
877077.929315476190586.5833333333333-8.65401785714286-7.92931547619047
888672.825148809523887.2916666666667-14.466517857142913.1748511904762
899377.893601190476287.4583333333333-9.5647321428571415.1063988095238
907480.619791666666787.6666666666667-7.046875-6.61979166666666
918793.253720238095288.54166666666674.71205357142857-6.25372023809524
927395.456101190476290.83333333333334.62276785714286-22.4561011904762
9310192.470982142857292.9166666666667-0.4456845238095248.52901785714285
9410094.792410714285792.08333333333332.709077380952385.20758928571429
9596108.65848214285790.166666666666718.4918154761905-12.6584821428571
96157141.07217261904889.458333333333351.613839285714315.9278273809524
976364.46800595238189.5-25.031994047619-1.46800595238093
9811572.393601190476289.3333333333333-16.939732142857142.6063988095238
997080.887648809523889.5416666666667-8.65401785714286-10.8876488095238
1006675.783482142857190.25-14.4665178571429-9.78348214285714
1016781.518601190476291.0833333333333-9.56473214285714-14.5186011904762
1028383.286458333333390.3333333333333-7.046875-0.286458333333329
1037994.462053571428689.754.71205357142857-15.4620535714286
1047792.414434523809587.79166666666674.62276785714286-15.4144345238095
10510285.845982142857186.2916666666667-0.44568452380952416.1540178571429
10611690.12574404761987.41666666666672.7090773809523825.874255952381
107100106.491815476198818.4918154761905-6.49181547619047
108135140.19717261904888.583333333333351.6138392857143-5.1971726190476
1097164.176339285714389.2083333333333-25.0319940476196.82366071428571
1106072.435267857142889.375-16.9397321428571-12.4352678571428
1118979.970982142857188.625-8.654017857142869.02901785714286
1127472.325148809523886.7916666666666-14.46651785714291.67485119047622
1137376.393601190476285.9583333333333-9.56473214285714-3.3936011904762
1149179.369791666666786.4166666666667-7.04687511.6302083333333
1158690.045386904761985.33333333333334.71205357142857-4.0453869047619
1167489.164434523809584.54166666666674.62276785714286-15.1644345238095
1178783.804315476190584.25-0.4456845238095243.19568452380953
1188786.417410714285783.70833333333332.709077380952380.582589285714306
119109102.15848214285783.666666666666718.49181547619056.84151785714286
120137134.48883928571482.87551.61383928571432.51116071428571
1214356.884672619047681.9166666666667-25.031994047619-13.8846726190476
1226964.476934523809581.4166666666667-16.93973214285714.52306547619048
1237372.429315476190581.0833333333333-8.654017857142860.570684523809533
1247765.533482142857180-14.466517857142911.4665178571429
1256969.560267857142979.125-9.56473214285714-0.560267857142861
1267671.911458333333378.9583333333333-7.0468754.08854166666667
1277883.920386904761979.20833333333334.71205357142857-5.9203869047619
1287083.706101190476279.08333333333334.62276785714286-13.7061011904762
1298377.762648809523878.2083333333333-0.4456845238095245.23735119047618
1306580.12574404761977.41666666666672.70907738095238-15.125744047619
13111095.03348214285776.541666666666718.491815476190514.9665178571429
132132127.32217261904875.708333333333351.61383928571434.67782738095239
1335450.968005952380976-25.0319940476193.03199404761907
1345559.185267857142976.125-16.9397321428571-4.18526785714288
1356666.345982142857175-8.65401785714286-0.345982142857139
1366559.950148809523874.4166666666667-14.46651785714295.0498511904762
1376063.268601190476272.8333333333333-9.56473214285714-3.26860119047619
1386563.20312570.25-7.0468751.796875
1399673.045386904761968.33333333333334.7120535714285722.9546130952381
1405571.789434523809567.16666666666674.62276785714286-16.7894345238095
1417165.970982142857166.4166666666667-0.4456845238095245.02901785714286
1426368.209077380952465.52.70907738095238-5.20907738095239
1437483.200148809523864.708333333333318.4918154761905-9.2001488095238
144106115.6138392857146451.6138392857143-9.61383928571428
1453437.343005952380962.375-25.031994047619-3.34300595238094
1464744.101934523809561.0416666666667-16.93973214285712.8980654761905
1475651.220982142857159.875-8.654017857142864.77901785714288
1485343.866815476190558.3333333333333-14.46651785714299.13318452380954
1495347.601934523809557.1666666666667-9.564732142857145.39806547619047
1505548.82812555.875-7.0468756.17187500000001
1516759.920386904761955.20833333333334.712053571428577.07961309523812
1525259.497767857142954.8754.62276785714286-7.49776785714285
1534653.720982142857154.1666666666667-0.445684523809524-7.72098214285714
1545156.125744047619153.41666666666672.70907738095238-5.12574404761906
1555871.075148809523852.583333333333318.4918154761905-13.0751488095238
15691103.69717261904852.083333333333351.6138392857143-12.6971726190476
1573326.634672619047651.6666666666667-25.0319940476196.36532738095239
1584034.393601190476251.3333333333333-16.93973214285715.60639880952381
1594642.762648809523851.4166666666667-8.654017857142863.2373511904762
1604536.991815476190551.4583333333333-14.46651785714298.00818452380952
1614141.518601190476251.0833333333333-9.56473214285714-0.518601190476197
1625543.036458333333350.0833333333333-7.04687511.9635416666667
1635756.045386904761951.33333333333334.712053571428570.954613095238095
1645457.581101190476252.95833333333334.62276785714286-3.58110119047619
1654652.137648809523852.5833333333333-0.445684523809524-6.1376488095238
1665255.25074404761952.54166666666672.70907738095238-3.25074404761905
1674871.283482142857152.791666666666718.4918154761905-23.2834821428571
16877104.11383928571452.551.6138392857143-27.1138392857143
1697724.676339285714349.7083333333333-25.03199404761952.3236607142857
1703528.143601190476245.0833333333333-16.93973214285716.85639880952381
1714234.179315476190542.8333333333333-8.654017857142867.82068452380953
1724828.325148809523842.7916666666667-14.466517857142919.6748511904762
1734433.810267857142943.375-9.5647321428571410.1897321428571
1744537.244791666666744.2916666666667-7.0468757.75520833333334
175047.337053571428642.6254.71205357142857-47.3370535714286
176045.456101190476240.83333333333334.62276785714286-45.4561011904762
1774640.679315476190541.125-0.4456845238095245.32068452380953
1785144.125744047619141.41666666666672.709077380952386.87425595238095
1796359.408482142857140.916666666666718.49181547619053.59151785714286
1808491.65550595238140.041666666666751.6138392857143-7.65550595238095
18130NA42.4166666666667NANA
18239NANANANA
18345NANANANA
18452NANANANA
18528NANANANA
18640NANANANA
18762NANANANA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2011/May/17/t1305637488ayjiher778r1mtu/18g3f1305637700.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/17/t1305637488ayjiher778r1mtu/18g3f1305637700.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/May/17/t1305637488ayjiher778r1mtu/2bh3r1305637700.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/17/t1305637488ayjiher778r1mtu/2bh3r1305637700.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/May/17/t1305637488ayjiher778r1mtu/3f0qe1305637700.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/17/t1305637488ayjiher778r1mtu/3f0qe1305637700.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/May/17/t1305637488ayjiher778r1mtu/4mrrf1305637700.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/17/t1305637488ayjiher778r1mtu/4mrrf1305637700.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