Home » date » 2009 » Jun » 05 »

classical decompostition - sigaretten - caroline thys

*Unverified author*
R Software Module: rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Fri, 05 Jun 2009 02:03:27 -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/05/t1244189258qixd28ihy22yzr8.htm/, Retrieved Fri, 05 Jun 2009 10:07:44 +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/05/t1244189258qixd28ihy22yzr8.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 «
106.07 106.07 106.07 106.07 106.07 106.2 107.5 108.31 108.53 108.61 108.62 108.62 108.62 108.62 110.1 110.74 110.77 110.77 110.78 110.78 110.78 110.84 110.84 110.84 110.84 110.84 111.01 112.66 114.04 114.16 114.2 114.2 114.23 114.23 114.23 114.23 114.23 114.23 115.97 116.96 117.08 117.08 117.08 117.63 119.12 119.47 119.5 119.52 119.49 119.49 119.5 119.5 119.56 122.35 122.92 122.92 123.04 123.04 123.04 123.06 123.33 128.21 129.57 129.79 131.66 135.01 136.01 136.31 136.37 136.4 136.4 136.4 137.34 142.18 143.79 144.08 144.08 144.09 144.09 144.11 144.11 144.15 144.15 144.16 144.2 144.38 144.38 144.28 144.46 144.53 144.53 145.34 147.98 150.42 150.53 150.64
 
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'George Udny Yule' @ 72.249.76.132


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
1106.07NANA-1.22211805555555NA
2106.07NANA-0.248665674603176NA
3106.07NANA0.206096230158729NA
4106.07NANA0.249548611111105NA
5106.07NANA0.271215277777774NA
6106.2NANA0.677346230158727NA
7107.5108.058774801587107.3345833333330.724191468253967-0.558774801587305
8108.31108.056274801587107.5470833333330.509191468253970.253725198412695
9108.53108.148655753968107.821250.3274057539682560.381344246031745
10108.61108.135679563492108.18375-0.04807043650793170.474320436507938
11108.62108.075858134921108.574166666667-0.498308531746030.544141865079396
12108.62108.012584325397108.960416666667-0.9478323412698360.607415674603189
13108.62108.065381944444109.2875-1.222118055555550.554618055555565
14108.62109.278417658730109.527083333333-0.248665674603176-0.658417658730144
15110.1109.929846230159109.723750.2060962301587290.170153769841278
16110.74110.159965277778109.9104166666670.2495486111111050.580034722222223
17110.77110.367048611111110.0958333333330.2712152777777740.402951388888894
18110.77110.958179563492110.2808333333330.677346230158727-0.188179563492085
19110.78111.190024801587110.4658333333330.724191468253967-0.410024801587298
20110.78111.160024801587110.6508333333330.50919146825397-0.380024801587325
21110.78111.108655753968110.781250.327405753968256-0.328655753968249
22110.84110.851096230159110.899166666667-0.0480704365079317-0.0110962301587278
23110.84110.617108134921111.115416666667-0.498308531746030.222891865079376
24110.84110.445084325397111.392916666667-0.9478323412698360.394915674603169
25110.84110.454548611111111.676666666667-1.222118055555550.38545138888891
26110.84111.713000992063111.961666666667-0.248665674603176-0.873000992063467
27111.01112.454012896825112.2479166666670.206096230158729-1.44401289682537
28112.66112.782465277778112.5329166666670.249548611111105-0.122465277777778
29114.04113.086631944444112.8154166666670.2712152777777740.953368055555572
30114.16113.775262896825113.0979166666670.6773462301587270.384737103174601
31114.2114.104608134921113.3804166666670.7241914682539670.0953918650793781
32114.2114.172108134921113.6629166666670.509191468253970.0278918650793685
33114.23114.338239087302114.0108333333330.327405753968256-0.108239087301570
34114.23114.348596230159114.396666666667-0.0480704365079317-0.118596230158715
35114.23114.204191468254114.7025-0.498308531746030.0258085317460512
36114.23114.003000992063114.950833333333-0.9478323412698360.226999007936527
37114.23113.970381944444115.1925-1.222118055555550.259618055555563
38114.23115.206750992063115.455416666667-0.248665674603176-0.976750992063472
39115.97116.008179563492115.8020833333330.206096230158729-0.038179563492065
40116.96116.473715277778116.2241666666670.2495486111111050.486284722222237
41117.08116.933298611111116.6620833333330.2712152777777740.1467013888889
42117.08117.779429563492117.1020833333330.677346230158727-0.699429563492046
43117.08118.265858134921117.5416666666670.724191468253967-1.18585813492062
44117.63118.489191468254117.980.50919146825397-0.859191468253954
45119.12118.673655753968118.346250.3274057539682560.446344246031785
46119.47118.551096230159118.599166666667-0.04807043650793170.918903769841293
47119.5118.310024801587118.808333333333-0.498308531746031.18997519841272
48119.52118.18341765873119.13125-0.9478323412698361.33658234126987
49119.49118.372048611111119.594166666667-1.222118055555551.11795138888893
50119.49119.809250992063120.057916666667-0.248665674603176-0.319250992063473
51119.5120.647762896825120.4416666666670.206096230158729-1.14776289682537
52119.5121.003298611111120.753750.249548611111105-1.50329861111109
53119.56121.321215277778121.050.271215277777774-1.76121527777775
54122.35122.022346230159121.3450.6773462301587270.327653769841277
55122.92122.376691468254121.65250.7241914682539670.543308531746035
56122.92122.685024801587122.1758333333330.509191468253970.234975198412698
57123.04123.286155753968122.958750.327405753968256-0.246155753968225
58123.04123.759012896825123.807083333333-0.0480704365079317-0.71901289682539
59123.04124.241691468254124.74-0.49830853174603-1.20169146825396
60123.06124.823834325397125.771666666667-0.947832341269836-1.76383432539681
61123.33125.622465277778126.844583333333-1.22211805555555-2.29246527777775
62128.21127.699250992063127.947916666667-0.2486656746031760.510749007936539
63129.57129.267346230159129.061250.2060962301587290.302653769841271
64129.79130.422881944444130.1733333333330.249548611111105-0.632881944444421
65131.66131.557881944444131.2866666666670.2712152777777740.102118055555565
66135.01133.076512896825132.3991666666670.6773462301587271.9334871031746
67136.01134.262941468254133.538750.7241914682539671.74705853174606
68136.31135.213774801587134.7045833333330.509191468253971.09622519841272
69136.37136.206572420635135.8791666666670.3274057539682560.163427579365077
70136.4137.019012896825137.067083333333-0.0480704365079317-0.619012896825382
71136.4137.681691468254138.18-0.49830853174603-1.28169146825397
72136.4138.128000992064139.075833333333-0.947832341269836-1.7280009920635
73137.34138.568715277778139.790833333333-1.22211805555555-1.22871527777778
74142.18140.203834325397140.4525-0.2486656746031761.97616567460315
75143.79141.306096230159141.10.2060962301587292.48390376984125
76144.08141.994965277778141.7454166666670.2495486111111052.08503472222222
77144.08142.662465277778142.391250.2712152777777741.41753472222223
78144.09143.714846230159143.03750.6773462301587270.37515376984129
79144.09144.370858134921143.6466666666670.724191468253967-0.280858134920607
80144.11144.533358134921144.0241666666670.50919146825397-0.423358134920591
81144.11144.467822420635144.1404166666670.327405753968256-0.357822420634932
82144.15144.125262896825144.173333333333-0.04807043650793170.0247371031746013
83144.15143.699191468254144.1975-0.498308531746030.45080853174602
84144.16143.283834325397144.231666666667-0.9478323412698360.876165674603158
85144.2143.046215277778144.268333333333-1.222118055555551.15378472222218
86144.38144.089250992063144.337916666667-0.2486656746031760.290749007936512
87144.38144.756512896825144.5504166666670.206096230158729-0.376512896825375
88144.28145.222465277778144.9729166666670.249548611111105-0.942465277777757
89144.46145.771215277778145.50.271215277777774-1.31121527777776
90144.53146.713179563492146.0358333333330.677346230158727-2.18317956349202
91144.53NANA0.724191468253967NA
92145.34NANA0.50919146825397NA
93147.98NANA0.327405753968256NA
94150.42NANA-0.0480704365079317NA
95150.53NANA-0.49830853174603NA
96150.64NANA-0.947832341269836NA
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/05/t1244189258qixd28ihy22yzr8/1a8a01244189005.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/05/t1244189258qixd28ihy22yzr8/1a8a01244189005.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/05/t1244189258qixd28ihy22yzr8/2hnbb1244189005.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/05/t1244189258qixd28ihy22yzr8/2hnbb1244189005.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/05/t1244189258qixd28ihy22yzr8/3ip2u1244189005.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/05/t1244189258qixd28ihy22yzr8/3ip2u1244189005.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/05/t1244189258qixd28ihy22yzr8/46s931244189005.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/05/t1244189258qixd28ihy22yzr8/46s931244189005.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