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(2,0,1,1,0,0,1,0,0,1,0,0,1,0,0,1,0,1,1,0,0,2,0,0,1,0,1,1,0,0,2,0,0,1,0,0,1,0,0,2,0,0,1,0,1,2,0,1,2,0,0,2,0,0,1,0,1,2,0,1,1,0,0,1,0,1,1,0,1,1,0,1,2,0,1,1,0,0,1,0,1,1,0,0,1,0,1,1,0,0,1,0,0,1,0,0,1,0,0,2,0,1,1,0,0,1,0,0,2,0,0,1,0,1,1,0,1,2,0,0,1,0,1,1,0,1,1,0,1,2,0,0,1,0,0,1,0,1,1,0,0,1,0,1,1,0,1,1,0,0,2,0,0,2,0,0,1,0,1,1,0,0,1,0,0,2,0,1,1,0,1,1,0,1,1,0,1,2,0,1,2,0,1,1,0,0,1,0,0,2,0,1,1,0,0,1,0,0,2,0,0,1,0,0,1,0,1,1,0,0,1,0,0,1,0,1,1,0,1,1,0,0,1,0,1,2,0,1,1,0,1,1,0,1,2,0,1,2,0,0,1,0,0,1,0,1,1,0,0,1,0,0,1,0,1,1,0,0,1,1,1,1,2,1,1,1,0,1,1,1,1,1,0,1,2,0,1,1,0,1,1,0,1,2,0,1,1,1,1,2,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,0,1,1,0,1,1,0,1,2,0,1,1,0,1,1,0,1,2,0,1,1,0,1,1,0,1,2,0,1,2,0,1,1,0,1,2,0,1,1,0,1,1,0,1,1,1,1,1,0,1,1,0,1,1,1,1,1,0,1,1,0,1,2,0,1,1,1,1,1,1,1,2,0,1,1,0,1,1,1,1,1,0,1,1,1,1,1,0,1,1,1,1,1,0,1,1,0,1,1,0,1,1,0,1,1,1,1,2,1,1,2,0,1,1,0,1,1,1,1,2,1,1,1,0,1,1,1,1,1,0,1,2,1,1,2,0,1,2,0,1,1,0,1,1,1,1,1,1,1,1,0,1,1,0,1,1,0),dim=c(3,154),dimnames=list(c('T40','T20','Outcome'),1:154)) > y <- array(NA,dim=c(3,154),dimnames=list(c('T40','T20','Outcome'),1:154)) > 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 = '1' > par3 <- 'No Linear Trend' > par2 <- 'Do not include Seasonal Dummies' > par1 <- '1' > #'GNU S' R Code compiled by R2WASP v. 1.0.44 () > #Author: Prof. Dr. P. Wessa > #To cite this work: AUTHOR(S), (YEAR), YOUR SOFTWARE TITLE (vNUMBER) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_YOURPAGE.wasp/ > #Source of accompanying publication: Office for Research, Development, and Education > #Technical description: Write here your technical program description (don't use hard returns!) > 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 T40 T20 Outcome 1 2 0 1 2 1 0 0 3 1 0 0 4 1 0 0 5 1 0 0 6 1 0 1 7 1 0 0 8 2 0 0 9 1 0 1 10 1 0 0 11 2 0 0 12 1 0 0 13 1 0 0 14 2 0 0 15 1 0 1 16 2 0 1 17 2 0 0 18 2 0 0 19 1 0 1 20 2 0 1 21 1 0 0 22 1 0 1 23 1 0 1 24 1 0 1 25 2 0 1 26 1 0 0 27 1 0 1 28 1 0 0 29 1 0 1 30 1 0 0 31 1 0 0 32 1 0 0 33 1 0 0 34 2 0 1 35 1 0 0 36 1 0 0 37 2 0 0 38 1 0 1 39 1 0 1 40 2 0 0 41 1 0 1 42 1 0 1 43 1 0 1 44 2 0 0 45 1 0 0 46 1 0 1 47 1 0 0 48 1 0 1 49 1 0 1 50 1 0 0 51 2 0 0 52 2 0 0 53 1 0 1 54 1 0 0 55 1 0 0 56 2 0 1 57 1 0 1 58 1 0 1 59 1 0 1 60 2 0 1 61 2 0 1 62 1 0 0 63 1 0 0 64 2 0 1 65 1 0 0 66 1 0 0 67 2 0 0 68 1 0 0 69 1 0 1 70 1 0 0 71 1 0 0 72 1 0 1 73 1 0 1 74 1 0 0 75 1 0 1 76 2 0 1 77 1 0 1 78 1 0 1 79 2 0 1 80 2 0 0 81 1 0 0 82 1 0 1 83 1 0 0 84 1 0 0 85 1 0 1 86 1 0 0 87 1 1 1 88 1 2 1 89 1 1 0 90 1 1 1 91 1 1 0 92 1 2 0 93 1 1 0 94 1 1 0 95 1 2 0 96 1 1 1 97 1 2 0 98 1 1 0 99 1 1 0 100 1 1 1 101 1 1 1 102 1 1 0 103 1 1 0 104 1 1 0 105 1 2 0 106 1 1 0 107 1 1 0 108 1 2 0 109 1 1 0 110 1 1 0 111 1 2 0 112 1 2 0 113 1 1 0 114 1 2 0 115 1 1 0 116 1 1 0 117 1 1 1 118 1 1 0 119 1 1 0 120 1 1 1 121 1 1 0 122 1 1 0 123 1 2 0 124 1 1 1 125 1 1 1 126 1 2 0 127 1 1 0 128 1 1 1 129 1 1 0 130 1 1 1 131 1 1 0 132 1 1 1 133 1 1 0 134 1 1 0 135 1 1 0 136 1 1 0 137 1 1 1 138 1 2 1 139 1 2 0 140 1 1 0 141 1 1 1 142 1 2 1 143 1 1 0 144 1 1 1 145 1 1 0 146 1 2 1 147 1 2 0 148 1 2 0 149 1 1 0 150 1 1 1 151 1 1 1 152 1 1 0 153 1 1 0 154 1 1 0 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) T20 Outcome 1.24187 -0.17489 0.01014 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -0.25200 -0.24187 -0.07711 0.09778 0.75813 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 1.24187 0.04377 28.374 < 2e-16 *** T20 -0.17489 0.04047 -4.321 2.8e-05 *** Outcome 0.01014 0.05662 0.179 0.858 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.3387 on 151 degrees of freedom Multiple R-squared: 0.1145, Adjusted R-squared: 0.1027 F-statistic: 9.759 on 2 and 151 DF, p-value: 0.0001033 > 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,] 0.7745253 4.509493e-01 2.254747e-01 [2,] 0.6403767 7.192466e-01 3.596233e-01 [3,] 0.9606338 7.873238e-02 3.936619e-02 [4,] 0.9582724 8.345530e-02 4.172765e-02 [5,] 0.9345615 1.308769e-01 6.543846e-02 [6,] 0.9857849 2.843020e-02 1.421510e-02 [7,] 0.9793246 4.135079e-02 2.067540e-02 [8,] 0.9702775 5.944501e-02 2.972251e-02 [9,] 0.9921794 1.564113e-02 7.820565e-03 [10,] 0.9897424 2.051511e-02 1.025755e-02 [11,] 0.9963302 7.339589e-03 3.669794e-03 [12,] 0.9989240 2.151969e-03 1.075985e-03 [13,] 0.9996540 6.919146e-04 3.459573e-04 [14,] 0.9995868 8.264033e-04 4.132016e-04 [15,] 0.9998646 2.707030e-04 1.353515e-04 [16,] 0.9998376 3.247094e-04 1.623547e-04 [17,] 0.9998203 3.594063e-04 1.797031e-04 [18,] 0.9997825 4.349368e-04 2.174684e-04 [19,] 0.9997221 5.557928e-04 2.778964e-04 [20,] 0.9999285 1.430828e-04 7.154140e-05 [21,] 0.9999110 1.780435e-04 8.902176e-05 [22,] 0.9998915 2.169768e-04 1.084884e-04 [23,] 0.9998622 2.756814e-04 1.378407e-04 [24,] 0.9998271 3.457368e-04 1.728684e-04 [25,] 0.9997780 4.440312e-04 2.220156e-04 [26,] 0.9997113 5.774410e-04 2.887205e-04 [27,] 0.9996217 7.565649e-04 3.782824e-04 [28,] 0.9995026 9.947737e-04 4.973869e-04 [29,] 0.9998708 2.584802e-04 1.292401e-04 [30,] 0.9998259 3.481068e-04 1.740534e-04 [31,] 0.9997661 4.678954e-04 2.339477e-04 [32,] 0.9999586 8.286846e-05 4.143423e-05 [33,] 0.9999500 9.999759e-05 4.999880e-05 [34,] 0.9999382 1.236583e-04 6.182917e-05 [35,] 0.9999901 1.975409e-05 9.877043e-06 [36,] 0.9999872 2.551681e-05 1.275841e-05 [37,] 0.9999833 3.332182e-05 1.666091e-05 [38,] 0.9999781 4.377320e-05 2.188660e-05 [39,] 0.9999970 6.045617e-06 3.022809e-06 [40,] 0.9999960 7.988253e-06 3.994127e-06 [41,] 0.9999946 1.072564e-05 5.362820e-06 [42,] 0.9999929 1.414534e-05 7.072671e-06 [43,] 0.9999906 1.880679e-05 9.403396e-06 [44,] 0.9999876 2.487823e-05 1.243911e-05 [45,] 0.9999838 3.236573e-05 1.618286e-05 [46,] 0.9999981 3.706983e-06 1.853492e-06 [47,] 0.9999999 2.715283e-07 1.357642e-07 [48,] 0.9999998 3.750815e-07 1.875407e-07 [49,] 0.9999997 5.119408e-07 2.559704e-07 [50,] 0.9999996 7.017709e-07 3.508854e-07 [51,] 1.0000000 4.091088e-08 2.045544e-08 [52,] 1.0000000 5.700992e-08 2.850496e-08 [53,] 1.0000000 7.843674e-08 3.921837e-08 [54,] 0.9999999 1.061826e-07 5.309131e-08 [55,] 1.0000000 4.037836e-09 2.018918e-09 [56,] 1.0000000 6.525622e-11 3.262811e-11 [57,] 1.0000000 1.035938e-10 5.179688e-11 [58,] 1.0000000 1.640147e-10 8.200737e-11 [59,] 1.0000000 7.827694e-13 3.913847e-13 [60,] 1.0000000 1.343032e-12 6.715159e-13 [61,] 1.0000000 2.284847e-12 1.142424e-12 [62,] 1.0000000 1.095190e-15 5.475950e-16 [63,] 1.0000000 2.149528e-15 1.074764e-15 [64,] 1.0000000 3.872055e-15 1.936028e-15 [65,] 1.0000000 7.439873e-15 3.719937e-15 [66,] 1.0000000 1.410789e-14 7.053945e-15 [67,] 1.0000000 2.431466e-14 1.215733e-14 [68,] 1.0000000 4.092333e-14 2.046167e-14 [69,] 1.0000000 7.350211e-14 3.675106e-14 [70,] 1.0000000 1.172439e-13 5.862194e-14 [71,] 1.0000000 5.825233e-18 2.912616e-18 [72,] 1.0000000 1.166570e-17 5.832851e-18 [73,] 1.0000000 2.248929e-17 1.124465e-17 [74,] 1.0000000 9.763918e-26 4.881959e-26 [75,] 1.0000000 0.000000e+00 0.000000e+00 [76,] 1.0000000 0.000000e+00 0.000000e+00 [77,] 1.0000000 0.000000e+00 0.000000e+00 [78,] 1.0000000 0.000000e+00 0.000000e+00 [79,] 1.0000000 0.000000e+00 0.000000e+00 [80,] 1.0000000 0.000000e+00 0.000000e+00 [81,] 1.0000000 0.000000e+00 0.000000e+00 [82,] 1.0000000 0.000000e+00 0.000000e+00 [83,] 1.0000000 0.000000e+00 0.000000e+00 [84,] 1.0000000 0.000000e+00 0.000000e+00 [85,] 1.0000000 0.000000e+00 0.000000e+00 [86,] 1.0000000 0.000000e+00 0.000000e+00 [87,] 1.0000000 0.000000e+00 0.000000e+00 [88,] 1.0000000 0.000000e+00 0.000000e+00 [89,] 1.0000000 0.000000e+00 0.000000e+00 [90,] 1.0000000 0.000000e+00 0.000000e+00 [91,] 1.0000000 0.000000e+00 0.000000e+00 [92,] 1.0000000 0.000000e+00 0.000000e+00 [93,] 1.0000000 0.000000e+00 0.000000e+00 [94,] 1.0000000 0.000000e+00 0.000000e+00 [95,] 1.0000000 0.000000e+00 0.000000e+00 [96,] 1.0000000 0.000000e+00 0.000000e+00 [97,] 1.0000000 0.000000e+00 0.000000e+00 [98,] 1.0000000 0.000000e+00 0.000000e+00 [99,] 1.0000000 0.000000e+00 0.000000e+00 [100,] 1.0000000 0.000000e+00 0.000000e+00 [101,] 1.0000000 0.000000e+00 0.000000e+00 [102,] 1.0000000 0.000000e+00 0.000000e+00 [103,] 1.0000000 0.000000e+00 0.000000e+00 [104,] 1.0000000 0.000000e+00 0.000000e+00 [105,] 1.0000000 0.000000e+00 0.000000e+00 [106,] 1.0000000 0.000000e+00 0.000000e+00 [107,] 1.0000000 0.000000e+00 0.000000e+00 [108,] 1.0000000 0.000000e+00 0.000000e+00 [109,] 1.0000000 0.000000e+00 0.000000e+00 [110,] 1.0000000 0.000000e+00 0.000000e+00 [111,] 1.0000000 0.000000e+00 0.000000e+00 [112,] 1.0000000 0.000000e+00 0.000000e+00 [113,] 1.0000000 0.000000e+00 0.000000e+00 [114,] 1.0000000 0.000000e+00 0.000000e+00 [115,] 1.0000000 0.000000e+00 0.000000e+00 [116,] 1.0000000 0.000000e+00 0.000000e+00 [117,] 1.0000000 0.000000e+00 0.000000e+00 [118,] 1.0000000 0.000000e+00 0.000000e+00 [119,] 1.0000000 0.000000e+00 0.000000e+00 [120,] 1.0000000 0.000000e+00 0.000000e+00 [121,] 1.0000000 0.000000e+00 0.000000e+00 [122,] 1.0000000 0.000000e+00 0.000000e+00 [123,] 1.0000000 0.000000e+00 0.000000e+00 [124,] 1.0000000 0.000000e+00 0.000000e+00 [125,] 1.0000000 0.000000e+00 0.000000e+00 [126,] 1.0000000 1.853278e-305 9.266391e-306 [127,] 1.0000000 1.039865e-294 5.199325e-295 [128,] 1.0000000 1.208423e-311 6.042113e-312 [129,] 1.0000000 1.207330e-272 6.036650e-273 [130,] 1.0000000 7.759508e-245 3.879754e-245 [131,] 1.0000000 3.004620e-231 1.502310e-231 [132,] 1.0000000 2.529940e-230 1.264970e-230 [133,] 1.0000000 0.000000e+00 0.000000e+00 [134,] 1.0000000 4.390965e-183 2.195483e-183 [135,] 1.0000000 6.987169e-168 3.493585e-168 [136,] 1.0000000 7.555676e-175 3.777838e-175 [137,] 1.0000000 2.905993e-138 1.452997e-138 [138,] 1.0000000 8.745867e-132 4.372934e-132 [139,] 1.0000000 5.902230e-110 2.951115e-110 [140,] 1.0000000 4.528978e-95 2.264489e-95 [141,] 1.0000000 3.291792e-77 1.645896e-77 [142,] 1.0000000 1.017656e-129 5.088281e-130 [143,] 1.0000000 7.995009e-47 3.997505e-47 > postscript(file="/var/wessaorg/rcomp/tmp/12og21355994083.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/2c4he1355994083.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/3up241355994083.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/4fq9u1355994083.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/5t02h1355994083.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 = 154 Frequency = 1 1 2 3 4 5 6 0.74799553 -0.24186510 -0.24186510 -0.24186510 -0.24186510 -0.25200447 7 8 9 10 11 12 -0.24186510 0.75813490 -0.25200447 -0.24186510 0.75813490 -0.24186510 13 14 15 16 17 18 -0.24186510 0.75813490 -0.25200447 0.74799553 0.75813490 0.75813490 19 20 21 22 23 24 -0.25200447 0.74799553 -0.24186510 -0.25200447 -0.25200447 -0.25200447 25 26 27 28 29 30 0.74799553 -0.24186510 -0.25200447 -0.24186510 -0.25200447 -0.24186510 31 32 33 34 35 36 -0.24186510 -0.24186510 -0.24186510 0.74799553 -0.24186510 -0.24186510 37 38 39 40 41 42 0.75813490 -0.25200447 -0.25200447 0.75813490 -0.25200447 -0.25200447 43 44 45 46 47 48 -0.25200447 0.75813490 -0.24186510 -0.25200447 -0.24186510 -0.25200447 49 50 51 52 53 54 -0.25200447 -0.24186510 0.75813490 0.75813490 -0.25200447 -0.24186510 55 56 57 58 59 60 -0.24186510 0.74799553 -0.25200447 -0.25200447 -0.25200447 0.74799553 61 62 63 64 65 66 0.74799553 -0.24186510 -0.24186510 0.74799553 -0.24186510 -0.24186510 67 68 69 70 71 72 0.75813490 -0.24186510 -0.25200447 -0.24186510 -0.24186510 -0.25200447 73 74 75 76 77 78 -0.25200447 -0.24186510 -0.25200447 0.74799553 -0.25200447 -0.25200447 79 80 81 82 83 84 0.74799553 0.75813490 -0.24186510 -0.25200447 -0.24186510 -0.24186510 85 86 87 88 89 90 -0.25200447 -0.24186510 -0.07711356 0.09777734 -0.06697419 -0.07711356 91 92 93 94 95 96 -0.06697419 0.10791671 -0.06697419 -0.06697419 0.10791671 -0.07711356 97 98 99 100 101 102 0.10791671 -0.06697419 -0.06697419 -0.07711356 -0.07711356 -0.06697419 103 104 105 106 107 108 -0.06697419 -0.06697419 0.10791671 -0.06697419 -0.06697419 0.10791671 109 110 111 112 113 114 -0.06697419 -0.06697419 0.10791671 0.10791671 -0.06697419 0.10791671 115 116 117 118 119 120 -0.06697419 -0.06697419 -0.07711356 -0.06697419 -0.06697419 -0.07711356 121 122 123 124 125 126 -0.06697419 -0.06697419 0.10791671 -0.07711356 -0.07711356 0.10791671 127 128 129 130 131 132 -0.06697419 -0.07711356 -0.06697419 -0.07711356 -0.06697419 -0.07711356 133 134 135 136 137 138 -0.06697419 -0.06697419 -0.06697419 -0.06697419 -0.07711356 0.09777734 139 140 141 142 143 144 0.10791671 -0.06697419 -0.07711356 0.09777734 -0.06697419 -0.07711356 145 146 147 148 149 150 -0.06697419 0.09777734 0.10791671 0.10791671 -0.06697419 -0.07711356 151 152 153 154 -0.07711356 -0.06697419 -0.06697419 -0.06697419 > postscript(file="/var/wessaorg/rcomp/tmp/6va2n1355994083.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 = 154 Frequency = 1 lag(myerror, k = 1) myerror 0 0.74799553 NA 1 -0.24186510 0.74799553 2 -0.24186510 -0.24186510 3 -0.24186510 -0.24186510 4 -0.24186510 -0.24186510 5 -0.25200447 -0.24186510 6 -0.24186510 -0.25200447 7 0.75813490 -0.24186510 8 -0.25200447 0.75813490 9 -0.24186510 -0.25200447 10 0.75813490 -0.24186510 11 -0.24186510 0.75813490 12 -0.24186510 -0.24186510 13 0.75813490 -0.24186510 14 -0.25200447 0.75813490 15 0.74799553 -0.25200447 16 0.75813490 0.74799553 17 0.75813490 0.75813490 18 -0.25200447 0.75813490 19 0.74799553 -0.25200447 20 -0.24186510 0.74799553 21 -0.25200447 -0.24186510 22 -0.25200447 -0.25200447 23 -0.25200447 -0.25200447 24 0.74799553 -0.25200447 25 -0.24186510 0.74799553 26 -0.25200447 -0.24186510 27 -0.24186510 -0.25200447 28 -0.25200447 -0.24186510 29 -0.24186510 -0.25200447 30 -0.24186510 -0.24186510 31 -0.24186510 -0.24186510 32 -0.24186510 -0.24186510 33 0.74799553 -0.24186510 34 -0.24186510 0.74799553 35 -0.24186510 -0.24186510 36 0.75813490 -0.24186510 37 -0.25200447 0.75813490 38 -0.25200447 -0.25200447 39 0.75813490 -0.25200447 40 -0.25200447 0.75813490 41 -0.25200447 -0.25200447 42 -0.25200447 -0.25200447 43 0.75813490 -0.25200447 44 -0.24186510 0.75813490 45 -0.25200447 -0.24186510 46 -0.24186510 -0.25200447 47 -0.25200447 -0.24186510 48 -0.25200447 -0.25200447 49 -0.24186510 -0.25200447 50 0.75813490 -0.24186510 51 0.75813490 0.75813490 52 -0.25200447 0.75813490 53 -0.24186510 -0.25200447 54 -0.24186510 -0.24186510 55 0.74799553 -0.24186510 56 -0.25200447 0.74799553 57 -0.25200447 -0.25200447 58 -0.25200447 -0.25200447 59 0.74799553 -0.25200447 60 0.74799553 0.74799553 61 -0.24186510 0.74799553 62 -0.24186510 -0.24186510 63 0.74799553 -0.24186510 64 -0.24186510 0.74799553 65 -0.24186510 -0.24186510 66 0.75813490 -0.24186510 67 -0.24186510 0.75813490 68 -0.25200447 -0.24186510 69 -0.24186510 -0.25200447 70 -0.24186510 -0.24186510 71 -0.25200447 -0.24186510 72 -0.25200447 -0.25200447 73 -0.24186510 -0.25200447 74 -0.25200447 -0.24186510 75 0.74799553 -0.25200447 76 -0.25200447 0.74799553 77 -0.25200447 -0.25200447 78 0.74799553 -0.25200447 79 0.75813490 0.74799553 80 -0.24186510 0.75813490 81 -0.25200447 -0.24186510 82 -0.24186510 -0.25200447 83 -0.24186510 -0.24186510 84 -0.25200447 -0.24186510 85 -0.24186510 -0.25200447 86 -0.07711356 -0.24186510 87 0.09777734 -0.07711356 88 -0.06697419 0.09777734 89 -0.07711356 -0.06697419 90 -0.06697419 -0.07711356 91 0.10791671 -0.06697419 92 -0.06697419 0.10791671 93 -0.06697419 -0.06697419 94 0.10791671 -0.06697419 95 -0.07711356 0.10791671 96 0.10791671 -0.07711356 97 -0.06697419 0.10791671 98 -0.06697419 -0.06697419 99 -0.07711356 -0.06697419 100 -0.07711356 -0.07711356 101 -0.06697419 -0.07711356 102 -0.06697419 -0.06697419 103 -0.06697419 -0.06697419 104 0.10791671 -0.06697419 105 -0.06697419 0.10791671 106 -0.06697419 -0.06697419 107 0.10791671 -0.06697419 108 -0.06697419 0.10791671 109 -0.06697419 -0.06697419 110 0.10791671 -0.06697419 111 0.10791671 0.10791671 112 -0.06697419 0.10791671 113 0.10791671 -0.06697419 114 -0.06697419 0.10791671 115 -0.06697419 -0.06697419 116 -0.07711356 -0.06697419 117 -0.06697419 -0.07711356 118 -0.06697419 -0.06697419 119 -0.07711356 -0.06697419 120 -0.06697419 -0.07711356 121 -0.06697419 -0.06697419 122 0.10791671 -0.06697419 123 -0.07711356 0.10791671 124 -0.07711356 -0.07711356 125 0.10791671 -0.07711356 126 -0.06697419 0.10791671 127 -0.07711356 -0.06697419 128 -0.06697419 -0.07711356 129 -0.07711356 -0.06697419 130 -0.06697419 -0.07711356 131 -0.07711356 -0.06697419 132 -0.06697419 -0.07711356 133 -0.06697419 -0.06697419 134 -0.06697419 -0.06697419 135 -0.06697419 -0.06697419 136 -0.07711356 -0.06697419 137 0.09777734 -0.07711356 138 0.10791671 0.09777734 139 -0.06697419 0.10791671 140 -0.07711356 -0.06697419 141 0.09777734 -0.07711356 142 -0.06697419 0.09777734 143 -0.07711356 -0.06697419 144 -0.06697419 -0.07711356 145 0.09777734 -0.06697419 146 0.10791671 0.09777734 147 0.10791671 0.10791671 148 -0.06697419 0.10791671 149 -0.07711356 -0.06697419 150 -0.07711356 -0.07711356 151 -0.06697419 -0.07711356 152 -0.06697419 -0.06697419 153 -0.06697419 -0.06697419 154 NA -0.06697419 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -0.24186510 0.74799553 [2,] -0.24186510 -0.24186510 [3,] -0.24186510 -0.24186510 [4,] -0.24186510 -0.24186510 [5,] -0.25200447 -0.24186510 [6,] -0.24186510 -0.25200447 [7,] 0.75813490 -0.24186510 [8,] -0.25200447 0.75813490 [9,] -0.24186510 -0.25200447 [10,] 0.75813490 -0.24186510 [11,] -0.24186510 0.75813490 [12,] -0.24186510 -0.24186510 [13,] 0.75813490 -0.24186510 [14,] -0.25200447 0.75813490 [15,] 0.74799553 -0.25200447 [16,] 0.75813490 0.74799553 [17,] 0.75813490 0.75813490 [18,] -0.25200447 0.75813490 [19,] 0.74799553 -0.25200447 [20,] -0.24186510 0.74799553 [21,] -0.25200447 -0.24186510 [22,] -0.25200447 -0.25200447 [23,] -0.25200447 -0.25200447 [24,] 0.74799553 -0.25200447 [25,] -0.24186510 0.74799553 [26,] -0.25200447 -0.24186510 [27,] -0.24186510 -0.25200447 [28,] -0.25200447 -0.24186510 [29,] -0.24186510 -0.25200447 [30,] -0.24186510 -0.24186510 [31,] -0.24186510 -0.24186510 [32,] -0.24186510 -0.24186510 [33,] 0.74799553 -0.24186510 [34,] -0.24186510 0.74799553 [35,] -0.24186510 -0.24186510 [36,] 0.75813490 -0.24186510 [37,] -0.25200447 0.75813490 [38,] -0.25200447 -0.25200447 [39,] 0.75813490 -0.25200447 [40,] -0.25200447 0.75813490 [41,] -0.25200447 -0.25200447 [42,] -0.25200447 -0.25200447 [43,] 0.75813490 -0.25200447 [44,] -0.24186510 0.75813490 [45,] -0.25200447 -0.24186510 [46,] -0.24186510 -0.25200447 [47,] -0.25200447 -0.24186510 [48,] -0.25200447 -0.25200447 [49,] -0.24186510 -0.25200447 [50,] 0.75813490 -0.24186510 [51,] 0.75813490 0.75813490 [52,] -0.25200447 0.75813490 [53,] -0.24186510 -0.25200447 [54,] -0.24186510 -0.24186510 [55,] 0.74799553 -0.24186510 [56,] -0.25200447 0.74799553 [57,] -0.25200447 -0.25200447 [58,] -0.25200447 -0.25200447 [59,] 0.74799553 -0.25200447 [60,] 0.74799553 0.74799553 [61,] -0.24186510 0.74799553 [62,] -0.24186510 -0.24186510 [63,] 0.74799553 -0.24186510 [64,] -0.24186510 0.74799553 [65,] -0.24186510 -0.24186510 [66,] 0.75813490 -0.24186510 [67,] -0.24186510 0.75813490 [68,] -0.25200447 -0.24186510 [69,] -0.24186510 -0.25200447 [70,] -0.24186510 -0.24186510 [71,] -0.25200447 -0.24186510 [72,] -0.25200447 -0.25200447 [73,] -0.24186510 -0.25200447 [74,] -0.25200447 -0.24186510 [75,] 0.74799553 -0.25200447 [76,] -0.25200447 0.74799553 [77,] -0.25200447 -0.25200447 [78,] 0.74799553 -0.25200447 [79,] 0.75813490 0.74799553 [80,] -0.24186510 0.75813490 [81,] -0.25200447 -0.24186510 [82,] -0.24186510 -0.25200447 [83,] -0.24186510 -0.24186510 [84,] -0.25200447 -0.24186510 [85,] -0.24186510 -0.25200447 [86,] -0.07711356 -0.24186510 [87,] 0.09777734 -0.07711356 [88,] -0.06697419 0.09777734 [89,] -0.07711356 -0.06697419 [90,] -0.06697419 -0.07711356 [91,] 0.10791671 -0.06697419 [92,] -0.06697419 0.10791671 [93,] -0.06697419 -0.06697419 [94,] 0.10791671 -0.06697419 [95,] -0.07711356 0.10791671 [96,] 0.10791671 -0.07711356 [97,] -0.06697419 0.10791671 [98,] -0.06697419 -0.06697419 [99,] -0.07711356 -0.06697419 [100,] -0.07711356 -0.07711356 [101,] -0.06697419 -0.07711356 [102,] -0.06697419 -0.06697419 [103,] -0.06697419 -0.06697419 [104,] 0.10791671 -0.06697419 [105,] -0.06697419 0.10791671 [106,] -0.06697419 -0.06697419 [107,] 0.10791671 -0.06697419 [108,] -0.06697419 0.10791671 [109,] -0.06697419 -0.06697419 [110,] 0.10791671 -0.06697419 [111,] 0.10791671 0.10791671 [112,] -0.06697419 0.10791671 [113,] 0.10791671 -0.06697419 [114,] -0.06697419 0.10791671 [115,] -0.06697419 -0.06697419 [116,] -0.07711356 -0.06697419 [117,] -0.06697419 -0.07711356 [118,] -0.06697419 -0.06697419 [119,] -0.07711356 -0.06697419 [120,] -0.06697419 -0.07711356 [121,] -0.06697419 -0.06697419 [122,] 0.10791671 -0.06697419 [123,] -0.07711356 0.10791671 [124,] -0.07711356 -0.07711356 [125,] 0.10791671 -0.07711356 [126,] -0.06697419 0.10791671 [127,] -0.07711356 -0.06697419 [128,] -0.06697419 -0.07711356 [129,] -0.07711356 -0.06697419 [130,] -0.06697419 -0.07711356 [131,] -0.07711356 -0.06697419 [132,] -0.06697419 -0.07711356 [133,] -0.06697419 -0.06697419 [134,] -0.06697419 -0.06697419 [135,] -0.06697419 -0.06697419 [136,] -0.07711356 -0.06697419 [137,] 0.09777734 -0.07711356 [138,] 0.10791671 0.09777734 [139,] -0.06697419 0.10791671 [140,] -0.07711356 -0.06697419 [141,] 0.09777734 -0.07711356 [142,] -0.06697419 0.09777734 [143,] -0.07711356 -0.06697419 [144,] -0.06697419 -0.07711356 [145,] 0.09777734 -0.06697419 [146,] 0.10791671 0.09777734 [147,] 0.10791671 0.10791671 [148,] -0.06697419 0.10791671 [149,] -0.07711356 -0.06697419 [150,] -0.07711356 -0.07711356 [151,] -0.06697419 -0.07711356 [152,] -0.06697419 -0.06697419 [153,] -0.06697419 -0.06697419 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -0.24186510 0.74799553 2 -0.24186510 -0.24186510 3 -0.24186510 -0.24186510 4 -0.24186510 -0.24186510 5 -0.25200447 -0.24186510 6 -0.24186510 -0.25200447 7 0.75813490 -0.24186510 8 -0.25200447 0.75813490 9 -0.24186510 -0.25200447 10 0.75813490 -0.24186510 11 -0.24186510 0.75813490 12 -0.24186510 -0.24186510 13 0.75813490 -0.24186510 14 -0.25200447 0.75813490 15 0.74799553 -0.25200447 16 0.75813490 0.74799553 17 0.75813490 0.75813490 18 -0.25200447 0.75813490 19 0.74799553 -0.25200447 20 -0.24186510 0.74799553 21 -0.25200447 -0.24186510 22 -0.25200447 -0.25200447 23 -0.25200447 -0.25200447 24 0.74799553 -0.25200447 25 -0.24186510 0.74799553 26 -0.25200447 -0.24186510 27 -0.24186510 -0.25200447 28 -0.25200447 -0.24186510 29 -0.24186510 -0.25200447 30 -0.24186510 -0.24186510 31 -0.24186510 -0.24186510 32 -0.24186510 -0.24186510 33 0.74799553 -0.24186510 34 -0.24186510 0.74799553 35 -0.24186510 -0.24186510 36 0.75813490 -0.24186510 37 -0.25200447 0.75813490 38 -0.25200447 -0.25200447 39 0.75813490 -0.25200447 40 -0.25200447 0.75813490 41 -0.25200447 -0.25200447 42 -0.25200447 -0.25200447 43 0.75813490 -0.25200447 44 -0.24186510 0.75813490 45 -0.25200447 -0.24186510 46 -0.24186510 -0.25200447 47 -0.25200447 -0.24186510 48 -0.25200447 -0.25200447 49 -0.24186510 -0.25200447 50 0.75813490 -0.24186510 51 0.75813490 0.75813490 52 -0.25200447 0.75813490 53 -0.24186510 -0.25200447 54 -0.24186510 -0.24186510 55 0.74799553 -0.24186510 56 -0.25200447 0.74799553 57 -0.25200447 -0.25200447 58 -0.25200447 -0.25200447 59 0.74799553 -0.25200447 60 0.74799553 0.74799553 61 -0.24186510 0.74799553 62 -0.24186510 -0.24186510 63 0.74799553 -0.24186510 64 -0.24186510 0.74799553 65 -0.24186510 -0.24186510 66 0.75813490 -0.24186510 67 -0.24186510 0.75813490 68 -0.25200447 -0.24186510 69 -0.24186510 -0.25200447 70 -0.24186510 -0.24186510 71 -0.25200447 -0.24186510 72 -0.25200447 -0.25200447 73 -0.24186510 -0.25200447 74 -0.25200447 -0.24186510 75 0.74799553 -0.25200447 76 -0.25200447 0.74799553 77 -0.25200447 -0.25200447 78 0.74799553 -0.25200447 79 0.75813490 0.74799553 80 -0.24186510 0.75813490 81 -0.25200447 -0.24186510 82 -0.24186510 -0.25200447 83 -0.24186510 -0.24186510 84 -0.25200447 -0.24186510 85 -0.24186510 -0.25200447 86 -0.07711356 -0.24186510 87 0.09777734 -0.07711356 88 -0.06697419 0.09777734 89 -0.07711356 -0.06697419 90 -0.06697419 -0.07711356 91 0.10791671 -0.06697419 92 -0.06697419 0.10791671 93 -0.06697419 -0.06697419 94 0.10791671 -0.06697419 95 -0.07711356 0.10791671 96 0.10791671 -0.07711356 97 -0.06697419 0.10791671 98 -0.06697419 -0.06697419 99 -0.07711356 -0.06697419 100 -0.07711356 -0.07711356 101 -0.06697419 -0.07711356 102 -0.06697419 -0.06697419 103 -0.06697419 -0.06697419 104 0.10791671 -0.06697419 105 -0.06697419 0.10791671 106 -0.06697419 -0.06697419 107 0.10791671 -0.06697419 108 -0.06697419 0.10791671 109 -0.06697419 -0.06697419 110 0.10791671 -0.06697419 111 0.10791671 0.10791671 112 -0.06697419 0.10791671 113 0.10791671 -0.06697419 114 -0.06697419 0.10791671 115 -0.06697419 -0.06697419 116 -0.07711356 -0.06697419 117 -0.06697419 -0.07711356 118 -0.06697419 -0.06697419 119 -0.07711356 -0.06697419 120 -0.06697419 -0.07711356 121 -0.06697419 -0.06697419 122 0.10791671 -0.06697419 123 -0.07711356 0.10791671 124 -0.07711356 -0.07711356 125 0.10791671 -0.07711356 126 -0.06697419 0.10791671 127 -0.07711356 -0.06697419 128 -0.06697419 -0.07711356 129 -0.07711356 -0.06697419 130 -0.06697419 -0.07711356 131 -0.07711356 -0.06697419 132 -0.06697419 -0.07711356 133 -0.06697419 -0.06697419 134 -0.06697419 -0.06697419 135 -0.06697419 -0.06697419 136 -0.07711356 -0.06697419 137 0.09777734 -0.07711356 138 0.10791671 0.09777734 139 -0.06697419 0.10791671 140 -0.07711356 -0.06697419 141 0.09777734 -0.07711356 142 -0.06697419 0.09777734 143 -0.07711356 -0.06697419 144 -0.06697419 -0.07711356 145 0.09777734 -0.06697419 146 0.10791671 0.09777734 147 0.10791671 0.10791671 148 -0.06697419 0.10791671 149 -0.07711356 -0.06697419 150 -0.07711356 -0.07711356 151 -0.06697419 -0.07711356 152 -0.06697419 -0.06697419 153 -0.06697419 -0.06697419 > 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/7glba1355994083.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/8yth41355994083.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/9e8jn1355994083.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/101fev1355994083.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/11jpco1355994083.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/12pswk1355994083.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/13kiin1355994083.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/14dl9f1355994083.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/15wirn1355994083.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/16t83m1355994083.tab") + } > > try(system("convert tmp/12og21355994083.ps tmp/12og21355994083.png",intern=TRUE)) character(0) > try(system("convert tmp/2c4he1355994083.ps tmp/2c4he1355994083.png",intern=TRUE)) character(0) > try(system("convert tmp/3up241355994083.ps tmp/3up241355994083.png",intern=TRUE)) character(0) > try(system("convert tmp/4fq9u1355994083.ps tmp/4fq9u1355994083.png",intern=TRUE)) character(0) > try(system("convert tmp/5t02h1355994083.ps tmp/5t02h1355994083.png",intern=TRUE)) character(0) > try(system("convert tmp/6va2n1355994083.ps tmp/6va2n1355994083.png",intern=TRUE)) character(0) > try(system("convert tmp/7glba1355994083.ps tmp/7glba1355994083.png",intern=TRUE)) character(0) > try(system("convert tmp/8yth41355994083.ps tmp/8yth41355994083.png",intern=TRUE)) character(0) > try(system("convert tmp/9e8jn1355994083.ps tmp/9e8jn1355994083.png",intern=TRUE)) character(0) > try(system("convert tmp/101fev1355994083.ps tmp/101fev1355994083.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 7.283 0.870 8.171