Home » date » 2009 » Jun » 06 »

Jurgen Leemans - 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: Sat, 06 Jun 2009 06:33:44 -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/06/t12442916589eeq5noh9s0unrd.htm/, Retrieved Sat, 06 Jun 2009 14:34:18 +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/06/t12442916589eeq5noh9s0unrd.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 «
163.40 162.89 162.29 161.26 161.43 161.44 161.44 161.44 161.92 162.23 161.89 161.40 161.40 159.55 158.93 158.59 158.29 158.03 158.03 163.94 164.36 164.39 163.22 163.22 163.56 162.82 162.80 162.44 161.98 161.53 161.53 161.52 162.07 161.84 161.54 161.47 161.47 161.54 161.57 160.75 160.31 160.57 160.57 159.65 158.76 158.95 159.25 158.72 158.72 158.72 158.53 157.92 157.89 157.81 157.81 157.88 157.52 156.11 155.61 155.31 155.31 155.31 153.09 151.94 151.73 151.65 151.65 151.09 149.94 149.47 149.15 149.22
 
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
1163.4NANA0.491638888888901NA
2162.89NANA0.155472222222233NA
3162.29NANA-0.262444444444434NA
4161.26NANA-0.712277777777785NA
5161.43NANA-0.787777777777778NA
6161.44NANA-0.702111111111116NA
7161.44161.202638888889161.835833333333-0.6331944444444490.237361111111142
8161.44162.120722222222161.6133333333330.507388888888876-0.680722222222187
9161.92162.021388888889161.3341666666670.68722222222221-0.101388888888863
10162.23161.702472222222161.0829166666670.6195555555555480.527527777777806
11161.89161.216888888889160.8408333333330.3760555555555590.673111111111126
12161.4160.828388888889160.5679166666670.2604722222222340.571611111111167
13161.4160.775388888889160.283750.4916388888889010.624611111111136
14159.55160.401305555556160.2458333333330.155472222222233-0.85130555555557
15158.93160.189222222222160.451666666667-0.262444444444434-1.25922222222223
16158.59159.931055555556160.643333333333-0.712277777777785-1.34105555555556
17158.29160.000972222222160.78875-0.787777777777778-1.71097222222221
18158.03160.217888888889160.92-0.702111111111116-2.18788888888886
19158.03160.452638888889161.085833333333-0.633194444444449-2.42263888888888
20163.94161.819472222222161.3120833333330.5073888888888762.12052777777777
21164.36162.296805555556161.6095833333330.687222222222212.06319444444446
22164.39162.550805555556161.931250.6195555555555481.83919444444447
23163.22162.621472222222162.2454166666670.3760555555555590.598527777777832
24163.22162.805472222222162.5450.2604722222222340.414527777777778
25163.56163.328305555556162.8366666666670.4916388888889010.231694444444486
26162.82163.037138888889162.8816666666670.155472222222233-0.217138888888883
27162.8162.422972222222162.685416666667-0.2624444444444340.37702777777784
28162.44161.771472222222162.48375-0.7122777777777850.668527777777825
29161.98161.519722222222162.3075-0.7877777777777780.460277777777804
30161.53161.462472222222162.164583333333-0.7021111111111160.0675277777777978
31161.53161.371388888889162.004583333333-0.6331944444444490.158611111111128
32161.52162.371555555556161.8641666666670.507388888888876-0.851555555555535
33162.07162.446805555556161.7595833333330.68722222222221-0.376805555555535
34161.84162.257472222222161.6379166666670.619555555555548-0.417472222222216
35161.54161.873972222222161.4979166666670.376055555555559-0.333972222222229
36161.47161.648805555556161.3883333333330.260472222222234-0.178805555555527
37161.47161.799972222222161.3083333333330.491638888888901-0.329972222222239
38161.54161.345888888889161.1904166666670.1554722222222330.194111111111084
39161.57160.712138888889160.974583333333-0.2624444444444340.857861111111106
40160.75160.003972222222160.71625-0.7122777777777850.746027777777783
41160.31159.712638888889160.500416666667-0.7877777777777780.597361111111127
42160.57159.588305555556160.290416666667-0.7021111111111160.981694444444457
43160.57159.428055555556160.06125-0.6331944444444491.14194444444448
44159.65160.336555555555159.8291666666670.507388888888876-0.686555555555486
45158.76160.272222222222159.5850.68722222222221-1.51222222222222
46158.95159.959972222222159.3404166666670.619555555555548-1.00997222222219
47159.25159.497722222222159.1216666666670.376055555555559-0.247722222222222
48158.72159.166305555556158.9058333333330.260472222222234-0.446305555555568
49158.72159.167472222222158.6758333333330.491638888888901-0.447472222222217
50158.72158.642555555556158.4870833333330.1554722222222330.0774444444444669
51158.53158.099222222222158.361666666667-0.2624444444444340.430777777777791
52157.92157.479388888889158.191666666667-0.7122777777777850.44061111111111
53157.89157.133888888889157.921666666667-0.7877777777777780.756111111111153
54157.81156.925805555556157.627916666667-0.7021111111111160.88419444444446
55157.81156.710555555556157.34375-0.6331944444444491.09944444444446
56157.88157.566972222222157.0595833333330.5073888888888760.313027777777762
57157.52157.378055555556156.6908333333330.687222222222210.141944444444476
58156.11156.834555555556156.2150.619555555555548-0.724555555555526
59155.61156.085222222222155.7091666666670.376055555555559-0.475222222222186
60155.31155.456305555556155.1958333333330.260472222222234-0.146305555555557
61155.31155.174138888889154.68250.4916388888889010.135861111111126
62155.31154.298388888889154.1429166666670.1554722222222331.01161111111114
63153.09153.281722222222153.544166666667-0.262444444444434-0.191722222222182
64151.94152.239388888889152.951666666667-0.712277777777785-0.299388888888870
65151.73151.618055555556152.405833333333-0.7877777777777780.111944444444475
66151.65151.180805555556151.882916666667-0.7021111111111160.469194444444469
67151.65NANA-0.633194444444449NA
68151.09NANA0.507388888888876NA
69149.94NANA0.68722222222221NA
70149.47NANA0.619555555555548NA
71149.15NANA0.376055555555559NA
72149.22NANA0.260472222222234NA
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/06/t12442916589eeq5noh9s0unrd/1aeah1244291620.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/06/t12442916589eeq5noh9s0unrd/1aeah1244291620.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/06/t12442916589eeq5noh9s0unrd/24lgk1244291620.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/06/t12442916589eeq5noh9s0unrd/24lgk1244291620.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/06/t12442916589eeq5noh9s0unrd/3y3th1244291620.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/06/t12442916589eeq5noh9s0unrd/3y3th1244291620.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/06/t12442916589eeq5noh9s0unrd/4iyau1244291620.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/06/t12442916589eeq5noh9s0unrd/4iyau1244291620.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