Home » date » 2010 » Dec » 10 »

Opgave9, 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: Fri, 10 Dec 2010 15:04:49 +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/t1291993397on2dr2y30bke544.htm/, Retrieved Fri, 10 Dec 2010 16:03:17 +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/t1291993397on2dr2y30bke544.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 «
0,74 0,73 0,76 0,8 0,83 0,81 0,83 0,88 0,89 0,93 0,91 0,9 0,86 0,88 0,93 0,98 0,97 1,03 1,06 1,06 1,08 1,09 1,04 1 1,01 1,02 1,04 1,06 1,06 1,06 1,06 1,06 1,02 0,98 0,99 0,99 0,94 0,96 0,98 1,01 1,01 1,02 1,04 1,03 1,05 1,08 1,17 1,11 1,11 1,11 1,2 1,21 1,31 1,37 1,37 1,26 1,23 1,17 1,06 0,95 0,92 0,92 0,9 0,93 0,93 0,97 0,96 0,99 0,98 0,96 1 0,99 1,03 1,02 1,07 1,13 1,15 1,16
 
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'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
10.74NANA-0.0644375NA
20.73NANA-0.0564375NA
30.76NANA-0.0261041666666667NA
40.8NANA0.000895833333333385NA
50.83NANA0.0178958333333334NA
60.81NANA0.0503958333333334NA
70.830.8953958333333330.8391666666666670.0562291666666668-0.0653958333333334
80.880.88606250.8504166666666670.0356458333333334-0.00606249999999997
90.890.88906250.863750.02531250000000000.000937500000000147
100.930.8852291666666670.8783333333333340.006895833333333390.0447708333333331
110.910.89181250.8916666666666670.0001458333333332900.0181874999999999
120.90.8602291666666660.906666666666667-0.04643750000000010.0397708333333336
130.860.8609791666666670.925416666666667-0.0644375-0.000979166666666531
140.880.88606250.9425-0.0564375-0.00606249999999986
150.930.93181250.957916666666667-0.0261041666666667-0.00181249999999988
160.980.9733958333333330.97250.0008958333333333850.00660416666666674
170.971.002479166666670.9845833333333330.0178958333333334-0.0324791666666667
181.031.04456250.9941666666666670.0503958333333334-0.0145625000000000
191.061.06081251.004583333333330.0562291666666668-0.000812500000000105
201.061.05231251.016666666666670.03564583333333340.00768750000000007
211.081.052395833333331.027083333333330.02531250000000000.0276041666666667
221.091.041895833333331.0350.006895833333333390.0481041666666668
231.041.042229166666671.042083333333330.000145833333333290-0.00222916666666673
2411.000645833333331.04708333333333-0.0464375000000001-0.000645833333333234
251.010.9838958333333331.04833333333333-0.06443750.0261041666666666
261.020.9918958333333331.04833333333333-0.05643750.0281041666666668
271.041.019729166666671.04583333333333-0.02610416666666670.0202708333333335
281.061.039645833333331.038750.0008958333333333850.0203541666666667
291.061.049979166666671.032083333333330.01789583333333340.0100208333333334
301.061.079979166666671.029583333333330.0503958333333334-0.0199791666666669
311.061.082479166666671.026250.0562291666666668-0.0224791666666666
321.061.056479166666671.020833333333330.03564583333333340.00352083333333320
331.021.041145833333331.015833333333330.0253125000000000-0.0211458333333335
340.981.018145833333331.011250.00689583333333339-0.0381458333333334
350.991.007229166666671.007083333333330.000145833333333290-0.0172291666666666
360.990.9568958333333331.00333333333333-0.04643750000000010.0331041666666669
370.940.9363958333333331.00083333333333-0.06443750.00360416666666663
380.960.94231250.99875-0.05643750.0176875000000001
390.980.9726458333333330.99875-0.02610416666666670.00735416666666677
401.011.00506251.004166666666670.0008958333333333850.00493750000000004
411.011.033729166666671.015833333333330.0178958333333334-0.0237291666666667
421.021.078729166666671.028333333333330.0503958333333334-0.0587291666666667
431.041.096645833333331.040416666666670.0562291666666668-0.0566458333333333
441.031.089395833333331.053750.0356458333333334-0.0593958333333333
451.051.094479166666671.069166666666670.0253125000000000-0.0444791666666664
461.081.09356251.086666666666670.00689583333333339-0.0135624999999997
471.171.107645833333331.10750.0001458333333332900.0623541666666667
481.111.088145833333331.13458333333333-0.04643750000000010.0218541666666667
491.111.098479166666671.16291666666667-0.06443750.0115208333333332
501.111.12981251.18625-0.0564375-0.0198124999999998
511.21.177229166666671.20333333333333-0.02610416666666670.0227708333333334
521.211.215479166666671.214583333333330.000895833333333385-0.00547916666666648
531.311.231645833333331.213750.01789583333333340.0783541666666667
541.371.252895833333331.20250.05039583333333340.117104166666667
551.371.244145833333331.187916666666670.05622916666666680.125854166666667
561.261.207729166666671.172083333333330.03564583333333340.0522708333333335
571.231.176979166666671.151666666666670.02531250000000000.0530208333333333
581.171.134395833333331.12750.006895833333333390.0356041666666667
591.061.100145833333331.10.000145833333333290-0.0401458333333333
600.951.02106251.0675-0.0464375000000001-0.0710625
610.920.96931251.03375-0.0644375-0.0493124999999999
620.920.9489791666666671.00541666666667-0.0564375-0.0289791666666668
630.90.9576458333333330.98375-0.0261041666666667-0.0576458333333333
640.930.9654791666666670.9645833333333330.000895833333333385-0.0354791666666666
650.930.9712291666666660.9533333333333330.0178958333333334-0.0412291666666664
660.971.002895833333330.95250.0503958333333334-0.0328958333333333
670.961.014979166666670.958750.0562291666666668-0.0549791666666667
680.991.003145833333330.96750.0356458333333334-0.0131458333333333
690.981.00406250.978750.0253125000000000-0.0240624999999999
700.961.00106250.9941666666666670.00689583333333339-0.0410625
7111.01181251.011666666666670.000145833333333290-0.0118124999999998
720.990.98231251.02875-0.04643750000000010.00768750000000007
731.03NANANANA
741.02NANANANA
751.07NANANANA
761.13NANANANA
771.15NANANANA
781.16NANANANA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/10/t1291993397on2dr2y30bke544/168li1291993485.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/10/t1291993397on2dr2y30bke544/168li1291993485.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/10/t1291993397on2dr2y30bke544/268li1291993485.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/10/t1291993397on2dr2y30bke544/268li1291993485.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/10/t1291993397on2dr2y30bke544/3hhkl1291993485.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/10/t1291993397on2dr2y30bke544/3hhkl1291993485.ps (open in new window)


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