Home » date » 2011 » May » 16 »

Inleiding kwantitatief onderzoek, opgave 9 (Bouke Van Leuffelen)

*Unverified author*
R Software Module: /rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Mon, 16 May 2011 15:13:46 +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/16/t1305558659uthgk5m1vsgu5on.htm/, Retrieved Mon, 16 May 2011 17:11:03 +0200
 
Original text written by user:
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
KDGP2W92
 
Dataseries X:
» Textbox « » Textfile « » CSV «
130 127 122 117 112 113 149 157 157 147 137 132 125 123 117 114 111 112 144 150 149 134 123 116 117 111 105 102 95 93 124 130 124 115 106 105 105 101 95 93 84 87 116 120 117 109 105 107 109 109 108 107 99 103 131 137 135 124 118 121 121 118 113 107 100 102 130 136 133 120 112 109 110
 
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'Herman Ole Andreas Wold' @ www.yougetit.org


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
1130NANA-2.04097222222222NA
2127NANA-4.70763888888888NA
3122NANA-9.13263888888888NA
4117NANA-11.7076388888889NA
5112NANA-18.0743055555556NA
6113NANA-16.0743055555556NA
7149146.967361111111133.12513.84236111111112.0326388888889
8157151.500694444444132.7518.75069444444445.49930555555557
9157150.475694444444132.37518.10069444444446.52430555555554
10147141.709027777778132.0416666666679.667361111111115.29097222222222
11137133.759027777778131.8751.884027777777783.24097222222221
12132131.284027777778131.791666666667-0.507638888888890.715972222222234
13125129.500694444444131.541666666667-2.04097222222222-4.50069444444443
14123126.334027777778131.041666666667-4.70763888888888-3.33402777777778
15117121.284027777778130.416666666667-9.13263888888888-4.28402777777777
16114117.834027777778129.541666666667-11.7076388888889-3.83402777777779
17111110.342361111111128.416666666667-18.07430555555560.657638888888897
18112111.092361111111127.166666666667-16.07430555555560.907638888888883
19144140.009027777778126.16666666666713.84236111111113.99097222222224
20150144.084027777778125.33333333333318.75069444444445.91597222222224
21149142.434027777778124.33333333333318.10069444444446.56597222222221
22134133.000694444444123.3333333333339.667361111111110.999305555555566
23123124.050694444444122.1666666666671.88402777777778-1.05069444444445
24116120.200694444444120.708333333333-0.50763888888889-4.20069444444445
25117117.042361111111119.083333333333-2.04097222222222-0.04236111111112
26111112.709027777778117.416666666667-4.70763888888888-1.70902777777779
27105106.409027777778115.541666666667-9.13263888888888-1.40902777777778
28102102.000694444444113.708333333333-11.7076388888889-0.000694444444420128
299594.1340277777778112.208333333333-18.07430555555560.865972222222226
309394.9673611111111111.041666666667-16.0743055555556-1.9673611111111
31124123.925694444444110.08333333333313.84236111111110.0743055555555685
32130127.917361111111109.16666666666718.75069444444442.08263888888891
33124126.434027777778108.33333333333318.1006944444444-2.43402777777776
34115117.209027777778107.5416666666679.66736111111111-2.20902777777775
35106108.592361111111106.7083333333331.88402777777778-2.59236111111109
36105105.492361111111106-0.50763888888889-0.49236111111108
37105103.375694444444105.416666666667-2.040972222222221.62430555555557
3810199.9590277777778104.666666666667-4.707638888888881.04097222222222
399594.8256944444445103.958333333333-9.132638888888880.174305555555563
409391.7090277777778103.416666666667-11.70763888888891.29097222222224
418485.0506944444444103.125-18.0743055555556-1.05069444444446
428787.0923611111111103.166666666667-16.0743055555556-0.0923611111111171
43116117.259027777778103.41666666666713.8423611111111-1.25902777777777
44120122.667361111111103.91666666666718.7506944444444-2.66736111111111
45117122.892361111111104.79166666666718.1006944444444-5.8923611111111
46109115.584027777778105.9166666666679.66736111111111-6.58402777777778
47105109.009027777778107.1251.88402777777778-4.00902777777779
48107107.909027777778108.416666666667-0.50763888888889-0.909027777777766
49109107.667361111111109.708333333333-2.040972222222221.33263888888891
50109106.334027777778111.041666666667-4.707638888888882.66597222222222
51108103.367361111111112.5-9.132638888888884.63263888888891
52107102.167361111111113.875-11.70763888888894.83263888888889
539996.9673611111111115.041666666667-18.07430555555562.0326388888889
54103100.092361111111116.166666666667-16.07430555555562.90763888888891
55131131.092361111111117.2513.8423611111111-0.0923611111110887
56137136.875694444444118.12518.75069444444440.124305555555566
57135136.809027777778118.70833333333318.1006944444444-1.80902777777777
58124128.584027777778118.9166666666679.66736111111111-4.58402777777776
59118120.842361111111118.9583333333331.88402777777778-2.8423611111111
60121118.450694444444118.958333333333-0.507638888888892.54930555555556
61121116.834027777778118.875-2.040972222222224.16597222222225
62118114.084027777778118.791666666667-4.707638888888883.91597222222225
63113109.534027777778118.666666666667-9.132638888888883.46597222222226
64107106.709027777778118.416666666667-11.70763888888890.290972222222251
6510099.9256944444444118-18.07430555555560.0743055555555685
66102101.175694444444117.25-16.07430555555560.824305555555569
67130130.134027777778116.29166666666713.8423611111111-0.13402777777776
68136NANA18.7506944444444NA
69133NANA18.1006944444444NA
70120NANA9.66736111111111NA
71112NANA1.88402777777778NA
72109NANA-0.50763888888889NA
73110NANANANA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2011/May/16/t1305558659uthgk5m1vsgu5on/1lwhc1305558824.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/16/t1305558659uthgk5m1vsgu5on/1lwhc1305558824.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/May/16/t1305558659uthgk5m1vsgu5on/2rj471305558824.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/16/t1305558659uthgk5m1vsgu5on/2rj471305558824.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/May/16/t1305558659uthgk5m1vsgu5on/342gc1305558824.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/16/t1305558659uthgk5m1vsgu5on/342gc1305558824.ps (open in new window)


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