Home » date » 2011 » May » 16 »

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: Mon, 16 May 2011 19:03:53 +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/t1305572975h7bpa79vs7lbfip.htm/, Retrieved Mon, 16 May 2011 21:09:39 +0200
 
Original text written by user:
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
KDGP2W92
 
Dataseries X:
» Textbox « » Textfile « » CSV «
6827 6178 7084 8162 8462 9644 10466 10748 9963 8194 6848 7027 7269 6775 7819 8371 9069 10248 11030 10882 10333 9109 7685 7602 8350 7829 8829 9948 10638 11253 11424 11391 10665 9396 7775 7933 8186 7444 8484 9948 10252 12282 11637 11577 12417 9637 8094 9280 8334 7899 9994 10078 10801 12950 12222 12246 13281 10366 8730 9614 8639 8772 10894 10455 11179 10588 10794 12770 13812 10857 9290 10925 9491 8919 11607 8852 12537 14759 13667 13731 15110 12185 10645 12161 10840 10436 13589 13402 13103 14933 14147 14057 16234 12389 11595 12772
 
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
16827NANA-1659.28869047619NA
26178NANA-2134.46726190476NA
37084NANA-314.0625NA
48162NANA-399.502976190475NA
58462NANA479.41369047619NA
69644NANA1764.6755952381NA
7104669889.758928571438318.666666666671571.09226190476576.241071428572
81074810184.53273809528361.958333333331822.5744047619563.467261904761
9996310495.39583333338417.458333333332077.9375-532.395833333334
1081948202.389880952388456.79166666667-254.401785714286-8.38988095238165
1168486652.288690476198490.79166666667-1838.50297619048195.711309523809
1270277425.782738095248541.25-1115.46726190476-398.782738095239
1372696930.627976190488589.91666666667-1659.28869047619338.372023809525
1467756484.532738095248619-2134.46726190476290.467261904763
1578198325.93758640-314.0625-506.9375
1683718294.038690476198693.54166666666-399.50297619047576.961309523811
1790699245.955357142868766.54166666667479.41369047619-176.955357142857
181024810590.05059523818825.3751764.6755952381-342.050595238094
191103010465.46726190488894.3751571.09226190476564.532738095239
201088210805.90773809528983.333333333331822.574404761976.0922619047633
211033311147.27083333339069.333333333332077.9375-814.270833333332
2291098922.72321428579177.125-254.401785714286186.276785714288
2376857469.705357142869308.20833333333-1838.50297619048215.294642857145
2476028299.991071428579415.45833333333-1115.46726190476-697.991071428571
2583507814.46130952389473.75-1659.28869047619535.538690476191
2678297376.907738095249511.375-2134.46726190476452.092261904761
2788299232.354166666679546.41666666667-314.0625-403.354166666666
2899489172.705357142869572.20833333333-399.502976190475775.294642857143
291063810067.33035714299587.91666666667479.41369047619570.669642857141
301125311370.13392857149605.458333333331764.6755952381-117.133928571429
311142411183.50892857149612.416666666661571.09226190476240.491071428574
321139111412.11607142869589.541666666671822.5744047619-21.1160714285706
331066511637.06259559.1252077.9375-972.0625
3493969290.348214285719544.75-254.401785714286105.651785714286
3577757690.16369047629528.66666666667-1838.5029761904884.8363095238092
3679338439.991071428579555.45833333333-1115.46726190476-506.99107142857
3781867947.919642857149607.20833333333-1659.28869047619238.080357142859
3874447489.366071428579623.83333333333-2134.46726190476-45.3660714285706
3984849390.520833333339704.58333333333-314.0625-906.520833333332
4099489388.122023809529787.625-399.502976190475559.877976190477
411025210290.37202380959810.95833333333479.41369047619-38.3720238095248
421228211645.05059523819880.3751764.6755952381636.949404761906
431163711513.75892857149942.666666666671571.09226190476123.241071428571
441157711790.36607142869967.791666666671822.5744047619-213.366071428571
451241712127.604166666710049.66666666672077.9375289.395833333334
4696379863.5982142857110118-254.401785714286-226.598214285714
4780948307.7886904761910146.2916666667-1838.50297619048-213.788690476189
4892809081.5327380952410197-1115.46726190476198.467261904761
4983348589.9196428571410249.2083333333-1659.28869047619-255.919642857141
5078998166.9910714285710301.4583333333-2134.46726190476-267.991071428571
51999410051.270833333310365.3333333333-314.0625-57.270833333334
521007810032.205357142910431.7083333333-399.50297619047545.7946428571431
531080110967.997023809510488.5833333333479.41369047619-166.997023809525
541295012293.6755952381105291764.6755952381656.324404761906
551222212126.717261904810555.6251571.0922619047695.2827380952385
561224612427.282738095210604.70833333331822.5744047619-181.282738095239
571328112756.520833333310678.58333333332077.9375524.479166666666
581036610477.389880952410731.7916666667-254.401785714286-111.38988095238
5987308924.7470238095210763.25-1838.50297619048-194.747023809521
6096149565.1160714285710680.5833333333-1115.4672619047648.8839285714275
6186398863.3779761904810522.6666666667-1659.28869047619-224.377976190477
6287728350.5327380952410485-2134.46726190476421.467261904761
631089410214.895833333310528.9583333333-314.0625679.104166666666
641045510172.038690476210571.5416666667-399.502976190475282.961309523811
651117911094.747023809510615.3333333333479.4136904761984.252976190477
661058812457.967261904810693.29166666671764.6755952381-1869.96726190476
671079412354.508928571410783.41666666671571.09226190476-1560.50892857143
681277012647.616071428610825.04166666671822.5744047619122.383928571429
691381212938.812510860.8752077.9375873.1875
701085710569.389880952410823.7916666667-254.401785714286287.610119047618
7192908975.0803571428610813.5833333333-1838.50297619048314.919642857143
72109259928.4910714285711043.9583333333-1115.46726190476996.50892857143
7394919678.1696428571411337.4583333333-1659.28869047619-187.169642857143
7489199362.7410714285711497.2083333333-2134.46726190476-443.741071428572
751160711277.270833333311591.3333333333-314.0625329.729166666668
76885211301.247023809511700.75-399.502976190475-2449.24702380952
771253712291.955357142911812.5416666667479.41369047619245.044642857143
781475913685.175595238111920.51764.67559523811073.82440476191
791366713599.300595238112028.20833333331571.0922619047667.6994047619064
801373113970.199404761912147.6251822.5744047619-239.199404761903
811511014371.354166666712293.41666666672077.9375738.645833333336
821218512311.18154761912565.5833333333-254.401785714286-126.181547619046
831064510940.247023809512778.75-1838.50297619048-295.247023809521
841216111694.116071428612809.5833333333-1115.46726190476466.883928571429
851084011177.544642857112836.8333333333-1659.28869047619-337.544642857141
861043610735.949404761912870.4166666667-2134.46726190476-299.949404761903
871358912616.770833333312930.8333333333-314.0625972.229166666668
881340212586.663690476212986.1666666667-399.502976190475815.33630952381
891310313513.663690476213034.25479.41369047619-410.663690476189
901493314863.967261904813099.29166666671764.675595238169.0327380952403
9114147NANA1571.09226190476NA
9214057NANA1822.5744047619NA
9316234NANA2077.9375NA
9412389NANA-254.401785714286NA
9511595NANA-1838.50297619048NA
9612772NANA-1115.46726190476NA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2011/May/16/t1305572975h7bpa79vs7lbfip/1xo9x1305572631.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/16/t1305572975h7bpa79vs7lbfip/1xo9x1305572631.ps (open in new window)


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


http://www.freestatistics.org/blog/date/2011/May/16/t1305572975h7bpa79vs7lbfip/3lcj91305572631.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/16/t1305572975h7bpa79vs7lbfip/3lcj91305572631.ps (open in new window)


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