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(299.90 + ,339.20 + ,374.20 + ,393.50 + ,389.20 + ,381.70 + ,375.20 + ,369.00 + ,357.40 + ,352.10 + ,346.50 + ,342.90 + ,340.30 + ,328.30 + ,322.90 + ,314.30 + ,308.90 + ,294.00 + ,285.60 + ,281.20 + ,280.30 + ,278.80 + ,274.50 + ,270.40 + ,263.40 + ,259.90 + ,258.00 + ,262.70 + ,284.70 + ,311.30 + ,322.10 + ,327.00 + ,331.30 + ,333.30 + ,321.40 + ,327.00 + ,320.00 + ,314.70 + ,316.70 + ,314.40 + ,321.30 + ,318.20 + ,307.20 + ,301.30 + ,287.50 + ,277.70 + ,274.40 + ,258.80 + ,253.30 + ,251.00 + ,248.40 + ,249.50 + ,246.10 + ,244.50 + ,243.60 + ,244.00 + ,240.80 + ,249.80 + ,248.00 + ,259.40 + ,260.50 + ,260.80 + ,261.30 + ,259.50 + ,256.60 + ,257.90 + ,256.50 + ,254.20 + ,253.30 + ,253.80 + ,255.50 + ,257.10 + ,257.30 + ,253.20 + ,252.80 + ,252.00 + ,250.70 + ,252.20 + ,250.00 + ,251.00 + ,253.40 + ,251.20 + ,255.60 + ,261.10 + ,258.90 + ,259.90 + ,261.20 + ,264.70 + ,267.10 + ,266.40 + ,267.70 + ,268.60 + ,267.50 + ,268.50 + ,268.50 + ,270.50 + ,270.90 + ,270.10 + ,269.30 + ,269.80 + ,270.10 + ,264.90 + ,263.70 + ,264.80 + ,263.70 + ,255.90 + ,276.20 + ,360.10 + ,380.50 + ,373.70 + ,369.80 + ,366.60 + ,359.30 + ,345.80 + ,326.20 + ,324.50 + ,328.10 + ,327.50 + ,324.40 + ,316.50 + ,310.90 + ,301.50 + ,291.70 + ,290.40 + ,287.40 + ,277.70 + ,281.60 + ,288.00 + ,276.00 + ,272.90 + ,283.00 + ,283.30 + ,276.80 + ,284.50 + ,282.70 + ,281.20 + ,287.40 + ,283.10 + ,284.00 + ,285.50 + ,289.20 + ,292.50 + ,296.40 + ,305.20 + ,303.90 + ,311.50 + ,316.30 + ,316.70 + ,322.50 + ,317.10 + ,309.80 + ,303.80 + ,290.30 + ,293.70 + ,291.70 + ,296.50 + ,289.10 + ,288.50 + ,293.80 + ,297.70 + ,305.40 + ,302.70 + ,302.50 + ,303.00 + ,294.50 + ,294.10 + ,294.50 + ,297.10 + ,289.40 + ,292.40 + ,287.90 + ,286.60 + ,280.50 + ,272.40 + ,269.20 + ,270.60 + ,267.30 + ,262.50 + ,266.80 + ,268.80 + ,263.10 + ,261.20 + ,266.00 + ,262.50 + ,265.20 + ,261.30 + ,253.70 + ,249.20 + ,239.10 + ,236.40 + ,235.20 + ,245.20 + ,246.20 + ,247.70 + ,251.40 + ,253.30 + ,254.80 + ,250.00 + ,249.30 + ,241.50 + ,243.30 + ,248.00 + ,253.00 + ,252.90 + ,251.50 + ,251.60 + ,253.50 + ,259.80 + ,334.10 + ,448.00 + ,445.80 + ,445.00 + ,448.20 + ,438.20 + ,439.80 + ,423.40 + ,410.80 + ,408.40 + ,406.70 + ,405.90 + ,402.70 + ,405.10 + ,399.60 + ,386.50 + ,381.40 + ,375.20 + ,357.70 + ,359.00 + ,355.00 + ,352.70 + ,344.40 + ,343.80 + ,338.00 + ,339.00 + ,333.30 + ,334.40 + ,328.30 + ,330.70 + ,330.00 + ,331.60 + ,351.20 + ,389.40 + ,410.90 + ,442.80 + ,462.80 + ,466.90 + ,461.70 + ,439.20 + ,430.30 + ,416.10 + ,402.50 + ,397.30 + ,403.30 + ,395.90 + ,387.80 + ,378.60 + ,377.10 + ,370.40 + ,362.00 + ,350.30 + ,348.20 + ,344.60 + ,343.50 + ,342.80 + ,347.60 + ,346.60 + ,349.50 + ,342.10 + ,342.00 + ,342.80 + ,339.30 + ,348.20 + ,333.70 + ,334.70 + ,354.00 + ,367.70 + ,363.30 + ,358.40 + ,353.10 + ,343.10 + ,344.60 + ,344.40 + ,333.90 + ,331.70 + ,324.30 + ,321.20 + ,322.40 + ,321.70 + ,320.50 + ,312.80 + ,309.70 + ,315.60 + ,309.70 + ,304.60 + ,302.50 + ,301.50 + ,298.80 + ,291.30 + ,293.60 + ,294.60 + ,285.90 + ,297.60 + ,301.10 + ,293.80 + ,297.70 + ,292.90 + ,292.10 + ,287.20 + ,288.20 + ,283.80 + ,299.90 + ,292.40 + ,293.30 + ,300.80 + ,293.70 + ,293.10 + ,294.40 + ,292.10 + ,291.90 + ,282.50 + ,277.90 + ,287.50 + ,289.20 + ,285.60 + ,293.20 + ,290.80 + ,283.10 + ,275.00 + ,287.80 + ,287.80 + ,287.40 + ,284.00 + ,277.80 + ,277.60 + ,304.90 + ,294.00 + ,300.90 + ,324.00 + ,332.90 + ,341.60 + ,333.40 + ,348.20 + ,344.70 + ,344.70 + ,329.30 + ,323.50 + ,323.20 + ,317.40 + ,330.10 + ,329.20 + ,334.90 + ,315.80 + ,315.40 + ,319.60 + ,317.30 + ,313.80 + ,315.80 + ,311.30) > x <- c(87.28 + ,87.28 + ,87.09 + ,86.92 + ,87.59 + ,90.72 + ,90.69 + ,90.30 + ,89.55 + ,88.94 + ,88.41 + ,87.82 + ,87.07 + ,86.82 + ,86.40 + ,86.02 + ,85.66 + ,85.32 + ,85.00 + ,84.67 + ,83.94 + ,82.83 + ,81.95 + ,81.19 + ,80.48 + ,78.86 + ,69.47 + ,68.77 + ,70.06 + ,73.95 + ,75.80 + ,77.79 + ,81.57 + ,83.07 + ,84.34 + ,85.10 + ,85.25 + ,84.26 + ,83.63 + ,86.44 + ,85.30 + ,84.10 + ,83.36 + ,82.48 + ,81.58 + ,80.47 + ,79.34 + ,82.13 + ,81.69 + ,80.70 + ,79.88 + ,79.16 + ,78.38 + ,77.42 + ,76.47 + ,75.46 + ,74.48 + ,78.27 + ,80.70 + ,79.91 + ,78.75 + ,77.78 + ,81.14 + ,81.08 + ,80.03 + ,78.91 + ,78.01 + ,76.90 + ,75.97 + ,81.93 + ,80.27 + ,78.67 + ,77.42 + ,76.16 + ,74.70 + ,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.80 + ,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.70 + ,80.25 + ,78.80 + ,77.51 + ,76.20 + ,75.04 + ,74.00 + ,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.90 + ,71.01 + ,77.47 + ,75.78 + ,76.60 + ,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.70 + ,64.70 + ,60.94 + ,59.08 + ,58.42 + ,57.77 + ,57.11 + ,53.31 + ,49.96 + ,49.40 + ,48.84 + ,48.30 + ,47.74 + ,47.24 + ,46.76 + ,46.29 + ,48.90 + ,49.23 + ,48.53 + ,48.03 + ,54.34 + ,53.79 + ,53.24 + ,52.96 + ,52.17 + ,51.70 + ,58.55 + ,78.20 + ,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.20 + ,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.20 + ,97.97 + ,89.55 + ,87.91 + ,93.34 + ,94.42 + ,93.20 + ,90.29 + ,91.46 + ,89.98 + ,88.35 + ,88.41 + ,82.44 + ,79.89 + ,75.69 + ,75.66 + ,84.50 + ,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.30 + ,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.00 + ,50.00 + ,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.60 + ,79.23 + ,80.00 + ,93.68 + ,107.63 + ,100.18 + ,97.30 + ,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) > par8 = '3' > 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#output/ > #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 <- 6 > 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 > y [1] 298.9 338.2 373.2 392.5 388.2 380.7 374.2 368.0 356.4 351.1 345.5 341.9 [13] 339.3 327.3 321.9 313.3 307.9 293.0 284.6 280.2 279.3 277.8 273.5 269.4 [25] 262.4 258.9 257.0 261.7 283.7 310.3 321.1 326.0 330.3 332.3 320.4 326.0 [37] 319.0 313.7 315.7 313.4 320.3 317.2 306.2 300.3 286.5 276.7 273.4 257.8 [49] 252.3 250.0 247.4 248.5 245.1 243.5 242.6 243.0 239.8 248.8 247.0 258.4 [61] 259.5 259.8 260.3 258.5 255.6 256.9 255.5 253.2 252.3 252.8 254.5 256.1 [73] 256.3 252.2 251.8 251.0 249.7 251.2 249.0 250.0 252.4 250.2 254.6 260.1 [85] 257.9 258.9 260.2 263.7 266.1 265.4 266.7 267.6 266.5 267.5 267.5 269.5 [97] 269.9 269.1 268.3 268.8 269.1 263.9 262.7 263.8 262.7 254.9 275.2 359.1 [109] 379.5 372.7 368.8 365.6 358.3 344.8 325.2 323.5 327.1 326.5 323.4 315.5 [121] 309.9 300.5 290.7 289.4 286.4 276.7 280.6 287.0 275.0 271.9 282.0 282.3 [133] 275.8 283.5 281.7 280.2 286.4 282.1 283.0 284.5 288.2 291.5 295.4 304.2 [145] 302.9 310.5 315.3 315.7 321.5 316.1 308.8 302.8 289.3 292.7 290.7 295.5 [157] 288.1 287.5 292.8 296.7 304.4 301.7 301.5 302.0 293.5 293.1 293.5 296.1 [169] 288.4 291.4 286.9 285.6 279.5 271.4 268.2 269.6 266.3 261.5 265.8 267.8 [181] 262.1 260.2 265.0 261.5 264.2 260.3 252.7 248.2 238.1 235.4 234.2 244.2 [193] 245.2 246.7 250.4 252.3 253.8 249.0 248.3 240.5 242.3 247.0 252.0 251.9 [205] 250.5 250.6 252.5 258.8 333.1 447.0 444.8 444.0 447.2 437.2 438.8 422.4 [217] 409.8 407.4 405.7 404.9 401.7 404.1 398.6 385.5 380.4 374.2 356.7 358.0 [229] 354.0 351.7 343.4 342.8 337.0 338.0 332.3 333.4 327.3 329.7 329.0 330.6 [241] 350.2 388.4 409.9 441.8 461.8 465.9 460.7 438.2 429.3 415.1 401.5 396.3 [253] 402.3 394.9 386.8 377.6 376.1 369.4 361.0 349.3 347.2 343.6 342.5 341.8 [265] 346.6 345.6 348.5 341.1 341.0 341.8 338.3 347.2 332.7 333.7 353.0 366.7 [277] 362.3 357.4 352.1 342.1 343.6 343.4 332.9 330.7 323.3 320.2 321.4 320.7 [289] 319.5 311.8 308.7 314.6 308.7 303.6 301.5 300.5 297.8 290.3 292.6 293.6 [301] 284.9 296.6 300.1 292.8 296.7 291.9 291.1 286.2 287.2 282.8 298.9 291.4 [313] 292.3 299.8 292.7 292.1 293.4 291.1 290.9 281.5 276.9 286.5 288.2 284.6 [325] 292.2 289.8 282.1 274.0 286.8 286.8 286.4 283.0 276.8 276.6 303.9 293.0 [337] 299.9 323.0 331.9 340.6 332.4 347.2 343.7 343.7 328.3 322.5 322.2 316.4 [349] 329.1 328.2 333.9 314.8 314.4 318.6 316.3 312.8 314.8 310.3 > (gyx <- grangertest(y ~ x, order=par8)) Granger causality test Model 1: ~ Lags(, 1:6) + Lags(, 1:6) Model 2: ~ Lags(, 1:6) Res.Df Df F Pr(>F) 1 339 2 345 -6 2.557 0.01955 * --- 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:6) + Lags(, 1:6) Model 2: ~ Lags(, 1:6) Res.Df Df F Pr(>F) 1 339 2 345 -6 7.2619 2.61e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > postscript(file="/var/www/html/rcomp/tmp/1c8ji1260291435.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.105 0.109 0.113 0.122 0.134 0.149 0.172 0.196 0.225 0.259 0.293 0.330 0.369 -9 -8 -7 -6 -5 -4 -3 -2 -1 0 1 2 3 0.406 0.445 0.483 0.522 0.564 0.609 0.655 0.691 0.716 0.729 0.728 0.714 0.689 4 5 6 7 8 9 10 11 12 13 14 15 16 0.651 0.606 0.566 0.532 0.499 0.469 0.439 0.408 0.373 0.342 0.317 0.293 0.276 17 18 19 20 21 22 0.264 0.252 0.243 0.243 0.244 0.244 > (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.105 0.109 0.113 0.122 0.134 0.149 0.172 0.196 0.225 0.259 0.293 0.330 0.369 -9 -8 -7 -6 -5 -4 -3 -2 -1 0 1 2 3 0.406 0.445 0.483 0.522 0.564 0.609 0.655 0.691 0.716 0.729 0.728 0.714 0.689 4 5 6 7 8 9 10 11 12 13 14 15 16 0.651 0.606 0.566 0.532 0.499 0.469 0.439 0.408 0.373 0.342 0.317 0.293 0.276 17 18 19 20 21 22 0.264 0.252 0.243 0.243 0.244 0.244 > par(op) > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/24zni1260291435.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/3wmhj1260291435.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/4jakg1260291435.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/5s0jj1260291435.tab") > > system("convert tmp/1c8ji1260291435.ps tmp/1c8ji1260291435.png") > system("convert tmp/24zni1260291435.ps tmp/24zni1260291435.png") > system("convert tmp/3wmhj1260291435.ps tmp/3wmhj1260291435.png") > > > proc.time() user system elapsed 1.055 0.480 1.265