Home » date » 2010 » Jun » 07 »

Opgave 9 Oefening 2

*Unverified author*
R Software Module: /rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Mon, 07 Jun 2010 07:30:30 +0000
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2010/Jun/07/t1275895978y0dxojzp5mh3otm.htm/, Retrieved Mon, 07 Jun 2010 09:32:59 +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/2010/Jun/07/t1275895978y0dxojzp5mh3otm.htm/},
    year = {2010},
}
@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 = {2010},
    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:
KDGP2W52
 
Dataseries X:
» Textbox « » Textfile « » CSV «
464 675 703 887 1139 1077 1318 1260 1120 963 996 960 530 883 894 1045 1199 1287 1565 1577 1076 918 1008 1063 544 635 804 980 1018 1064 1404 1286 1104 999 996 1015 615 722 832 977 1270 1437 1520 1708 1151 934 1159 1209 699 830 996 1124 1458 1270 1753 2258 1208 1241 1265 1828 809 997 1164 1205 1538 1513 1378 2083 1357 1536 1526 1376 779 1005 1193 1522 1539 1546 2116 2326 1596 1356 1553 1613 814 1150 1225 1691 1759 1754 2100 2062 2012 1897 1964 2186 966 1549 1538 1612 2078 2137 2907 2249 1883 1739 1828 1868 1138 1430 1809 1763 2200 2067 2503 2141 2103 1972 2181 2344 970 1199 1718 1683 2025 2051 2439 2353 2230 1852 2147 2286 1007 1665 1642 1518 1831 2207 2822 2393 2306 1785 2047 2171 1212 1335 2011 1860 1954 2152 2835 2224 2182 1992 2389 2724 891 1247 2017 2257 2255 2255 3057 3330 1896 2096 2374 2535 1041 1728 2201 2455 2204 2660 3670 2665 etc...
 
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'RServer@AstonUniversity' @ vre.aston.ac.uk


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
1464NANA-771.48933531746NA
2675NANA-471.242311507937NA
3703NANA-217.873263888889NA
4887NANA-108.438740079365NA
51139NANA71.3559027777777NA
61077NANA138.064236111111NA
713181573.5910218254966.25607.341021825397-255.591021825397
812601479.48090277778977.666666666667501.814236111111-219.480902777778
911201066.58506944444994.29166666666772.293402777777753.4149305555557
10963914.6445932539681008.83333333333-94.18874007936548.3554067460317
119961092.064236111111017.9166666666774.1475694444445-96.0642361111113
129601227.382688492061029.16666666667198.216021825397-267.382688492064
13530276.7189980158731048.20833333333-771.48933531746253.281001984127
14883600.4660218253971071.70833333333-471.242311507937282.533978174603
15894865.2100694444441083.08333333333-217.87326388888928.7899305555557
161045970.9362599206351079.375-108.43874007936574.063740079365
1711991149.35590277778107871.355902777777749.6440972222222
1812871220.855902777781082.79166666667138.06423611111166.1440972222222
1915651695.007688492061087.66666666667607.341021825397-130.007688492063
2015771579.730902777781077.91666666667501.814236111111-2.73090277777783
2110761136.126736111111063.8333333333372.2934027777777-60.126736111111
22918963.1862599206351057.375-94.188740079365-45.1862599206347
2310081121.272569444441047.12574.1475694444445-113.272569444444
2410631228.507688492061030.29166666667198.216021825397-165.507688492063
25544242.8023313492061014.29166666667-771.48933531746301.197668650794
26635524.216021825397995.458333333333-471.242311507937110.783978174603
27804766.626736111111984.5-217.87326388888937.3732638888889
28980880.602926587301989.041666666667-108.43874007936599.3970734126984
2910181063.27256944444991.91666666666771.3559027777777-45.2725694444443
3010641127.48090277778989.416666666667138.064236111111-63.4809027777776
3114041597.7160218254990.375607.341021825397-193.716021825397
3212861498.77256944444996.958333333333501.814236111111-212.772569444444
3311041074.043402777781001.7572.293402777777729.9565972222223
34999908.6029265873021002.79166666667-94.18874007936590.3970734126984
359961087.314236111111013.1666666666774.1475694444445-91.314236111111
3610151237.424355158731039.20833333333198.216021825397-222.42435515873
37615288.0939980158731059.58333333333-771.48933531746326.906001984127
38722610.7576884920631082-471.242311507937111.242311507937
39832883.6684027777781101.54166666667-217.873263888889-51.6684027777776
40977992.3529265873011100.79166666667-108.438740079365-15.3529265873015
4112701176.230902777781104.87571.355902777777793.7690972222222
4214371257.814236111111119.75138.064236111111179.185763888889
4315201738.674355158731131.33333333333607.341021825397-218.67435515873
4417081641.147569444441139.33333333333501.81423611111166.8524305555557
4511511222.960069444441150.6666666666772.2934027777777-71.9600694444446
469341069.436259920631163.625-94.188740079365-135.436259920635
4711591251.730902777781177.5833333333374.1475694444445-92.7309027777778
4812091376.674355158731178.45833333333198.216021825397-167.67435515873
49699409.7189980158731181.20833333333-771.48933531746289.281001984127
50830742.5910218253971213.83333333333-471.24231150793787.4089781746029
519961021.251736111111239.125-217.873263888889-25.2517361111109
5211241145.85292658731254.29166666667-108.438740079365-21.8529265873015
5314581342.855902777781271.571.3559027777777115.144097222222
5412701439.772569444441301.70833333333138.064236111111-169.772569444444
5517531939.424355158731332.08333333333607.341021825397-186.42435515873
5622581845.439236111111343.625501.814236111111412.560763888889
5712081429.876736111111357.5833333333372.2934027777777-221.876736111111
5812411273.769593253971367.95833333333-94.188740079365-32.769593253968
5912651448.814236111111374.6666666666774.1475694444445-183.814236111111
6018281586.34102182541388.125198.216021825397241.658978174603
61809611.135664682541382.625-771.48933531746197.86433531746
62997888.4660218253971359.70833333333-471.242311507937108.533978174603
6311641140.751736111111358.625-217.87326388888923.2482638888889
6412051268.686259920631377.125-108.438740079365-63.6862599206347
6515381471.647569444441400.2916666666771.355902777777766.3524305555557
6615131530.397569444441392.33333333333138.064236111111-17.3975694444446
6713781979.59102182541372.25607.341021825397-601.591021825397
6820831873.147569444441371.33333333333501.814236111111209.852430555555
6913571445.168402777781372.87572.2934027777777-88.1684027777781
7015361293.10292658731387.29166666667-94.188740079365242.897073412699
7115261474.689236111111400.5416666666774.147569444444551.3107638888891
7213761600.174355158731401.95833333333198.216021825397-224.17435515873
73779662.5939980158731434.08333333333-771.48933531746116.406001984127
7410051003.71602182541474.95833333333-471.2423115079371.28397817460313
7511931277.168402777781495.04166666667-217.873263888889-84.168402777778
7615221389.061259920641497.5-108.438740079365132.938740079365
7715391562.480902777781491.12571.3559027777777-23.4809027777778
7815461640.189236111111502.125138.064236111111-94.1892361111109
7921162120.799355158731513.45833333333607.341021825397-4.7993551587299
8023262022.772569444441520.95833333333501.814236111111303.227430555556
8115961600.626736111111528.3333333333372.2934027777777-4.62673611111086
8213561442.519593253971536.70833333333-94.188740079365-86.5195932539682
8315531627.064236111111552.9166666666774.1475694444445-74.0642361111109
8416131768.96602182541570.75198.216021825397-155.966021825397
85814807.260664682541578.75-771.489335317466.73933531746025
8611501095.84102182541567.08333333333-471.24231150793754.1589781746029
8712251355.543402777781573.41666666667-217.873263888889-130.543402777778
8816911504.85292658731613.29166666667-108.438740079365186.147073412699
8917591724.314236111111652.9583333333371.355902777777734.6857638888891
9017541832.022569444441693.95833333333138.064236111111-78.0225694444441
9121002331.507688492061724.16666666667607.341021825397-231.507688492063
9220622248.939236111111747.125501.814236111111-186.939236111111
9320121849.085069444441776.7916666666772.2934027777777162.914930555555
9418971692.35292658731786.54166666667-94.188740079365204.647073412699
9519641870.689236111111796.5416666666774.147569444444593.3107638888889
9621862024.007688492061825.79166666667198.216021825397161.992311507937
979661103.885664682541875.375-771.48933531746-137.88566468254
9815491445.549355158731916.79166666667-471.242311507937103.45064484127
9915381701.335069444441919.20833333333-217.873263888889-163.335069444444
10016121798.811259920641907.25-108.438740079365-186.811259920635
10120781966.35590277778189571.3559027777777111.644097222222
10221372014.147569444441876.08333333333138.064236111111122.852430555556
10329072477.34102182541870607.341021825397429.658978174604
10422492374.022569444441872.20833333333501.814236111111-125.022569444444
10518831950.835069444441878.5416666666772.2934027777777-67.8350694444443
10617391801.936259920631896.125-94.188740079365-62.936259920635
10718281981.647569444441907.574.1475694444445-153.647569444445
10818682107.882688492061909.66666666667198.216021825397-239.882688492064
10911381118.427331349211889.91666666667-771.4893353174619.5726686507935
11014301397.34102182541868.58333333333-471.24231150793732.6589781746031
11118091655.376736111111873.25-217.873263888889153.623263888889
11217631783.686259920631892.125-108.438740079365-20.6862599206347
11322001987.897569444441916.5416666666771.3559027777777212.102430555555
11420672089.147569444441951.08333333333138.064236111111-22.1475694444443
11525032571.257688492061963.91666666667607.341021825397-68.2576884920636
11621412449.105902777781947.29166666667501.814236111111-308.105902777778
11721032006.168402777781933.87572.293402777777796.8315972222222
11819721832.561259920631926.75-94.188740079365139.438740079365
11921811990.272569444441916.12574.1475694444445190.727430555556
12023442106.382688492061908.16666666667198.216021825397237.617311507937
1219701133.343998015871904.83333333333-771.48933531746-163.343998015873
12211991439.757688492061911-471.242311507937-240.757688492063
12317181707.251736111111925.125-217.87326388888910.7482638888891
12416831816.97792658731925.41666666667-108.438740079365-133.977926587302
12520251990.35590277778191971.355902777777734.6440972222222
12620512053.230902777781915.16666666667138.064236111111-2.23090277777783
12724392521.632688492061914.29166666667607.341021825397-82.6326884920636
12823532437.064236111111935.25501.814236111111-84.0642361111109
12922302023.793402777781951.572.2934027777777206.206597222222
13018521847.269593253971941.45833333333-94.1887400793654.7304067460318
13121472000.647569444441926.574.1475694444445146.352430555556
13222862123.132688492061924.91666666667198.216021825397162.867311507937
13310071175.885664682541947.375-771.48933531746-168.885664682539
13416651493.757688492061965-471.242311507937171.242311507936
13516421751.960069444441969.83333333333-217.873263888889-109.960069444444
13615181861.769593253971970.20833333333-108.438740079365-343.769593253968
13718312034.605902777781963.2571.3559027777777-203.605902777778
13822072092.355902777781954.29166666667138.064236111111114.644097222222
13928222565.382688492061958.04166666667607.341021825397256.617311507937
14023932454.647569444441952.83333333333501.814236111111-61.6475694444443
14123062026.751736111111954.4583333333372.2934027777777279.248263888889
14217851889.894593253971984.08333333333-94.188740079365-104.894593253968
14320472077.605902777782003.4583333333374.1475694444445-30.6059027777783
14421712204.507688492062006.29166666667198.216021825397-33.5076884920636
14512121233.052331349212004.54166666667-771.48933531746-21.0523313492065
14613351526.799355158731998.04166666667-471.242311507937-191.79935515873
14720111767.960069444441985.83333333333-217.873263888889243.039930555556
14818601880.85292658731989.29166666667-108.438740079365-20.8529265873015
14919542083.522569444442012.1666666666771.3559027777777-129.522569444444
15021522187.522569444442049.45833333333138.064236111111-35.5225694444441
15128352666.46602182542059.125607.341021825397168.533978174604
15222242543.897569444442042.08333333333501.814236111111-319.897569444444
15321822110.960069444442038.6666666666772.293402777777771.0399305555557
15419921961.269593253972055.45833333333-94.18874007936530.7304067460318
15523892158.689236111112084.5416666666774.1475694444445230.310763888889
15627242299.59102182542101.375198.216021825397424.408978174604
1578911343.427331349212114.91666666667-771.48933531746-452.427331349206
15812471699.007688492062170.25-471.242311507937-452.007688492063
15920171986.543402777782204.41666666667-217.87326388888930.4565972222222
16022572088.394593253972196.83333333333-108.438740079365168.605406746032
16122552271.897569444442200.5416666666771.3559027777777-16.8975694444443
16222552330.105902777782192.04166666667138.064236111111-75.1059027777783
16330572797.757688492062190.41666666667607.341021825397259.242311507937
16433302718.522569444442216.70833333333501.814236111111611.477430555555
16518962316.710069444442244.4166666666772.2934027777777-420.710069444444
16620962166.144593253972260.33333333333-94.188740079365-70.1445932539682
16723742340.605902777782266.4583333333374.147569444444533.3940972222222
16825352479.424355158732281.20833333333198.21602182539755.5756448412699
16910411552.135664682542323.625-771.48933531746-511.13566468254
17017281850.21602182542321.45833333333-471.242311507937-122.216021825397
17122012106.835069444442324.70833333333-217.87326388888994.1649305555557
17224552252.644593253972361.08333333333-108.438740079365202.355406746031
17322042446.689236111112375.3333333333371.3559027777777-242.689236111111
17426602528.439236111112390.375138.064236111111131.560763888889
17536703009.924355158732402.58333333333607.341021825397660.07564484127
17626652911.272569444442409.45833333333501.814236111111-246.272569444444
17726392493.376736111112421.0833333333372.2934027777777145.623263888889
17822262344.436259920632438.625-94.188740079365-118.436259920635
17925862535.439236111112461.2916666666774.147569444444550.5607638888891
18026842702.46602182542504.25198.216021825397-18.4660218253971
1811185NA2541.875NANA
1821749NANANANA
1832459NANANANA
1842618NANANANA
1852585NANANANA
1863310NANANANA
1873923NANANANA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Jun/07/t1275895978y0dxojzp5mh3otm/1r56v1275895826.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jun/07/t1275895978y0dxojzp5mh3otm/1r56v1275895826.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jun/07/t1275895978y0dxojzp5mh3otm/2r56v1275895826.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jun/07/t1275895978y0dxojzp5mh3otm/2r56v1275895826.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jun/07/t1275895978y0dxojzp5mh3otm/31enf1275895826.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jun/07/t1275895978y0dxojzp5mh3otm/31enf1275895826.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jun/07/t1275895978y0dxojzp5mh3otm/41enf1275895826.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jun/07/t1275895978y0dxojzp5mh3otm/41enf1275895826.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