Send output to:
Browser Blue - Charts White
Browser Black/White
CSV
Data:
-130.910.987.314.406 131.766.722.476.436 0.311902089432624 158.143.730.597.924 0.0192400144346201 -0.9368753688608 0.243932484300078 -218.563.592.223.445 0.935635745770661 0.839892795267538 579.778.367.605.613 170.441.393.629.028 -0.329020925034685 -101.366.959.341.428 -0.0721891698409563 -0.352185041020035 -149.386.935.956.607 -0.119895993686133 -0.550705443241956 0.707319366690019 0.293174810691929 0.655220572744206 134.613.443.388.521 12.638.272.219.042 -0.0318833228854187 -0.535995463130649 -0.529671431821257 -0.789148635231205 -0.0425744109948981 0.272498055255342 -0.0800450106434503 0.816983228463799 0.846801025205687 -0.222074056938455 195.349.653.329.495 -0.172023120296064 -0.69027654889302 0.287592534260633 -0.859207133715227 -201.772.610.889.065 -0.414444629012988 -105.580.413.901.964 -0.581262797215352 -0.286538973559151 -0.773355922423026 147.741.619.719.803 0.521645126539635 0.649524975249249 0.947300946458225 0.691871214114913 -0.670858760026571 0.0993984226509969 -0.568791387950251 -0.955697417689572 0.410503257643818 0.521762645926369 0.21801433183982 0.464905022439139 0.749746330627607 0.728431943221657 0.0388556155016051 0.354112674721681 -0.520666561813183 110.276.754.576.813 0.739079360099292 -0.356430025460785 0.012218479821687 -0.423458979992071 0.690942640935863 0.683055919648925 -0.332602274669517 0.895246552676766 -0.0822976200815086 -0.384204531591252 0.279966494676576 -0.253563763880968 -0.817066547023874 0.328939924260027 0.093990912489306 -140.517.485.842.956 0.119314824608429 -0.510745602335118 -0.260161606926564
Seasonal period
multiplicative
12
1
2
3
4
5
6
7
8
9
10
11
12
Number of Forecasts
12
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