Home » date » 2009 » Dec » 03 »

Ad hoc forecasting 1

*The author of this computation has been verified*
R Software Module: /rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Thu, 03 Dec 2009 10:14:39 -0700
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2009/Dec/03/t12598607234gicc79acg1yz84.htm/, Retrieved Thu, 03 Dec 2009 18:18:48 +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/2009/Dec/03/t12598607234gicc79acg1yz84.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:
Uitleg in Word document
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
96.96 93.11 95.62 98.30 96.38 100.82 99.06 94.03 102.07 99.31 98.64 101.82 99.14 97.63 100.06 101.32 101.49 105.43 105.09 99.48 108.53 104.34 106.10 107.35 103.00 104.50 105.17 104.84 106.18 108.86 107.77 102.74 112.63 106.26 108.86 111.38 106.85 107.86 107.94 111.38 111.29 113.72 111.88 109.87 113.72 111.71 114.81 112.05 111.54 110.87 110.87 115.48 111.63 116.24 113.56 106.01 110.45 107.77 108.61 108.19
 
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
196.96NANA0.982441725464283NA
293.11NANA0.98046891946843NA
395.62NANA0.986208918331083NA
498.3NANA1.00490527685339NA
596.38NANA0.99781901202507NA
6100.82NANA1.02784167491245NA
799.0698.979892424566198.10083333333331.008960770886071.00080933180944
894.0394.763163697412798.380.9632360611650.992263199445791
9102.07102.07711366910998.75333333333331.033657398931090.999930310832145
1099.3198.486616013920899.06416666666670.99416993376941.00836036427491
1198.64100.03713167392799.40291666666671.006380245454840.986033869118907
12101.82101.19625104933799.80791666666671.013910062738881.00616375551658
1399.1498.4910110299512100.251250.9824417254642831.00658932184026
1497.6398.7622257293386100.7295833333330.980468919468430.988535842312409
15100.0699.8298195988292101.2258333333330.9862089183310831.00230572790871
16101.32102.203472471842101.7045833333331.004905276853390.991355748973346
17101.49102.002048504263102.2250.997819012025070.994980017443067
18105.43105.627434524471102.766251.027841674912450.998130840483251
19105.09104.08187072268103.15751.008960770886071.00968592580360
2099.4899.795670768641103.6045833333330.9632360611650.996836829030662
21108.53107.607611443973104.103751.033657398931091.00857177799646
22104.34103.854305181331104.4633333333330.99416993376941.00467669412280
23106.1105.474100949997104.8054166666671.006380245454841.00593414918322
24107.35106.606306159102105.143751.013910062738881.00697607737940
25103103.547720461060105.3983333333330.9824417254642830.994710453705587
26104.5103.582456054675105.6458333333330.980468919468431.00885810184729
27105.17104.491300419474105.95250.9862089183310831.00649527355676
28104.84106.724290086086106.2033333333331.004905276853390.98234431838744
29106.18106.166279847781106.3983333333330.997819012025071.00012923267387
30108.86109.651434681753106.681251.027841674912450.99278226788322
31107.77107.968471692197107.0095833333331.008960770886070.9981617625119
32102.74103.364861723616107.310.9632360611650.993954795534996
33112.63111.185788806606107.5654166666671.033657398931091.01298917072852
34106.26107.323958250186107.9533333333330.99416993376940.990086479593813
35108.86109.130615841816108.438751.006380245454840.997520257356483
36111.38110.368334954389108.8541666666671.013910062738881.00916626173648
37106.85107.310062918869109.2279166666670.9824417254642830.995712770020303
38107.86107.553763707239109.696250.980468919468431.00284728569420
39107.94108.521196612005110.038750.9862089183310830.994644395471583
40111.38110.852357221294110.311251.004905276853391.00475986972160
41111.29110.544626520962110.786250.997819012025071.00674273822705
42113.72114.154237752599111.0620833333331.027841674912450.996196043518418
43111.88112.282619788378111.2854166666671.008960770886070.996414228763662
44109.87107.503164651396111.606250.9632360611651.02201642487715
45113.72115.618456285689111.853751.033657398931090.983579989331479
46111.71111.492844172459112.1466666666670.99416993376941.00194771089708
47114.81113.048370272351112.3316666666671.006380245454841.01558297322999
48112.05114.015031480040112.4508333333331.013910062738880.98276515425614
49111.54110.648318031853112.6258333333330.9824417254642831.00805870332245
50110.87110.337069852380112.5350.980468919468431.00483001903470
51110.87110.690034391568112.2379166666670.9862089183310831.00162585195155
52115.48112.486584427777111.93751.004905276853391.02661131180621
53111.63111.271787125976111.5150.997819012025071.00321926054462
54116.24114.188927409127111.0958333333331.027841674912451.01796209700371
55113.56NANA1.00896077088607NA
56106.01NANA0.963236061165NA
57110.45NANA1.03365739893109NA
58107.77NANA0.9941699337694NA
59108.61NANA1.00638024545484NA
60108.19NANA1.01391006273888NA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/03/t12598607234gicc79acg1yz84/174fw1259860476.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/03/t12598607234gicc79acg1yz84/174fw1259860476.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/03/t12598607234gicc79acg1yz84/2iw881259860476.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/03/t12598607234gicc79acg1yz84/2iw881259860476.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/03/t12598607234gicc79acg1yz84/34izl1259860476.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/03/t12598607234gicc79acg1yz84/34izl1259860476.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/03/t12598607234gicc79acg1yz84/4gph51259860476.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/03/t12598607234gicc79acg1yz84/4gph51259860476.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