Home » date » 2010 » Dec » 11 »

opgave 9

*Unverified author*
R Software Module: /rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Sat, 11 Dec 2010 22:55:11 +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/Dec/11/t1292108018un4r9ggsj2qwyuk.htm/, Retrieved Sat, 11 Dec 2010 23:53:43 +0100
 
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/Dec/11/t1292108018un4r9ggsj2qwyuk.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:
KDGP2W92
 
Dataseries X:
» Textbox « » Textfile « » CSV «
96,1 96,5 96,9 97,8 98,9 100,2 101,2 101 101,6 102,4 103,7 103,7 104,6 104,5 104,5 105,6 106,1 107,6 107,7 108,3 108,1 108,1 108 108,2 108,9 109,8 109,9 109,8 110,9 111,1 112,2 112,7 114,6 114,2 114,7 114,7 116 116,3 116,4 116,6 118,1 117,2 108,3 109,5 110,5 110,6 111,2 111,1 111 112,4 112,5 112,4 111,8 111,6 112,9 112,8 113,7 113,8 114 113,8 113,9 114,4 114,4 114,5 113,8 114,3 115 115,4 115,3 114,9 114,3 114,5 115,5 115,8 115,8 116 114,9 114,1 114,1 113,5 115 114,7 115,4 116,1 116,6 117,2 118,2 118 117,7 118,5 117,5 118 117,7 116,3 115 115,7 113,6 114,8 114,9 117,3 117,3 117,7 120 119,6 119,2 117,3 117,5 119 112,5 118,9 118,4 119,4 120,6 118,6 122 122,6 120,6 117,4 116,4 122,2 121 122,4 124,9 126,1 124,5 123,2 126,4 123,9 116 126,6 125,9 126,6 116,7 126,4 129 128,7 128,4 129,2 133,3 128,9 132,7 127,7 131,8 133,9
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time9 seconds
R Server'George Udny Yule' @ 72.249.76.132


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
196.1NANA-1.60160984848485NA
296.5NANA0.225662878787878NA
396.9NANA0.547632575757575NA
497.8NANA0.833996212121216NA
598.9NANA0.604450757575756NA
6100.2NANA0.292708333333332NA
7101.2100.735511363636100.3541666666670.3813446969696960.464488636363654
8101101.231723484848101.0416666666670.190056818181812-0.231723484848473
9101.6101.192329545455101.691666666667-0.4993371212121230.407670454545453
10102.4101.958996212121102.333333333333-0.3743371212121190.441003787878799
11103.7102.337026515152102.958333333333-0.6213068181818121.36297348484848
12103.7103.587405303030103.5666666666670.02073863636363830.112594696969708
13104.6102.544223484848104.145833333333-1.601609848484852.05577651515152
14104.5104.946496212121104.7208333333330.225662878787878-0.44649621212119
15104.5105.843465909091105.2958333333330.547632575757575-1.34346590909090
16105.6106.638162878788105.8041666666670.833996212121216-1.03816287878787
17106.1106.825284090909106.2208333333330.604450757575756-0.7252840909091
18107.6106.880208333333106.58750.2927083333333320.71979166666668
19107.7107.335511363636106.9541666666670.3813446969696960.36448863636366
20108.3107.544223484848107.3541666666670.1900568181818120.755776515151524
21108.1107.300662878788107.8-0.4993371212121230.799337121212133
22108.1107.825662878788108.2-0.3743371212121190.274337121212127
23108107.953693181818108.575-0.6213068181818120.0463068181818045
24108.2108.941571969697108.9208333333330.0207386363636383-0.741571969696963
25108.9107.652556818182109.254166666667-1.601609848484851.24744318181821
26109.8109.850662878788109.6250.225662878787878-0.0506628787878611
27109.9110.626799242424110.0791666666670.547632575757575-0.726799242424221
28109.8111.438162878788110.6041666666670.833996212121216-1.63816287878788
29110.9111.741950757576111.13750.604450757575756-0.841950757575745
30111.1111.980208333333111.68750.292708333333332-0.880208333333343
31112.2112.635511363636112.2541666666670.381344696969696-0.435511363636351
32112.7113.010890151515112.8208333333330.190056818181812-0.310890151515153
33114.6112.863162878788113.3625-0.4993371212121231.73683712121212
34114.2113.542329545455113.916666666667-0.3743371212121190.657670454545453
35114.7113.878693181818114.5-0.6213068181818120.82130681818181
36114.7115.074905303030115.0541666666670.0207386363636383-0.374905303030275
37116113.544223484848115.145833333333-1.601609848484852.45577651515154
38116.3115.075662878788114.850.2256628787878781.22433712121213
39116.4115.093465909091114.5458333333330.5476325757575751.30653409090908
40116.6115.058996212121114.2250.8339962121212161.54100378787878
41118.1114.533617424242113.9291666666670.6044507575757563.56638257575756
42117.2113.926041666667113.6333333333330.2927083333333323.27395833333334
43108.3113.656344696970113.2750.381344696969696-5.35634469696967
44109.5113.094223484848112.9041666666670.190056818181812-3.59422348484848
45110.5112.079829545455112.579166666667-0.499337121212123-1.57982954545454
46110.6111.867329545455112.241666666667-0.374337121212119-1.26732954545453
47111.2111.182859848485111.804166666667-0.6213068181818120.0171401515151643
48111.1111.329071969697111.3083333333330.0207386363636383-0.229071969696946
49111109.665056818182111.266666666667-1.601609848484851.33494318181819
50112.4111.821496212121111.5958333333330.2256628787878780.578503787878802
51112.5112.414299242424111.8666666666670.5476325757575750.0857007575757507
52112.4112.967329545455112.1333333333330.833996212121216-0.567329545454541
53111.8112.987784090909112.3833333333330.604450757575756-1.18778409090909
54111.6112.905208333333112.61250.292708333333332-1.30520833333335
55112.9113.227178030303112.8458333333330.381344696969696-0.327178030303017
56112.8113.240056818182113.050.190056818181812-0.44005681818183
57113.7112.713162878788113.2125-0.4993371212121230.986837121212147
58113.8113.004829545455113.379166666667-0.3743371212121190.79517045454547
59114112.928693181818113.55-0.6213068181818121.07130681818184
60113.8113.766571969697113.7458333333330.02073863636363830.0334280303030283
61113.9112.344223484848113.945833333333-1.601609848484851.55577651515155
62114.4114.367329545455114.1416666666670.2256628787878780.0326704545454675
63114.4114.864299242424114.3166666666670.547632575757575-0.464299242424246
64114.5115.263162878788114.4291666666670.833996212121216-0.763162878787867
65113.8115.091950757576114.48750.604450757575756-1.29195075757576
66114.3114.821875114.5291666666670.292708333333332-0.521874999999994
67115115.006344696970114.6250.381344696969696-0.0063446969696912
68115.4114.940056818182114.750.1900568181818120.459943181818176
69115.3114.367329545455114.866666666667-0.4993371212121230.932670454545459
70114.9114.613162878788114.9875-0.3743371212121190.286837121212145
71114.3114.474526515152115.095833333333-0.621306818181812-0.174526515151513
72114.5115.154071969697115.1333333333330.0207386363636383-0.654071969696957
73115.5113.485890151515115.0875-1.601609848484852.01410984848484
74115.8115.196496212121114.9708333333330.2256628787878780.603503787878793
75115.8115.426799242424114.8791666666670.5476325757575750.373200757575759
76116115.692329545455114.8583333333330.8339962121212160.307670454545459
77114.9115.500284090909114.8958333333330.604450757575756-0.600284090909099
78114.1115.301041666667115.0083333333330.292708333333332-1.20104166666668
79114.1115.502178030303115.1208333333330.381344696969696-1.40217803030303
80113.5115.415056818182115.2250.190056818181812-1.91505681818182
81115114.883996212121115.383333333333-0.4993371212121230.116003787878810
82114.7115.192329545455115.566666666667-0.374337121212119-0.49232954545451
83115.4115.145359848485115.766666666667-0.6213068181818120.25464015151519
84116.1116.087405303030116.0666666666670.02073863636363830.0125946969697281
85116.6114.790056818182116.391666666667-1.601609848484851.8099431818182
86117.2116.946496212121116.7208333333330.2256628787878780.253503787878799
87118.2117.568465909091117.0208333333330.5476325757575750.631534090909099
88118118.033996212121117.20.833996212121216-0.0339962121212096
89117.7117.854450757576117.250.604450757575756-0.154450757575745
90118.5117.509375117.2166666666670.2927083333333320.990625000000009
91117.5117.456344696970117.0750.3813446969696960.0436553030303344
92118117.040056818182116.850.1900568181818120.95994318181819
93117.7116.113162878788116.6125-0.4993371212121231.58683712121213
94116.3116.071496212121116.445833333333-0.3743371212121190.228503787878779
95115115.778693181818116.4-0.621306818181812-0.778693181818184
96115.7116.370738636364116.350.0207386363636383-0.670738636363623
97113.6114.819223484848116.420833333333-1.60160984848485-1.21922348484847
98114.8116.817329545455116.5916666666670.225662878787878-2.01732954545453
99114.9117.268465909091116.7208333333330.547632575757575-2.36846590909089
100117.3117.658996212121116.8250.833996212121216-0.358996212121212
101117.3117.575284090909116.9708333333330.604450757575756-0.275284090909111
102117.7117.505208333333117.21250.2927083333333320.19479166666666
103120117.685511363636117.3041666666670.3813446969696962.31448863636363
104119.6117.619223484848117.4291666666670.1900568181818121.98077651515152
105119.2117.246496212121117.745833333333-0.4993371212121231.95350378787879
106117.3117.604829545455117.979166666667-0.374337121212119-0.304829545454552
107117.5117.582859848485118.204166666667-0.621306818181812-0.0828598484848584
108119118.399905303030118.3791666666670.02073863636363830.600094696969705
109112.5116.898390151515118.5-1.60160984848485-4.39839015151517
110118.9118.933996212121118.7083333333330.225662878787878-0.0339962121212238
111118.4119.439299242424118.8916666666670.547632575757575-1.03929924242425
112119.4119.788162878788118.9541666666670.833996212121216-0.388162878787881
113120.6119.516950757576118.91250.6044507575757561.08304924242424
114118.6119.2927083333331190.292708333333332-0.692708333333329
115122119.868844696970119.48750.3813446969696962.13115530303030
116122.6120.177556818182119.98750.1900568181818122.42244318181818
117120.6119.904829545455120.404166666667-0.4993371212121230.695170454545448
118117.4120.579829545455120.954166666667-0.374337121212119-3.17982954545454
119116.4120.774526515152121.395833333333-0.621306818181812-4.37452651515153
120122.2121.770738636364121.750.02073863636363830.429261363636371
121121120.523390151515122.125-1.601609848484850.47660984848487
122122.4122.588162878788122.36250.225662878787878-0.188162878787864
123124.9122.772632575758122.2250.5476325757575752.12736742424242
124126.1123.250662878788122.4166666666670.8339962121212162.84933712121212
125124.5123.800284090909123.1958333333330.6044507575757560.699715909090912
126123.2124.067708333333123.7750.292708333333332-0.867708333333312
127126.4124.160511363636123.7791666666670.3813446969696962.23948863636365
128123.9123.956723484848123.7666666666670.190056818181812-0.0567234848484617
129116123.604829545455124.104166666667-0.499337121212123-7.60482954545455
130126.6124.008996212121124.383333333333-0.3743371212121192.59100378787879
131125.9124.032859848485124.654166666667-0.6213068181818121.86714015151514
132126.6125.087405303030125.0666666666670.02073863636363831.5125946969697
133116.7124.002556818182125.604166666667-1.60160984848485-7.3025568181818
134126.4126.325662878788126.10.2256628787878780.0743371212121389
135129127.551799242424127.0041666666670.5476325757575751.44820075757579
136128.7128.579829545455127.7458333333330.8339962121212160.120170454545459
137128.4128.641950757576128.03750.604450757575756-0.241950757575722
138129.2128.880208333333128.58750.2927083333333320.319791666666674
139133.3NANA0.381344696969696NA
140128.9NANA0.190056818181812NA
141132.7NANA-0.499337121212123NA
142127.7NANA-0.374337121212119NA
143131.8NANA-0.621306818181812NA
144133.9NANA0.0207386363636383NA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/11/t1292108018un4r9ggsj2qwyuk/1zstf1292108101.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/11/t1292108018un4r9ggsj2qwyuk/1zstf1292108101.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/11/t1292108018un4r9ggsj2qwyuk/2zstf1292108101.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/11/t1292108018un4r9ggsj2qwyuk/2zstf1292108101.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/11/t1292108018un4r9ggsj2qwyuk/3a1si1292108101.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/11/t1292108018un4r9ggsj2qwyuk/3a1si1292108101.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/11/t1292108018un4r9ggsj2qwyuk/4a1si1292108101.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/11/t1292108018un4r9ggsj2qwyuk/4a1si1292108101.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