Send output to:
Browser Blue - Charts White
Browser Black/White
CSV
Data X:
82.61 83.77 85.03 83.20 81.09 81.11 75.39 68.27 67.41 68.03 69.15 69.84 70.76 67.17 65.98 66.76 68.08 72.36 77.76 80.45 79.64 77.86 76.28 75.88 77.90 78.67 79.24 75.06 77.52 81.61 85.44 85.41 84.43 85.25 85.32 84.49 93.27 101.32 102.29 97.53 87.89 76.94 73.06 70.88 72.88 69.34 68.35 72.24 80.30 83.69 84.14 86.98 84.39 85.63 85.74 85.70 81.21 70.62 69.80 70.93 70.11 67.97 63.55 61.28 63.84 68.52 71.15 70.50 70.75 71.23 72.44 69.54 67.28 63.66 62.94 65.10 67.66 68.87 68.20 67.22 66.50 66.09 65.84 66.01 65.83 64.60 64.50 65.60 66.26 66.22 65.68 65.33 65.90 65.91 65.60 66.10 66.86 67.59 69.04 69.45 68.79 68.96 69.81 69.68 71.58 73.71 75.88 77.70 77.65 77.87 76.81 73.26 67.67 67.09 68.27 66.76 68.30 68.40 65.47 65.35 65.83 67.36 67.26 67.43 68.15 68.95 68.22 68.15 61.53 35.60 38.06 34.79 28.59 28.99 30.47 37.38 48.31 57.85 55.33 53.59 61.63 63.47 65.36 67.63 69.26 72.12 72.20 73.67 73.74 72.14 71.86 73.68 75.24 76.57 78.45 69.83 88.00 88.00 88.00 88.00 87.50 85.11 85.00 78.13 76.50 72.00 73.00 76.71 82.25 84.00 84.00 84.00 84.00 86.00 86.00 86.00 86.00 86.00 86.00 86.00 86.00 88.00 92.36 101.00 99.40 95.33 93.08 98.88 105.25 105.25 104.70 107.00 111.00 112.25 109.00 108.13 108.00 109.90 114.63 114.40 114.50 109.11 106.78 106.06 104.50 100.33 96.00 94.00 82.50 71.00 74.80 74.75 70.08 71.68 73.00 72.24 73.08 73.19 72.44 74.80 75.60 73.48 73.54 74.64 77.25 75.69 75.05 76.58 77.93 75.43 69.36 67.59
Data Y:
671.00 688.00 705.00 633.00 661.00 674.00 703.00 694.00 681.00 663.00 632.00 561.00 497.00 509.00 475.00 392.00 319.00 354.00 388.00 381.00 370.00 354.00 348.00 332.00 349.00 372.00 324.00 315.00 312.00 306.00 288.00 255.00 257.00 265.00 254.00 240.00 254.00 251.00 234.00 255.00 330.00 362.00 310.00 277.00 323.00 338.00 338.00 330.00 338.00 349.00 371.00 411.00 406.00 425.00 400.00 408.00 442.00 465.00 458.00 452.00 426.00 412.00 417.00 430.00 411.00 395.00 420.00 485.00 503.00 510.00 496.00 535.00 550.00 538.00 513.00 440.00 426.00 432.00 439.00 431.00 433.00 423.00 402.00 403.00 435.00 429.00 417.00 419.00 417.00 407.00 421.00 442.00 444.00 429.00 424.25 445.00 440.00 439.00 440.00 437.00 471.00 510.00 497.00 507.00 547.00 583.00 599.00 605.00 622.00 710.00 772.00 805.00 811.00 821.00 835.00 881.00 952.00 950.00 1.059.00 1.160.00 1.249.00 1.174.00 1.207.50 1.213.00 1.128.00 885.00 771.00 545.00 488.00 503.00 562.00 572.00 598.00 702.00 801.00 726.00 639.00 723.00 674.00 680.00 725.00 792.00 793.00 798.00 832.00 830.00 811.00 798.00 807.00 905.00 912.00 987.00 1.109.00 1.228.00 1.281.00 1.292.00 1.180.00 1.149.00 1.159.00 1.133.00 1.089.00 1.083.00 1.065.00 994.00 1.053.00 1.027.00 1.061.00 1.106.00 1.153.00 1.181.00 1.085.00 999.00 1.015.00 997.00 967.00 839.00 813.00 776.00 841.00 863.00 854.00 842.00 849.00 860.00 833.00 829.00 820.00 859.00 920.75 912.00 865.00 908.00 961.00 911.00 893.25 857.00 841.00 766.00 709.00 722.00 731.00 693.00 688.00 689.00 672.00 662.00 659.00 671.00 635.00 549.00 538.00 583.00 558.00 568.00 566.00 640.00 686.00 722.00 706.25 683.00 652.00 736.00 756.00 716.00 751.00 788.00 809.00 774.00 734.00 685.00 727.00 677.00
Box-Cox transformation parameter (X series)
1
1
-2.0
-1.9
-1.8
-1.7
-1.6
-1.5
-1.4
-1.3
-1.2
-1.1
-1.0
-0.9
-0.8
-0.7
-0.6
-0.5
-0.4
-0.3
-0.2
-0.1
0.0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1.0
1.1
1.2
1.3
1.4
1.5
1.6
1.7
1.8
1.9
2.0
Degree (d) of non-seasonal differencing (X series)
0
0
1
2
Degree (D) of seasonal differencing (X series)
0
0
1
2
Seasonal Period
1
1
2
3
4
12
Box-Cox transformation parameter (Y series)
1
1
-2.0
-1.9
-1.8
-1.7
-1.6
-1.5
-1.4
-1.3
-1.2
-1.1
-1.0
-0.9
-0.8
-0.7
-0.6
-0.5
-0.4
-0.3
-0.2
-0.1
0.0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1.0
1.1
1.2
1.3
1.4
1.5
1.6
1.7
1.8
1.9
2.0
Degree (d) of non-seasonal differencing (Y series)
0
0
1
2
Degree (D) of seasonal differencing (Y series)
0
0
1
2
Number of non-seasonal time lags in test
1
1
2
3
4
5
6
7
8
9
10
11
Chart options
Label y-axis:
Label x-axis:
R Code
par8 <- '1' par7 <- '0' par6 <- '0' par5 <- '1' par4 <- '1' par3 <- '0' par2 <- '0' par1 <- '1' library(lmtest) par1 <- as.numeric(par1) par2 <- as.numeric(par2) par3 <- as.numeric(par3) par4 <- as.numeric(par4) par5 <- as.numeric(par5) par6 <- as.numeric(par6) par7 <- as.numeric(par7) par8 <- as.numeric(par8) ox <- x oy <- y if (par1 == 0) { x <- log(x) } else { x <- (x ^ par1 - 1) / par1 } if (par5 == 0) { y <- log(y) } else { y <- (y ^ par5 - 1) / par5 } if (par2 > 0) x <- diff(x,lag=1,difference=par2) if (par6 > 0) y <- diff(y,lag=1,difference=par6) if (par3 > 0) x <- diff(x,lag=par4,difference=par3) if (par7 > 0) y <- diff(y,lag=par4,difference=par7) print(x) print(y) (gyx <- grangertest(y ~ x, order=par8)) (gxy <- grangertest(x ~ y, order=par8)) bitmap(file='test1.png') op <- par(mfrow=c(2,1)) (r <- ccf(ox,oy,main='Cross Correlation Function (raw data)',ylab='CCF',xlab='Lag (k)')) (r <- ccf(x,y,main='Cross Correlation Function (transformed and differenced)',ylab='CCF',xlab='Lag (k)')) par(op) dev.off() bitmap(file='test2.png') op <- par(mfrow=c(2,1)) acf(ox,lag.max=round(length(x)/2),main='ACF of x (raw)') acf(x,lag.max=round(length(x)/2),main='ACF of x (transformed and differenced)') par(op) dev.off() bitmap(file='test3.png') op <- par(mfrow=c(2,1)) acf(oy,lag.max=round(length(y)/2),main='ACF of y (raw)') acf(y,lag.max=round(length(y)/2),main='ACF of y (transformed and differenced)') par(op) dev.off() load(file='createtable') a<-table.start() a<-table.row.start(a) a<-table.element(a,'Granger Causality Test: Y = f(X)',5,TRUE) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a,'Model',header=TRUE) a<-table.element(a,'Res.DF',header=TRUE) a<-table.element(a,'Diff. DF',header=TRUE) a<-table.element(a,'F',header=TRUE) a<-table.element(a,'p-value',header=TRUE) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a,'Complete model',header=TRUE) a<-table.element(a,gyx$Res.Df[1]) a<-table.element(a,'') a<-table.element(a,'') a<-table.element(a,'') a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a,'Reduced model',header=TRUE) a<-table.element(a,gyx$Res.Df[2]) a<-table.element(a,gyx$Df[2]) a<-table.element(a,gyx$F[2]) a<-table.element(a,gyx$Pr[2]) a<-table.row.end(a) a<-table.end(a) table.save(a,file='mytable1.tab') a<-table.start() a<-table.row.start(a) a<-table.element(a,'Granger Causality Test: X = f(Y)',5,TRUE) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a,'Model',header=TRUE) a<-table.element(a,'Res.DF',header=TRUE) a<-table.element(a,'Diff. DF',header=TRUE) a<-table.element(a,'F',header=TRUE) a<-table.element(a,'p-value',header=TRUE) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a,'Complete model',header=TRUE) a<-table.element(a,gxy$Res.Df[1]) a<-table.element(a,'') a<-table.element(a,'') a<-table.element(a,'') a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a,'Reduced model',header=TRUE) a<-table.element(a,gxy$Res.Df[2]) a<-table.element(a,gxy$Df[2]) a<-table.element(a,gxy$F[2]) a<-table.element(a,gxy$Pr[2]) a<-table.row.end(a) a<-table.end(a) table.save(a,file='mytable2.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