Home » date » 2010 » Dec » 10 »

Opgave 9 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, 10 Dec 2010 10:27:13 +0000
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2010/Dec/10/t1291976746ihijd61praxwvdz.htm/, Retrieved Fri, 10 Dec 2010 11:25:52 +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/Dec/10/t1291976746ihijd61praxwvdz.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:
KDGP2W92
 
Dataseries X:
» Textbox « » Textfile « » CSV «
6715 7703 9856 8326 9269 7035 10342 11682 10304 11385 9777 8882 7897 6930 9545 9110 7459 7320 10017 12307 11072 10749 9589 9080 7384 8062 8511 8684 8306 7643 10577 13747 11783 11611 9946 8693 7303 7609 9423 8584 7586 6843 11811 13414 12103 11501 8213 7982 7687 7180 7862 8043 8340 6692 10065 12684 11587 9843 8110 7940 6475 6121 9669 7778 7826 7403 10741 14023 11519 10236 8075 8157
 
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'RServer@AstonUniversity' @ vre.aston.ac.uk


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
16715NANA-1826.77847222222NA
27703NANA-2018.41180555556NA
39856NANA-226.445138888889NA
48326NANA-789.19513888889NA
59269NANA-1301.83680555555NA
67035NANA-2004.81180555556NA
71034210653.46319444449322.251331.21319444444-311.463194444443
81168212890.08819444449339.291666666673550.79652777778-1208.08819444445
91030411462.66319444449294.1252168.53819444444-1158.66319444444
101138511136.49652777789313.833333333331822.66319444444248.503472222223
1197779219.538194444459271.08333333333-51.5451388888888557.461805555555
1288828553.354861111119207.54166666667-654.186805555556328.645138888887
1378977379.096527777789205.875-1826.77847222222517.903472222222
1469307199.963194444449218.375-2018.41180555556-269.963194444445
1595459049.971527777789276.41666666667-226.445138888889495.02847222222
1691108492.721527777789281.91666666667-789.19513888889617.27847222222
1774597945.746527777789247.58333333333-1301.83680555555-486.746527777777
1873207243.188194444449248-2004.8118055555676.8118055555569
191001710566.08819444449234.8751331.21319444444-549.088194444443
201230712811.46319444449260.666666666673550.79652777778-504.463194444445
211107211433.28819444449264.752168.53819444444-361.288194444445
221074911026.57986111119203.916666666671822.66319444444-277.579861111113
2395899169.913194444449221.45833333333-51.5451388888888419.086805555557
2490808616.021527777789270.20833333333-654.186805555556463.978472222223
2573847480.221527777789307-1826.77847222222-96.2215277777777
2680627371.921527777789390.33333333333-2018.41180555556690.078472222223
2785119253.513194444459479.95833333333-226.445138888889-742.513194444446
2886848756.304861111119545.5-789.19513888889-72.3048611111117
2983068294.454861111119596.29166666667-1301.8368055555511.5451388888887
3076437590.229861111119595.04166666667-2004.8118055555652.7701388888872
311057710906.75486111119575.541666666671331.21319444444-329.754861111112
321374713104.08819444449553.291666666673550.79652777778642.911805555555
331178311740.95486111119572.416666666672168.5381944444442.0451388888887
341161111428.91319444449606.251822.66319444444182.086805555555
3599469520.538194444449572.08333333333-51.5451388888888425.461805555557
3686938854.563194444449508.75-654.186805555556-161.563194444445
3773037700.054861111119526.83333333333-1826.77847222222-397.054861111112
3876097545.963194444449564.375-2018.4118055555663.0368055555573
3994239337.388194444459563.83333333333-226.44513888888985.6118055555544
4085848783.388194444449572.58333333333-789.19513888889-199.388194444444
4175868193.954861111119495.79166666666-1301.83680555555-607.95486111111
4268437389.146527777789393.95833333333-2004.81180555556-546.146527777777
431181110711.54652777789380.333333333331331.213194444441099.45347222222
441341412929.25486111119378.458333333333550.79652777778484.745138888889
451210311464.07986111119295.541666666672168.53819444444638.920138888889
461150111030.62152777789207.958333333331822.66319444444470.378472222223
4782139165.288194444459216.83333333333-51.5451388888888-952.288194444445
4879828587.771527777789241.95833333333-654.186805555556-605.771527777777
4976877336.138194444449162.91666666667-1826.77847222222350.861805555556
5071807041.338194444449059.75-2018.41180555556138.661805555555
5178628781.388194444449007.83333333333-226.445138888889-919.388194444443
5280438128.054861111118917.25-789.19513888889-85.0548611111117
5383407542.038194444458843.875-1301.83680555555797.961805555555
5466926833.021527777788837.83333333333-2004.81180555556-141.021527777777
551006510116.79652777788785.583333333331331.21319444444-51.7965277777785
561268412241.75486111118690.958333333333550.79652777778442.245138888889
571158710890.66319444448722.1252168.53819444444696.336805555555
58984310609.03819444448786.3751822.66319444444-766.038194444444
5981108702.371527777788753.91666666667-51.5451388888888-592.371527777777
6079408107.938194444448762.125-654.186805555556-167.938194444445
6164756993.138194444448819.91666666667-1826.77847222222-518.138194444444
6261216885.463194444448903.875-2018.41180555556-764.463194444445
6396698730.388194444448956.83333333333-226.445138888889938.611805555556
6477788181.179861111118970.375-789.19513888889-403.179861111112
6578267683.454861111118985.29166666667-1301.83680555555142.545138888889
6674036988.063194444448992.875-2004.81180555556414.936805555557
6710741NANA1331.21319444444NA
6814023NANA3550.79652777778NA
6911519NANA2168.53819444444NA
7010236NANA1822.66319444444NA
718075NANA-51.5451388888888NA
728157NANA-654.186805555556NA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/10/t1291976746ihijd61praxwvdz/1315j1291976829.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/10/t1291976746ihijd61praxwvdz/1315j1291976829.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/10/t1291976746ihijd61praxwvdz/2315j1291976829.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/10/t1291976746ihijd61praxwvdz/2315j1291976829.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/10/t1291976746ihijd61praxwvdz/3315j1291976829.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/10/t1291976746ihijd61praxwvdz/3315j1291976829.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/10/t1291976746ihijd61praxwvdz/4vanm1291976829.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/10/t1291976746ihijd61praxwvdz/4vanm1291976829.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