Home » date » 2009 » Jun » 01 »

thomas van eester - opgave 9 - oefening 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 13:51:23 -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/t1243885954bf2ecyce87bjld1.htm/, Retrieved Mon, 01 Jun 2009 21:52:34 +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/t1243885954bf2ecyce87bjld1.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 «
0,63 0,63 0,63 0,64 0,63 0,63 0,63 0,63 0,63 0,64 0,65 0,65 0,65 0,65 0,65 0,66 0,65 0,66 0,66 0,66 0,66 0,68 0,69 0,7 0,71 0,71 0,7 0,7 0,7 0,7 0,71 0,7 0,7 0,7 0,69 0,7 0,69 0,69 0,69 0,7 0,7 0,71 0,71 0,71 0,72 0,73 0,74 0,74 0,74 0,74 0,75 0,75 0,76 0,76 0,76 0,76 0,76 0,77 0,77 0,78 0,78 0,78 0,78 0,78 0,78 0,78 0,8 0,8 0,8 0,81 0,81 0,81 0,8 0,81 0,81 0,81 0,8 0,82 0,83 0,83
 
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
10.63NANA0.00350694444444447NA
20.63NANA0.000673611111111096NA
30.63NANA-0.00215972222222221NA
40.64NANA-0.000993055555555565NA
50.63NANA-0.00374305555555555NA
60.63NANA-0.00240972222222221NA
70.630.6368402777777780.6358333333333330.00100694444444448-0.00684027777777774
80.630.6339236111111110.6375-0.00357638888888886-0.00392361111111106
90.630.6349236111111110.639166666666667-0.00424305555555556-0.00492361111111106
100.640.6440069444444440.6408333333333330.00317361111111109-0.00400694444444438
110.650.6451736111111110.64250.002673611111111050.00482638888888898
120.650.6506736111111110.6445833333333330.00609027777777777-0.000673611111111194
130.650.6505902777777780.6470833333333330.00350694444444447-0.000590277777777759
140.650.6502569444444440.6495833333333330.000673611111111096-0.000256944444444462
150.650.6499236111111110.652083333333333-0.002159722222222217.63888888887232e-05
160.660.6540069444444450.655-0.0009930555555555650.00599305555555552
170.650.6545902777777780.658333333333333-0.00374305555555555-0.00459027777777787
180.660.6596736111111110.662083333333333-0.002409722222222210.000326388888888918
190.660.6676736111111110.6666666666666670.00100694444444448-0.0076736111111112
200.660.6680902777777780.671666666666667-0.00357638888888886-0.00809027777777782
210.660.6720069444444440.67625-0.00424305555555556-0.0120069444444444
220.680.6831736111111110.680.00317361111111109-0.00317361111111114
230.690.6864236111111110.683750.002673611111111050.00357638888888878
240.70.6935902777777780.68750.006090277777777770.00640972222222203
250.710.6947569444444440.691250.003506944444444470.0152430555555555
260.710.6956736111111110.6950.0006736111111110960.0143263888888889
270.70.6961736111111110.698333333333333-0.002159722222222210.00382638888888887
280.70.6998402777777780.700833333333333-0.0009930555555555650.000159722222222158
290.70.6979236111111110.701666666666667-0.003743055555555550.00207638888888884
300.70.6992569444444450.701666666666667-0.002409722222222210.000743055555555427
310.710.7018402777777780.7008333333333330.001006944444444480.00815972222222217
320.70.6955902777777780.699166666666667-0.003576388888888860.00440972222222225
330.70.6936736111111110.697916666666667-0.004243055555555560.00632638888888892
340.70.7006736111111110.69750.00317361111111109-0.000673611111111305
350.690.7001736111111110.69750.00267361111111105-0.0101736111111113
360.70.7040069444444450.6979166666666670.00609027777777777-0.00400694444444460
370.690.7018402777777780.6983333333333330.00350694444444447-0.0118402777777777
380.690.6994236111111110.698750.000673611111111096-0.00942361111111112
390.690.6978402777777780.7-0.00215972222222221-0.00784027777777785
400.70.7010902777777780.702083333333333-0.000993055555555565-0.00109027777777793
410.70.7016736111111110.705416666666667-0.00374305555555555-0.00167361111111108
420.710.7067569444444440.709166666666667-0.002409722222222210.00324305555555560
430.710.7139236111111110.7129166666666670.00100694444444448-0.00392361111111117
440.710.7135069444444440.717083333333333-0.00357638888888886-0.00350694444444444
450.720.7174236111111110.721666666666667-0.004243055555555560.00257638888888889
460.730.7294236111111110.726250.003173611111111090.000576388888888779
470.740.7335069444444450.7308333333333330.002673611111111050.00649305555555546
480.740.7415069444444440.7354166666666670.00609027777777777-0.00150694444444444
490.740.7430902777777780.7395833333333330.00350694444444447-0.00309027777777759
500.740.7444236111111110.743750.000673611111111096-0.004423611111111
510.750.7453402777777780.7475-0.002159722222222210.00465972222222222
520.750.7498402777777780.750833333333333-0.0009930555555555650.000159722222222269
530.760.7500069444444440.75375-0.003743055555555550.00999305555555552
540.760.7542569444444440.756666666666667-0.002409722222222210.00574305555555554
550.760.7610069444444450.760.00100694444444448-0.00100694444444460
560.760.7597569444444450.763333333333333-0.003576388888888860.000243055555555483
570.760.7620069444444450.76625-0.00424305555555556-0.00200694444444449
580.770.7719236111111110.768750.00317361111111109-0.00192361111111117
590.770.7735069444444440.7708333333333330.00267361111111105-0.00350694444444433
600.780.7785902777777780.77250.006090277777777770.00140972222222224
610.780.7785069444444440.7750.003506944444444470.00149305555555557
620.780.7790069444444450.7783333333333330.0006736111111110960.00099305555555551
630.780.7795069444444440.781666666666667-0.002159722222222210.000493055555555566
640.780.7840069444444450.785-0.000993055555555565-0.00400694444444449
650.780.7845902777777780.788333333333333-0.00374305555555555-0.00459027777777765
660.780.7888402777777780.79125-0.00240972222222221-0.00884027777777752
670.80.7943402777777770.7933333333333330.001006944444444480.00565972222222255
680.80.7918402777777780.795416666666666-0.003576388888888860.0081597222222225
690.80.7936736111111110.797916666666667-0.004243055555555560.00632638888888903
700.810.8035902777777780.8004166666666670.003173611111111090.00640972222222236
710.810.8051736111111110.80250.002673611111111050.00482638888888898
720.810.8110902777777780.8050.00609027777777777-0.00109027777777770
730.8NA0.807916666666667NANA
740.81NA0.810416666666667NANA
750.81NANANANA
760.81NANANANA
770.8NANANANA
780.82NANANANA
790.83NANANANA
800.83NANANANA
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/01/t1243885954bf2ecyce87bjld1/1qq351243885879.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/01/t1243885954bf2ecyce87bjld1/1qq351243885879.ps (open in new window)


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


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/01/t1243885954bf2ecyce87bjld1/3h86k1243885879.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/01/t1243885954bf2ecyce87bjld1/3h86k1243885879.ps (open in new window)


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