R version 2.9.0 (2009-04-17) Copyright (C) 2009 The R Foundation for Statistical Computing ISBN 3-900051-07-0 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > y <- c(255 + ,280.2 + ,299.9 + ,339.2 + ,374.2 + ,393.5 + ,389.2 + ,381.7 + ,375.2 + ,369 + ,357.4 + ,352.1 + ,346.5 + ,342.9 + ,340.3 + ,328.3 + ,322.9 + ,314.3 + ,308.9 + ,294 + ,285.6 + ,281.2 + ,280.3 + ,278.8 + ,274.5 + ,270.4 + ,263.4 + ,259.9 + ,258 + ,262.7 + ,284.7 + ,311.3 + ,322.1 + ,327 + ,331.3 + ,333.3 + ,321.4 + ,327 + ,320 + ,314.7 + ,316.7 + ,314.4 + ,321.3 + ,318.2 + ,307.2 + ,301.3 + ,287.5 + ,277.7 + ,274.4 + ,258.8 + ,253.3 + ,251 + ,248.4 + ,249.5 + ,246.1 + ,244.5 + ,243.6 + ,244 + ,240.8 + ,249.8 + ,248 + ,259.4 + ,260.5 + ,260.8 + ,261.3 + ,259.5 + ,256.6 + ,257.9 + ,256.5 + ,254.2 + ,253.3 + ,253.8 + ,255.5 + ,257.1 + ,257.3 + ,253.2 + ,252.8 + ,252 + ,250.7 + ,252.2 + ,250 + ,251 + ,253.4 + ,251.2 + ,255.6 + ,261.1 + ,258.9 + ,259.9 + ,261.2 + ,264.7 + ,267.1 + ,266.4 + ,267.7 + ,268.6 + ,267.5 + ,268.5 + ,268.5 + ,270.5 + ,270.9 + ,270.1 + ,269.3 + ,269.8 + ,270.1 + ,264.9 + ,263.7 + ,264.8 + ,263.7 + ,255.9 + ,276.2 + ,360.1 + ,380.5 + ,373.7 + ,369.8 + ,366.6 + ,359.3 + ,345.8 + ,326.2 + ,324.5 + ,328.1 + ,327.5 + ,324.4 + ,316.5 + ,310.9 + ,301.5 + ,291.7 + ,290.4 + ,287.4 + ,277.7 + ,281.6 + ,288 + ,276 + ,272.9 + ,283 + ,283.3 + ,276.8 + ,284.5 + ,282.7 + ,281.2 + ,287.4 + ,283.1 + ,284 + ,285.5 + ,289.2 + ,292.5 + ,296.4 + ,305.2 + ,303.9 + ,311.5 + ,316.3 + ,316.7 + ,322.5 + ,317.1 + ,309.8 + ,303.8 + ,290.3 + ,293.7 + ,291.7 + ,296.5 + ,289.1 + ,288.5 + ,293.8 + ,297.7 + ,305.4 + ,302.7 + ,302.5 + ,303 + ,294.5 + ,294.1 + ,294.5 + ,297.1 + ,289.4 + ,292.4 + ,287.9 + ,286.6 + ,280.5 + ,272.4 + ,269.2 + ,270.6 + ,267.3 + ,262.5 + ,266.8 + ,268.8 + ,263.1 + ,261.2 + ,266 + ,262.5 + ,265.2 + ,261.3 + ,253.7 + ,249.2 + ,239.1 + ,236.4 + ,235.2 + ,245.2 + ,246.2 + ,247.7 + ,251.4 + ,253.3 + ,254.8 + ,250 + ,249.3 + ,241.5 + ,243.3 + ,248 + ,253 + ,252.9 + ,251.5 + ,251.6 + ,253.5 + ,259.8 + ,334.1 + ,448 + ,445.8 + ,445 + ,448.2 + ,438.2 + ,439.8 + ,423.4 + ,410.8 + ,408.4 + ,406.7 + ,405.9 + ,402.7 + ,405.1 + ,399.6 + ,386.5 + ,381.4 + ,375.2 + ,357.7 + ,359 + ,355 + ,352.7 + ,344.4 + ,343.8 + ,338 + ,339 + ,333.3 + ,334.4 + ,328.3 + ,330.7 + ,330 + ,331.6 + ,351.2 + ,389.4 + ,410.9 + ,442.8 + ,462.8 + ,466.9 + ,461.7 + ,439.2 + ,430.3 + ,416.1 + ,402.5 + ,397.3 + ,403.3 + ,395.9 + ,387.8 + ,378.6 + ,377.1 + ,370.4 + ,362 + ,350.3 + ,348.2 + ,344.6 + ,343.5 + ,342.8 + ,347.6 + ,346.6 + ,349.5 + ,342.1 + ,342 + ,342.8 + ,339.3 + ,348.2 + ,333.7 + ,334.7 + ,354 + ,367.7 + ,363.3 + ,358.4 + ,353.1 + ,343.1 + ,344.6 + ,344.4 + ,333.9 + ,331.7 + ,324.3 + ,321.2 + ,322.4 + ,321.7 + ,320.5 + ,312.8 + ,309.7 + ,315.6 + ,309.7 + ,304.6 + ,302.5 + ,301.5 + ,298.8 + ,291.3 + ,293.6 + ,294.6 + ,285.9 + ,297.6 + ,301.1 + ,293.8 + ,297.7 + ,292.9 + ,292.1 + ,287.2 + ,288.2 + ,283.8 + ,299.9 + ,292.4 + ,293.3 + ,300.8 + ,293.7 + ,293.1 + ,294.4 + ,292.1 + ,291.9 + ,282.5 + ,277.9 + ,287.5 + ,289.2 + ,285.6 + ,293.2 + ,290.8 + ,283.1 + ,275 + ,287.8 + ,287.8 + ,287.4 + ,284 + ,277.8 + ,277.6 + ,304.9 + ,294 + ,300.9 + ,324 + ,332.9 + ,341.6 + ,333.4 + ,348.2 + ,344.7 + ,344.7 + ,329.3 + ,323.5 + ,323.2 + ,317.4 + ,330.1 + ,329.2 + ,334.9 + ,315.8 + ,315.4 + ,319.6 + ,317.3 + ,313.8 + ,315.8) > x <- c(87.28 + ,87.28 + ,87.09 + ,86.92 + ,87.59 + ,90.72 + ,90.69 + ,90.3 + ,89.55 + ,88.94 + ,88.41 + ,87.82 + ,87.07 + ,86.82 + ,86.4 + ,86.02 + ,85.66 + ,85.32 + ,85 + ,84.67 + ,83.94 + ,82.83 + ,81.95 + ,81.19 + ,80.48 + ,78.86 + ,69.47 + ,68.77 + ,70.06 + ,73.95 + ,75.8 + ,77.79 + ,81.57 + ,83.07 + ,84.34 + ,85.1 + ,85.25 + ,84.26 + ,83.63 + ,86.44 + ,85.3 + ,84.1 + ,83.36 + ,82.48 + ,81.58 + ,80.47 + ,79.34 + ,82.13 + ,81.69 + ,80.7 + ,79.88 + ,79.16 + ,78.38 + ,77.42 + ,76.47 + ,75.46 + ,74.48 + ,78.27 + ,80.7 + ,79.91 + ,78.75 + ,77.78 + ,81.14 + ,81.08 + ,80.03 + ,78.91 + ,78.01 + ,76.9 + ,75.97 + ,81.93 + ,80.27 + ,78.67 + ,77.42 + ,76.16 + ,74.7 + ,76.39 + ,76.04 + ,74.65 + ,73.29 + ,71.79 + ,74.39 + ,74.91 + ,74.54 + ,73.08 + ,72.75 + ,71.32 + ,70.38 + ,70.35 + ,70.01 + ,69.36 + ,67.77 + ,69.26 + ,69.8 + ,68.38 + ,67.62 + ,68.39 + ,66.95 + ,65.21 + ,66.64 + ,63.45 + ,60.66 + ,62.34 + ,60.32 + ,58.64 + ,60.46 + ,58.59 + ,61.87 + ,61.85 + ,67.44 + ,77.06 + ,91.74 + ,93.15 + ,94.15 + ,93.11 + ,91.51 + ,89.96 + ,88.16 + ,86.98 + ,88.03 + ,86.24 + ,84.65 + ,83.23 + ,81.7 + ,80.25 + ,78.8 + ,77.51 + ,76.2 + ,75.04 + ,74 + ,75.49 + ,77.14 + ,76.15 + ,76.27 + ,78.19 + ,76.49 + ,77.31 + ,76.65 + ,74.99 + ,73.51 + ,72.07 + ,70.59 + ,71.96 + ,76.29 + ,74.86 + ,74.93 + ,71.9 + ,71.01 + ,77.47 + ,75.78 + ,76.6 + ,76.07 + ,74.57 + ,73.02 + ,72.65 + ,73.16 + ,71.53 + ,69.78 + ,67.98 + ,69.96 + ,72.16 + ,70.47 + ,68.86 + ,67.37 + ,65.87 + ,72.16 + ,71.34 + ,69.93 + ,68.44 + ,67.16 + ,66.01 + ,67.25 + ,70.91 + ,69.75 + ,68.59 + ,67.48 + ,66.31 + ,64.81 + ,66.58 + ,65.97 + ,64.7 + ,64.7 + ,60.94 + ,59.08 + ,58.42 + ,57.77 + ,57.11 + ,53.31 + ,49.96 + ,49.4 + ,48.84 + ,48.3 + ,47.74 + ,47.24 + ,46.76 + ,46.29 + ,48.9 + ,49.23 + ,48.53 + ,48.03 + ,54.34 + ,53.79 + ,53.24 + ,52.96 + ,52.17 + ,51.7 + ,58.55 + ,78.2 + ,77.03 + ,76.19 + ,77.15 + ,75.87 + ,95.47 + ,109.67 + ,112.28 + ,112.01 + ,107.93 + ,105.96 + ,105.06 + ,102.98 + ,102.2 + ,105.23 + ,101.85 + ,99.89 + ,96.23 + ,94.76 + ,91.51 + ,91.63 + ,91.54 + ,85.23 + ,87.83 + ,87.38 + ,84.44 + ,85.19 + ,84.03 + ,86.73 + ,102.52 + ,104.45 + ,106.98 + ,107.02 + ,99.26 + ,94.45 + ,113.44 + ,157.33 + ,147.38 + ,171.89 + ,171.95 + ,132.71 + ,126.02 + ,121.18 + ,115.45 + ,110.48 + ,117.85 + ,117.63 + ,124.65 + ,109.59 + ,111.27 + ,99.78 + ,98.21 + ,99.2 + ,97.97 + ,89.55 + ,87.91 + ,93.34 + ,94.42 + ,93.2 + ,90.29 + ,91.46 + ,89.98 + ,88.35 + ,88.41 + ,82.44 + ,79.89 + ,75.69 + ,75.66 + ,84.5 + ,96.73 + ,87.48 + ,82.39 + ,83.48 + ,79.31 + ,78.16 + ,72.77 + ,72.45 + ,68.46 + ,67.62 + ,68.76 + ,70.07 + ,68.55 + ,65.3 + ,58.96 + ,59.17 + ,62.37 + ,66.28 + ,55.62 + ,55.23 + ,55.85 + ,56.75 + ,50.89 + ,53.88 + ,52.95 + ,55.08 + ,53.61 + ,58.78 + ,61.85 + ,55.91 + ,53.32 + ,46.41 + ,44.57 + ,50 + ,50 + ,53.36 + ,46.23 + ,50.45 + ,49.07 + ,45.85 + ,48.45 + ,49.96 + ,46.53 + ,50.51 + ,47.58 + ,48.05 + ,46.84 + ,47.67 + ,49.16 + ,55.54 + ,55.82 + ,58.22 + ,56.19 + ,57.77 + ,63.19 + ,54.76 + ,55.74 + ,62.54 + ,61.39 + ,69.6 + ,79.23 + ,80 + ,93.68 + ,107.63 + ,100.18 + ,97.3 + ,90.45 + ,80.64 + ,80.58 + ,75.82 + ,85.59 + ,89.35 + ,89.42 + ,104.73 + ,95.32 + ,89.27 + ,90.44 + ,86.97 + ,79.98 + ,81.22 + ,87.35 + ,83.64 + ,82.22 + ,94.4) > par8 = '11' > par7 = '0' > par6 = '0' > par5 = '1' > par4 = '12' > par3 = '0' > par2 = '0' > par1 = '1' > #'GNU S' R Code compiled by R2WASP v. 1.0.44 () > #Author: Prof. Dr. P. Wessa > #To cite this work: Wessa P., (2008), Bivariate Granger Causality (v1.0.0) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_grangercausality.wasp/ > #Source of accompanying publication: Office for Research, Development, and Education > #Technical description: > library(lmtest) Loading required package: zoo Attaching package: 'zoo' The following object(s) are masked from package:base : as.Date.numeric > 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) > x [1] 86.28 86.28 86.09 85.92 86.59 89.72 89.69 89.30 88.55 87.94 [11] 87.41 86.82 86.07 85.82 85.40 85.02 84.66 84.32 84.00 83.67 [21] 82.94 81.83 80.95 80.19 79.48 77.86 68.47 67.77 69.06 72.95 [31] 74.80 76.79 80.57 82.07 83.34 84.10 84.25 83.26 82.63 85.44 [41] 84.30 83.10 82.36 81.48 80.58 79.47 78.34 81.13 80.69 79.70 [51] 78.88 78.16 77.38 76.42 75.47 74.46 73.48 77.27 79.70 78.91 [61] 77.75 76.78 80.14 80.08 79.03 77.91 77.01 75.90 74.97 80.93 [71] 79.27 77.67 76.42 75.16 73.70 75.39 75.04 73.65 72.29 70.79 [81] 73.39 73.91 73.54 72.08 71.75 70.32 69.38 69.35 69.01 68.36 [91] 66.77 68.26 68.80 67.38 66.62 67.39 65.95 64.21 65.64 62.45 [101] 59.66 61.34 59.32 57.64 59.46 57.59 60.87 60.85 66.44 76.06 [111] 90.74 92.15 93.15 92.11 90.51 88.96 87.16 85.98 87.03 85.24 [121] 83.65 82.23 80.70 79.25 77.80 76.51 75.20 74.04 73.00 74.49 [131] 76.14 75.15 75.27 77.19 75.49 76.31 75.65 73.99 72.51 71.07 [141] 69.59 70.96 75.29 73.86 73.93 70.90 70.01 76.47 74.78 75.60 [151] 75.07 73.57 72.02 71.65 72.16 70.53 68.78 66.98 68.96 71.16 [161] 69.47 67.86 66.37 64.87 71.16 70.34 68.93 67.44 66.16 65.01 [171] 66.25 69.91 68.75 67.59 66.48 65.31 63.81 65.58 64.97 63.70 [181] 63.70 59.94 58.08 57.42 56.77 56.11 52.31 48.96 48.40 47.84 [191] 47.30 46.74 46.24 45.76 45.29 47.90 48.23 47.53 47.03 53.34 [201] 52.79 52.24 51.96 51.17 50.70 57.55 77.20 76.03 75.19 76.15 [211] 74.87 94.47 108.67 111.28 111.01 106.93 104.96 104.06 101.98 101.20 [221] 104.23 100.85 98.89 95.23 93.76 90.51 90.63 90.54 84.23 86.83 [231] 86.38 83.44 84.19 83.03 85.73 101.52 103.45 105.98 106.02 98.26 [241] 93.45 112.44 156.33 146.38 170.89 170.95 131.71 125.02 120.18 114.45 [251] 109.48 116.85 116.63 123.65 108.59 110.27 98.78 97.21 98.20 96.97 [261] 88.55 86.91 92.34 93.42 92.20 89.29 90.46 88.98 87.35 87.41 [271] 81.44 78.89 74.69 74.66 83.50 95.73 86.48 81.39 82.48 78.31 [281] 77.16 71.77 71.45 67.46 66.62 67.76 69.07 67.55 64.30 57.96 [291] 58.17 61.37 65.28 54.62 54.23 54.85 55.75 49.89 52.88 51.95 [301] 54.08 52.61 57.78 60.85 54.91 52.32 45.41 43.57 49.00 49.00 [311] 52.36 45.23 49.45 48.07 44.85 47.45 48.96 45.53 49.51 46.58 [321] 47.05 45.84 46.67 48.16 54.54 54.82 57.22 55.19 56.77 62.19 [331] 53.76 54.74 61.54 60.39 68.60 78.23 79.00 92.68 106.63 99.18 [341] 96.30 89.45 79.64 79.58 74.82 84.59 88.35 88.42 103.73 94.32 [351] 88.27 89.44 85.97 78.98 80.22 86.35 82.64 81.22 93.40 > y [1] 254.0 279.2 298.9 338.2 373.2 392.5 388.2 380.7 374.2 368.0 356.4 351.1 [13] 345.5 341.9 339.3 327.3 321.9 313.3 307.9 293.0 284.6 280.2 279.3 277.8 [25] 273.5 269.4 262.4 258.9 257.0 261.7 283.7 310.3 321.1 326.0 330.3 332.3 [37] 320.4 326.0 319.0 313.7 315.7 313.4 320.3 317.2 306.2 300.3 286.5 276.7 [49] 273.4 257.8 252.3 250.0 247.4 248.5 245.1 243.5 242.6 243.0 239.8 248.8 [61] 247.0 258.4 259.5 259.8 260.3 258.5 255.6 256.9 255.5 253.2 252.3 252.8 [73] 254.5 256.1 256.3 252.2 251.8 251.0 249.7 251.2 249.0 250.0 252.4 250.2 [85] 254.6 260.1 257.9 258.9 260.2 263.7 266.1 265.4 266.7 267.6 266.5 267.5 [97] 267.5 269.5 269.9 269.1 268.3 268.8 269.1 263.9 262.7 263.8 262.7 254.9 [109] 275.2 359.1 379.5 372.7 368.8 365.6 358.3 344.8 325.2 323.5 327.1 326.5 [121] 323.4 315.5 309.9 300.5 290.7 289.4 286.4 276.7 280.6 287.0 275.0 271.9 [133] 282.0 282.3 275.8 283.5 281.7 280.2 286.4 282.1 283.0 284.5 288.2 291.5 [145] 295.4 304.2 302.9 310.5 315.3 315.7 321.5 316.1 308.8 302.8 289.3 292.7 [157] 290.7 295.5 288.1 287.5 292.8 296.7 304.4 301.7 301.5 302.0 293.5 293.1 [169] 293.5 296.1 288.4 291.4 286.9 285.6 279.5 271.4 268.2 269.6 266.3 261.5 [181] 265.8 267.8 262.1 260.2 265.0 261.5 264.2 260.3 252.7 248.2 238.1 235.4 [193] 234.2 244.2 245.2 246.7 250.4 252.3 253.8 249.0 248.3 240.5 242.3 247.0 [205] 252.0 251.9 250.5 250.6 252.5 258.8 333.1 447.0 444.8 444.0 447.2 437.2 [217] 438.8 422.4 409.8 407.4 405.7 404.9 401.7 404.1 398.6 385.5 380.4 374.2 [229] 356.7 358.0 354.0 351.7 343.4 342.8 337.0 338.0 332.3 333.4 327.3 329.7 [241] 329.0 330.6 350.2 388.4 409.9 441.8 461.8 465.9 460.7 438.2 429.3 415.1 [253] 401.5 396.3 402.3 394.9 386.8 377.6 376.1 369.4 361.0 349.3 347.2 343.6 [265] 342.5 341.8 346.6 345.6 348.5 341.1 341.0 341.8 338.3 347.2 332.7 333.7 [277] 353.0 366.7 362.3 357.4 352.1 342.1 343.6 343.4 332.9 330.7 323.3 320.2 [289] 321.4 320.7 319.5 311.8 308.7 314.6 308.7 303.6 301.5 300.5 297.8 290.3 [301] 292.6 293.6 284.9 296.6 300.1 292.8 296.7 291.9 291.1 286.2 287.2 282.8 [313] 298.9 291.4 292.3 299.8 292.7 292.1 293.4 291.1 290.9 281.5 276.9 286.5 [325] 288.2 284.6 292.2 289.8 282.1 274.0 286.8 286.8 286.4 283.0 276.8 276.6 [337] 303.9 293.0 299.9 323.0 331.9 340.6 332.4 347.2 343.7 343.7 328.3 322.5 [349] 322.2 316.4 329.1 328.2 333.9 314.8 314.4 318.6 316.3 312.8 314.8 > (gyx <- grangertest(y ~ x, order=par8)) Granger causality test Model 1: ~ Lags(, 1:11) + Lags(, 1:11) Model 2: ~ Lags(, 1:11) Res.Df Df F Pr(>F) 1 325 2 336 -11 3.1957 0.0003848 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > (gxy <- grangertest(x ~ y, order=par8)) Granger causality test Model 1: ~ Lags(, 1:11) + Lags(, 1:11) Model 2: ~ Lags(, 1:11) Res.Df Df F Pr(>F) 1 325 2 336 -11 2.0975 0.02014 * --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > postscript(file="/var/www/html/rcomp/tmp/1h2c21260448353.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > op <- par(mfrow=c(2,1)) > (r <- ccf(ox,oy,main='Cross Correlation Function (raw data)',ylab='CCF',xlab='Lag (k)')) Autocorrelations of series 'X', by lag -22 -21 -20 -19 -18 -17 -16 -15 -14 -13 -12 -11 -10 0.112 0.121 0.133 0.148 0.171 0.195 0.225 0.258 0.292 0.329 0.367 0.405 0.443 -9 -8 -7 -6 -5 -4 -3 -2 -1 0 1 2 3 0.481 0.520 0.562 0.607 0.653 0.689 0.714 0.726 0.725 0.710 0.684 0.647 0.602 4 5 6 7 8 9 10 11 12 13 14 15 16 0.562 0.527 0.495 0.465 0.435 0.404 0.370 0.339 0.315 0.292 0.275 0.263 0.250 17 18 19 20 21 22 0.242 0.242 0.242 0.241 0.241 0.240 > (r <- ccf(x,y,main='Cross Correlation Function (transformed and differenced)',ylab='CCF',xlab='Lag (k)')) Autocorrelations of series 'X', by lag -22 -21 -20 -19 -18 -17 -16 -15 -14 -13 -12 -11 -10 0.112 0.121 0.133 0.148 0.171 0.195 0.225 0.258 0.292 0.329 0.367 0.405 0.443 -9 -8 -7 -6 -5 -4 -3 -2 -1 0 1 2 3 0.481 0.520 0.562 0.607 0.653 0.689 0.714 0.726 0.725 0.710 0.684 0.647 0.602 4 5 6 7 8 9 10 11 12 13 14 15 16 0.562 0.527 0.495 0.465 0.435 0.404 0.370 0.339 0.315 0.292 0.275 0.263 0.250 17 18 19 20 21 22 0.242 0.242 0.242 0.241 0.241 0.240 > par(op) > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/276661260448353.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > 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() null device 1 > postscript(file="/var/www/html/rcomp/tmp/3icq31260448353.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > 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() null device 1 > > #Note: the /var/www/html/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/html/rcomp/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="/var/www/html/rcomp/tmp/44roi1260448353.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="/var/www/html/rcomp/tmp/5exzk1260448353.tab") > > system("convert tmp/1h2c21260448353.ps tmp/1h2c21260448353.png") > system("convert tmp/276661260448353.ps tmp/276661260448353.png") > system("convert tmp/3icq31260448353.ps tmp/3icq31260448353.png") > > > proc.time() user system elapsed 1.128 0.511 1.648