Send output to:
Browser Blue - Charts White
Browser Black/White
CSV
Data:
347553 353245 347966 364343 341713 361162 354400 345183 341807 348712 349011 416259 360289 367557 364611 378688 351763 377765 373212 365819 364686 363333 362536 428803 375361 377205 381266 390516 366117 393928 387784 385656 385320 389053 390595 462440 402532 409070 421329 428841 404864 432633 416886 414893 417914 417518 423137 506710 436264 443712 452849 453009 437876 460041 450426 447873 444955 452043 480877 546696 483668 489627 490007 496590 480846 497677 492795 488495 486769 494455 498054 558648 506424 512528 512866 529324 508431 523026 521355 514103 513885 522150 527384 654047 543115 543200 571201 568892 537223 553186 550954 543433 557195 565522 571691 633972 575265 572364 586744 600389 578540 610778 596577 590558 597294 602384 614190 690042 639497 649304 678762 691885 667973 682032 672651 671865 671463 675917 680952 754718 694413 699390 710573 714217 702996 712370 708445 707083 700632 706309 709523 769096 715100 713872 714032 732269 711137 715284 716888 716426 714726 718016 725932 779564 732144 730816 746719 760065 734516 740167 740976 735764 734711 737916 739132 792705 747488 746616 749781 760911 739543 745626 746246 744769 741388 744469 745566 798367 752440 756627 758941 771287 749858 758370 755407 752063 756298 755892 758486 812777 762561 763579 764615 773312 755697 762909 760337 759270 754929 766116 765945 814783 768494 769222 768977 783341 764061 767394 763910 761677 759173 762486 762690 809542 769041 770889 773527 789890 768325 772712 772944 769637 768546 775013 776635
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