Home » date » 2011 » Jan » 17 »

*Unverified author*
R Software Module: /rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Mon, 17 Jan 2011 00:05:57 +0000
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2011/Jan/17/t12952226142wexo6rr7rfmh5a.htm/, Retrieved Mon, 17 Jan 2011 01:03:38 +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/2011/Jan/17/t12952226142wexo6rr7rfmh5a.htm/},
    year = {2011},
}
@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 = {2011},
    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:
KDGP2W92
 
Dataseries X:
» Textbox « » Textfile « » CSV «
1590 1798 1935 1887 2027 2080 1556 1682 1785 1869 1781 2082 2571 1862 1938 1505 1767 1607 1578 1495 1615 1700 1337 1531 1623 1543 1640 1524 1429 1827 1603 1351 1267 1742 1384 1392 1649 1665 1526 1717 1391 1790 1472 1350 1704 1391 1190 1351 1160 1236 1444 1257 1193 1701 1428 1611 1431 1472 1240 1276
 
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' @ www.wessa.org


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
11590NANA1.09622001036115NA
21798NANA1.00399468896838NA
31935NANA1.04797549003747NA
41887NANA0.970299290984255NA
52027NANA0.932171041876886NA
62080NANA1.14166900207308NA
715561800.600683058991880.208333333330.9576601970840080.864156064495406
816821745.465455264891923.750.907324473172130.963639810187332
917851916.614823605051926.541666666670.9948473250107310.931329538943308
1018692005.510964041421910.751.049593596253520.931932077914784
1117811684.6666653088918840.8941967437945271.05718243061066
1220821860.961392862321853.458333333331.004048140383871.11877656784577
1325712011.19831234261834.666666666671.096220010361151.2783423614777
1418621835.093125873991827.791666666671.003994688968381.01466240254875
1519381899.892232147091812.916666666671.047975490037471.02005785760272
1615051745.366278795051798.791666666670.9702992909842550.862283188511586
1717671652.972300008191773.250.9321710418768861.06898343063054
1816071977.13286388181731.791666666671.141669002073080.812793125518585
1915781598.65408899891669.333333333330.9576601970840080.987080326418932
2014951466.727816069131616.541666666670.907324473172131.01927568538697
2116151582.636286204571590.833333333330.9948473250107311.0204492428725
2217001657.526953816861579.208333333331.049593596253521.02562434721519
2313371400.237584386911565.916666666670.8941967437945270.954837961006024
2415311567.3191471392215611.004048140383870.976827216584756
2516231722.39001544621571.208333333331.096220010361150.942295290523704
2615431572.506681596721566.251.003994688968380.981235894294098
2716401619.908113725411545.751.047975490037471.01240310243794
2815241487.4688130788615330.9702992909842551.02455929603359
2914291432.475008144231536.708333333330.9321710418768860.997574123021715
3018271750.035871552771532.8751.141669002073081.04397860049517
3116031463.464391177211528.166666666670.9576601970840081.09534609086767
3213511392.138183337111534.333333333330.907324473172130.970449640826248
3312671526.759028116471534.666666666670.9948473250107310.82986245810059
3417421614.231217971411537.958333333331.049593596253521.0791514750837
3513841381.012354395331544.416666666670.8941967437945271.00216337355358
3613921547.531031705821541.291666666671.004048140383870.89949730989602
3716491681.921226730361534.291666666671.096220010361150.980426415811184
3816651534.898713872441528.791666666671.003994688968381.08476213117628
3915261621.174417442541546.958333333331.047975490037470.941292919245122
4017171504.489479808211550.541666666670.9702992909842551.1412509180316
4113911424.201990147571527.833333333330.9321710418768860.976687302519407
4217901733.101114688681518.041666666671.141669002073081.03283067838863
4314721432.619752329461495.958333333330.9576601970840081.0274882763598
4413501322.614445580291457.708333333330.907324473172131.02070562174126
4517041429.015278434161436.416666666670.9948473250107311.19242951822541
4613911483.950412836441413.833333333331.049593596253520.937362857928136
4711901239.72926887581386.416666666670.8941967437945270.959886992971546
4813511380.022333618451374.458333333331.004048140383870.978969663815258
4911601500.633842516891368.916666666671.096220010361150.77300669032922
5012361383.462848286381377.958333333331.003994688968380.893410330122681
5114441443.542571881191377.458333333331.047975490037471.00031687885603
5212571328.784449865811369.458333333330.9702992909842550.945977355565034
5311931281.657501660561374.916666666670.9321710418768860.93082590197015
5417011568.510500223151373.8751.141669002073081.08446835373943
551428NANA0.957660197084008NA
561611NANA0.90732447317213NA
571431NANA0.994847325010731NA
581472NANA1.04959359625352NA
591240NANA0.894196743794527NA
601276NANA1.00404814038387NA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2011/Jan/17/t12952226142wexo6rr7rfmh5a/1k4ii1295222755.png (open in new window)
http://www.freestatistics.org/blog/date/2011/Jan/17/t12952226142wexo6rr7rfmh5a/1k4ii1295222755.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/Jan/17/t12952226142wexo6rr7rfmh5a/25goj1295222755.png (open in new window)
http://www.freestatistics.org/blog/date/2011/Jan/17/t12952226142wexo6rr7rfmh5a/25goj1295222755.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/Jan/17/t12952226142wexo6rr7rfmh5a/32u5p1295222755.png (open in new window)
http://www.freestatistics.org/blog/date/2011/Jan/17/t12952226142wexo6rr7rfmh5a/32u5p1295222755.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/Jan/17/t12952226142wexo6rr7rfmh5a/4zqo11295222755.png (open in new window)
http://www.freestatistics.org/blog/date/2011/Jan/17/t12952226142wexo6rr7rfmh5a/4zqo11295222755.ps (open in new window)


 
Parameters (Session):
par1 = 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