Home » date » 2010 » Dec » 17 »

Classical Decomp of Time Series By Moving Averages : Passengers

*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: Fri, 17 Dec 2010 15:25:46 +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/17/t1292599440521idqrbayt938v.htm/, Retrieved Fri, 17 Dec 2010 16:24:00 +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/17/t1292599440521idqrbayt938v.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:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
989236 1008380 1207763 1368839 1469798 1498721 1761769 1653214 1599104 1421179 1163995 1037735 1015407 1039210 1258049 1469445 1552346 1549144 1785895 1662335 1629440 1467430 1202209 1076982 1039367 1063449 1335135 1491602 1591972 1641248 1898849 1798580 1762444 1622044 1368955 1262973 1195650 1269530 1479279 1607819 1712466 1721766 1949843 1821326 1757802 1590367 1260647 1149235 1016367 1027885 1262159 1520854 1544144 1564709 1821776 1741365 1623386 1498658 1241822 1136029
 
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'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
1989236NANA-385867.105034722NA
21008380NANA-354089.667534722NA
31207763NANA-121623.844618055NA
41368839NANA66090.6449652777NA
51469798NANA142274.874131944NA
61498721NANA159425.030381944NA
717617691754463.582465281349401.54166667405062.0407986117305.41753472225
816532141641127.582465281351776.58333333289350.99913194412086.4175347222
915991041597071.363715281355156.41666667241914.9470486112032.63628472225
1014211791439265.915798611361443.5833333377822.3324652778-18086.915798611
1111639951168235.905381941369075-200839.094618056-4240.90538194426
1210377351055094.301215281374615.45833333-319521.157118056-17359.3012152775
131015407991854.5616319441377721.66666667-385867.10503472223552.4383680555
1410392101025017.290798611379106.95833333-354089.66753472214192.7092013888
1512580491259127.155381941380751-121623.844618055-1078.15538194426
1614694451450032.769965281383942.12566090.644965277719412.2300347222
1715523461529736.374131941387461.5142274.87413194422609.6258680555
1815491441550114.072048611390689.04166667159425.030381944-970.072048611008
1917858951798384.707465281393322.66666667405062.040798611-12489.7074652775
2016623351684681.957465281395330.95833333289350.999131944-22346.957465278
2116294401641467.780381941399552.83333333241914.947048611-12027.7803819440
2214674301481510.290798611403687.9583333377822.3324652778-14080.290798611
2312022091205423.155381941406262.25-200839.094618056-3214.15538194403
2410769821092229.842881941411751-319521.157118056-15247.8428819445
2510393671034427.978298611420295.08333333-385867.1050347224939.02170138876
2610634491076588.707465281430678.375-354089.667534722-13139.7074652778
2713351351320273.238715281441897.08333333-121623.84461805514861.7612847225
2814916021519971.811631941453881.1666666766090.6449652777-28369.8116319445
2915919721609546.040798611467271.16666667142274.874131944-17574.040798611
3016412481641393.572048611481968.54166667159425.030381944-145.572048611240
3118988491901291.999131941496229.95833333405062.040798611-2442.99913194426
3217985801800679.457465281511328.45833333289350.999131944-2099.45746527775
3317624441767836.113715281525921.16666667241914.947048611-5392.11371527752
3416220441614591.874131941536769.5416666777822.33246527787452.12586805574
3513689551345793.405381941546632.5-200839.09461805623161.5946180555
3612629731235486.842881941555008-319521.15711805627486.1571180555
3711956501174620.561631941560487.66666667-385867.10503472221029.4383680557
3812695301209470.499131941563560.16666667-354089.66753472260059.5008680557
3914792791442690.655381941564314.5-121623.84461805536588.3446180557
4016078191628891.853298611562801.2083333366090.6449652777-21072.853298611
4117124661699243.374131941556968.5142274.87413194413222.6258680555
4217217661707141.613715281547716.58333333159425.03038194414624.3862847222
4319498431940569.415798611535507.375405062.0407986119273.584201389
4418213261807319.707465281517968.70833333289350.99913194414006.2925347222
4517578021740768.447048611498853.5241914.94704861117033.552951389
4615903671564005.624131941486183.2916666777822.332465277826361.3758680557
4712606471274707.238715281475546.33333333-200839.094618056-14060.2387152778
4811492351142467.717881941461988.875-319521.1571180566767.2821180555
4910163671064241.603298611450108.70833333-385867.105034722-47874.603298611
5010278851087351.207465281441440.875-354089.667534722-59466.207465278
5112621591310884.655381941432508.5-121623.844618055-48725.6553819445
5215208541489177.269965281423086.62566090.644965277731676.7300347222
5315441441560755.915798611418481.04166667142274.874131944-16611.9157986108
5415647091576571.447048611417146.41666667159425.030381944-11862.447048611
551821776NANA405062.040798611NA
561741365NANA289350.999131944NA
571623386NANA241914.947048611NA
581498658NANA77822.3324652778NA
591241822NANA-200839.094618056NA
601136029NANA-319521.157118056NA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/17/t1292599440521idqrbayt938v/10abx1292599542.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/17/t1292599440521idqrbayt938v/10abx1292599542.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/17/t1292599440521idqrbayt938v/20abx1292599542.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/17/t1292599440521idqrbayt938v/20abx1292599542.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/17/t1292599440521idqrbayt938v/3t2s01292599542.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/17/t1292599440521idqrbayt938v/3t2s01292599542.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/17/t1292599440521idqrbayt938v/4t2s01292599542.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/17/t1292599440521idqrbayt938v/4t2s01292599542.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])
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