Home » date » 2009 » Dec » 04 »

WS 9 Classical Decomposition

*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, 04 Dec 2009 03:19:32 -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/04/t1259922024sppmpz0q7nh1ncm.htm/, Retrieved Fri, 04 Dec 2009 11:20:30 +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/04/t1259922024sppmpz0q7nh1ncm.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:
SHW WS 9 Classical Decomposition
 
Dataseries X:
» Textbox « » Textfile « » CSV «
14.2 13.5 11.9 14.6 15.6 14.1 14.9 14.2 14.6 17.2 15.4 14.3 17.5 14.5 14.4 16.6 16.7 16.6 16.9 15.7 16.4 18.4 16.9 16.5 18.3 15.1 15.7 18.1 16.8 18.9 19 18.1 17.8 21.5 17.1 18.7 19 16.4 16.9 18.6 19.3 19.4 17.6 18.6 18.1 20.4 18.1 19.6 19.9 19.2 17.8 19.2 22 21.1 19.5 22.2 20.9 22.2 23.5 21.5 24.3 22.8 20.3 23.7 23.3 19.6 18 17.3 16.8 18.2 16.5 16 18.4
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time1 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
114.2NANA1.0648237190536NA
213.5NANA0.937619927740266NA
311.9NANA0.908864046242515NA
414.6NANA1.02609493892651NA
515.6NANA1.04303119886857NA
614.1NANA1.01965263741201NA
714.914.267896201909514.67916666666670.9719827103202641.04430252289093
814.214.791557900125314.85833333333330.9955058597953090.960007059153634
914.614.485144602488715.00416666666670.9654081379053831.00792918542847
1017.216.159645981100815.19166666666671.063717782628691.06437975312800
1115.415.494908651417215.32083333333331.011362000636430.993874849245493
1214.315.346092630278415.47083333333330.9919370404704620.931833291021947
1317.516.673364734180915.65833333333331.06482371905361.04957819126480
1414.514.818301607995115.80416666666670.9376199277402660.978519697033067
1514.414.488807670516115.94166666666670.9088640462425150.993870601878662
1616.616.485925352085916.06666666666671.026094938926511.0069195174355
1716.716.875375605027716.17916666666671.043031198868570.989607602868675
1816.616.654326411062916.33333333333331.019652637412010.996738000101476
1916.915.997215440687716.45833333333330.9719827103202641.05643385642080
2015.716.442438450952516.51666666666670.9955058597953090.95484620768585
2116.416.021752555321416.59583333333330.9654081379053831.02360836889551
2218.417.777383442181916.71251.063717782628691.03502295823472
2316.916.969811569012016.77916666666671.011362000636430.995886131750602
2416.516.74307062894116.87916666666670.9919370404704620.985482314783954
2518.318.168554706352017.06251.06482371905361.00723476885049
2615.116.173943753519617.250.9376199277402660.93360037787408
2715.715.821808271671817.40833333333330.9088640462425150.992301242084328
2818.118.054995529527717.59583333333331.026094938926511.00249263260125
2916.818.496419926602617.73333333333331.043031198868570.908283876915946
3018.918.183805367180917.83333333333331.019652637412011.03938640006078
311917.451139578208417.95416666666670.9719827103202641.08875411344057
3218.117.956436946057918.03750.9955058597953091.00799507465615
3317.817.514112635166818.14166666666670.9654081379053831.01632325718056
3421.519.372960116124918.21251.063717782628691.10979426329922
3517.118.545850686670518.33751.011362000636430.9220391282612
3618.718.313637609685918.46250.9919370404704621.02109697693864
371919.619377023562618.4251.06482371905360.968430341961485
3816.417.240486421324118.38750.9376199277402660.95124926288132
3916.916.742033118492318.42083333333330.9088640462425151.00943534637577
4018.618.867320689511218.38751.026094938926510.985831550016544
4119.319.174390205867218.38333333333331.043031198868571.00655091467234
4219.418.825336818219318.46251.019652637412011.03052605046750
4317.618.018129492561918.53750.9719827103202640.976793956734826
4418.618.607663696007318.69166666666670.9955058597953090.999588143028995
4518.118.193920865608518.84583333333330.9654081379053830.9948377886052
4620.420.113130406537418.90833333333331.063717782628691.01426280184458
4718.119.262232103787919.04583333333331.011362000636430.939662646700256
4819.619.074122674046619.22916666666670.9919370404704621.02757019732650
4919.920.635396322159519.37916666666671.06482371905360.964362384386588
5019.218.385164083107119.60833333333330.9376199277402661.04432029614800
5117.818.063672919070019.8750.9088640462425150.985403139203677
5219.220.590305107791920.06666666666671.026094938926510.932477683039976
532221.243068750289920.36666666666671.043031198868571.03563191639625
5421.121.077069725837520.67083333333331.019652637412011.00108792514618
5519.520.346838069370920.93333333333330.9719827103202640.95837986882858
5622.221.171091284980221.26666666666670.9955058597953091.04859970141217
5720.920.776387634505421.52083333333330.9654081379053831.00594965629585
5822.223.202344133588221.81251.063717782628690.956799876434158
5923.522.304746122369222.05416666666671.011362000636431.05358742354983
6021.521.868078671371722.04583333333330.9919370404704620.983168220816144
6124.323.341823274754121.92083333333331.06482371905361.04104978064341
6222.820.303378185275721.65416666666670.9376199277402661.12296583317031
6320.319.339869517335521.27916666666670.9088640462425151.04964513756434
6423.721.488138179352620.94166666666671.026094938926511.10293408401351
6523.321.364755723491220.48333333333331.043031198868571.09058115625357
6619.620.354815774337319.96251.019652637412010.962917091330841
671818.941513067366119.48750.9719827103202640.950293671682003
6817.3NANA0.995505859795309NA
6916.8NANA0.965408137905383NA
7018.2NANA1.06371778262869NA
7116.5NANA1.01136200063643NA
7216NANA0.991937040470462NA
7318.4NANANANA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259922024sppmpz0q7nh1ncm/1ozpz1259921970.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259922024sppmpz0q7nh1ncm/1ozpz1259921970.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/04/t1259922024sppmpz0q7nh1ncm/2rmj41259921970.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259922024sppmpz0q7nh1ncm/2rmj41259921970.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/04/t1259922024sppmpz0q7nh1ncm/3xfks1259921970.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259922024sppmpz0q7nh1ncm/3xfks1259921970.ps (open in new window)


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