Send output to:
Browser Blue - Charts White
Browser Black/White
CSV
Data:
58.4 64.8 73.8 65 73 71.1 58.2 64 75 74.9 75 68.3 72.5 72.4 79.6 70.7 76.4 79.7 64.2 67.9 74.1 78.5 73.4 65.4 69.9 69.6 76.8 75.6 74 76 68.1 65.5 76.9 81.7 73.6 68.7 73.3 71.5 78.3 76.5 71.8 77.6 70 64 81.3 82.5 73.1 78.1 70.7 74.9 88 81.3 75.7 89.8 74.6 74.9 90 88.1 84.9 87.7 80.5 79 89.9 86.3 81.1 92.4 71.8 76.1 92.5 87 89.5 88.7 83.8 84.9 99 84.6 92.7 97.6 78 81.9 96.5 99.9 96.2 90.5 91.4 89.7 102.7 91.5 96.2 104.5 90.3 90.3 100.4 111.3 101.3 94.4 100.4 102 104.3 108.8 101.3 108.9 98.5 88.8 111.8 109.6 92.5 94.5 80.8 83.7 94.2 86.2 89 94.7 81.9 80.2 96.5 95.6 91.9 89.9 86.3 94 108 96.3 94.6 111.7 92 91.9 109.2 106.8 105.8 103.6 97.6 102.8 124.8 103.9 112.2 108.5 92.4 101.1 114.9 106.4 104 101.6 99.4 102.3 121.3 99.3 102.9 111.4 98.5 98.5 108.5 112.1 105.3 95.2 98.2 96.6 109.6 108 106.7 111.5 104.5 94.3 109.6 116.4 106.5 100.5 101.7 104.1 112.3 111.2 108.2 115.1 102.3 93.6 120.6 118.4 106.6 105.3 101.5 100.1 119.5 111.2 103.7 117.8 101.7 97.4 120 117 110.6 105.3 100.9 108.1 119.3 113 108.6 123.3 101.4 103.5 119.4 113.1 112 115.8
Type of Seasonality
grey
additive
multiplicative
Seasonal Period
no
12
1
2
3
4
5
6
7
8
9
10
11
12
Chart options
R Code
par2 <- '12' par1 <- 'multiplicative' 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