# ::Free Statistics and Forecasting Software::

v1.1.23-r7
Secure website (SSL) | Donate to wessa.net

### :: Classical Decomposition - Free Statistics Software (Calculator) ::

All rights reserved. The non-commercial (academic) use of this software is free of charge. The only thing that is asked in return is to cite this software when results are used in publications.

This free online software (calculator) computes the Classical Seasonal Decomposition of a univariate time series by Moving Averages.

Enter (or paste) your data delimited by hard returns.

 Send output to: Browser Blue - Charts White Browser Black/White CSV MS Excel MS Word Data (click to load default data) 112 118 132 129 121 135 148 148 136 119 104 118 115 126 141 135 125 149 170 170 158 133 114 140 145 150 178 163 172 178 199 199 184 162 146 166 171 180 193 181 183 218 230 242 209 191 172 194 196 196 236 235 229 243 264 272 237 211 180 201 204 188 235 227 234 264 302 293 259 229 203 229 242 233 267 269 270 315 364 347 312 274 237 278 284 277 317 313 318 374 413 405 355 306 271 306 315 301 356 348 355 422 465 467 404 347 305 336 340 318 362 348 363 435 491 505 404 359 310 337 360 342 406 396 420 472 548 559 463 407 362 405 417 391 419 461 472 535 622 606 508 461 390 432 Sample Range:(leave blank to include all observations) From: To: Type of Seasonality additivemultiplicative Seasonal Period 12123456789101112 Chart options Width: Height:

 Source code of R 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")
 Top | Output | Charts | References | History | Feedback

 Cite this software as: Wessa P., (2008), Classical Decomposition (v1.0.2) in Free Statistics Software (v1.1.23-r7), Office for Research Development and Education, URL http://www.wessa.net/rwasp_decompose.wasp/ The R code is based on :
 Top | Output | Charts | References | History | Feedback
 Top | Output | Charts | References | History | Feedback

 [Select module] Main Menu Equation Plotter   Scientific Forecasting   Descriptive Statistics -Central Tendency -Variability -Skewness/Kurtosis -Quartiles -Percentiles -Stem and Leaf -Histogram -Kernel Density -Harrell-Davis -Univariate EDA -Bootstrap -Blocked Bootstrap -Mean Plot -SD Plot -(P)ACF -Spectrum -SD Mean-Plot -Variance Reduction -Correlation -Kendall Rank Corr. -Simple Regression -Bivariate KDE -Box-Cox Linearity -Regression Validation -Back-Back Histo. -Partial Correlation -Trivariate Scatter -Kendall tau Matrix -Notched Boxplots -Star Plot   Distributions -Normal ML Fit -Beta ML Fit -Cauchy ML Fit -Exponential ML Fit -Gamma ML Fit -Lognormal ML Fit -Logistic ML Fit -Neg. Binom. ML Fit -Poisson ML Fit -Weibull ML Fit -Tukey lambda PPCC -Box-Cox Normality   Hypothesis Tests -Mean -Skewness/Kurtosis   Multiple Regression -Estimate Equation   About this server

 Home Page Equation Plotter Time Series Analysis Multiple Regression Descriptive Statistics Statistical Distributions Hypothesis Testing Simon Fraser University Aston University Academic citations Computations Archive Search Computations R Project FAQ About Wessa.net Powered by Linux Server status page Any R Server'Herman Ole Andreas Wold''Gwilym Jenkins''Sir Ronald Aylmer Fisher''George Udny Yule''Gertrude Mary Cox''Sir Maurice George Kendall'Installed PackagesHistory list