Home » date » 2009 » Jun » 01 »

Nick Vermeulen opgave 9.2

*Unverified author*
R Software Module: rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Mon, 01 Jun 2009 15:44:12 -0600
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2009/Jun/01/t1243892697pq6lp7bblxocmwz.htm/, Retrieved Mon, 01 Jun 2009 23:44:57 +0200
 
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/2009/Jun/01/t1243892697pq6lp7bblxocmwz.htm/},
    year = {2009},
}
@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 = {2009},
    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:
Maandelijkse verkoop auto's
 
Dataseries X:
» Textbox « » Textfile « » CSV «
14620 16005 16683 15487 15684 15962 12000 13769 14031 16078 15827 13149 15969 16628 16670 16487 16883 16201 12168 14010 16556 17404 16435 13123 16744 17410 16484 17103 17301 17301 12843 13748 16904 17342 15476 15424 15988 19244 18715 17780 17160 17349 11171 13438 16713 18369 17067 14055 15500 18475 19423 18686 19646 19733 12605 16616 19156 21348 20049 18020 20262 21789 20603 21928 21025 19346 11786 19082 20127 20217 20385 16653 13065 20275 21776 20260 22523 23033 14133 20110 19682 22197 17212 11784 15467 17002 15952 18767 20605 19809 14233 19311 20827 23388 20181 14344
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time3 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
114620NANA-1109.25644841270NA
216005NANA1391.32093253968NA
316683NANA1146.45188492063NA
415487NANA1260.77331349206NA
515684NANA1781.63045634921NA
615962NANA1409.88640873016NA
71200010297.559027777814997.4583333333-4699.899305555551702.44097222222
81376913806.892361111115079.625-1272.73263888889-37.8923611111113
91403115601.582837301615105.0416666667496.541170634921-1570.58283730159
101607817025.535218254015146.16666666671879.36855158730-947.535218253966
111582715567.773313492115237.7916666667329.981646825397259.226686507936
121314912683.642361111115297.7083333333-2614.06597222222465.357638888891
131596914205.410218254015314.6666666667-1109.256448412701763.58978174604
141662816723.02926587315331.70833333331391.32093253968-95.029265873014
151667016593.410218254015446.95833333331146.4518849206376.5897817460354
161648716868.189980158715607.41666666671260.77331349206-381.189980158726
171688317469.6304563492156881781.63045634921-586.630456349203
181620117122.136408730215712.251409.88640873016-921.136408730157
191216811043.559027777815743.4583333333-4699.899305555551124.44097222222
201401014535.600694444415808.3333333333-1272.73263888889-525.600694444443
211655616329.707837301615833.1666666667496.541170634921226.292162698413
221740417730.451884920615851.08333333331879.36855158730-326.451884920634
231643516224.148313492115894.1666666667329.981646825397210.851686507935
241312313343.350694444415957.4166666667-2614.06597222222-220.350694444443
251674414922.118551587316031.375-1109.256448412701821.8814484127
261741017439.904265873016048.58333333331391.32093253968-29.9042658730177
271648417198.618551587316052.16666666671146.45188492063-714.618551587304
281710317324.856646825416064.08333333331260.77331349206-221.856646825398
291730117803.172123015916021.54166666671781.63045634921-502.172123015871
301730117487.344742063516077.45833333331409.88640873016-186.344742063491
311284311441.934027777816141.8333333333-4699.899305555551401.06597222222
321374814914.017361111116186.75-1272.73263888889-1166.01736111111
331690416852.666170634916356.125496.54117063492151.3338293650795
341734218356.660218254016477.29166666671879.36855158730-1014.66021825397
351547616829.606646825416499.625329.981646825397-1353.60664682539
361542413881.684027777816495.75-2614.065972222221542.31597222223
371598815318.826884920616428.0833333333-1109.25644841270669.173115079368
381924417736.820932539716345.51391.320932539681507.17906746032
391871517471.076884920616324.6251146.451884920631243.92311507937
401778017620.231646825416359.45833333331260.77331349206159.768353174602
411716018250.172123015916468.54166666671781.63045634921-1090.17212301587
421734917887.678075396816477.79166666671409.88640873016-538.678075396827
431117111700.517361111116400.4166666667-4699.89930555555-529.51736111111
441343815075.309027777816348.0416666667-1272.73263888889-1637.30902777778
451671316842.041170634916345.5496.541170634921-129.041170634919
461836918292.118551587316412.751879.3685515873076.8814484126997
471706716884.064980158716554.0833333333329.981646825397182.935019841272
481405514142.934027777816757-2614.06597222222-87.9340277777774
491550015806.826884920616916.0833333333-1109.25644841270-306.826884920632
501847518499.570932539717108.251391.32093253968-24.5709325396820
511942318488.910218254017342.45833333331146.45188492063934.089781746035
521868618829.148313492117568.3751260.77331349206-143.148313492064
531964619598.380456349217816.751781.6304563492147.6195436507951
541973319516.094742063518106.20833333331409.88640873016216.905257936509
551260513769.934027777818469.8333333333-4699.89930555555-1164.93402777777
561661617533.600694444418806.3333333333-1272.73263888889-917.600694444442
571915619490.124503968318993.5833333333496.541170634921-334.124503968258
582134821057.201884920619177.83333333331879.36855158730290.798115079368
592004919700.356646825419370.375329.981646825397348.643353174604
601802016797.642361111119411.7083333333-2614.065972222221222.35763888889
612026218252.201884920619361.4583333333-1109.256448412702009.79811507937
622178920821.40426587319430.08333333331391.32093253968967.59573412699
632060320719.743551587319573.29166666671146.45188492063-116.743551587300
642192820827.398313492119566.6251260.773313492061100.60168650794
652102521315.130456349219533.51781.63045634921-290.130456349209
661934620900.428075396819490.54166666671409.88640873016-1554.42807539682
671178614433.809027777819133.7083333333-4699.89930555555-2647.80902777778
681908217498.017361111118770.75-1272.732638888891583.98263888889
692012719253.082837301618756.5416666667496.541170634921873.917162698413
702021720615.285218254018735.91666666671879.36855158730-398.285218253965
712038519058.814980158718728.8333333333329.9816468253971326.18501984127
721665316330.809027777818944.875-2614.06597222222322.190972222223
731306518087.035218254019196.2916666667-1109.25644841270-5022.03521825397
742027520728.237599206319336.91666666671391.32093253968-453.23759920635
752177620507.660218254019361.20833333331146.451884920631268.33978174603
762026020685.939980158719425.16666666671260.77331349206-425.939980158728
772252321157.088789682519375.45833333331781.630456349211365.91121031746
782303320450.261408730219040.3751409.886408730162582.73859126984
791413314237.684027777818937.5833333333-4699.89930555555-104.684027777777
802011017628.559027777818901.2916666667-1272.732638888892481.44097222222
811968219018.791170634918522.25496.541170634921663.208829365081
822219720096.743551587318217.3751879.368551587302100.2564484127
831721218405.231646825418075.25329.981646825397-1193.23164682540
841178415246.934027777817861-2614.06597222222-3462.93402777777
851546716621.576884920617730.8333333333-1109.25644841270-1154.57688492063
861700219093.02926587317701.70833333331391.32093253968-2091.02926587302
871595218862.576884920617716.1251146.45188492063-2910.57688492063
881876719074.231646825417813.45833333331260.77331349206-307.231646825396
892060519768.422123015917986.79166666671781.63045634921836.577876984127
901980919627.053075396818217.16666666671409.88640873016181.946924603173
9114233NANA-4699.89930555555NA
9219311NANA-1272.73263888889NA
9320827NANA496.541170634921NA
9423388NANA1879.36855158730NA
9520181NANA329.981646825397NA
9614344NANA-2614.06597222222NA
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/01/t1243892697pq6lp7bblxocmwz/1djwl1243892648.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/01/t1243892697pq6lp7bblxocmwz/1djwl1243892648.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/01/t1243892697pq6lp7bblxocmwz/2ngn41243892648.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/01/t1243892697pq6lp7bblxocmwz/2ngn41243892648.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/01/t1243892697pq6lp7bblxocmwz/36z6q1243892648.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/01/t1243892697pq6lp7bblxocmwz/36z6q1243892648.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/01/t1243892697pq6lp7bblxocmwz/4fnnb1243892648.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/01/t1243892697pq6lp7bblxocmwz/4fnnb1243892648.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