Home » date » 2010 » Dec » 14 »

opgave 9.2 ad

*Unverified author*
R Software Module: /rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Tue, 14 Dec 2010 19:37:04 +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/14/t12923553563eugo8ztd0lfi9n.htm/, Retrieved Tue, 14 Dec 2010 20:35:58 +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/14/t12923553563eugo8ztd0lfi9n.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 «
101,02 101,15 101,51 101,75 101,8 101,8 101,8 101,82 101,99 102,25 102,34 102,35 102,35 102,39 102,49 102,67 102,68 102,7 102,71 102,72 102,83 102,92 103,04 103,08 103,09 103,11 103,18 103,18 103,22 103,25 103,25 103,25 103,47 103,57 103,66 103,7 103,7 103,75 103,85 104,02 104,13 104,17 104,18 104,2 104,5 104,78 104,88 104,89 104,9 104,95 105,24 105,35 105,44 105,46 105,47 105,48 105,75 106,1 106,19 106,23 106,24 106,25 106,35 106,48 106,52 106,55 106,55 106,56 106,89 107,09 107,24 107,28 107,3 107,31 107,47 107,35 107,31 107,32 107,32 107,34 107,53 107,72 107,75 107,79 107,81 107,9 107,8 107,86 107,8 107,74 107,75 107,83 107,8 107,81 107,86 107,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'RServer@AstonUniversity' @ vre.aston.ac.uk


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
1101.02NANA0.0258978174603173NA
2101.15NANA-0.00672123015872303NA
3101.51NANA0.0257787698412637NA
4101.75NANA0.0338144841269788NA
5101.8NANA-0.00499503968253818NA
6101.8NANA-0.0576140873015867NA
7101.8101.73845734127101.85375-0.115292658730150.0615426587301755
8101.82101.777802579365101.960833333333-0.1830307539682530.0421974206349205
9101.99102.019826388889102.053333333333-0.0335069444444475-0.0298263888888926
10102.25102.235183531746102.13250.1026835317460310.0148164682539829
11102.34102.333814484127102.20750.1263144841269840.00618551587304239
12102.35102.368338293651102.2816666666670.0866716269841243-0.0183382936507854
13102.35102.382981150794102.3570833333330.0258978174603173-0.0329811507936455
14102.39102.425778769841102.4325-0.00672123015872303-0.0357787698412864
15102.49102.530778769841102.5050.0257787698412637-0.0407787698412676
16102.67102.601731150794102.5679166666670.03381448412697880.0682688492063477
17102.68102.620004960317102.625-0.004995039682538180.0599950396825619
18102.7102.626969246032102.684583333333-0.05761408730158670.0730307539682684
19102.71102.630540674603102.745833333333-0.115292658730150.0794593253968259
20102.72102.623635912698102.806666666667-0.1830307539682530.0963640873015947
21102.83102.831909722222102.865416666667-0.0335069444444475-0.00190972222220864
22102.92103.018100198413102.9154166666670.102683531746031-0.098100198412709
23103.04103.085481150794102.9591666666670.126314484126984-0.0454811507936341
24103.08103.091254960317103.0045833333330.0866716269841243-0.0112549603174728
25103.09103.07589781746103.050.02589781746031730.0141021825396876
26103.11103.087862103175103.094583333333-0.006721230158723030.0221378968253987
27103.18103.169112103175103.1433333333330.02577876984126370.0108878968254089
28103.18103.23089781746103.1970833333330.0338144841269788-0.0508978174602959
29103.22103.245004960317103.25-0.00499503968253818-0.0250049603174602
30103.25103.244052579365103.301666666667-0.05761408730158670.00594742063492504
31103.25103.237624007936103.352916666667-0.115292658730150.0123759920635109
32103.25103.221969246032103.405-0.1830307539682530.0280307539682667
33103.47103.426076388889103.459583333333-0.03350694444444750.0439236111111256
34103.57103.625183531746103.52250.102683531746031-0.0551835317460245
35103.66103.721731150794103.5954166666670.126314484126984-0.0617311507936478
36103.7103.758338293651103.6716666666670.0866716269841243-0.0583382936507917
37103.7103.77464781746103.748750.0258978174603173-0.0746478174603027
38103.75103.820362103175103.827083333333-0.00672123015872303-0.0703621031746025
39103.85103.935362103175103.9095833333330.0257787698412637-0.085362103174603
40104.02104.036731150794104.0029166666670.0338144841269788-0.0167311507936461
41104.13104.099171626984104.104166666667-0.004995039682538180.0308283730158792
42104.17104.146969246032104.204583333333-0.05761408730158670.0230307539682713
43104.18104.188874007936104.304166666667-0.11529265873015-0.00887400793648396
44104.2104.221135912698104.404166666667-0.183030753968253-0.0211359126984263
45104.5104.478576388889104.512083333333-0.03350694444444750.0214236111111177
46104.78104.728100198413104.6254166666670.1026835317460310.0518998015873109
47104.88104.861731150794104.7354166666670.1263144841269840.0182688492063363
48104.89104.930421626984104.843750.0866716269841243-0.0404216269841271
49104.9104.97714781746104.951250.0258978174603173-0.0771478174603146
50104.95105.051612103175105.058333333333-0.00672123015872303-0.101612103174588
51105.24105.189528769841105.163750.02577876984126370.0504712301587347
52105.35105.30464781746105.2708333333330.03381448412697880.0453521825396876
53105.44105.375421626984105.380416666667-0.004995039682538180.0645783730158627
54105.46105.433219246032105.490833333333-0.05761408730158670.0267807539682394
55105.47105.48720734127105.6025-0.11529265873015-0.0172073412698381
56105.48105.529469246032105.7125-0.183030753968253-0.0494692460317196
57105.75105.779409722222105.812916666667-0.0335069444444475-0.0294097222221978
58106.1106.008933531746105.906250.1026835317460310.0910664682539846
59106.19106.12464781746105.9983333333330.1263144841269840.0653521825396979
60106.23106.175421626984106.088750.08667162698412430.054578373015886
61106.24106.205064484127106.1791666666670.02589781746031730.0349355158730162
62106.25106.262445436508106.269166666667-0.00672123015872303-0.0124454365079174
63106.35106.387445436508106.3616666666670.0257787698412637-0.0374454365079231
64106.48106.484231150794106.4504166666670.0338144841269788-0.0042311507936148
65106.52106.530421626984106.535416666667-0.00499503968253818-0.0104216269841118
66106.55106.565302579365106.622916666667-0.0576140873015867-0.0153025793650698
67106.55106.595540674603106.710833333333-0.11529265873015-0.0455406746031599
68106.56106.616135912698106.799166666667-0.183030753968253-0.0561359126983945
69106.89106.856493055556106.89-0.03350694444444750.0335069444444684
70107.09107.075600198413106.9729166666670.1026835317460310.0143998015873308
71107.24107.16839781746107.0420833333330.1263144841269840.0716021825397064
72107.28107.193754960317107.1070833333330.08667162698412430.0862450396825665
73107.3107.19714781746107.171250.02589781746031730.102852182539706
74107.31107.229112103175107.235833333333-0.006721230158723030.0808878968254021
75107.47107.320778769841107.2950.02577876984126370.149221230158744
76107.35107.381731150794107.3479166666670.0338144841269788-0.0317311507936466
77107.31107.390421626984107.395416666667-0.00499503968253818-0.0804216269840907
78107.32107.380302579365107.437916666667-0.0576140873015867-0.0603025793650716
79107.32107.365124007936107.480416666667-0.11529265873015-0.0451240079364936
80107.34107.343219246032107.52625-0.183030753968253-0.00321924603173329
81107.53107.531076388889107.564583333333-0.0335069444444475-0.00107638888886186
82107.72107.702266865079107.5995833333330.1026835317460310.0177331349206753
83107.75107.767564484127107.641250.126314484126984-0.0175644841269644
84107.79107.765838293651107.6791666666670.08667162698412430.0241617063492043
85107.81107.740481150794107.7145833333330.02589781746031730.0695188492063465
86107.9107.746195436508107.752916666667-0.006721230158723030.153804563492059
87107.8107.810362103175107.7845833333330.0257787698412637-0.0103621031746144
88107.86107.83339781746107.7995833333330.03381448412697880.0266021825396763
89107.8107.802921626984107.807916666667-0.00499503968253818-0.00292162698411857
90107.74107.756552579365107.814166666667-0.0576140873015867-0.0165525793650545
91107.75NANA-0.11529265873015NA
92107.83NANA-0.183030753968253NA
93107.8NANA-0.0335069444444475NA
94107.81NANA0.102683531746031NA
95107.86NANA0.126314484126984NA
96107.83NANA0.0866716269841243NA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/14/t12923553563eugo8ztd0lfi9n/14r1f1292355420.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t12923553563eugo8ztd0lfi9n/14r1f1292355420.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t12923553563eugo8ztd0lfi9n/2wjii1292355420.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t12923553563eugo8ztd0lfi9n/2wjii1292355420.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t12923553563eugo8ztd0lfi9n/3wjii1292355420.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t12923553563eugo8ztd0lfi9n/3wjii1292355420.ps (open in new window)


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