Home » date » 2009 » Jun » 07 »

*Unverified author*
R Software Module: rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Sun, 07 Jun 2009 05:07:22 -0600
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2009/Jun/07/t1244372871pzzjlpow510nunm.htm/, Retrieved Sun, 07 Jun 2009 13:07:56 +0200
 
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/Jun/07/t1244372871pzzjlpow510nunm.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 «
0 1 0 0 1 3 9 2 3 5 3 5 2 2 0 1 0 1 3 3 2 1 1 5 0 3 1 0 1 4 0 0 1 6 14 1 1 0 0 1 1 1 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 0 2 0 1 0 1 0 0 1 2 0 0 1 2 0 3 1 1 0 2 0 4 0 2 1 1 1 1 0 1 1 0 2 1 3 1 2 4 0 0 0 1 0 1 0 2 2 4 2 3 3 0 0 2 7 8 2 4 1 1 2 4
 
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
10NANA0.56795571354298NA
21NANA0.885600553738695NA
30NANA0.384391498719661NA
40NANA0.640831635999864NA
51NANA0.744814376862322NA
63NANA0.956322404732267NA
793.45740718912762.751.257238977864582.60310675245369
823.280262068443482.8751.140960719458600.609707382602214
933.101173379742302.916666666666671.063259444483080.967375774471948
1053.223384758934592.958333333333331.089594848090561.55116449754904
1134.432135284711682.958333333333331.498186575113810.676874645579587
1255.01738921228182.833333333333331.770843251393580.996534211011728
1321.419889283857452.50.567955713542981.40856052844244
1422.029501268984512.291666666666670.8856005537386950.98546378391807
1500.8808971845658892.291666666666670.3843914987196610
1611.335065908333052.083333333333330.6408316359998640.749026691310386
1701.365493024247591.833333333333330.7448143768623220
1811.673564208281471.750.9563224047322670.59752711909803
1932.095398296440971.666666666666671.257238977864581.43170871384953
2031.854061169120231.6251.140960719458601.61806959229049
2121.816401550991921.708333333333331.063259444483081.10107811728514
2211.861391198821381.708333333333331.089594848090560.53723258207796
2312.559402065819421.708333333333331.498186575113810.390716258830493
2453.320331096362961.8751.770843251393581.50587391886217
2501.064916962893091.8750.567955713542980
2631.439100899825381.6250.8856005537386952.08463492751899
2710.5605709356328381.458333333333330.3843914987196611.78389555439774
2801.041351408499781.6250.6408316359998640
2911.768934145048012.3750.7448143768623220.565312169929795
3042.629886613013732.750.9563224047322671.52097812134044
3103.300252316894532.6251.257238977864580
3202.899941828623952.541666666666671.140960719458600
3312.525241180647312.3751.063259444483080.396001779023604
3462.587787764215092.3751.089594848090562.31858272265225
35143.620617556525042.416666666666671.498186575113813.86674366497764
3614.058182451110282.291666666666671.770843251393580.246415732177445
3711.254235534074082.208333333333330.567955713542980.797298412325907
3801.992601245912062.250.8856005537386950
3900.8648808721192362.250.3843914987196610
4011.2816632719997320.6408316359998640.780236136781652
4110.8999840387086391.208333333333330.7448143768623221.11113081675856
4210.5977015029576670.6250.9563224047322671.67307593347448
4310.733389403754340.5833333333333331.257238977864581.36353210842812
4400.6655604196841840.5833333333333331.140960719458600
4510.6645371528019230.6251.063259444483081.50480676028970
4600.6809967800566030.6251.089594848090560
4710.8739421688163880.5833333333333331.498186575113811.14424047228930
4800.9592067611715210.5416666666666671.770843251393580
4910.283977856771490.50.567955713542983.52140132110609
5000.4428002768693480.50.8856005537386950
5110.1921957493598300.50.3843914987196615.20302870032673
5200.3204158179999320.50.6408316359998640
5310.3413732560618970.4583333333333330.7448143768623222.92934488054530
5400.4781612023661330.50.9563224047322670
5510.6810044463433160.5416666666666671.257238977864581.46841919369183
5600.6180203897067420.5416666666666671.140960719458600
5710.5759321990950.5416666666666671.063259444483081.73631549264196
5800.5901972093823890.5416666666666671.089594848090560
5900.8115177281866460.5416666666666671.498186575113810
6020.8854216256967890.51.770843251393582.25881087829325
6100.283977856771490.50.567955713542980
6210.5166003230142390.5833333333333330.8856005537386951.93573243269621
6300.2402446866997880.6250.3843914987196610
6410.3738184543332540.5833333333333330.6408316359998642.67509532610852
6500.4655089855389510.6250.7448143768623220
6600.6375482698215110.6666666666666670.9563224047322670
6710.8381593185763890.6666666666666671.257238977864581.19309059487461
6820.8557205395939510.751.140960719458602.33721163330849
6900.9303520139226920.8751.063259444483080
7000.9987952774163510.9166666666666671.089594848090560
7111.373337693854320.9166666666666671.498186575113810.728153027820464
7221.7708432513935811.770843251393581.12940543914662
7300.5916205349406041.041666666666670.567955713542980
7430.9594005998835871.083333333333330.8856005537386953.12695239127849
7510.4484567485062711.166666666666670.3843914987196612.22986944299717
7610.801039544999831.250.6408316359998641.24837781885064
7700.9930858358164291.333333333333330.7448143768623220
7821.235249772779181.291666666666670.9563224047322671.61910574207208
7901.623933679741751.291666666666671.257238977864580
8041.426200899323251.251.140960719458602.80465395997019
8101.196166875043461.1251.063259444483080
8221.180394418764781.083333333333331.089594848090561.69434891270741
8311.685459897003031.1251.498186575113810.593309874520378
8411.918413522343041.083333333333331.770843251393580.521264048836904
8510.6152853563382281.083333333333330.567955713542981.62526214820281
8610.922500576811141.041666666666670.8856005537386951.08401016230988
8700.4004078111663131.041666666666670.3843914987196610
8810.7209355904998481.1250.6408316359998641.38708646538960
8910.8379161739701121.1250.7448143768623221.19343680318512
9001.235249772779181.291666666666670.9563224047322670
9121.72870359456381.3751.257238977864581.15693633442386
9211.473740929300691.291666666666671.140960719458600.678545312896013
9331.329074305603851.251.063259444483082.25721014043454
9411.361993560113211.251.089594848090560.734217862173212
9521.810308778262521.208333333333331.498186575113811.10478390427933
9642.139768928767241.208333333333331.770843251393581.86936072686338
9700.6626149991334761.166666666666670.567955713542980
9800.9963006229560321.1250.8856005537386950
9900.4324404360596181.1250.3843914987196610
10010.774338226833171.208333333333330.6408316359998641.29142532984549
10100.9930858358164291.333333333333330.7448143768623220
10211.235249772779181.291666666666670.9563224047322670.80955287103604
10301.72870359456381.3751.257238977864580
10421.711441079187901.51.140960719458601.16860581665424
10521.594889166724611.51.063259444483081.25400563357475
10641.679792057472951.541666666666671.089594848090562.38124712056177
10722.809099828338391.8751.498186575113810.711971849424454
10834.353322993009212.458333333333331.770843251393580.689128742530144
10931.609207855038442.833333333333330.567955713542981.8642712876444
11002.6568016612160930.8856005537386950
11101.169190808605633.041666666666670.3843914987196610
11221.842390953499612.8750.6408316359998641.08554592943534
11372.048239536371382.750.7448143768623223.41756902730285
11482.669733379877582.791666666666670.9563224047322672.99655391070057
1152NANA1.25723897786458NA
1164NANA1.14096071945860NA
1171NANA1.06325944448308NA
1181NANA1.08959484809056NA
1192NANA1.49818657511381NA
1204NANA1.77084325139358NA
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/07/t1244372871pzzjlpow510nunm/1iya51244372840.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/07/t1244372871pzzjlpow510nunm/1iya51244372840.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/07/t1244372871pzzjlpow510nunm/2yt7f1244372840.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/07/t1244372871pzzjlpow510nunm/2yt7f1244372840.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/07/t1244372871pzzjlpow510nunm/31twu1244372840.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/07/t1244372871pzzjlpow510nunm/31twu1244372840.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/07/t1244372871pzzjlpow510nunm/4h4ly1244372840.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/07/t1244372871pzzjlpow510nunm/4h4ly1244372840.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