Home » date » 2008 » May » 19 » attachments

classical decomposition multiplicative

R Software Module: rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Mon, 19 May 2008 10:19:08 -0600
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2008/May/19/t12112140122gjg7yng7dut1n1.htm/, Retrieved Mon, 19 May 2008 18:20:17 +0200
 
User-defined keywords:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
104,7 104,7 104,7 104,7 106 107 107 107 107 107 107 107 107 107 107 107 107,6 109,9 109,9 109,9 109,9 109,9 109,9 109,9 109,9 109,9 109,9 109,9 110,6 114,3 114,3 114,3 114,3 114,3 114,3 114,3 114,3 114,3 114,3 114,3 114,3 119,01 119,01 119,01 119,01 119,01 119,01 119,01 119,01 119,01 119,01 119,01 121,27 123,54 123,54 123,54 123,54 123,54 123,54 123,54 123,54 123,54 123,54 123,54 123,54 125,24 125,24 125,24 125,24 125,24 125,24 125,24 125,24 125,24 125,24 125,24 125,24 128,35 128,35 128,35 128,35 128,35 128,35 128,35
 
Text written by user:
 
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
1104.7NANA0.995535352336965NA
2104.7NANA0.992900042396295NA
3104.7NANA0.990280103498155NA
4104.7NANA0.98767539439766NA
5106NANA0.991170558649357NA
6107NANA1.01392585017503NA
7107107.443811201634106.2458333333331.011275527996870.995869364678424
8107107.357166314666106.43751.008640435134850.996673102253661
9107107.271120511037106.6291666666671.006020433849750.99747256754898
10107107.185667936694106.8208333333331.003415388103390.998267791391628
11107107.075622492774106.9833333333331.000862649877930.99929374687708
12107106.98845682349107.1708333333330.998298263583751.00010789179368
13107106.932941032894107.41250.9955353523369651.00062711234217
14107106.889826647471107.6541666666670.9929000423962951.0010307187876
15107106.847097000353107.8958333333330.9902801034981551.00143104495994
16107106.804747961677108.13750.987675394397661.00182812133402
17107.6107.422239170952108.3791666666670.9911705586493571.00165478610779
18109.9110.133470784220108.6208333333331.013925850175030.99788011053717
19109.9110.089982166559108.86251.011275527996870.998274301050644
20109.9110.046874141692109.1041666666671.008640435134850.998665349262872
21109.9110.004142689662109.3458333333331.006020433849750.9990532839299
22109.9109.961783843780109.58751.003415388103390.999438133489469
23109.9109.928081044926109.8333333333331.000862649877930.999744550758467
24109.9109.954234581553110.1416666666670.998298263583750.999506753134522
25109.9110.014952561171110.5083333333330.9955353523369650.998955118749819
26109.9110.087792200689110.8750.9929000423962950.998294159625376
27109.9110.160409179974111.2416666666670.9902801034981550.997636091024785
28109.9110.232804643066111.6083333333330.987675394397660.996980892900773
29110.6110.986323304762111.9750.9911705586493570.99651918098322
30114.3113.90611988508112.3416666666671.013925850175031.00345793637179
31114.3113.979179301314112.7083333333331.011275527996871.00281473073111
32114.3114.052017202873113.0751.008640435134851.00217429558204
33114.3114.124634716638113.4416666666671.006020433849751.00153661200141
34114.3114.197032961066113.8083333333331.003415388103391.00090166124516
35114.3114.244301222525114.1458333333331.000862649877931.00048754097035
36114.3114.301407561851114.496250.998298263583750.999987685524781
37114.3114.375812210803114.888750.9955353523369650.999337165705423
38114.3114.462758012498115.281250.9929000423962950.998578070148544
39114.3114.549413122020115.673750.9902801034981550.997822659102111
40114.3114.635779245008116.066250.987675394397660.997070903628702
41114.3115.430484297106116.458750.9911705586493570.99020636269535
42119.01118.478503000265116.851251.013925850175031.00448602055458
43119.01118.565735185583117.243751.011275527996871.00374699160530
44119.01118.652678387632117.636251.008640435134851.00301149217383
45119.01118.739334281743118.028751.006020433849751.00227949499544
46119.01118.825704528438118.421251.003415388103391.00155097310210
47119.01119.010492566464118.9079166666671.000862649877930.999995861150948
48119.01119.183917985995119.3870833333330.998298263583750.998540759618127
49119.01119.229876666240119.7645833333330.9955353523369650.998155859316576
50119.01119.289079635246120.1420833333330.9929000423962950.997660476247287
51119.01119.348145456888120.5195833333330.9902801034981550.997166730529466
52119.01119.407074462777120.8970833333330.987675394397660.9966746152641
53121.27120.203796512468121.2745833333330.9911705586493571.00886996516305
54123.54123.346192019314121.6520833333331.013925850175031.00157125224146
55123.54123.405531316655122.0295833333331.011275527996871.00108964875326
56123.54123.464733796921122.4070833333331.008640435134851.00060961701989
57123.54123.523799795060122.7845833333331.006020433849751.00013115047438
58123.54123.582729647539123.1620833333331.003415388103390.999654242565604
59123.54123.551906840285123.4454166666671.000862649877930.999903628842404
60123.54123.400480276807123.6108333333330.998298263583751.00113062544716
61123.54123.199988690080123.75250.9955353523369651.00275983231439
62123.54123.014523335987123.8941666666670.9929000423962951.00427166361957
63123.54122.830217870813124.0358333333330.9902801034981551.00577856281207
64123.54122.647061287815124.17750.987675394397661.00728055530078
65123.54123.221497875823124.3191666666670.9911705586493571.00258479347896
66125.24126.194056250993124.4608333333331.013925850175030.992439768723376
67125.24126.00745897723124.60251.011275527996870.993909416288056
68125.24125.822010547201124.7441666666671.008640435134850.995374334389748
69125.24125.637700231687124.8858333333331.006020433849750.996834547027257
70125.24125.454517436096125.02751.003415388103390.99829007802604
71125.24125.277143833012125.1691666666671.000862649877930.999703506706204
72125.24125.156237347885125.3695833333330.998298263583751.00066926470378
73125.24125.067861894902125.628750.9955353523369651.00137635762289
74125.24124.994117795515125.8879166666670.9929000423962951.00196715020532
75125.24124.920946739324126.1470833333330.9902801034981551.00255404132777
76125.24124.848342823079126.406250.987675394397661.00313706348090
77125.24125.547031799054126.6654166666670.9911705586493570.997554447965404
78128.35128.692116064362126.9245833333331.013925850175030.997341592672308
79128.35NANA1.01127552799687NA
80128.35NANA1.00864043513485NA
81128.35NANA1.00602043384975NA
82128.35NANA1.00341538810339NA
83128.35NANA1.00086264987793NA
84128.35NANA0.99829826358375NA
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/19/t12112140122gjg7yng7dut1n1/1vymd1211213945.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/19/t12112140122gjg7yng7dut1n1/1vymd1211213945.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/19/t12112140122gjg7yng7dut1n1/24x2b1211213945.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/19/t12112140122gjg7yng7dut1n1/24x2b1211213945.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/19/t12112140122gjg7yng7dut1n1/34g841211213945.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/19/t12112140122gjg7yng7dut1n1/34g841211213945.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/19/t12112140122gjg7yng7dut1n1/4uz7l1211213945.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/19/t12112140122gjg7yng7dut1n1/4uz7l1211213945.ps (open in new window)


 
Parameters (Session):
par1 = multiplicative ; par2 = 12 ;
 
Parameters (R input):
par1 = multiplicative ; 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