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 16:56:16 +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/t1305651139l18qdwzvfsyfs5q.htm/, Retrieved Tue, 17 May 2011 18:52:23 +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 time5 seconds
R Server'Gwilym Jenkins' @ www.wessa.org


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
1112NANA0.739352083743664NA
2118NANA0.808471572602186NA
3129NANA0.906935936641768NA
499NANA0.860584463518577NA
5116NANA0.895308654255108NA
6168NANA0.929788828226209NA
7118148.003296738498147.0833333333331.006254708703670.797279537688207
8129144.372854778781148.1250.9746690617976780.89351977002646
9205148.26827554122148.3750.9992807113140381.38262888167879
10147152.951155124742148.0833333333331.032872178670180.961091139717851
11150179.424458811887147.4166666666671.217124649939310.836006422944064
12267236.460456479028145.1251.629357150587621.12915285699654
13126109.239270373126147.750.7393520837436641.15343135824346
14129125.818388486215155.6250.8084715726021861.0252873332115
15124141.066327145155155.5416666666670.9069359366417680.879019128869826
1697130.521976966984151.6666666666670.8605844635185770.743169864984012
17102135.71387017417151.5833333333330.8953086542551080.751581248615908
18127139.507065435107150.0416666666670.9297888282262090.910348157664279
19222147.709805781793146.7916666666671.006254708703671.50294693588559
20214139.458898258884143.0833333333330.9746690617976781.53450229904112
21118139.06656565787139.1666666666670.9992807113140380.848514518509806
22141141.933851885593137.4166666666671.032872178670180.99342051333641
23154168.521050489514138.4583333333331.217124649939310.913832423621064
24226226.887983219326139.251.629357150587620.996086248347197
258999.5352742739908134.6250.7393520837436640.894155370035046
2677102.035849725501126.2083333333330.8084715726021860.7546367301997
2782110.343872291415121.6666666666670.9069359366417680.743131433555642
2897103.234277936249119.9583333333330.8605844635185770.939610388517473
29127105.571812147581117.9166666666670.8953086542551081.20297262514035
30121106.654526837781114.7083333333330.9297888282262091.13450411893006
31117112.448963697635111.751.006254708703671.04047201639494
32117109.60965824133112.4583333333330.9746690617976781.06742418393823
33106115.042191890029115.1250.9992807113140380.921401081277448
34112119.813172725741161.032872178670180.934788700207237
35134139.25934536389114.4166666666671.217124649939310.962233447599896
36169183.777908610028112.7916666666671.629357150587620.919588220794335
377582.745820705645111.9166666666670.7393520837436640.90639018817398
3810890.4477571848696111.8750.8084715726021861.19405945886812
39115101.690191895958112.1250.9069359366417681.13088585886099
408595.8475946243815111.3750.8605844635185770.886824550298916
4110199.1181289314925110.7083333333330.8953086542551081.018986143996
42108102.780406720172110.5416666666670.9297888282262091.05078393291475
43109111.568490827519110.8751.006254708703670.976978349277038
44124107.660320117735110.4583333333330.9746690617976781.15177067896878
45105109.296327799973109.3750.9992807113140380.960691014177203
4695112.927358201273109.3333333333331.032872178670180.841248759496169
47135132.6665868433851091.217124649939311.01758855196425
48164175.495343094541107.7083333333331.629357150587620.93449773143924
498878.3097082031831105.9166666666670.7393520837436641.12374317334544
508585.4958688026812105.750.8084715726021860.994200084640047
5111296.2107872787475106.0833333333330.9069359366417681.16411062800585
528791.4012415628689106.2083333333330.8605844635185770.951847026499727
539195.7234169507753106.9166666666670.8953086542551080.950655575184866
548799.371181016676106.8750.9297888282262090.875505343801841
5587106.201799047766105.5416666666671.006254708703670.819195162229504
56142101.649860903316104.2916666666670.9746690617976781.39695223129781
5795104.591381117536104.6666666666670.9992807113140380.908296639598272
58108108.881942168148105.4166666666671.032872178670180.991900014358803
59139129.471634637294106.3751.217124649939311.07359423080892
60159173.66231630013106.5833333333331.629357150587620.915569960066695
616178.4329335504737106.0833333333330.7393520837436640.777734520929845
628284.4515930214034104.4583333333330.8084715726021860.970970434852756
6312493.0743004978614102.6250.9069359366417681.33226894359361
649388.1381921386943102.4166666666670.8605844635185771.05516119338658
6510891.0976555704572101.750.8953086542551081.18554093762018
667592.823918017916599.83333333333330.9297888282262090.807981408256477
678799.032234248252698.41666666666671.006254708703670.878501839935365
6810395.070844736181897.54166666666670.9746690617976781.0834025960937
699094.390390522871894.45833333333330.9992807113140380.953486891000753
7010894.163513622097791.16666666666671.032872178670181.14694105865072
71123108.22266679043788.91666666666671.217124649939311.13654563916982
72129142.1614113887787.251.629357150587620.907419240846047
735764.970564358974587.8750.7393520837436640.877320376733445
746572.324519432370689.45833333333330.8084715726021860.898727022455786
756782.039913268719990.45833333333330.9069359366417680.816675656159496
767177.345028658732189.8750.8605844635185770.917964622047938
777679.010988738013388.250.8953086542551080.961891519317684
786781.898899286258688.08333333333330.9297888282262090.818081812868047
7911089.179323558862588.6251.006254708703671.23346977315201
8011886.420656812727488.66666666666670.9746690617976781.36541429273912
819988.727799825425688.79166666666670.9992807113140381.11577206010726
828592.485096331758689.54166666666671.032872178670180.919066999671943
83107110.60620256323590.8751.217124649939310.967396018671076
84141149.69718821023791.8751.629357150587620.941901459110755
855867.435071304786791.20833333333330.7393520837436640.860086582215611
866571.448675228718288.3750.8084715726021860.90974394965232
877078.52553651423386.58333333333330.9069359366417680.891429757850967
888675.121852127975887.29166666666670.8605844635185771.14480670489184
899378.302202720061387.45833333333330.8953086542551081.1877060512906
907481.511487274497787.66666666666670.9297888282262090.907847500693957
918789.095468999803988.54166666666671.006254708703670.976480633377568
927388.532439779955790.83333333333330.9746690617976780.824556514893738
9310192.84983275959692.91666666666670.9992807113140381.08777794206163
9410095.11031311921292.08333333333331.032872178670181.05141069060155
9596109.74407260286190.16666666666671.217124649939310.874762506284983
96157145.75957509631789.45833333333331.629357150587621.07711620246049
976366.172011495057989.50.7393520837436640.95206415184621
9811572.223460485795389.33333333333330.8084715726021861.59228039236112
997081.208555326798389.54166666666670.9069359366417680.861978146493396
1006677.667747832551690.250.8605844635185770.84977357837507
1016781.54769659173691.08333333333330.8953086542551080.821605058146912
1028383.990924149767690.33333333333330.9297888282262090.98820200920756
1037990.311360106154189.751.006254708703670.874751525247117
1047785.567821383654587.79166666666670.9746690617976780.899870988356248
10510286.229598047140586.29166666666670.9992807113140381.18288850128048
10611690.290242952084587.41666666666671.032872178670181.2847456846645
107100107.106969194659881.217124649939310.933646061987405
108135144.33388758955388.58333333333331.629357150587620.935331281201984
1097165.956367137299489.20833333333330.7393520837436641.07646923385276
1106072.257146801320489.3750.8084715726021860.83036768895646
1118980.377197384876788.6250.9069359366417681.10727921469859
1127474.691559896216586.79166666666660.8605844635185770.99074112393452
1137376.959239738678685.95833333333330.8953086542551080.948554068983496
1149180.34925123921586.41666666666670.9297888282262091.13255566911353
1158685.867068476046385.33333333333331.006254708703671.00154810832969
1167482.40014693281284.54166666666670.9746690617976780.898056651043822
1178784.189399928207684.250.9992807113140381.033384251155
1188786.460008622849383.70833333333331.032872178670181.00624556237909
119109101.83276237825683.66666666666671.217124649939311.07038243345616
120137135.03297385494982.8751.629357150587621.01456700603487
1214360.565258193335181.91666666666670.7393520837436640.709977985444003
1226965.82306053602881.41666666666670.8084715726021861.0482648396793
1237373.537388862703381.08333333333330.9069359366417680.992692304268423
1247768.8467570814862800.8605844635185771.11842595445511
1256970.841297267935479.1250.8953086542551080.974008137358478
1267673.414576228694478.95833333333330.9297888282262091.03521676353823
1277879.703758385236379.20833333333331.006254708703670.978623863921179
1287077.08007830383379.08333333333330.9746690617976780.908146456780637
1298378.152078964018778.20833333333330.9992807113140381.06203188834187
1306579.961521165382777.41666666666671.032872178670180.812890988723962
13111093.160749247438176.54166666666671.217124649939311.18075478019006
132132123.35591427573875.70833333333331.629357150587621.07007435172456
1335456.1907583645185760.7393520837436640.961012123198148
1345561.544898464341476.1250.8084715726021860.893656523486939
1356668.0201952481326750.9069359366417680.970300066902733
1366564.041827160174174.41666666666670.8605844635185771.01496167243057
1376065.208313651580372.83333333333330.8953086542551080.920128073248309
1386565.317665182891270.250.9297888282262090.995136611481722
1399668.76073842808468.33333333333331.006254708703671.39614556496372
1405565.465271984077467.16666666666670.9746690617976780.84014009768992
1417166.36889390977466.41666666666670.9992807113140381.0697782623366
1426367.653127702896565.51.032872178670180.931220804404919
1437478.758107556489664.70833333333331.217124649939310.93958580641267
144106104.278857637608641.629357150587621.01650519003932
1453446.11708622351162.3750.7393520837436640.737253863681145
1464749.350452244258461.04166666666670.8084715726021860.952372224825318
1475654.302789206425859.8750.9069359366417681.03125457860226
1485350.20076037191758.33333333333330.8605844635185771.05576090097729
1495351.181811401583757.16666666666670.8953086542551081.03552411586512
1505551.951950777139455.8750.9297888282262091.0586705441714
1516755.553645376348355.20833333333331.006254708703671.20604146759602
1525253.484964766147654.8750.9746690617976780.97223584660399
1534654.12770519617754.16666666666670.9992807113140380.84984205100291
1545155.172588877298653.41666666666671.032872178670180.924372066596726
1555864.000471175975552.58333333333331.217124649939310.906243328123685
1569184.862351593105152.08333333333331.629357150587621.07232475051273
1573338.199857660089351.66666666666670.7393520837436640.863877564509303
1584041.501540726912251.33333333333330.8084715726021860.963819638967318
1594646.631622742330951.41666666666670.9069359366417680.986455055492686
1604544.284242185226851.45833333333330.8605844635185771.01616281050445
1614145.735350421531851.08333333333330.8953086542551080.896461918890155
1625546.566923813662650.08333333333330.9297888282262091.1810958400448
1635751.654408380121651.33333333333331.006254708703671.10348761678849
1645451.616849064368752.95833333333330.9746690617976781.04617001965113
1654652.545510736596552.58333333333330.9992807113140380.875431589781129
1665254.268825720962152.54166666666671.032872178670180.958192835558523
1674864.254038811379552.79166666666671.217124649939310.747034752802171
1687785.5412504058552.51.629357150587620.900150507909037
1697736.751959829424649.70833333333330.7393520837436642.09512636488984
1703536.448593398148645.08333333333330.8084715726021860.960256534941561
1714238.847089286155742.83333333333330.9069359366417681.08116208374376
1724836.825843501399142.79166666666670.8605844635185771.30343246579474
1734438.834012878315343.3750.8953086542551081.13302738344018
1744541.181896850185844.29166666666670.9297888282262091.09271314441158
175042.891606958493842.6251.006254708703670
176039.798986690071840.83333333333330.9746690617976780
1774641.095419252789841.1250.9992807113140381.11934616646787
1785142.778122733256441.41666666666671.032872178670181.19219817844769
1796349.800683593350240.91666666666671.217124649939311.26504287600607
1808465.242175904779240.04166666666671.629357150587621.28751070661098
18130NA42.4166666666667NANA
18239NANANANA
18345NANANANA
18452NANANANA
18528NANANANA
18640NANANANA
18762NANANANA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2011/May/17/t1305651139l18qdwzvfsyfs5q/1uryj1305651371.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/17/t1305651139l18qdwzvfsyfs5q/1uryj1305651371.ps (open in new window)


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


http://www.freestatistics.org/blog/date/2011/May/17/t1305651139l18qdwzvfsyfs5q/38yst1305651371.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/17/t1305651139l18qdwzvfsyfs5q/38yst1305651371.ps (open in new window)


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