Home » date » 2010 » Jan » 08 »

opgave 6 oef 2

*Unverified author*
R Software Module: /rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Fri, 08 Jan 2010 09:08:46 -0700
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2010/Jan/08/t12629670172wcnb5ldlk646ht.htm/, Retrieved Fri, 08 Jan 2010 17:10:23 +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/Jan/08/t12629670172wcnb5ldlk646ht.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 «
102,5 77,7 82,8 77,3 103,1 99,7 99,5 107,2 96,7 97,1 105,2 151,2 102,7 75,4 87,2 83,7 105,8 111,5 99,7 111,2 101,5 110,9 116,3 164,9 118,1 83,7 84 107,2 113,7 120,7 111,2 112,4 112,5 130,4 130,7 174,3 132,2 91,8 104,2 104,8 131,4 141,2 132,7 135,7 136,9 151,2 144 201,5 149,6 108,7 122,8 126,7 139,9 162,5 142,7 151,6 148,1 159 157,8 226,7 153,7 122,3 117,6 166 154,5 183,9 164,4 173,3 160,2 166,4 170,3 238,4 166,8 122,5 141,8 140,5 173,8 188,8 168 187,4 177,7 183,8 196,1 264,6 193,7 141,3 170,1 163,7 190,1 230,7 195,9 210,3 204,7 210,3 221,2 288,2 203,2 162,4 149,2 195,3 213,7 227,9 212,1 226,8 212,6 220,9 228,1 311,6
 
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
1102.5NANA1.01860237749486NA
277.7NANA0.747205802621793NA
382.8NANA0.80155869200008NA
477.3NANA0.879634543888747NA
5103.1NANA0.985080885490468NA
699.7NANA1.08499349602838NA
799.596.6987437028958100.0083333333330.966906861457171.0289689006272
8107.2102.34441649732699.92083333333331.024255033541481.04744356037049
996.797.2849567865602100.0083333333330.9727685038236160.993987181514162
1097.1103.499312270431100.4583333333331.03027104707190.938170485097422
11105.2105.787899960649100.83751.049092847012760.994442654019337
12151.2146.038457409837101.4416666666671.439629909568751.03534372165873
13102.7103.838024032456101.9416666666671.018602377494860.98904039206197
1475.476.3021658777288102.1166666666670.7472058026217930.988176405383112
1587.282.1464066184748102.4833333333330.801558692000081.06151934807077
1683.790.8295969443789103.2583333333330.8796345438887470.921505795641207
17105.8102.739831852966104.2958333333330.9850808854904681.02978560595090
18111.5114.281460775422105.3291666666671.084993496028380.975661312372547
1999.7103.015868531083106.5416666666670.966906861457170.96781206062363
20111.2110.137290210854107.5291666666671.024255033541481.00964895529127
21101.5104.807699882796107.7416666666670.9727685038236160.968440296977273
22110.9111.874557323920108.58751.03027104707190.99128883861325
23116.3115.290932666506109.8958333333331.049092847012761.00875235640961
24164.9159.235064914217110.6083333333331.439629909568751.03557592725468
25118.1113.544455854667111.4708333333331.018602377494861.04012123807405
2683.783.68704989364081120.7472058026217931.00015474444822
278490.1820325057757112.5083333333330.801558692000080.931449399242807
28107.2100.084085374875113.7791666666670.8796345438887471.07109936208611
29113.7113.473109001123115.1916666666670.9850808854904681.00199951337259
30120.7126.058161013563116.1833333333331.084993496028380.957494532916541
31111.2113.285225155476117.16250.966906861457170.981593141094845
32112.4120.951716273330118.08751.024255033541480.929296445417903
33112.5116.018856889363119.2666666666670.9727685038236160.969669957249114
34130.4123.641111240687120.0083333333331.03027104707191.05466538347553
35130.7126.568680771893120.6458333333331.049092847012761.03264092825264
36174.3175.97676107091122.23751.439629909568750.990471690348736
37132.2126.293962279644123.98751.018602377494861.04676421274422
3891.894.0389636174636125.8541666666670.7472058026217930.97619110705461
39104.2102.472599116444127.8416666666670.801558692000081.01685719790901
40104.8114.110591205968129.7250.8796345438887470.918407300255221
41131.4129.189253628385131.1458333333330.9850808854904681.01711246337852
42141.2144.123302722436132.8333333333331.084993496028380.979716654647682
43132.7130.234296681102134.6916666666670.966906861457171.01893282631176
44135.7139.422448711528136.1208333333331.024255033541480.973300937216864
45136.9133.852946126130137.60.9727685038236161.02276418982216
46151.2143.503878469027139.28751.03027104707191.05363005943170
47144147.454370867839140.5541666666671.049092847012760.976573289435176
48201.5204.133522718892141.7958333333331.439629909568750.987099018897945
49149.6145.762000219515143.11.018602377494861.02633059216192
50108.7107.731509950508144.1791666666670.7472058026217931.00898984939445
51122.8116.473157603378145.3083333333330.801558692000081.05432017579678
52126.7128.514606862146146.10.8796345438887470.985880150852483
53139.9144.8068901670991470.9850808854904680.96611424938802
54162.5161.257158347217148.6251.084993496028381.00770720298882
55142.7144.886964410767149.8458333333330.966906861457170.984905719988948
56151.6154.235737134121150.5833333333331.024255033541480.982910982998517
57148.1146.823192843778150.9333333333330.9727685038236161.00869622252106
58159156.966086817433152.3541666666671.03027104707191.01295765998761
59157.8162.189754148172154.61.049092847012760.972934454637855
60226.7224.726228883682156.11.439629909568751.00878300288365
61153.7160.833071229866157.8958333333331.018602377494860.955649225776014
62122.3119.331880036211159.7041666666670.7472058026217931.02487281657582
63117.6129.141124764863161.11250.801558692000080.910631684632787
64166142.434823519185161.9250.8796345438887471.16544533070342
65154.5160.326018617263162.7541666666670.9850808854904680.963661427711423
66183.9177.681247393347163.76251.084993496028381.03499948755361
67164.4159.342221989552164.7958333333330.966906861457171.03174160588008
68173.3169.360569796084165.351.024255033541481.02326061023920
69160.2161.836253419456166.3666666666670.9727685038236160.989889450695484
70166.4171.346953516145166.31251.03027104707190.97112902555528
71170.3174.206238466664166.0541666666671.049092847012760.977576931222174
72238.4240.508171767329167.06251.439629909568750.991234510861573
73166.8170.531014698932167.4166666666671.018602377494860.97812119569265
74122.5125.645769068365168.1541666666670.7472058026217930.97496319142546
75141.8135.840819498830169.4708333333330.801558692000081.04386884975485
76140.5150.351534414184170.9250.8796345438887470.93447666196046
77173.8170.148095946341172.7250.9850808854904681.02146309092293
78188.8189.756320842896174.8916666666671.084993496028380.994960268840332
79168171.243233942654177.1041666666670.966906861457170.981060659344122
80187.4183.350186462538179.0083333333331.024255033541481.02208786157024
81177.7176.042726777380180.9708333333330.9727685038236161.00941403972182
82183.8188.659799902983183.1166666666671.03027104707190.97424040571716
83196.1193.833017146195184.76251.049092847012761.01169554540904
84264.6269.480723697401187.18751.439629909568750.981888412534913
85193.7193.632067785201190.0958333333331.018602377494861.00035083142775
86141.3143.622295336441192.21250.7472058026217930.98383053737582
87170.1155.736174199849194.2916666666670.801558692000081.09223178798343
88163.7172.866513593803196.5208333333330.8796345438887470.946973457130382
89190.1195.706840421129198.6708333333330.9850808854904680.971350820395117
90230.7217.758194652895200.71.084993496028381.05943200148097
91195.9195.391732807547202.0791666666670.966906861457171.00260127276190
92210.3208.286528799967203.3541666666671.024255033541481.00966683352800
93204.7197.82463485883203.36250.9727685038236161.03475484813141
94210.3209.977824985312203.8083333333331.03027104707191.00153432875453
95221.2216.226778209721206.1083333333331.049092847012761.02300002724665
96288.2297.967400532992206.9751.439629909568750.967219902192251
97203.2211.393946742767207.5333333333331.018602377494860.96123849869392
98162.4156.088178810182208.8958333333330.7472058026217931.04043753497498
99149.2168.257188934467209.91250.801558692000080.886737743242048
100195.3185.324337821628210.6833333333330.8796345438887471.05382812800321
101213.7208.258412703753211.41250.9850808854904681.02612901551299
102227.9230.750991767835212.6751.084993496028380.987644725831978
103212.1NANA0.96690686145717NA
104226.8NANA1.02425503354148NA
105212.6NANA0.972768503823616NA
106220.9NANA1.0302710470719NA
107228.1NANA1.04909284701276NA
108311.6NANA1.43962990956875NA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Jan/08/t12629670172wcnb5ldlk646ht/15cx71262966924.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/08/t12629670172wcnb5ldlk646ht/15cx71262966924.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jan/08/t12629670172wcnb5ldlk646ht/2m5go1262966924.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/08/t12629670172wcnb5ldlk646ht/2m5go1262966924.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jan/08/t12629670172wcnb5ldlk646ht/3qmp41262966924.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/08/t12629670172wcnb5ldlk646ht/3qmp41262966924.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jan/08/t12629670172wcnb5ldlk646ht/4uaav1262966924.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/08/t12629670172wcnb5ldlk646ht/4uaav1262966924.ps (open in new window)


 
Parameters (Session):
par1 = multiplicative ; par2 = 12 ;
 
Parameters (R input):
par1 = multiplicative ; 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