Home » date » 2009 » Jun » 07 »

Thomas Van den Bosch 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: Sun, 07 Jun 2009 13:20:53 -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/07/t124440248007u9m35lblj0jf7.htm/, Retrieved Sun, 07 Jun 2009 21:21:25 +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/07/t124440248007u9m35lblj0jf7.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 «
36.80 35.40 33.00 28.73 26.70 26.46 24.60 28.00 31.60 33.50 34.50 35.00 34.76 33.50 32.74 34.40 31.93 29.24 25.75 26.03 26.08 23.80 20.61 19.70 18.18 19.60 20.60 20.03 23.00 23.60 22.56 22.55 23.75 24.92 24.50 30.58 28.07 27.70 27.00 25.23 26.86 25.60 24.55 23.96 23.50 23.64 21.55 21.05 21.89 21.98 21.45 22.15 22.58 23.80 23.30 22.38 23.00 21.96 22.40 20.80 20.40 16.00 12.78 9.75 7.50 11.24 12.24 12.75 12.52 14.49 14.21 14.32 22.15 22.58 23.80 23.30 22.38 23.00 21.96 22.40 20.80 20.40 16.00 12.78 9.75 7.50 11.24 12.24 12.75 12.52 14.49 14.21 14.32
 
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'George Udny Yule' @ 72.249.76.132


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
136.8NANA1.02927662037037NA
235.4NANA0.404832175925924NA
333NANA0.0203877314814813NA
428.73NANA-0.398640046296296NA
526.7NANA-0.28086226851852NA
626.46NANA0.373582175925926NA
724.630.787401620370431.1058333333333-0.318431712962963-6.18740162037037
82830.929137731481530.9416666666667-0.0125289351851842-2.92913773148148
931.631.098998842592630.85166666666670.2473321759259270.501001157407405
1033.531.554276620370431.07708333333330.4771932870370381.94572337962963
1134.530.638859953703731.53125-0.8923900462962943.86114004629629
123531.215248842592631.865-0.6497511574074073.78475115740741
1334.7633.058026620370432.028751.029276620370371.70197337962963
1433.532.399415509259331.99458333333330.4048321759259241.10058449074074
1532.7431.702887731481531.68250.02038773148148131.03711226851852
1634.430.649693287037031.0483333333333-0.3986400462962963.75030671296296
1731.9329.784554398148130.0654166666667-0.280862268518522.14544560185185
1829.2429.222748842592628.84916666666670.3735821759259260.0172511574074079
1925.7527.202401620370427.5208333333333-0.318431712962963-1.45240162037037
2026.0326.238304398148126.2508333333333-0.0125289351851842-0.208304398148144
2126.0825.413165509259325.16583333333330.2473321759259270.666834490740744
2223.824.538443287037024.061250.477193287037038-0.738443287037036
2320.6122.198026620370423.0904166666667-0.892390046296294-1.58802662037037
2419.721.833582175925922.4833333333333-0.649751157407407-2.13358217592592
2518.1823.144693287037022.11541666666671.02927662037037-4.96469328703703
2619.622.242332175925921.83750.404832175925924-2.64233217592593
2720.621.615804398148121.59541666666670.0203877314814813-1.01580439814815
2820.0321.146359953703721.545-0.398640046296296-1.1163599537037
292321.472887731481521.75375-0.280862268518521.52711226851852
3023.622.742748842592622.36916666666670.3735821759259260.857251157407411
3122.5622.916151620370423.2345833333333-0.318431712962963-0.356151620370373
3222.5523.971637731481523.9841666666667-0.0125289351851842-1.42163773148148
3323.7524.835665509259324.58833333333330.247332175925927-1.08566550925926
3424.9225.548859953703725.07166666666670.477193287037038-0.628859953703707
3524.524.556776620370425.4491666666667-0.892390046296294-0.0567766203703641
3630.5825.043582175925925.6933333333333-0.6497511574074075.53641782407407
3728.0726.888859953703725.85958333333331.029276620370371.18114004629630
3827.726.406082175925926.001250.4048321759259241.29391782407407
392726.069971064814826.04958333333330.02038773148148130.930028935185184
4025.2325.587193287037025.9858333333333-0.398640046296296-0.357193287037038
4126.8625.528721064814825.8095833333333-0.280862268518521.33127893518519
4225.625.663165509259325.28958333333330.373582175925926-0.0631655092592567
4324.5524.316568287037024.635-0.3184317129629630.233431712962965
4423.9624.126637731481524.1391666666667-0.0125289351851842-0.166637731481480
4523.523.916915509259323.66958333333330.247332175925927-0.416915509259258
4623.6423.787193287037023.310.477193287037038-0.147193287037037
4721.5522.110943287037023.0033333333333-0.892390046296294-0.560943287037034
4821.0522.100248842592622.75-0.649751157407407-1.05024884259259
4921.8923.65219328703722.62291666666671.02927662037037-1.76219328703703
5021.9822.909832175925922.5050.404832175925924-0.929832175925924
5121.4522.438721064814822.41833333333330.0203877314814813-0.988721064814815
5222.1521.928859953703722.3275-0.3986400462962960.221140046296298
5322.5822.012054398148122.2929166666667-0.280862268518520.567945601851854
5423.822.691498842592622.31791666666670.3735821759259261.10850115740741
5523.321.926984953703722.2454166666667-0.3184317129629631.3730150462963
5622.3821.921637731481521.9341666666667-0.01252893518518420.458362268518513
572321.571082175925921.323750.2473321759259271.42891782407407
5821.9620.923026620370420.44583333333330.4771932870370381.03697337962963
5922.418.408443287037019.3008333333333-0.8923900462962943.99155671296296
6020.817.499415509259318.1491666666667-0.6497511574074073.30058449074074
6120.418.194276620370417.1651.029276620370372.20572337962963
621616.707748842592616.30291666666670.404832175925924-0.707748842592592
6312.7815.485387731481515.4650.0203877314814813-2.70538773148148
649.7514.318443287037014.7170833333333-0.398640046296296-4.56844328703704
657.513.783721064814814.0645833333333-0.28086226851852-6.28372106481481
6611.2413.826915509259313.45333333333330.373582175925926-2.58691550925926
6712.2412.937818287037013.25625-0.318431712962963-0.697818287037038
6812.7513.590804398148113.6033333333333-0.0125289351851842-0.840804398148148
6912.5214.583998842592614.33666666666670.247332175925927-2.06399884259259
7014.4915.837609953703715.36041666666670.477193287037038-1.34760995370370
7114.2115.652609953703716.545-0.892390046296294-1.44260995370370
7214.3217.005248842592617.655-0.649751157407407-2.68524884259259
7322.1519.579276620370418.551.029276620370372.57072337962963
7422.5819.761915509259319.35708333333330.4048321759259242.81808449074074
7523.820.124554398148120.10416666666670.02038773148148133.67544560185186
7623.320.296776620370420.6954166666667-0.3986400462962963.00322337962963
7722.3820.735387731481521.01625-0.280862268518521.64461226851851
782321.400248842592621.02666666666670.3735821759259261.59975115740741
7921.9620.127401620370420.4458333333333-0.3184317129629631.83259837962963
8022.419.288304398148119.3008333333333-0.01252893518518423.11169560185185
8120.818.396498842592618.14916666666670.2473321759259272.40350115740741
8220.417.642193287037017.1650.4771932870370382.75780671296296
831615.410526620370416.3029166666667-0.8923900462962940.589473379629627
8412.7814.815248842592615.465-0.649751157407407-2.03524884259259
859.75NA14.7170833333333NANA
867.5NA14.0645833333333NANA
8711.24NA13.4533333333333NANA
8812.24NANANANA
8912.75NANANANA
9012.52NANANANA
9114.49NANANANA
9214.21NANANANA
9314.32NANANANA
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/07/t124440248007u9m35lblj0jf7/1393a1244402451.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/07/t124440248007u9m35lblj0jf7/1393a1244402451.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/07/t124440248007u9m35lblj0jf7/2fk571244402451.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/07/t124440248007u9m35lblj0jf7/2fk571244402451.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/07/t124440248007u9m35lblj0jf7/3dkoq1244402451.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/07/t124440248007u9m35lblj0jf7/3dkoq1244402451.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/07/t124440248007u9m35lblj0jf7/4vf701244402451.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/07/t124440248007u9m35lblj0jf7/4vf701244402451.ps (open in new window)


 
Parameters (Session):
 
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