R version 2.15.2 (2012-10-26) -- "Trick or Treat" Copyright (C) 2012 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i686-pc-linux-gnu (32-bit) 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. > x <- array(list(44 + ,39.3 + ,43.6 + ,40.3 + ,44.4 + ,32.4 + ,44.3 + ,32.7 + ,43 + ,34.5 + ,42.2 + ,32.4 + ,41.4 + ,33.1 + ,42.1 + ,34.9 + ,41.6 + ,34.1 + ,43 + ,31.9 + ,42.8 + ,32.7 + ,41.5 + ,32.5 + ,40.2 + ,27.2 + ,41.4 + ,24.3 + ,41.4 + ,24 + ,41.7 + ,24.7 + ,41.4 + ,25.6 + ,42.9 + ,30.1 + ,43 + ,32.1 + ,43.3 + ,32.3 + ,44.6 + ,31 + ,48.1 + ,32.2 + ,49.3 + ,33.2 + ,51.9 + ,35.2 + ,51.5 + ,34.2 + ,50.8 + ,31 + ,50.2 + ,34.1 + ,50.4 + ,37.8 + ,51.4 + ,40.6 + ,49.2 + ,37.5 + ,49.7 + ,31.8 + ,51 + ,32.4 + ,48.8 + ,34.6 + ,47.2 + ,35.6 + ,47.7 + ,37 + ,50 + ,33.8 + ,52.3 + ,36.2 + ,54 + ,36.6 + ,55.2 + ,37.8 + ,58.6 + ,39.8 + ,60.1 + ,39.7 + ,64.9 + ,42.8 + ,65.6 + ,43.4 + ,64 + ,47.8 + ,61.6 + ,46.3 + ,57.1 + ,48.6 + ,51 + ,53.1 + ,49.9 + ,52.7 + ,48.5 + ,59 + ,49.9 + ,53.9 + ,51.7 + ,49.7 + ,51.3 + ,54.3 + ,53.2 + ,55.9 + ,59 + ,63.9 + ,57 + ,64 + ,57.7 + ,60.7 + ,59.4 + ,67.8 + ,58.8 + ,70.5 + ,55.9 + ,76.6 + ,53.8 + ,76.2 + ,54.2 + ,71.8 + ,54.2 + ,67.8 + ,56.7 + ,69.7 + ,59.8 + ,76.7 + ,60.7 + ,74.2 + ,59.7 + ,75.8 + ,60.2 + ,84.3 + ,61.3 + ,84.9 + ,59.8 + ,84.4 + ,61.2 + ,89.4 + ,59.3 + ,88.5 + ,59.4 + ,76.5 + ,63.1 + ,71.4 + ,68 + ,72.1 + ,69.4 + ,75.8 + ,70.2 + ,66.6 + ,72.6 + ,71.7 + ,72.1 + ,75.4 + ,69.7 + ,80.9 + ,71.5 + ,80.7 + ,75.7 + ,85 + ,76 + ,91.5 + ,76.4 + ,87.7 + ,83.8 + ,95.3 + ,86.2 + ,102.4 + ,88.5 + ,114.2 + ,95.9 + ,111.7 + ,103.1 + ,113.7 + ,113.5 + ,118.8 + ,115.7 + ,129 + ,113.1 + ,136.4 + ,112.7 + ,155 + ,121.9 + ,166 + ,120.3 + ,168.7 + ,108.7 + ,145.5 + ,102.8 + ,127.3 + ,83.4 + ,91.5 + ,79.4 + ,69 + ,77.8 + ,54 + ,85.7 + ,56.3 + ,83.2 + ,54.2 + ,82 + ,59.3 + ,86.9 + ,63.4 + ,95.7 + ,73.3 + ,97.9 + ,86.7 + ,89.3 + ,81.3 + ,91.5 + ,89.6 + ,86.8 + ,85.3 + ,91 + ,92.4 + ,93.8 + ,96.8 + ,96.8 + ,93.6 + ,95.7 + ,97.6 + ,91.4 + ,94.2 + ,88.7 + ,99.9 + ,88.2 + ,106.4 + ,87.7 + ,96 + ,89.5 + ,94.9 + ,95.6 + ,94.8 + ,100.5 + ,95.9 + ,106.3 + ,96.2 + ,112 + ,103.1 + ,117.7 + ,106.9 + ,125 + ,114.2 + ,132.4 + ,118.2 + ,138.1 + ,123.9 + ,134.7 + ,137.1 + ,136.7 + ,146.2 + ,134.3 + ,136.4 + ,131.6 + ,133.2 + ,129.8 + ,135.9 + ,131.9 + ,127.1 + ,129.8 + ,128.5 + ,119.4 + ,126.6 + ,116.7 + ,132.6 + ,112.8 + ,130.9 + ,116 + ,134.1 + ,117.5 + ,141.1 + ,118.8 + ,147 + ,118.7 + ,141.3 + ,116.3 + ,129.6 + ,115.2 + ,113.3 + ,131.7 + ,120.5 + ,133.7 + ,131.2 + ,132.5 + ,132.1 + ,126.9 + ,128.3) + ,dim=c(2 + ,145) + ,dimnames=list(c('Levensmiddelen' + ,'Grondstoffen') + ,1:145)) > y <- array(NA,dim=c(2,145),dimnames=list(c('Levensmiddelen','Grondstoffen'),1:145)) > for (i in 1:dim(x)[1]) + { + for (j in 1:dim(x)[2]) + { + y[i,j] <- as.numeric(x[i,j]) + } + } > par3 = 'No Linear Trend' > par2 = 'Do not include Seasonal Dummies' > par1 = '2' > library(lattice) > library(lmtest) Loading required package: zoo Attaching package: 'zoo' The following object(s) are masked from 'package:base': as.Date, as.Date.numeric > n25 <- 25 #minimum number of obs. for Goldfeld-Quandt test > par1 <- as.numeric(par1) > x <- t(y) > k <- length(x[1,]) > n <- length(x[,1]) > x1 <- cbind(x[,par1], x[,1:k!=par1]) > mycolnames <- c(colnames(x)[par1], colnames(x)[1:k!=par1]) > colnames(x1) <- mycolnames #colnames(x)[par1] > x <- x1 > if (par3 == 'First Differences'){ + x2 <- array(0, dim=c(n-1,k), dimnames=list(1:(n-1), paste('(1-B)',colnames(x),sep=''))) + for (i in 1:n-1) { + for (j in 1:k) { + x2[i,j] <- x[i+1,j] - x[i,j] + } + } + x <- x2 + } > if (par2 == 'Include Monthly Dummies'){ + x2 <- array(0, dim=c(n,11), dimnames=list(1:n, paste('M', seq(1:11), sep =''))) + for (i in 1:11){ + x2[seq(i,n,12),i] <- 1 + } + x <- cbind(x, x2) + } > if (par2 == 'Include Quarterly Dummies'){ + x2 <- array(0, dim=c(n,3), dimnames=list(1:n, paste('Q', seq(1:3), sep =''))) + for (i in 1:3){ + x2[seq(i,n,4),i] <- 1 + } + x <- cbind(x, x2) + } > k <- length(x[1,]) > if (par3 == 'Linear Trend'){ + x <- cbind(x, c(1:n)) + colnames(x)[k+1] <- 't' + } > x Grondstoffen Levensmiddelen 1 39.3 44.0 2 40.3 43.6 3 32.4 44.4 4 32.7 44.3 5 34.5 43.0 6 32.4 42.2 7 33.1 41.4 8 34.9 42.1 9 34.1 41.6 10 31.9 43.0 11 32.7 42.8 12 32.5 41.5 13 27.2 40.2 14 24.3 41.4 15 24.0 41.4 16 24.7 41.7 17 25.6 41.4 18 30.1 42.9 19 32.1 43.0 20 32.3 43.3 21 31.0 44.6 22 32.2 48.1 23 33.2 49.3 24 35.2 51.9 25 34.2 51.5 26 31.0 50.8 27 34.1 50.2 28 37.8 50.4 29 40.6 51.4 30 37.5 49.2 31 31.8 49.7 32 32.4 51.0 33 34.6 48.8 34 35.6 47.2 35 37.0 47.7 36 33.8 50.0 37 36.2 52.3 38 36.6 54.0 39 37.8 55.2 40 39.8 58.6 41 39.7 60.1 42 42.8 64.9 43 43.4 65.6 44 47.8 64.0 45 46.3 61.6 46 48.6 57.1 47 53.1 51.0 48 52.7 49.9 49 59.0 48.5 50 53.9 49.9 51 49.7 51.7 52 54.3 51.3 53 55.9 53.2 54 63.9 59.0 55 64.0 57.0 56 60.7 57.7 57 67.8 59.4 58 70.5 58.8 59 76.6 55.9 60 76.2 53.8 61 71.8 54.2 62 67.8 54.2 63 69.7 56.7 64 76.7 59.8 65 74.2 60.7 66 75.8 59.7 67 84.3 60.2 68 84.9 61.3 69 84.4 59.8 70 89.4 61.2 71 88.5 59.3 72 76.5 59.4 73 71.4 63.1 74 72.1 68.0 75 75.8 69.4 76 66.6 70.2 77 71.7 72.6 78 75.4 72.1 79 80.9 69.7 80 80.7 71.5 81 85.0 75.7 82 91.5 76.0 83 87.7 76.4 84 95.3 83.8 85 102.4 86.2 86 114.2 88.5 87 111.7 95.9 88 113.7 103.1 89 118.8 113.5 90 129.0 115.7 91 136.4 113.1 92 155.0 112.7 93 166.0 121.9 94 168.7 120.3 95 145.5 108.7 96 127.3 102.8 97 91.5 83.4 98 69.0 79.4 99 54.0 77.8 100 56.3 85.7 101 54.2 83.2 102 59.3 82.0 103 63.4 86.9 104 73.3 95.7 105 86.7 97.9 106 81.3 89.3 107 89.6 91.5 108 85.3 86.8 109 92.4 91.0 110 96.8 93.8 111 93.6 96.8 112 97.6 95.7 113 94.2 91.4 114 99.9 88.7 115 106.4 88.2 116 96.0 87.7 117 94.9 89.5 118 94.8 95.6 119 95.9 100.5 120 96.2 106.3 121 103.1 112.0 122 106.9 117.7 123 114.2 125.0 124 118.2 132.4 125 123.9 138.1 126 137.1 134.7 127 146.2 136.7 128 136.4 134.3 129 133.2 131.6 130 135.9 129.8 131 127.1 131.9 132 128.5 129.8 133 126.6 119.4 134 132.6 116.7 135 130.9 112.8 136 134.1 116.0 137 141.1 117.5 138 147.0 118.8 139 141.3 118.7 140 129.6 116.3 141 113.3 115.2 142 120.5 131.7 143 131.2 133.7 144 132.1 132.5 145 128.3 126.9 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) Levensmiddelen -12.841 1.171 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -31.226 -11.291 -2.773 10.086 40.653 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) -12.84093 3.44655 -3.726 0.00028 *** Levensmiddelen 1.17114 0.04181 28.010 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 15 on 143 degrees of freedom Multiple R-squared: 0.8458, Adjusted R-squared: 0.8448 F-statistic: 784.5 on 1 and 143 DF, p-value: < 2.2e-16 > if (n > n25) { + kp3 <- k + 3 + nmkm3 <- n - k - 3 + gqarr <- array(NA, dim=c(nmkm3-kp3+1,3)) + numgqtests <- 0 + numsignificant1 <- 0 + numsignificant5 <- 0 + numsignificant10 <- 0 + for (mypoint in kp3:nmkm3) { + j <- 0 + numgqtests <- numgqtests + 1 + for (myalt in c('greater', 'two.sided', 'less')) { + j <- j + 1 + gqarr[mypoint-kp3+1,j] <- gqtest(mylm, point=mypoint, alternative=myalt)$p.value + } + if (gqarr[mypoint-kp3+1,2] < 0.01) numsignificant1 <- numsignificant1 + 1 + if (gqarr[mypoint-kp3+1,2] < 0.05) numsignificant5 <- numsignificant5 + 1 + if (gqarr[mypoint-kp3+1,2] < 0.10) numsignificant10 <- numsignificant10 + 1 + } + gqarr + } [,1] [,2] [,3] [1,] 2.464379e-02 4.928759e-02 0.975356205 [2,] 8.665539e-03 1.733108e-02 0.991334461 [3,] 1.933877e-03 3.867754e-03 0.998066123 [4,] 4.020812e-04 8.041624e-04 0.999597919 [5,] 7.617314e-05 1.523463e-04 0.999923827 [6,] 2.127788e-05 4.255576e-05 0.999978722 [7,] 4.456498e-06 8.912997e-06 0.999995544 [8,] 7.972472e-07 1.594494e-06 0.999999203 [9,] 3.544546e-07 7.089091e-07 0.999999646 [10,] 8.032976e-07 1.606595e-06 0.999999197 [11,] 8.561061e-07 1.712212e-06 0.999999144 [12,] 6.037875e-07 1.207575e-06 0.999999396 [13,] 2.292494e-07 4.584987e-07 0.999999771 [14,] 7.031413e-08 1.406283e-07 0.999999930 [15,] 1.703698e-08 3.407397e-08 0.999999983 [16,] 4.163706e-09 8.327411e-09 0.999999996 [17,] 2.353889e-09 4.707777e-09 0.999999998 [18,] 2.858333e-09 5.716666e-09 0.999999997 [19,] 1.157387e-09 2.314775e-09 0.999999999 [20,] 3.448332e-10 6.896663e-10 1.000000000 [21,] 1.012485e-10 2.024970e-10 1.000000000 [22,] 4.530644e-11 9.061287e-11 1.000000000 [23,] 1.175042e-11 2.350084e-11 1.000000000 [24,] 4.051344e-12 8.102688e-12 1.000000000 [25,] 2.168115e-12 4.336230e-12 1.000000000 [26,] 6.620815e-13 1.324163e-12 1.000000000 [27,] 2.640349e-13 5.280699e-13 1.000000000 [28,] 1.037748e-13 2.075496e-13 1.000000000 [29,] 2.708642e-14 5.417285e-14 1.000000000 [30,] 7.763272e-15 1.552654e-14 1.000000000 [31,] 2.659018e-15 5.318036e-15 1.000000000 [32,] 7.786627e-16 1.557325e-15 1.000000000 [33,] 2.157539e-16 4.315078e-16 1.000000000 [34,] 6.329182e-17 1.265836e-16 1.000000000 [35,] 1.878887e-17 3.757774e-17 1.000000000 [36,] 6.012090e-18 1.202418e-17 1.000000000 [37,] 2.118503e-18 4.237006e-18 1.000000000 [38,] 8.331919e-19 1.666384e-18 1.000000000 [39,] 3.510875e-19 7.021751e-19 1.000000000 [40,] 3.742458e-19 7.484916e-19 1.000000000 [41,] 2.867657e-19 5.735314e-19 1.000000000 [42,] 1.652528e-18 3.305057e-18 1.000000000 [43,] 1.397654e-15 2.795308e-15 1.000000000 [44,] 1.186943e-13 2.373886e-13 1.000000000 [45,] 8.940470e-11 1.788094e-10 1.000000000 [46,] 6.994371e-10 1.398874e-09 0.999999999 [47,] 1.036047e-09 2.072094e-09 0.999999999 [48,] 3.768133e-09 7.536266e-09 0.999999996 [49,] 1.113446e-08 2.226892e-08 0.999999989 [50,] 5.338781e-08 1.067756e-07 0.999999947 [51,] 2.242100e-07 4.484201e-07 0.999999776 [52,] 3.565347e-07 7.130694e-07 0.999999643 [53,] 1.063019e-06 2.126038e-06 0.999998937 [54,] 3.824712e-06 7.649423e-06 0.999996175 [55,] 4.485854e-05 8.971708e-05 0.999955141 [56,] 3.456215e-04 6.912431e-04 0.999654378 [57,] 8.726807e-04 1.745361e-03 0.999127319 [58,] 1.287083e-03 2.574166e-03 0.998712917 [59,] 1.609611e-03 3.219223e-03 0.998390389 [60,] 2.315247e-03 4.630494e-03 0.997684753 [61,] 2.415952e-03 4.831905e-03 0.997584048 [62,] 2.850079e-03 5.700158e-03 0.997149921 [63,] 5.497318e-03 1.099464e-02 0.994502682 [64,] 8.686667e-03 1.737333e-02 0.991313333 [65,] 1.420152e-02 2.840304e-02 0.985798478 [66,] 2.615950e-02 5.231901e-02 0.973840497 [67,] 5.036604e-02 1.007321e-01 0.949633961 [68,] 5.110685e-02 1.022137e-01 0.948893153 [69,] 4.087919e-02 8.175837e-02 0.959120814 [70,] 3.250533e-02 6.501065e-02 0.967494675 [71,] 2.552444e-02 5.104888e-02 0.974475559 [72,] 2.304844e-02 4.609689e-02 0.976951557 [73,] 1.963644e-02 3.927289e-02 0.980363557 [74,] 1.521816e-02 3.043633e-02 0.984781835 [75,] 1.200338e-02 2.400677e-02 0.987996617 [76,] 9.160352e-03 1.832070e-02 0.990839648 [77,] 6.999396e-03 1.399879e-02 0.993000604 [78,] 5.929555e-03 1.185911e-02 0.994070445 [79,] 4.673389e-03 9.346778e-03 0.995326611 [80,] 3.762539e-03 7.525078e-03 0.996237461 [81,] 3.235986e-03 6.471972e-03 0.996764014 [82,] 3.935616e-03 7.871231e-03 0.996064384 [83,] 3.602991e-03 7.205982e-03 0.996397009 [84,] 3.517676e-03 7.035352e-03 0.996482324 [85,] 4.230279e-03 8.460557e-03 0.995769721 [86,] 3.673845e-03 7.347689e-03 0.996326155 [87,] 3.441205e-03 6.882411e-03 0.996558795 [88,] 1.056147e-02 2.112293e-02 0.989438533 [89,] 2.934766e-02 5.869531e-02 0.970652343 [90,] 1.159223e-01 2.318446e-01 0.884077714 [91,] 2.348103e-01 4.696206e-01 0.765189694 [92,] 2.992184e-01 5.984368e-01 0.700781606 [93,] 2.923363e-01 5.846727e-01 0.707663652 [94,] 2.929041e-01 5.858083e-01 0.707095857 [95,] 4.034672e-01 8.069344e-01 0.596532802 [96,] 6.454011e-01 7.091978e-01 0.354598877 [97,] 8.293341e-01 3.413317e-01 0.170665861 [98,] 9.027993e-01 1.944013e-01 0.097200669 [99,] 9.605719e-01 7.885622e-02 0.039428111 [100,] 9.880339e-01 2.393220e-02 0.011966102 [101,] 9.910029e-01 1.799428e-02 0.008997139 [102,] 9.916467e-01 1.670669e-02 0.008353346 [103,] 9.895617e-01 2.087664e-02 0.010438320 [104,] 9.870956e-01 2.580870e-02 0.012904351 [105,] 9.827012e-01 3.459765e-02 0.017298824 [106,] 9.762762e-01 4.744758e-02 0.023723791 [107,] 9.736502e-01 5.269957e-02 0.026349783 [108,] 9.656757e-01 6.864855e-02 0.034324274 [109,] 9.557664e-01 8.846723e-02 0.044233615 [110,] 9.394180e-01 1.211640e-01 0.060581979 [111,] 9.287689e-01 1.424621e-01 0.071231059 [112,] 9.044645e-01 1.910709e-01 0.095535460 [113,] 8.762169e-01 2.475661e-01 0.123783056 [114,] 8.623875e-01 2.752250e-01 0.137612489 [115,] 8.794610e-01 2.410780e-01 0.120539018 [116,] 9.422698e-01 1.154604e-01 0.057730218 [117,] 9.777318e-01 4.453649e-02 0.022268247 [118,] 9.941964e-01 1.160720e-02 0.005803602 [119,] 9.973986e-01 5.202890e-03 0.002601445 [120,] 9.984146e-01 3.170852e-03 0.001585426 [121,] 9.983947e-01 3.210575e-03 0.001605287 [122,] 9.971239e-01 5.752111e-03 0.002876056 [123,] 9.980919e-01 3.816252e-03 0.001908126 [124,] 9.969107e-01 6.178606e-03 0.003089303 [125,] 9.942503e-01 1.149942e-02 0.005749710 [126,] 9.908343e-01 1.833143e-02 0.009165714 [127,] 9.833826e-01 3.323476e-02 0.016617380 [128,] 9.700022e-01 5.999553e-02 0.029997767 [129,] 9.523646e-01 9.527071e-02 0.047635356 [130,] 9.185436e-01 1.629127e-01 0.081456360 [131,] 8.706713e-01 2.586573e-01 0.129328656 [132,] 7.975135e-01 4.049731e-01 0.202486536 [133,] 7.468187e-01 5.063625e-01 0.253181251 [134,] 8.391249e-01 3.217501e-01 0.160875051 [135,] 9.232220e-01 1.535559e-01 0.076777966 [136,] 9.409504e-01 1.180992e-01 0.059049583 > postscript(file="/var/wessaorg/rcomp/tmp/13dfq1353078444.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(x[,1], type='l', main='Actuals and Interpolation', ylab='value of Actuals and Interpolation (dots)', xlab='time or index') > points(x[,1]-mysum$resid) > grid() > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/2bgyy1353078444.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(mysum$resid, type='b', pch=19, main='Residuals', ylab='value of Residuals', xlab='time or index') > grid() > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/3om4r1353078444.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > hist(mysum$resid, main='Residual Histogram', xlab='values of Residuals') > grid() > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/4covn1353078444.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > densityplot(~mysum$resid,col='black',main='Residual Density Plot', xlab='values of Residuals') > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/5twq61353078444.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > qqnorm(mysum$resid, main='Residual Normal Q-Q Plot') > qqline(mysum$resid) > grid() > dev.off() null device 1 > (myerror <- as.ts(mysum$resid)) Time Series: Start = 1 End = 145 Frequency = 1 1 2 3 4 5 6 0.61089926 2.07935413 -6.75755562 -6.34044190 -3.01796357 -4.18105383 7 8 9 10 11 12 -2.54414409 -1.56394011 -1.77837152 -5.61796357 -4.58373613 -3.26125781 13 14 15 16 17 18 -7.03877948 -11.34414409 -11.64414409 -11.29548524 -10.04414409 -7.30084985 19 20 21 22 23 24 -5.41796357 -5.56930472 -8.39178305 -11.29076317 -11.69612778 -12.74108443 25 26 27 28 29 30 -13.27262956 -15.65283354 -11.85015124 -8.38437867 -6.75551585 -7.27901406 31 32 33 34 35 36 -13.56458265 -14.48706098 -9.71055919 -6.83673971 -6.02230830 -11.91592380 37 38 39 40 41 42 -12.20953930 -13.80047250 -14.00583711 -15.98770351 -17.84440928 -20.36586772 43 44 45 46 47 48 -20.58566374 -14.31184426 -13.00111504 -5.43099775 6.21293902 7.10118992 49 50 51 52 53 54 15.04078196 8.30118992 1.99314300 7.06159787 6.43643724 7.64384162 55 56 57 58 59 60 10.08611597 5.96631995 11.07538675 14.47806905 23.97436686 26.03375493 61 62 63 64 65 66 21.16530006 17.16530006 16.13745712 19.50693188 15.95290842 18.72404559 67 68 69 70 71 72 26.63847701 25.95022611 27.20693188 30.56733983 31.89250046 19.77538675 73 74 75 76 77 78 10.34217920 5.30360703 7.36401499 -2.77289475 -0.48362397 3.80194461 79 80 81 82 83 84 12.11267384 9.80462692 9.18585078 15.33450963 11.06605476 9.99963966 85 86 87 88 89 90 14.28891043 23.39529493 12.22887983 5.79669216 -1.28313447 6.34036375 91 92 93 94 95 96 16.78532040 35.85377527 36.07931326 40.65313274 31.03832398 19.74803332 97 98 99 100 101 102 6.66809453 -11.14735677 -24.27353729 -31.22552098 -30.39767804 -23.89231343 103 104 105 106 107 108 -25.53088559 -25.93689274 -15.11339452 -10.44161481 -4.71811660 -3.51377187 109 110 111 112 113 114 -1.33254801 -0.21173210 -6.92514363 -1.63689274 -0.00100288 8.86106749 115 116 117 118 119 120 15.94663608 6.13220467 2.92415775 -4.31977902 -8.95835118 -15.45094680 121 122 123 124 125 126 -15.22642870 -18.10191060 -19.35121199 -24.01762709 -24.99310899 -7.81124259 127 128 129 130 131 132 -1.05351695 -8.04278772 -8.08071735 -3.27267043 -14.53205850 -10.67267043 133 134 135 136 137 138 -0.39284380 8.76922657 11.63666156 11.08902259 16.33231683 20.70983850 139 140 141 142 143 144 15.12695222 6.23768144 -8.77406766 -20.89783107 -12.54010542 -10.23474081 145 -7.47637262 > postscript(file="/var/wessaorg/rcomp/tmp/6uzwr1353078444.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > dum <- cbind(lag(myerror,k=1),myerror) > dum Time Series: Start = 0 End = 145 Frequency = 1 lag(myerror, k = 1) myerror 0 0.61089926 NA 1 2.07935413 0.61089926 2 -6.75755562 2.07935413 3 -6.34044190 -6.75755562 4 -3.01796357 -6.34044190 5 -4.18105383 -3.01796357 6 -2.54414409 -4.18105383 7 -1.56394011 -2.54414409 8 -1.77837152 -1.56394011 9 -5.61796357 -1.77837152 10 -4.58373613 -5.61796357 11 -3.26125781 -4.58373613 12 -7.03877948 -3.26125781 13 -11.34414409 -7.03877948 14 -11.64414409 -11.34414409 15 -11.29548524 -11.64414409 16 -10.04414409 -11.29548524 17 -7.30084985 -10.04414409 18 -5.41796357 -7.30084985 19 -5.56930472 -5.41796357 20 -8.39178305 -5.56930472 21 -11.29076317 -8.39178305 22 -11.69612778 -11.29076317 23 -12.74108443 -11.69612778 24 -13.27262956 -12.74108443 25 -15.65283354 -13.27262956 26 -11.85015124 -15.65283354 27 -8.38437867 -11.85015124 28 -6.75551585 -8.38437867 29 -7.27901406 -6.75551585 30 -13.56458265 -7.27901406 31 -14.48706098 -13.56458265 32 -9.71055919 -14.48706098 33 -6.83673971 -9.71055919 34 -6.02230830 -6.83673971 35 -11.91592380 -6.02230830 36 -12.20953930 -11.91592380 37 -13.80047250 -12.20953930 38 -14.00583711 -13.80047250 39 -15.98770351 -14.00583711 40 -17.84440928 -15.98770351 41 -20.36586772 -17.84440928 42 -20.58566374 -20.36586772 43 -14.31184426 -20.58566374 44 -13.00111504 -14.31184426 45 -5.43099775 -13.00111504 46 6.21293902 -5.43099775 47 7.10118992 6.21293902 48 15.04078196 7.10118992 49 8.30118992 15.04078196 50 1.99314300 8.30118992 51 7.06159787 1.99314300 52 6.43643724 7.06159787 53 7.64384162 6.43643724 54 10.08611597 7.64384162 55 5.96631995 10.08611597 56 11.07538675 5.96631995 57 14.47806905 11.07538675 58 23.97436686 14.47806905 59 26.03375493 23.97436686 60 21.16530006 26.03375493 61 17.16530006 21.16530006 62 16.13745712 17.16530006 63 19.50693188 16.13745712 64 15.95290842 19.50693188 65 18.72404559 15.95290842 66 26.63847701 18.72404559 67 25.95022611 26.63847701 68 27.20693188 25.95022611 69 30.56733983 27.20693188 70 31.89250046 30.56733983 71 19.77538675 31.89250046 72 10.34217920 19.77538675 73 5.30360703 10.34217920 74 7.36401499 5.30360703 75 -2.77289475 7.36401499 76 -0.48362397 -2.77289475 77 3.80194461 -0.48362397 78 12.11267384 3.80194461 79 9.80462692 12.11267384 80 9.18585078 9.80462692 81 15.33450963 9.18585078 82 11.06605476 15.33450963 83 9.99963966 11.06605476 84 14.28891043 9.99963966 85 23.39529493 14.28891043 86 12.22887983 23.39529493 87 5.79669216 12.22887983 88 -1.28313447 5.79669216 89 6.34036375 -1.28313447 90 16.78532040 6.34036375 91 35.85377527 16.78532040 92 36.07931326 35.85377527 93 40.65313274 36.07931326 94 31.03832398 40.65313274 95 19.74803332 31.03832398 96 6.66809453 19.74803332 97 -11.14735677 6.66809453 98 -24.27353729 -11.14735677 99 -31.22552098 -24.27353729 100 -30.39767804 -31.22552098 101 -23.89231343 -30.39767804 102 -25.53088559 -23.89231343 103 -25.93689274 -25.53088559 104 -15.11339452 -25.93689274 105 -10.44161481 -15.11339452 106 -4.71811660 -10.44161481 107 -3.51377187 -4.71811660 108 -1.33254801 -3.51377187 109 -0.21173210 -1.33254801 110 -6.92514363 -0.21173210 111 -1.63689274 -6.92514363 112 -0.00100288 -1.63689274 113 8.86106749 -0.00100288 114 15.94663608 8.86106749 115 6.13220467 15.94663608 116 2.92415775 6.13220467 117 -4.31977902 2.92415775 118 -8.95835118 -4.31977902 119 -15.45094680 -8.95835118 120 -15.22642870 -15.45094680 121 -18.10191060 -15.22642870 122 -19.35121199 -18.10191060 123 -24.01762709 -19.35121199 124 -24.99310899 -24.01762709 125 -7.81124259 -24.99310899 126 -1.05351695 -7.81124259 127 -8.04278772 -1.05351695 128 -8.08071735 -8.04278772 129 -3.27267043 -8.08071735 130 -14.53205850 -3.27267043 131 -10.67267043 -14.53205850 132 -0.39284380 -10.67267043 133 8.76922657 -0.39284380 134 11.63666156 8.76922657 135 11.08902259 11.63666156 136 16.33231683 11.08902259 137 20.70983850 16.33231683 138 15.12695222 20.70983850 139 6.23768144 15.12695222 140 -8.77406766 6.23768144 141 -20.89783107 -8.77406766 142 -12.54010542 -20.89783107 143 -10.23474081 -12.54010542 144 -7.47637262 -10.23474081 145 NA -7.47637262 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 2.07935413 0.61089926 [2,] -6.75755562 2.07935413 [3,] -6.34044190 -6.75755562 [4,] -3.01796357 -6.34044190 [5,] -4.18105383 -3.01796357 [6,] -2.54414409 -4.18105383 [7,] -1.56394011 -2.54414409 [8,] -1.77837152 -1.56394011 [9,] -5.61796357 -1.77837152 [10,] -4.58373613 -5.61796357 [11,] -3.26125781 -4.58373613 [12,] -7.03877948 -3.26125781 [13,] -11.34414409 -7.03877948 [14,] -11.64414409 -11.34414409 [15,] -11.29548524 -11.64414409 [16,] -10.04414409 -11.29548524 [17,] -7.30084985 -10.04414409 [18,] -5.41796357 -7.30084985 [19,] -5.56930472 -5.41796357 [20,] -8.39178305 -5.56930472 [21,] -11.29076317 -8.39178305 [22,] -11.69612778 -11.29076317 [23,] -12.74108443 -11.69612778 [24,] -13.27262956 -12.74108443 [25,] -15.65283354 -13.27262956 [26,] -11.85015124 -15.65283354 [27,] -8.38437867 -11.85015124 [28,] -6.75551585 -8.38437867 [29,] -7.27901406 -6.75551585 [30,] -13.56458265 -7.27901406 [31,] -14.48706098 -13.56458265 [32,] -9.71055919 -14.48706098 [33,] -6.83673971 -9.71055919 [34,] -6.02230830 -6.83673971 [35,] -11.91592380 -6.02230830 [36,] -12.20953930 -11.91592380 [37,] -13.80047250 -12.20953930 [38,] -14.00583711 -13.80047250 [39,] -15.98770351 -14.00583711 [40,] -17.84440928 -15.98770351 [41,] -20.36586772 -17.84440928 [42,] -20.58566374 -20.36586772 [43,] -14.31184426 -20.58566374 [44,] -13.00111504 -14.31184426 [45,] -5.43099775 -13.00111504 [46,] 6.21293902 -5.43099775 [47,] 7.10118992 6.21293902 [48,] 15.04078196 7.10118992 [49,] 8.30118992 15.04078196 [50,] 1.99314300 8.30118992 [51,] 7.06159787 1.99314300 [52,] 6.43643724 7.06159787 [53,] 7.64384162 6.43643724 [54,] 10.08611597 7.64384162 [55,] 5.96631995 10.08611597 [56,] 11.07538675 5.96631995 [57,] 14.47806905 11.07538675 [58,] 23.97436686 14.47806905 [59,] 26.03375493 23.97436686 [60,] 21.16530006 26.03375493 [61,] 17.16530006 21.16530006 [62,] 16.13745712 17.16530006 [63,] 19.50693188 16.13745712 [64,] 15.95290842 19.50693188 [65,] 18.72404559 15.95290842 [66,] 26.63847701 18.72404559 [67,] 25.95022611 26.63847701 [68,] 27.20693188 25.95022611 [69,] 30.56733983 27.20693188 [70,] 31.89250046 30.56733983 [71,] 19.77538675 31.89250046 [72,] 10.34217920 19.77538675 [73,] 5.30360703 10.34217920 [74,] 7.36401499 5.30360703 [75,] -2.77289475 7.36401499 [76,] -0.48362397 -2.77289475 [77,] 3.80194461 -0.48362397 [78,] 12.11267384 3.80194461 [79,] 9.80462692 12.11267384 [80,] 9.18585078 9.80462692 [81,] 15.33450963 9.18585078 [82,] 11.06605476 15.33450963 [83,] 9.99963966 11.06605476 [84,] 14.28891043 9.99963966 [85,] 23.39529493 14.28891043 [86,] 12.22887983 23.39529493 [87,] 5.79669216 12.22887983 [88,] -1.28313447 5.79669216 [89,] 6.34036375 -1.28313447 [90,] 16.78532040 6.34036375 [91,] 35.85377527 16.78532040 [92,] 36.07931326 35.85377527 [93,] 40.65313274 36.07931326 [94,] 31.03832398 40.65313274 [95,] 19.74803332 31.03832398 [96,] 6.66809453 19.74803332 [97,] -11.14735677 6.66809453 [98,] -24.27353729 -11.14735677 [99,] -31.22552098 -24.27353729 [100,] -30.39767804 -31.22552098 [101,] -23.89231343 -30.39767804 [102,] -25.53088559 -23.89231343 [103,] -25.93689274 -25.53088559 [104,] -15.11339452 -25.93689274 [105,] -10.44161481 -15.11339452 [106,] -4.71811660 -10.44161481 [107,] -3.51377187 -4.71811660 [108,] -1.33254801 -3.51377187 [109,] -0.21173210 -1.33254801 [110,] -6.92514363 -0.21173210 [111,] -1.63689274 -6.92514363 [112,] -0.00100288 -1.63689274 [113,] 8.86106749 -0.00100288 [114,] 15.94663608 8.86106749 [115,] 6.13220467 15.94663608 [116,] 2.92415775 6.13220467 [117,] -4.31977902 2.92415775 [118,] -8.95835118 -4.31977902 [119,] -15.45094680 -8.95835118 [120,] -15.22642870 -15.45094680 [121,] -18.10191060 -15.22642870 [122,] -19.35121199 -18.10191060 [123,] -24.01762709 -19.35121199 [124,] -24.99310899 -24.01762709 [125,] -7.81124259 -24.99310899 [126,] -1.05351695 -7.81124259 [127,] -8.04278772 -1.05351695 [128,] -8.08071735 -8.04278772 [129,] -3.27267043 -8.08071735 [130,] -14.53205850 -3.27267043 [131,] -10.67267043 -14.53205850 [132,] -0.39284380 -10.67267043 [133,] 8.76922657 -0.39284380 [134,] 11.63666156 8.76922657 [135,] 11.08902259 11.63666156 [136,] 16.33231683 11.08902259 [137,] 20.70983850 16.33231683 [138,] 15.12695222 20.70983850 [139,] 6.23768144 15.12695222 [140,] -8.77406766 6.23768144 [141,] -20.89783107 -8.77406766 [142,] -12.54010542 -20.89783107 [143,] -10.23474081 -12.54010542 [144,] -7.47637262 -10.23474081 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 2.07935413 0.61089926 2 -6.75755562 2.07935413 3 -6.34044190 -6.75755562 4 -3.01796357 -6.34044190 5 -4.18105383 -3.01796357 6 -2.54414409 -4.18105383 7 -1.56394011 -2.54414409 8 -1.77837152 -1.56394011 9 -5.61796357 -1.77837152 10 -4.58373613 -5.61796357 11 -3.26125781 -4.58373613 12 -7.03877948 -3.26125781 13 -11.34414409 -7.03877948 14 -11.64414409 -11.34414409 15 -11.29548524 -11.64414409 16 -10.04414409 -11.29548524 17 -7.30084985 -10.04414409 18 -5.41796357 -7.30084985 19 -5.56930472 -5.41796357 20 -8.39178305 -5.56930472 21 -11.29076317 -8.39178305 22 -11.69612778 -11.29076317 23 -12.74108443 -11.69612778 24 -13.27262956 -12.74108443 25 -15.65283354 -13.27262956 26 -11.85015124 -15.65283354 27 -8.38437867 -11.85015124 28 -6.75551585 -8.38437867 29 -7.27901406 -6.75551585 30 -13.56458265 -7.27901406 31 -14.48706098 -13.56458265 32 -9.71055919 -14.48706098 33 -6.83673971 -9.71055919 34 -6.02230830 -6.83673971 35 -11.91592380 -6.02230830 36 -12.20953930 -11.91592380 37 -13.80047250 -12.20953930 38 -14.00583711 -13.80047250 39 -15.98770351 -14.00583711 40 -17.84440928 -15.98770351 41 -20.36586772 -17.84440928 42 -20.58566374 -20.36586772 43 -14.31184426 -20.58566374 44 -13.00111504 -14.31184426 45 -5.43099775 -13.00111504 46 6.21293902 -5.43099775 47 7.10118992 6.21293902 48 15.04078196 7.10118992 49 8.30118992 15.04078196 50 1.99314300 8.30118992 51 7.06159787 1.99314300 52 6.43643724 7.06159787 53 7.64384162 6.43643724 54 10.08611597 7.64384162 55 5.96631995 10.08611597 56 11.07538675 5.96631995 57 14.47806905 11.07538675 58 23.97436686 14.47806905 59 26.03375493 23.97436686 60 21.16530006 26.03375493 61 17.16530006 21.16530006 62 16.13745712 17.16530006 63 19.50693188 16.13745712 64 15.95290842 19.50693188 65 18.72404559 15.95290842 66 26.63847701 18.72404559 67 25.95022611 26.63847701 68 27.20693188 25.95022611 69 30.56733983 27.20693188 70 31.89250046 30.56733983 71 19.77538675 31.89250046 72 10.34217920 19.77538675 73 5.30360703 10.34217920 74 7.36401499 5.30360703 75 -2.77289475 7.36401499 76 -0.48362397 -2.77289475 77 3.80194461 -0.48362397 78 12.11267384 3.80194461 79 9.80462692 12.11267384 80 9.18585078 9.80462692 81 15.33450963 9.18585078 82 11.06605476 15.33450963 83 9.99963966 11.06605476 84 14.28891043 9.99963966 85 23.39529493 14.28891043 86 12.22887983 23.39529493 87 5.79669216 12.22887983 88 -1.28313447 5.79669216 89 6.34036375 -1.28313447 90 16.78532040 6.34036375 91 35.85377527 16.78532040 92 36.07931326 35.85377527 93 40.65313274 36.07931326 94 31.03832398 40.65313274 95 19.74803332 31.03832398 96 6.66809453 19.74803332 97 -11.14735677 6.66809453 98 -24.27353729 -11.14735677 99 -31.22552098 -24.27353729 100 -30.39767804 -31.22552098 101 -23.89231343 -30.39767804 102 -25.53088559 -23.89231343 103 -25.93689274 -25.53088559 104 -15.11339452 -25.93689274 105 -10.44161481 -15.11339452 106 -4.71811660 -10.44161481 107 -3.51377187 -4.71811660 108 -1.33254801 -3.51377187 109 -0.21173210 -1.33254801 110 -6.92514363 -0.21173210 111 -1.63689274 -6.92514363 112 -0.00100288 -1.63689274 113 8.86106749 -0.00100288 114 15.94663608 8.86106749 115 6.13220467 15.94663608 116 2.92415775 6.13220467 117 -4.31977902 2.92415775 118 -8.95835118 -4.31977902 119 -15.45094680 -8.95835118 120 -15.22642870 -15.45094680 121 -18.10191060 -15.22642870 122 -19.35121199 -18.10191060 123 -24.01762709 -19.35121199 124 -24.99310899 -24.01762709 125 -7.81124259 -24.99310899 126 -1.05351695 -7.81124259 127 -8.04278772 -1.05351695 128 -8.08071735 -8.04278772 129 -3.27267043 -8.08071735 130 -14.53205850 -3.27267043 131 -10.67267043 -14.53205850 132 -0.39284380 -10.67267043 133 8.76922657 -0.39284380 134 11.63666156 8.76922657 135 11.08902259 11.63666156 136 16.33231683 11.08902259 137 20.70983850 16.33231683 138 15.12695222 20.70983850 139 6.23768144 15.12695222 140 -8.77406766 6.23768144 141 -20.89783107 -8.77406766 142 -12.54010542 -20.89783107 143 -10.23474081 -12.54010542 144 -7.47637262 -10.23474081 > plot(z,main=paste('Residual Lag plot, lowess, and regression line'), ylab='values of Residuals', xlab='lagged values of Residuals') > lines(lowess(z)) > abline(lm(z)) > grid() > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/7jmhc1353078444.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > acf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Autocorrelation Function') > grid() > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/8yols1353078444.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > pacf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Partial Autocorrelation Function') > grid() > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/9g1r31353078444.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > opar <- par(mfrow = c(2,2), oma = c(0, 0, 1.1, 0)) > plot(mylm, las = 1, sub='Residual Diagnostics') > par(opar) > dev.off() null device 1 > if (n > n25) { + postscript(file="/var/wessaorg/rcomp/tmp/100jo11353078444.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) + plot(kp3:nmkm3,gqarr[,2], main='Goldfeld-Quandt test',ylab='2-sided p-value',xlab='breakpoint') + grid() + dev.off() + } null device 1 > > #Note: the /var/wessaorg/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/wessaorg/rcomp/createtable") > > a<-table.start() > a<-table.row.start(a) > a<-table.element(a, 'Multiple Linear Regression - Estimated Regression Equation', 1, TRUE) > a<-table.row.end(a) > myeq <- colnames(x)[1] > myeq <- paste(myeq, '[t] = ', sep='') > for (i in 1:k){ + if (mysum$coefficients[i,1] > 0) myeq <- paste(myeq, '+', '') + myeq <- paste(myeq, mysum$coefficients[i,1], sep=' ') + if (rownames(mysum$coefficients)[i] != '(Intercept)') { + myeq <- paste(myeq, rownames(mysum$coefficients)[i], sep='') + if (rownames(mysum$coefficients)[i] != 't') myeq <- paste(myeq, '[t]', sep='') + } + } > myeq <- paste(myeq, ' + e[t]') > a<-table.row.start(a) > a<-table.element(a, myeq) > a<-table.row.end(a) > a<-table.end(a) > table.save(a,file="/var/wessaorg/rcomp/tmp/11kcjh1353078444.tab") > a<-table.start() > a<-table.row.start(a) > a<-table.element(a,hyperlink('http://www.xycoon.com/ols1.htm','Multiple Linear Regression - Ordinary Least Squares',''), 6, TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'Variable',header=TRUE) > a<-table.element(a,'Parameter',header=TRUE) > a<-table.element(a,'S.D.',header=TRUE) > a<-table.element(a,'T-STAT
H0: parameter = 0',header=TRUE) > a<-table.element(a,'2-tail p-value',header=TRUE) > a<-table.element(a,'1-tail p-value',header=TRUE) > a<-table.row.end(a) > for (i in 1:k){ + a<-table.row.start(a) + a<-table.element(a,rownames(mysum$coefficients)[i],header=TRUE) + a<-table.element(a,mysum$coefficients[i,1]) + a<-table.element(a, round(mysum$coefficients[i,2],6)) + a<-table.element(a, round(mysum$coefficients[i,3],4)) + a<-table.element(a, round(mysum$coefficients[i,4],6)) + a<-table.element(a, round(mysum$coefficients[i,4]/2,6)) + a<-table.row.end(a) + } > a<-table.end(a) > table.save(a,file="/var/wessaorg/rcomp/tmp/12q8hd1353078444.tab") > a<-table.start() > a<-table.row.start(a) > a<-table.element(a, 'Multiple Linear Regression - Regression Statistics', 2, TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Multiple R',1,TRUE) > a<-table.element(a, sqrt(mysum$r.squared)) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'R-squared',1,TRUE) > a<-table.element(a, mysum$r.squared) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Adjusted R-squared',1,TRUE) > a<-table.element(a, mysum$adj.r.squared) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'F-TEST (value)',1,TRUE) > a<-table.element(a, mysum$fstatistic[1]) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'F-TEST (DF numerator)',1,TRUE) > a<-table.element(a, mysum$fstatistic[2]) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'F-TEST (DF denominator)',1,TRUE) > a<-table.element(a, mysum$fstatistic[3]) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'p-value',1,TRUE) > a<-table.element(a, 1-pf(mysum$fstatistic[1],mysum$fstatistic[2],mysum$fstatistic[3])) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Multiple Linear Regression - Residual Statistics', 2, TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Residual Standard Deviation',1,TRUE) > a<-table.element(a, mysum$sigma) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Sum Squared Residuals',1,TRUE) > a<-table.element(a, sum(myerror*myerror)) > a<-table.row.end(a) > a<-table.end(a) > table.save(a,file="/var/wessaorg/rcomp/tmp/13m1j71353078444.tab") > a<-table.start() > a<-table.row.start(a) > a<-table.element(a, 'Multiple Linear Regression - Actuals, Interpolation, and Residuals', 4, TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Time or Index', 1, TRUE) > a<-table.element(a, 'Actuals', 1, TRUE) > a<-table.element(a, 'Interpolation
Forecast', 1, TRUE) > a<-table.element(a, 'Residuals
Prediction Error', 1, TRUE) > a<-table.row.end(a) > for (i in 1:n) { + a<-table.row.start(a) + a<-table.element(a,i, 1, TRUE) + a<-table.element(a,x[i]) + a<-table.element(a,x[i]-mysum$resid[i]) + a<-table.element(a,mysum$resid[i]) + a<-table.row.end(a) + } > a<-table.end(a) > table.save(a,file="/var/wessaorg/rcomp/tmp/14wywc1353078445.tab") > if (n > n25) { + a<-table.start() + a<-table.row.start(a) + a<-table.element(a,'Goldfeld-Quandt test for Heteroskedasticity',4,TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'p-values',header=TRUE) + a<-table.element(a,'Alternative Hypothesis',3,header=TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'breakpoint index',header=TRUE) + a<-table.element(a,'greater',header=TRUE) + a<-table.element(a,'2-sided',header=TRUE) + a<-table.element(a,'less',header=TRUE) + a<-table.row.end(a) + for (mypoint in kp3:nmkm3) { + a<-table.row.start(a) + a<-table.element(a,mypoint,header=TRUE) + a<-table.element(a,gqarr[mypoint-kp3+1,1]) + a<-table.element(a,gqarr[mypoint-kp3+1,2]) + a<-table.element(a,gqarr[mypoint-kp3+1,3]) + a<-table.row.end(a) + } + a<-table.end(a) + table.save(a,file="/var/wessaorg/rcomp/tmp/15uc521353078445.tab") + a<-table.start() + a<-table.row.start(a) + a<-table.element(a,'Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity',4,TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'Description',header=TRUE) + a<-table.element(a,'# significant tests',header=TRUE) + a<-table.element(a,'% significant tests',header=TRUE) + a<-table.element(a,'OK/NOK',header=TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'1% type I error level',header=TRUE) + a<-table.element(a,numsignificant1) + a<-table.element(a,numsignificant1/numgqtests) + if (numsignificant1/numgqtests < 0.01) dum <- 'OK' else dum <- 'NOK' + a<-table.element(a,dum) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'5% type I error level',header=TRUE) + a<-table.element(a,numsignificant5) + a<-table.element(a,numsignificant5/numgqtests) + if (numsignificant5/numgqtests < 0.05) dum <- 'OK' else dum <- 'NOK' + a<-table.element(a,dum) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'10% type I error level',header=TRUE) + a<-table.element(a,numsignificant10) + a<-table.element(a,numsignificant10/numgqtests) + if (numsignificant10/numgqtests < 0.1) dum <- 'OK' else dum <- 'NOK' + a<-table.element(a,dum) + a<-table.row.end(a) + a<-table.end(a) + table.save(a,file="/var/wessaorg/rcomp/tmp/16gld81353078445.tab") + } > > try(system("convert tmp/13dfq1353078444.ps tmp/13dfq1353078444.png",intern=TRUE)) character(0) > try(system("convert tmp/2bgyy1353078444.ps tmp/2bgyy1353078444.png",intern=TRUE)) character(0) > try(system("convert tmp/3om4r1353078444.ps tmp/3om4r1353078444.png",intern=TRUE)) character(0) > try(system("convert tmp/4covn1353078444.ps tmp/4covn1353078444.png",intern=TRUE)) character(0) > try(system("convert tmp/5twq61353078444.ps tmp/5twq61353078444.png",intern=TRUE)) character(0) > try(system("convert tmp/6uzwr1353078444.ps tmp/6uzwr1353078444.png",intern=TRUE)) character(0) > try(system("convert tmp/7jmhc1353078444.ps tmp/7jmhc1353078444.png",intern=TRUE)) character(0) > try(system("convert tmp/8yols1353078444.ps tmp/8yols1353078444.png",intern=TRUE)) character(0) > try(system("convert tmp/9g1r31353078444.ps tmp/9g1r31353078444.png",intern=TRUE)) character(0) > try(system("convert tmp/100jo11353078444.ps tmp/100jo11353078444.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 9.071 1.441 10.518