Send output to:
Browser Blue - Charts White
Browser Black/White
CSV
Data:
1.0137 0.9834 0.9643 0.9470 0.9060 0.9492 0.9397 0.9041 0.8721 0.8552 0.8564 0.8973 0.9383 0.9217 0.9095 0.8920 0.8742 0.8532 0.8607 0.9005 0.9111 0.9059 0.8883 0.8924 0.8833 0.8700 0.8758 0.8858 0.9170 0.9554 0.9922 0.9778 0.9808 0.9811 1.0014 1.0183 1.0622 1.0773 1.0807 1.0848 1.1582 1.1663 1.1372 1.1139 1.1222 1.1692 1.1702 1.2286 1.2613 1.2646 1.2262 1.1985 1.2007 1.2138 1.2266 1.2176 1.2218 1.2490 1.2991 1.3408 1.3119 1.3014 1.3201 1.2938 1.2694 1.2165 1.2037 1.2292 1.2256 1.2015 1.1786 1.1856 1.2103 1.1938 1.2020 1.2271 1.2770 1.2650 1.2684 1.2811 1.2727 1.2611 1.2881 1.3213 1.2999 1.3074 1.3242 1.3516 1.3511 1.3419 1.3716 1.3622 1.3896 1.4227 1.4684 1.4570 1.4718 1.4748 1.5527 1.5750 1.5557 1.5553 1.5770 1.4975 1.4369 1.3322 1.2732 1.3449 1.3239 1.2785 1.3050 1.3190 1.3650 1.4016 1.4088 1.4268 1.4562 1.4816 1.4914 1.4614 1.4272 1.3686 1.3569 1.3406 1.2565 1.2208 1.2770 1.2894 1.3067 1.3898 1.3661 1.3220 1.3360 1.3649 1.3999 1.4442 1.4349 1.4388 1.4264 1.4343 1.3770 1.3706 1.3556 1.3179 1.2905 1.3224 1.3201 1.3162 1.2789 1.2526 1.2288 1.2400 1.2856 1.2974 1.2828
Seasonal period
12
12
1
2
3
4
5
6
7
8
9
10
11
12
Number of Forecasts
12
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
Algorithm
BFGS
L-BFGS-B
Chart options
R Code
par1 <- as.numeric(par1) nx <- length(x) x <- ts(x,frequency=par1) m <- StructTS(x,type='BSM') m$coef m$fitted m$resid mylevel <- as.numeric(m$fitted[,'level']) myslope <- as.numeric(m$fitted[,'slope']) myseas <- as.numeric(m$fitted[,'sea']) myresid <- as.numeric(m$resid) myfit <- mylevel+myseas mylagmax <- nx/2 bitmap(file='test2.png') op <- par(mfrow = c(2,2)) acf(as.numeric(x),lag.max = mylagmax,main='Observed') acf(mylevel,na.action=na.pass,lag.max = mylagmax,main='Level') acf(myseas,na.action=na.pass,lag.max = mylagmax,main='Seasonal') acf(myresid,na.action=na.pass,lag.max = mylagmax,main='Standardized Residals') par(op) dev.off() bitmap(file='test3.png') op <- par(mfrow = c(2,2)) spectrum(as.numeric(x),main='Observed') spectrum(mylevel,main='Level') spectrum(myseas,main='Seasonal') spectrum(myresid,main='Standardized Residals') par(op) dev.off() bitmap(file='test4.png') op <- par(mfrow = c(2,2)) cpgram(as.numeric(x),main='Observed') cpgram(mylevel,main='Level') cpgram(myseas,main='Seasonal') cpgram(myresid,main='Standardized Residals') par(op) dev.off() bitmap(file='test1.png') plot(as.numeric(m$resid),main='Standardized Residuals',ylab='Residuals',xlab='time',type='b') grid() dev.off() bitmap(file='test5.png') op <- par(mfrow = c(2,2)) hist(m$resid,main='Residual Histogram') plot(density(m$resid),main='Residual Kernel Density') qqnorm(m$resid,main='Residual Normal QQ Plot') qqline(m$resid) plot(m$resid^2, myfit^2,main='Sq.Resid vs. Sq.Fit',xlab='Squared residuals',ylab='Squared Fit') par(op) dev.off() load(file='createtable') a<-table.start() a<-table.row.start(a) a<-table.element(a,'Structural Time Series Model',6,TRUE) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a,'t',header=TRUE) a<-table.element(a,'Observed',header=TRUE) a<-table.element(a,'Level',header=TRUE) a<-table.element(a,'Slope',header=TRUE) a<-table.element(a,'Seasonal',header=TRUE) a<-table.element(a,'Stand. Residuals',header=TRUE) a<-table.row.end(a) for (i in 1:nx) { a<-table.row.start(a) a<-table.element(a,i,header=TRUE) a<-table.element(a,x[i]) a<-table.element(a,mylevel[i]) a<-table.element(a,myslope[i]) a<-table.element(a,myseas[i]) a<-table.element(a,myresid[i]) 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