Home » date » 2009 » Jun » 08 »

opgave 9 OEFENING 2 - Tabakprijs - Quincy Cabral MAR201a

*Unverified author*
R Software Module: rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Mon, 08 Jun 2009 03:52:25 -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/08/t1244454805abkem4jfsdixbzv.htm/, Retrieved Mon, 08 Jun 2009 11:53:30 +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/08/t1244454805abkem4jfsdixbzv.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:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
3,27 3,27 3,27 3,27 3,27 3,28 3,32 3,34 3,34 3,35 3,35 3,35 3,35 3,35 3,4 3,42 3,42 3,42 3,42 3,42 3,42 3,42 3,42 3,42 3,42 3,42 3,43 3,47 3,51 3,52 3,52 3,52 3,52 3,52 3,52 3,52 3,52 3,52 3,58 3,6 3,61 3,61 3,61 3,63 3,68 3,69 3,69 3,69 3,69 3,69 3,69 3,69 3,69 3,78 3,79 3,79 3,8 3,8 3,8 3,8 3,81 3,95 3,99 4 4,06 4,16 4,19 4,2 4,2 4,2 4,2 4,2 4,23 4,38 4,43 4,44 4,44 4,44 4,44 4,44 4,45 4,45 4,45 4,45 4,45 4,45 4,45 4,45 4,46 4,46 4,46 4,48 4,58 4,67 4,68 4,68 4,69 4,69 4,69 4,69 4,69 4,69 4,69 4,73 4,78 4,79 4,79 4,8 4,8 4,81 5,16 5,26 5,29 5,29 5,29 5,3 5,3 5,3 5,3 5,3 5,3 5,3 5,3 5,35 5,44 5,47 5,47 5,48 5,48 5,48 5,48
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time1 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
13.27NANA-0.0419907407407408NA
23.27NANA-0.0268518518518519NA
33.27NANA0.0172222222222222NA
43.27NANA0.0213425925925926NA
53.27NANA0.0199537037037037NA
63.28NANA0.0241203703703703NA
73.323.320509259259263.310.0105092592592595-0.000509259259259043
83.343.320231481481483.316666666666670.003564814814815060.0197685185185179
93.343.335601851851853.325416666666670.01018518518518530.00439814814814765
103.353.341759259259263.337083333333330.004675925925925950.00824074074074055
113.353.337083333333333.34958333333333-0.01250000000000020.0129166666666665
123.353.331435185185193.36166666666667-0.03023148148148160.0185648148148143
133.353.329675925925933.37166666666667-0.04199074074074080.020324074074074
143.353.352314814814813.37916666666667-0.0268518518518519-0.00231481481481488
153.43.403055555555563.385833333333330.0172222222222222-0.00305555555555603
163.423.413425925925933.392083333333330.02134259259259260.00657407407407407
173.423.417870370370373.397916666666670.01995370370370370.00212962962962937
183.423.427870370370373.403750.0241203703703703-0.00787037037037042
193.423.420092592592593.409583333333330.0105092592592595-9.25925925927551e-05
203.423.418981481481483.415416666666670.003564814814815060.00101851851851809
213.423.429768518518523.419583333333330.0101851851851853-0.009768518518519
223.423.427592592592593.422916666666670.00467592592592595-0.00759259259259304
233.423.416253.42875-0.01250000000000020.0037499999999997
243.423.406435185185193.43666666666667-0.03023148148148160.0135648148148144
253.423.403009259259263.445-0.04199074074074080.0169907407407406
263.423.426481481481483.45333333333333-0.0268518518518519-0.0064814814814822
273.433.478888888888893.461666666666670.0172222222222222-0.0488888888888894
283.473.491342592592593.470.0213425925925926-0.0213425925925930
293.513.498287037037043.478333333333330.01995370370370370.0117129629629620
303.523.510787037037043.486666666666670.02412037037037030.00921296296296248
313.523.505509259259263.4950.01050925925925950.0144907407407402
323.523.506898148148153.503333333333330.003564814814815060.0131018518518511
333.523.523935185185193.513750.0101851851851853-0.0039351851851861
343.523.530092592592593.525416666666670.00467592592592595-0.0100925925925934
353.523.52253.535-0.0125000000000002-0.00250000000000083
363.523.512685185185193.54291666666667-0.03023148148148160.00731481481481433
373.523.508425925925933.55041666666667-0.04199074074074080.0115740740740740
383.523.531898148148153.55875-0.0268518518518519-0.0118981481481484
393.583.587222222222223.570.0172222222222222-0.00722222222222246
403.63.605092592592593.583750.0213425925925926-0.00509259259259265
413.613.617870370370373.597916666666670.0199537037037037-0.00787037037037042
423.613.636203703703703.612083333333330.0241203703703703-0.0262037037037035
433.613.636759259259263.626250.0105092592592595-0.0267592592592591
443.633.643981481481483.640416666666670.00356481481481506-0.0139814814814816
453.683.662268518518523.652083333333330.01018518518518530.0177314814814813
463.693.665092592592593.660416666666670.004675925925925950.0249074074074072
473.693.6553.6675-0.01250000000000020.0349999999999997
483.693.647685185185193.67791666666667-0.03023148148148160.042314814814814
493.693.650509259259263.6925-0.04199074074074080.0394907407407401
503.693.679814814814823.70666666666667-0.02685185185185190.0101851851851844
513.693.735555555555563.718333333333330.0172222222222222-0.0455555555555565
523.693.749259259259263.727916666666670.0213425925925926-0.0592592592592598
533.693.757037037037043.737083333333330.0199537037037037-0.0670370370370379
543.783.770370370370373.746250.02412037037037030.00962962962962877
553.793.766342592592593.755833333333330.01050925925925950.0236574074074070
563.793.775231481481483.771666666666670.003564814814815060.0147685185185180
573.83.805185185185193.7950.0101851851851853-0.00518518518518585
583.83.825092592592593.820416666666670.00467592592592595-0.0250925925925927
593.83.836253.84875-0.0125000000000002-0.0362499999999999
603.83.849768518518523.88-0.0302314814814816-0.0497685185185177
613.813.870509259259263.9125-0.0419907407407408-0.0605092592592578
623.953.919398148148153.94625-0.02685185185185190.0306018518518534
633.993.997222222222223.980.0172222222222222-0.00722222222222069
6444.034675925925934.013333333333330.0213425925925926-0.0346759259259253
654.064.066620370370374.046666666666670.0199537037037037-0.00662037037036978
664.164.104120370370374.080.02412037037037030.0558796296296293
674.194.124675925925934.114166666666670.01050925925925950.0653240740740744
684.24.153148148148154.149583333333330.003564814814815060.0468518518518515
694.24.196018518518524.185833333333330.01018518518518530.00398148148148181
704.24.227175925925934.22250.00467592592592595-0.0271759259259259
714.24.244166666666674.25666666666667-0.0125000000000002-0.0441666666666665
724.24.253935185185194.28416666666667-0.0302314814814816-0.0539351851851855
734.234.264259259259264.30625-0.0419907407407408-0.034259259259259
744.384.299814814814824.32666666666667-0.02685185185185190.0801851851851847
754.434.364305555555564.347083333333330.01722222222222220.0656944444444445
764.444.389259259259264.367916666666670.02134259259259260.050740740740741
774.444.40870370370374.388750.01995370370370370.0312962962962970
784.444.433703703703704.409583333333330.02412037037037030.0062962962962958
794.444.439675925925934.429166666666670.01050925925925950.000324074074073977
804.444.444814814814824.441250.00356481481481506-0.00481481481481527
814.454.455185185185194.4450.0101851851851853-0.0051851851851854
824.454.450925925925934.446250.00467592592592595-0.000925925925925775
834.454.4354.4475-0.01250000000000020.0149999999999997
844.454.418935185185194.44916666666667-0.03023148148148160.0310648148148145
854.454.408842592592594.45083333333333-0.04199074074074080.0411574074074066
864.454.426481481481484.45333333333333-0.02685185185185190.0235185185185181
874.454.477638888888894.460416666666670.0172222222222222-0.0276388888888901
884.454.496342592592594.4750.0213425925925926-0.0463425925925938
894.464.513703703703704.493750.0199537037037037-0.0537037037037047
904.464.537037037037044.512916666666670.0241203703703703-0.0770370370370381
914.464.543009259259264.53250.0105092592592595-0.08300925925926
924.484.556064814814814.55250.00356481481481506-0.0760648148148144
934.584.582685185185194.57250.0101851851851853-0.0026851851851859
944.674.597175925925934.59250.004675925925925950.0728240740740729
954.684.599583333333334.61208333333333-0.01250000000000020.0804166666666655
964.684.601018518518524.63125-0.03023148148148160.0789814814814811
974.694.608425925925934.65041666666667-0.04199074074074080.0815740740740747
984.694.643564814814814.67041666666667-0.02685185185185190.0464351851851861
994.694.706388888888894.689166666666670.0172222222222222-0.0163888888888879
1004.694.723842592592594.70250.0213425925925926-0.0338425925925909
1014.694.732037037037044.712083333333330.0199537037037037-0.0420370370370353
1024.694.745787037037044.721666666666670.0241203703703703-0.0557870370370361
1034.694.741759259259264.731250.0105092592592595-0.0517592592592582
1044.734.744398148148154.740833333333330.00356481481481506-0.0143981481481461
1054.784.775601851851854.765416666666670.01018518518518530.00439814814814898
1064.794.813425925925934.808750.00467592592592595-0.0234259259259257
1074.794.8454.8575-0.0125000000000002-0.0549999999999997
1084.84.877268518518524.9075-0.0302314814814816-0.077268518518518
1094.84.915509259259264.9575-0.0419907407407408-0.115509259259260
1104.814.979398148148155.00625-0.0268518518518519-0.169398148148149
1115.165.068888888888895.051666666666670.01722222222222220.0911111111111103
1125.265.115925925925935.094583333333330.02134259259259260.144074074074073
1135.295.157037037037045.137083333333330.01995370370370370.132962962962963
1145.295.203287037037045.179166666666670.02412037037037030.0867129629629622
1155.295.231342592592595.220833333333330.01050925925925950.0586574074074084
1165.35.265648148148155.262083333333330.003564814814815060.0343518518518531
1175.35.298518518518525.288333333333330.01018518518518530.00148148148148231
1185.35.302592592592595.297916666666660.00467592592592595-0.00259259259259093
1195.35.295416666666675.30791666666667-0.01250000000000020.00458333333333449
1205.35.291435185185185.32166666666667-0.03023148148148160.0085648148148163
1215.3NA5.33666666666667NANA
1225.3NA5.35166666666666NANA
1235.3NA5.36666666666667NANA
1245.35NA5.38166666666667NANA
1255.44NA5.39666666666667NANA
1265.47NANANANA
1275.47NANANANA
1285.48NANANANA
1295.48NANANANA
1305.48NANANANA
1315.48NANANANA
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/08/t1244454805abkem4jfsdixbzv/1fwtq1244454743.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/08/t1244454805abkem4jfsdixbzv/1fwtq1244454743.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/08/t1244454805abkem4jfsdixbzv/2blrw1244454743.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/08/t1244454805abkem4jfsdixbzv/2blrw1244454743.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/08/t1244454805abkem4jfsdixbzv/3v9hf1244454743.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/08/t1244454805abkem4jfsdixbzv/3v9hf1244454743.ps (open in new window)


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