Home » date » 2009 » Aug » 18 »

opgave 9.1

*Unverified author*
R Software Module: rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Tue, 18 Aug 2009 12:29:56 -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/Aug/18/t1250620423xu3iaw8r7dwg8uc.htm/, Retrieved Tue, 18 Aug 2009 20:33:48 +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/Aug/18/t1250620423xu3iaw8r7dwg8uc.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 «
108,87 106,38 104,77 105,38 106,74 110 110,73 115,7 115,44 113,66 118,4 116,71 119,7 114,17 110,52 111,27 111,41 111,62 113,91 118,54 122,26 120,44 121,37 121,49 125 117,24 117,18 115,15 115,27 114,6 117,48 120,8 118,62 116,79 115,46 112,83 115,56 106,66 103,39 102,65 103,22 104,1 104,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'Gwilym Jenkins' @ 72.249.127.135


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
1108.87NANA5.48772569444444NA
2106.38NANA-1.40414930555555NA
3104.77NANA-3.43164930555555NA
4105.38NANA-4.20310763888889NA
5106.74NANA-4.07706597222223NA
6110NANA-4.16498263888889NA
7110.73110.103350694444111.51625-1.412899305555550.62664930555556
8115.7115.096892361111112.2920833333332.804809027777790.603107638888872
9115.44116.736059027778112.856253.87980902777778-1.29605902777776
10113.66115.724184027778113.341252.38293402777778-2.06418402777777
11118.4116.314392361111113.781252.53314236111112.08560763888887
12116.71115.648767361111114.0433333333331.605434027777761.06123263888890
13119.7119.731059027778114.2433333333335.48772569444444-0.0310590277777862
14114.17113.090017361111114.494166666667-1.404149305555551.07998263888891
15110.52111.465017361111114.896666666667-3.43164930555555-0.945017361111098
16111.27111.260225694444115.463333333333-4.203107638888890.0097743055555668
17111.41111.792517361111115.869583333333-4.07706597222223-0.382517361111084
18111.62112.027517361111116.1925-4.16498263888889-0.40751736111109
19113.91115.199600694444116.6125-1.41289930555555-1.28960069444443
20118.54119.766059027778116.961252.80480902777779-1.22605902777775
21122.26121.246475694444117.3666666666673.879809027777781.01352430555556
22120.44120.188767361111117.8058333333332.382934027777780.251232638888908
23121.37120.661475694444118.1283333333332.53314236111110.70852430555557
24121.49120.018767361111118.4133333333331.605434027777761.47123263888891
25125124.173975694444118.686255.487725694444440.826024305555578
26117.24117.525017361111118.929166666667-1.40414930555555-0.285017361111116
27117.18115.440017361111118.871666666667-3.431649305555551.73998263888890
28115.15114.364809027778118.567916666667-4.203107638888890.785190972222239
29115.27114.092517361111118.169583333333-4.077065972222231.17748263888889
30114.6113.397517361111117.5625-4.164982638888891.20248263888890
31117.48115.395434027778116.808333333333-1.412899305555552.08456597222222
32120.8118.778975694444115.9741666666672.804809027777792.02102430555554
33118.62118.838559027778114.958753.87980902777778-0.218559027777758
34116.79116.246267361111113.8633333333332.382934027777780.543732638888898
35115.46115.373559027778112.8404166666672.53314236111110.0864409722222206
36112.83113.506267361111111.9008333333331.60543402777776-0.676267361111101
37115.56NA110.915NANA
38106.66NANANANA
39103.39NANANANA
40102.65NANANANA
41103.22NANANANA
42104.1NANANANA
43104.32NANANANA
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Aug/18/t1250620423xu3iaw8r7dwg8uc/1ovbs1250620194.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Aug/18/t1250620423xu3iaw8r7dwg8uc/1ovbs1250620194.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Aug/18/t1250620423xu3iaw8r7dwg8uc/2tko51250620194.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Aug/18/t1250620423xu3iaw8r7dwg8uc/2tko51250620194.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Aug/18/t1250620423xu3iaw8r7dwg8uc/3d4891250620194.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Aug/18/t1250620423xu3iaw8r7dwg8uc/3d4891250620194.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Aug/18/t1250620423xu3iaw8r7dwg8uc/4za421250620194.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Aug/18/t1250620423xu3iaw8r7dwg8uc/4za421250620194.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