Home » date » 2009 » Dec » 16 »

Ad hoc forecasting

*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: Wed, 16 Dec 2009 15:54:54 -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/16/t1261004128s2wc7p0lsydbbys.htm/, Retrieved Wed, 16 Dec 2009 23:55:33 +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/16/t1261004128s2wc7p0lsydbbys.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 «
441 449 452 462 455 461 461 463 462 456 455 456 472 472 471 465 459 465 468 467 463 460 462 461 476 476 471 453 443 442 444 438 427 424 416 406 431 434 418 412 404 409 412 406 398 397 385 390 413 413 401 397 397 409 419 424 428 430 424 433 456
 
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
1441NANA1.02722122831291NA
2449NANA1.03098213453975NA
3452NANA1.01238961586729NA
4462NANA0.99453947276264NA
5455NANA0.982206122008657NA
6461NANA0.996438253502204NA
7461460.996653135373457.3751.007918345198961.00000726006275
8463461.568071596403459.6251.004227515031611.00310231251188
9462458.517910164968461.3750.9938074454943771.00759422861754
10456458.434911569309462.2916666666670.991657312092240.994688642797788
11455453.300801766383462.5833333333330.9799332771026121.00374850039311
12456453.04694914766462.9166666666670.9786792780867541.00651820050416
13472475.988636669495463.3751.027221228312910.991620311154056
14472478.203880070689463.8333333333331.030982134539750.987026704865356
15471469.790964663081464.0416666666671.012389615867291.00257356021691
16465461.714950230055464.250.994539472762641.00711488715778
17459456.43936994844464.7083333333330.9822061220086571.00561001136219
18465463.551379181338465.2083333333330.9964382535022041.00312504909644
19468469.269982885547465.5833333333331.007918345198960.997293705261653
20467467.886336378477465.9166666666671.004227515031610.998105658768885
21463463.197086887504466.0833333333330.9938074454943770.999574507497815
22460461.699116888279465.5833333333330.991657312092240.996319861082406
23462455.097346107738464.4166666666670.9799332771026121.01516742286304
24461452.924614237899462.7916666666670.9786792780867541.01782942571070
25476473.3777827142460.8333333333331.027221228312911.0055393754873
26476472.834181453294458.6251.030982134539751.00669540966132
27471461.56529903416455.9166666666671.012389615867291.02044066351085
28453450.443502872079452.9166666666670.994539472762641.00567551116094
29443441.501651842892449.50.9822061220086571.00339375436276
30442443.705650632419445.2916666666670.9964382535022040.996155896076627
31444444.61798002589441.1251.007918345198960.99861008764006
32438439.349537826329437.51.004227515031610.99692832765227
33427430.856936265375433.5416666666670.9938074454943770.991048220555978
34424426.040772707629429.6250.991657312092240.995209912200048
35416417.737389918201426.2916666666670.9799332771026120.995840951851255
36406414.266782753472423.2916666666670.9786792780867540.980044784912452
37431432.032128274605420.5833333333331.027221228312910.997610991852094
38434430.864617059738417.9166666666671.030982134539751.00727695618558
39418420.521336690874415.3751.012389615867290.994004259782121
40412410.786241395668413.0416666666670.994539472762641.00295472068443
41404403.318388849805410.6250.9822061220086571.00169000761939
42409407.211099597900408.6666666666670.9964382535022041.00439305412811
43412410.474746082275407.251.007918345198961.00371582888419
44406407.339785784696405.6251.004227515031610.996710888964319
45398401.539616623291404.0416666666670.9938074454943770.991184888173534
46397399.34866339048402.7083333333330.991657312092240.994118764864419
47385393.729024629187401.7916666666670.9799332771026120.97782986754048
48390392.939730151832401.50.9786792780867540.99251862327412
49413412.728929359225401.7916666666671.027221228312911.00065677644937
50413415.313969863764402.8333333333331.030982134539750.994428384230555
51401409.849062823606404.8333333333331.012389615867290.978408971432943
52397405.233396006077407.4583333333330.994539472762640.979682335939673
53397403.15468782947410.4583333333330.9822061220086570.98473368159848
54409412.400882168225413.8750.9964382535022040.991753455641646
55419420.763912522848417.4583333333331.007918345198960.99580783315691
56424NANA1.00422751503161NA
57428NANA0.993807445494377NA
58430NANA0.99165731209224NA
59424NANA0.979933277102612NA
60433NANA0.978679278086754NA
61456NANANANA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/16/t1261004128s2wc7p0lsydbbys/1y9n71261004092.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/16/t1261004128s2wc7p0lsydbbys/1y9n71261004092.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/16/t1261004128s2wc7p0lsydbbys/2e4lz1261004092.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/16/t1261004128s2wc7p0lsydbbys/2e4lz1261004092.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/16/t1261004128s2wc7p0lsydbbys/3ud3y1261004092.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/16/t1261004128s2wc7p0lsydbbys/3ud3y1261004092.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/16/t1261004128s2wc7p0lsydbbys/474gg1261004092.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/16/t1261004128s2wc7p0lsydbbys/474gg1261004092.ps (open in new window)


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