Send output to:
Browser Blue - Charts White
Browser Black/White
CSV
Data:
4738.4 4687.2 5930.8 5532 5429.8 6107.4 5960.8 5541.8 5362.2 5237 4827 4781.6 4983.2 4718.4 5523.8 5286.6 5389 5810.4 5057.4 5604.4 5285 5215.2 4625.4 4270.4 4685.4 4233.8 5278.4 4978.8 5333.4 5451 5224 5790.2 5079.4 4705.8 4139.6 3720.8 4594 4638.8 4969.4 4764.4 5010.8 5267.8 5312.2 5723.2 4579.6 5015.2 4282.4 3834.2 4523.4 3884.2 3897.8 4845.6 4929 4955.4 5198.4 5122.2 4643.2 4789.8 3950.8 3824.4 4511.8 4262.4 4616.6 5139.6 4972.8 5222 5242 4979.8 4691.8 4821.6 4123.6 4027.4 4365.2 4333.6 4930 5053 5031.4 5342 5191.4 4852.2 4675.6 4689.2 3809.4 4054.2 4409.6 4210.2 4566.4 4907 5021.8 5215.2 4933.6 5197.8 4734.6 4681.8 4172 4037.8 4462.6 4282.6 4962.4 4969.2 5214.6 5416.8 4764.2 5326.2 4545.4 4797.2 4259 4117 4469.2 4203.2 5033.8 4883 5361.6 5044.6 5005.6 5382 4565.4 4825 4290.2 3933.6 4177.6 3949.4 4492.6 4894.2 5224.4 5071
Type of Seasonality
additive
multiplicative
Seasonal Period
12
1
2
3
4
5
6
7
8
9
10
11
12
Chart options
R Code
par2 <- '12' par1 <- 'additive' 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,signif(m$trend[i]+m$seasonal[i],6)) else a<-table.element(a,signif(m$trend[i]*m$seasonal[i],6)) a<-table.element(a,signif(m$trend[i],6)) a<-table.element(a,signif(m$seasonal[i],6)) a<-table.element(a,signif(m$random[i],6)) a<-table.row.end(a) } a<-table.end(a) table.save(a,file='mytable.tab')
Compute
Summary of computational transaction
Raw Input
view raw input (R code)
Raw Output
view raw output of R engine
Computing time
0 seconds
R Server
Big Analytics Cloud Computing Center
Click here to blog (archive) this computation