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,0,0,1,0,1,1,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,1,0,0,1,0,1,0,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,0,1,0,0,0,0,0,0,1,0,1,1,0,0,0,0,0,1,0,0,0,0,1,1,0,1,0,0,1,0,0,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,0,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 0 0 1 88 0 1 1 89 0 0 0 90 0 0 1 91 0 0 0 92 0 1 0 93 0 0 0 94 0 0 0 95 0 1 0 96 0 0 1 97 0 1 0 98 0 0 0 99 0 0 0 100 0 0 1 101 0 0 1 102 0 0 0 103 0 0 0 104 0 0 0 105 0 1 0 106 0 0 0 107 0 0 0 108 0 1 0 109 0 0 0 110 0 0 0 111 0 1 0 112 0 1 0 113 0 0 0 114 0 1 0 115 0 0 0 116 0 0 0 117 0 0 1 118 0 0 0 119 0 0 0 120 0 0 1 121 0 0 0 122 0 0 0 123 0 1 0 124 0 0 1 125 0 0 1 126 0 1 0 127 0 0 0 128 0 0 1 129 0 0 0 130 0 0 1 131 0 0 0 132 0 0 1 133 0 0 0 134 0 0 0 135 0 0 0 136 0 0 0 137 0 0 1 138 0 1 1 139 0 1 0 140 0 0 0 141 0 0 1 142 0 1 1 143 0 0 0 144 0 0 1 145 0 0 0 146 0 1 1 147 0 1 0 148 0 1 0 149 0 0 0 150 0 0 1 151 0 0 1 152 0 0 0 153 0 0 0 154 0 0 0 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) T20 Outcome 0.7309 -0.7675 0.1555 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -0.8864 -0.7309 0.1136 0.2691 1.2691 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 0.73094 0.07338 9.962 < 2e-16 *** T20 -0.76752 0.17296 -4.438 1.75e-05 *** Outcome 0.15545 0.11082 1.403 0.163 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.6681 on 151 degrees of freedom Multiple R-squared: 0.1343, Adjusted R-squared: 0.1228 F-statistic: 11.71 on 2 and 151 DF, p-value: 1.875e-05 > 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.223214428 4.464289e-01 7.767856e-01 [2,] 0.105529096 2.110582e-01 8.944709e-01 [3,] 0.296438126 5.928763e-01 7.035619e-01 [4,] 0.234082765 4.681655e-01 7.659172e-01 [5,] 0.152154389 3.043088e-01 8.478456e-01 [6,] 0.231255379 4.625108e-01 7.687446e-01 [7,] 0.166474809 3.329496e-01 8.335252e-01 [8,] 0.115469841 2.309397e-01 8.845302e-01 [9,] 0.165053979 3.301080e-01 8.349460e-01 [10,] 0.123575178 2.471504e-01 8.764248e-01 [11,] 0.146676711 2.933534e-01 8.533233e-01 [12,] 0.181122683 3.622454e-01 8.188773e-01 [13,] 0.207989501 4.159790e-01 7.920105e-01 [14,] 0.172757589 3.455152e-01 8.272424e-01 [15,] 0.190162006 3.803240e-01 8.098380e-01 [16,] 0.160696990 3.213940e-01 8.393030e-01 [17,] 0.136466292 2.729326e-01 8.635337e-01 [18,] 0.111973535 2.239471e-01 8.880265e-01 [19,] 0.089260669 1.785213e-01 9.107393e-01 [20,] 0.109236382 2.184728e-01 8.907636e-01 [21,] 0.090306052 1.806121e-01 9.096939e-01 [22,] 0.073581354 1.471627e-01 9.264186e-01 [23,] 0.059395308 1.187906e-01 9.406047e-01 [24,] 0.046979729 9.395946e-02 9.530203e-01 [25,] 0.037034742 7.406948e-02 9.629653e-01 [26,] 0.028728159 5.745632e-02 9.712718e-01 [27,] 0.021947347 4.389469e-02 9.780527e-01 [28,] 0.016525655 3.305131e-02 9.834743e-01 [29,] 0.023181965 4.636393e-02 9.768180e-01 [30,] 0.017585483 3.517097e-02 9.824145e-01 [31,] 0.013175046 2.635009e-02 9.868250e-01 [32,] 0.023712315 4.742463e-02 9.762877e-01 [33,] 0.019017822 3.803564e-02 9.809822e-01 [34,] 0.014953437 2.990687e-02 9.850466e-01 [35,] 0.026184703 5.236941e-02 9.738153e-01 [36,] 0.020726460 4.145292e-02 9.792735e-01 [37,] 0.016153644 3.230729e-02 9.838464e-01 [38,] 0.012407353 2.481471e-02 9.875926e-01 [39,] 0.022262641 4.452528e-02 9.777374e-01 [40,] 0.018599431 3.719886e-02 9.814006e-01 [41,] 0.014417439 2.883488e-02 9.855826e-01 [42,] 0.011912777 2.382555e-02 9.880872e-01 [43,] 0.009083099 1.816620e-02 9.909169e-01 [44,] 0.006845612 1.369122e-02 9.931544e-01 [45,] 0.005575270 1.115054e-02 9.944247e-01 [46,] 0.012089969 2.417994e-02 9.879100e-01 [47,] 0.025330811 5.066162e-02 9.746692e-01 [48,] 0.020074771 4.014954e-02 9.799252e-01 [49,] 0.017926790 3.585358e-02 9.820732e-01 [50,] 0.016001063 3.200213e-02 9.839989e-01 [51,] 0.032144325 6.428865e-02 9.678557e-01 [52,] 0.026431079 5.286216e-02 9.735689e-01 [53,] 0.021599246 4.319849e-02 9.784008e-01 [54,] 0.017554307 3.510861e-02 9.824457e-01 [55,] 0.038528557 7.705711e-02 9.614714e-01 [56,] 0.080277819 1.605556e-01 9.197222e-01 [57,] 0.076484566 1.529691e-01 9.235154e-01 [58,] 0.073191545 1.463831e-01 9.268085e-01 [59,] 0.151300073 3.026001e-01 8.486999e-01 [60,] 0.148776886 2.975538e-01 8.512231e-01 [61,] 0.147303322 2.946066e-01 8.526967e-01 [62,] 0.331736905 6.634738e-01 6.682631e-01 [63,] 0.342638042 6.852761e-01 6.573620e-01 [64,] 0.336191479 6.723830e-01 6.638085e-01 [65,] 0.351524438 7.030489e-01 6.484756e-01 [66,] 0.370989991 7.419800e-01 6.290100e-01 [67,] 0.369150216 7.383004e-01 6.308498e-01 [68,] 0.370088173 7.401763e-01 6.299118e-01 [69,] 0.397922064 7.958441e-01 6.020779e-01 [70,] 0.404359213 8.087184e-01 5.956408e-01 [71,] 0.735799851 5.284003e-01 2.642001e-01 [72,] 0.764688780 4.706224e-01 2.353112e-01 [73,] 0.798605141 4.027897e-01 2.013949e-01 [74,] 0.987405867 2.518827e-02 1.259413e-02 [75,] 0.999991761 1.647810e-05 8.239051e-06 [76,] 0.999999406 1.187193e-06 5.935963e-07 [77,] 0.999999985 3.033203e-08 1.516601e-08 [78,] 1.000000000 1.396847e-10 6.984237e-11 [79,] 1.000000000 1.850268e-14 9.251341e-15 [80,] 1.000000000 3.492072e-22 1.746036e-22 [81,] 1.000000000 0.000000e+00 0.000000e+00 [82,] 1.000000000 0.000000e+00 0.000000e+00 [83,] 1.000000000 0.000000e+00 0.000000e+00 [84,] 1.000000000 0.000000e+00 0.000000e+00 [85,] 1.000000000 0.000000e+00 0.000000e+00 [86,] 1.000000000 0.000000e+00 0.000000e+00 [87,] 1.000000000 0.000000e+00 0.000000e+00 [88,] 1.000000000 0.000000e+00 0.000000e+00 [89,] 1.000000000 0.000000e+00 0.000000e+00 [90,] 1.000000000 0.000000e+00 0.000000e+00 [91,] 1.000000000 0.000000e+00 0.000000e+00 [92,] 1.000000000 0.000000e+00 0.000000e+00 [93,] 1.000000000 0.000000e+00 0.000000e+00 [94,] 1.000000000 0.000000e+00 0.000000e+00 [95,] 1.000000000 0.000000e+00 0.000000e+00 [96,] 1.000000000 0.000000e+00 0.000000e+00 [97,] 1.000000000 0.000000e+00 0.000000e+00 [98,] 1.000000000 0.000000e+00 0.000000e+00 [99,] 1.000000000 0.000000e+00 0.000000e+00 [100,] 1.000000000 0.000000e+00 0.000000e+00 [101,] 1.000000000 0.000000e+00 0.000000e+00 [102,] 1.000000000 0.000000e+00 0.000000e+00 [103,] 1.000000000 0.000000e+00 0.000000e+00 [104,] 1.000000000 0.000000e+00 0.000000e+00 [105,] 1.000000000 0.000000e+00 0.000000e+00 [106,] 1.000000000 0.000000e+00 0.000000e+00 [107,] 1.000000000 0.000000e+00 0.000000e+00 [108,] 1.000000000 0.000000e+00 0.000000e+00 [109,] 1.000000000 0.000000e+00 0.000000e+00 [110,] 1.000000000 0.000000e+00 0.000000e+00 [111,] 1.000000000 0.000000e+00 0.000000e+00 [112,] 1.000000000 0.000000e+00 0.000000e+00 [113,] 1.000000000 0.000000e+00 0.000000e+00 [114,] 1.000000000 0.000000e+00 0.000000e+00 [115,] 1.000000000 0.000000e+00 0.000000e+00 [116,] 1.000000000 0.000000e+00 0.000000e+00 [117,] 1.000000000 0.000000e+00 0.000000e+00 [118,] 1.000000000 0.000000e+00 0.000000e+00 [119,] 1.000000000 0.000000e+00 0.000000e+00 [120,] 1.000000000 0.000000e+00 0.000000e+00 [121,] 1.000000000 0.000000e+00 0.000000e+00 [122,] 1.000000000 0.000000e+00 0.000000e+00 [123,] 1.000000000 0.000000e+00 0.000000e+00 [124,] 1.000000000 0.000000e+00 0.000000e+00 [125,] 1.000000000 0.000000e+00 0.000000e+00 [126,] 1.000000000 0.000000e+00 0.000000e+00 [127,] 1.000000000 0.000000e+00 0.000000e+00 [128,] 1.000000000 0.000000e+00 0.000000e+00 [129,] 1.000000000 0.000000e+00 0.000000e+00 [130,] 1.000000000 0.000000e+00 0.000000e+00 [131,] 1.000000000 0.000000e+00 0.000000e+00 [132,] 1.000000000 0.000000e+00 0.000000e+00 [133,] 1.000000000 0.000000e+00 0.000000e+00 [134,] 1.000000000 0.000000e+00 0.000000e+00 [135,] 1.000000000 0.000000e+00 0.000000e+00 [136,] 1.000000000 0.000000e+00 0.000000e+00 [137,] 1.000000000 0.000000e+00 0.000000e+00 [138,] 1.000000000 0.000000e+00 0.000000e+00 [139,] 1.000000000 0.000000e+00 0.000000e+00 [140,] 1.000000000 0.000000e+00 0.000000e+00 [141,] 1.000000000 0.000000e+00 0.000000e+00 [142,] 1.000000000 0.000000e+00 0.000000e+00 [143,] 1.000000000 0.000000e+00 0.000000e+00 > postscript(file="/var/fisher/rcomp/tmp/1c7r91355956097.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/fisher/rcomp/tmp/2erzu1355956097.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/fisher/rcomp/tmp/3t2wk1355956097.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/fisher/rcomp/tmp/4qigw1355956097.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/fisher/rcomp/tmp/5desc1355956097.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 1.11360522 0.26905628 0.26905628 0.26905628 0.26905628 0.11360522 7 8 9 10 11 12 0.26905628 1.26905628 0.11360522 0.26905628 1.26905628 0.26905628 13 14 15 16 17 18 0.26905628 1.26905628 0.11360522 1.11360522 1.26905628 1.26905628 19 20 21 22 23 24 0.11360522 1.11360522 0.26905628 0.11360522 0.11360522 0.11360522 25 26 27 28 29 30 1.11360522 0.26905628 0.11360522 0.26905628 0.11360522 0.26905628 31 32 33 34 35 36 0.26905628 0.26905628 0.26905628 1.11360522 0.26905628 0.26905628 37 38 39 40 41 42 1.26905628 0.11360522 0.11360522 1.26905628 0.11360522 0.11360522 43 44 45 46 47 48 0.11360522 1.26905628 0.26905628 0.11360522 0.26905628 0.11360522 49 50 51 52 53 54 0.11360522 0.26905628 1.26905628 1.26905628 0.11360522 0.26905628 55 56 57 58 59 60 0.26905628 1.11360522 0.11360522 0.11360522 0.11360522 1.11360522 61 62 63 64 65 66 1.11360522 0.26905628 0.26905628 1.11360522 0.26905628 0.26905628 67 68 69 70 71 72 1.26905628 0.26905628 0.11360522 0.26905628 0.26905628 0.11360522 73 74 75 76 77 78 0.11360522 0.26905628 0.11360522 1.11360522 0.11360522 0.11360522 79 80 81 82 83 84 1.11360522 1.26905628 0.26905628 0.11360522 0.26905628 0.26905628 85 86 87 88 89 90 0.11360522 0.26905628 -0.88639478 -0.11887434 -0.73094372 -0.88639478 91 92 93 94 95 96 -0.73094372 0.03657672 -0.73094372 -0.73094372 0.03657672 -0.88639478 97 98 99 100 101 102 0.03657672 -0.73094372 -0.73094372 -0.88639478 -0.88639478 -0.73094372 103 104 105 106 107 108 -0.73094372 -0.73094372 0.03657672 -0.73094372 -0.73094372 0.03657672 109 110 111 112 113 114 -0.73094372 -0.73094372 0.03657672 0.03657672 -0.73094372 0.03657672 115 116 117 118 119 120 -0.73094372 -0.73094372 -0.88639478 -0.73094372 -0.73094372 -0.88639478 121 122 123 124 125 126 -0.73094372 -0.73094372 0.03657672 -0.88639478 -0.88639478 0.03657672 127 128 129 130 131 132 -0.73094372 -0.88639478 -0.73094372 -0.88639478 -0.73094372 -0.88639478 133 134 135 136 137 138 -0.73094372 -0.73094372 -0.73094372 -0.73094372 -0.88639478 -0.11887434 139 140 141 142 143 144 0.03657672 -0.73094372 -0.88639478 -0.11887434 -0.73094372 -0.88639478 145 146 147 148 149 150 -0.73094372 -0.11887434 0.03657672 0.03657672 -0.73094372 -0.88639478 151 152 153 154 -0.88639478 -0.73094372 -0.73094372 -0.73094372 > postscript(file="/var/fisher/rcomp/tmp/6af781355956097.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 1.11360522 NA 1 0.26905628 1.11360522 2 0.26905628 0.26905628 3 0.26905628 0.26905628 4 0.26905628 0.26905628 5 0.11360522 0.26905628 6 0.26905628 0.11360522 7 1.26905628 0.26905628 8 0.11360522 1.26905628 9 0.26905628 0.11360522 10 1.26905628 0.26905628 11 0.26905628 1.26905628 12 0.26905628 0.26905628 13 1.26905628 0.26905628 14 0.11360522 1.26905628 15 1.11360522 0.11360522 16 1.26905628 1.11360522 17 1.26905628 1.26905628 18 0.11360522 1.26905628 19 1.11360522 0.11360522 20 0.26905628 1.11360522 21 0.11360522 0.26905628 22 0.11360522 0.11360522 23 0.11360522 0.11360522 24 1.11360522 0.11360522 25 0.26905628 1.11360522 26 0.11360522 0.26905628 27 0.26905628 0.11360522 28 0.11360522 0.26905628 29 0.26905628 0.11360522 30 0.26905628 0.26905628 31 0.26905628 0.26905628 32 0.26905628 0.26905628 33 1.11360522 0.26905628 34 0.26905628 1.11360522 35 0.26905628 0.26905628 36 1.26905628 0.26905628 37 0.11360522 1.26905628 38 0.11360522 0.11360522 39 1.26905628 0.11360522 40 0.11360522 1.26905628 41 0.11360522 0.11360522 42 0.11360522 0.11360522 43 1.26905628 0.11360522 44 0.26905628 1.26905628 45 0.11360522 0.26905628 46 0.26905628 0.11360522 47 0.11360522 0.26905628 48 0.11360522 0.11360522 49 0.26905628 0.11360522 50 1.26905628 0.26905628 51 1.26905628 1.26905628 52 0.11360522 1.26905628 53 0.26905628 0.11360522 54 0.26905628 0.26905628 55 1.11360522 0.26905628 56 0.11360522 1.11360522 57 0.11360522 0.11360522 58 0.11360522 0.11360522 59 1.11360522 0.11360522 60 1.11360522 1.11360522 61 0.26905628 1.11360522 62 0.26905628 0.26905628 63 1.11360522 0.26905628 64 0.26905628 1.11360522 65 0.26905628 0.26905628 66 1.26905628 0.26905628 67 0.26905628 1.26905628 68 0.11360522 0.26905628 69 0.26905628 0.11360522 70 0.26905628 0.26905628 71 0.11360522 0.26905628 72 0.11360522 0.11360522 73 0.26905628 0.11360522 74 0.11360522 0.26905628 75 1.11360522 0.11360522 76 0.11360522 1.11360522 77 0.11360522 0.11360522 78 1.11360522 0.11360522 79 1.26905628 1.11360522 80 0.26905628 1.26905628 81 0.11360522 0.26905628 82 0.26905628 0.11360522 83 0.26905628 0.26905628 84 0.11360522 0.26905628 85 0.26905628 0.11360522 86 -0.88639478 0.26905628 87 -0.11887434 -0.88639478 88 -0.73094372 -0.11887434 89 -0.88639478 -0.73094372 90 -0.73094372 -0.88639478 91 0.03657672 -0.73094372 92 -0.73094372 0.03657672 93 -0.73094372 -0.73094372 94 0.03657672 -0.73094372 95 -0.88639478 0.03657672 96 0.03657672 -0.88639478 97 -0.73094372 0.03657672 98 -0.73094372 -0.73094372 99 -0.88639478 -0.73094372 100 -0.88639478 -0.88639478 101 -0.73094372 -0.88639478 102 -0.73094372 -0.73094372 103 -0.73094372 -0.73094372 104 0.03657672 -0.73094372 105 -0.73094372 0.03657672 106 -0.73094372 -0.73094372 107 0.03657672 -0.73094372 108 -0.73094372 0.03657672 109 -0.73094372 -0.73094372 110 0.03657672 -0.73094372 111 0.03657672 0.03657672 112 -0.73094372 0.03657672 113 0.03657672 -0.73094372 114 -0.73094372 0.03657672 115 -0.73094372 -0.73094372 116 -0.88639478 -0.73094372 117 -0.73094372 -0.88639478 118 -0.73094372 -0.73094372 119 -0.88639478 -0.73094372 120 -0.73094372 -0.88639478 121 -0.73094372 -0.73094372 122 0.03657672 -0.73094372 123 -0.88639478 0.03657672 124 -0.88639478 -0.88639478 125 0.03657672 -0.88639478 126 -0.73094372 0.03657672 127 -0.88639478 -0.73094372 128 -0.73094372 -0.88639478 129 -0.88639478 -0.73094372 130 -0.73094372 -0.88639478 131 -0.88639478 -0.73094372 132 -0.73094372 -0.88639478 133 -0.73094372 -0.73094372 134 -0.73094372 -0.73094372 135 -0.73094372 -0.73094372 136 -0.88639478 -0.73094372 137 -0.11887434 -0.88639478 138 0.03657672 -0.11887434 139 -0.73094372 0.03657672 140 -0.88639478 -0.73094372 141 -0.11887434 -0.88639478 142 -0.73094372 -0.11887434 143 -0.88639478 -0.73094372 144 -0.73094372 -0.88639478 145 -0.11887434 -0.73094372 146 0.03657672 -0.11887434 147 0.03657672 0.03657672 148 -0.73094372 0.03657672 149 -0.88639478 -0.73094372 150 -0.88639478 -0.88639478 151 -0.73094372 -0.88639478 152 -0.73094372 -0.73094372 153 -0.73094372 -0.73094372 154 NA -0.73094372 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 0.26905628 1.11360522 [2,] 0.26905628 0.26905628 [3,] 0.26905628 0.26905628 [4,] 0.26905628 0.26905628 [5,] 0.11360522 0.26905628 [6,] 0.26905628 0.11360522 [7,] 1.26905628 0.26905628 [8,] 0.11360522 1.26905628 [9,] 0.26905628 0.11360522 [10,] 1.26905628 0.26905628 [11,] 0.26905628 1.26905628 [12,] 0.26905628 0.26905628 [13,] 1.26905628 0.26905628 [14,] 0.11360522 1.26905628 [15,] 1.11360522 0.11360522 [16,] 1.26905628 1.11360522 [17,] 1.26905628 1.26905628 [18,] 0.11360522 1.26905628 [19,] 1.11360522 0.11360522 [20,] 0.26905628 1.11360522 [21,] 0.11360522 0.26905628 [22,] 0.11360522 0.11360522 [23,] 0.11360522 0.11360522 [24,] 1.11360522 0.11360522 [25,] 0.26905628 1.11360522 [26,] 0.11360522 0.26905628 [27,] 0.26905628 0.11360522 [28,] 0.11360522 0.26905628 [29,] 0.26905628 0.11360522 [30,] 0.26905628 0.26905628 [31,] 0.26905628 0.26905628 [32,] 0.26905628 0.26905628 [33,] 1.11360522 0.26905628 [34,] 0.26905628 1.11360522 [35,] 0.26905628 0.26905628 [36,] 1.26905628 0.26905628 [37,] 0.11360522 1.26905628 [38,] 0.11360522 0.11360522 [39,] 1.26905628 0.11360522 [40,] 0.11360522 1.26905628 [41,] 0.11360522 0.11360522 [42,] 0.11360522 0.11360522 [43,] 1.26905628 0.11360522 [44,] 0.26905628 1.26905628 [45,] 0.11360522 0.26905628 [46,] 0.26905628 0.11360522 [47,] 0.11360522 0.26905628 [48,] 0.11360522 0.11360522 [49,] 0.26905628 0.11360522 [50,] 1.26905628 0.26905628 [51,] 1.26905628 1.26905628 [52,] 0.11360522 1.26905628 [53,] 0.26905628 0.11360522 [54,] 0.26905628 0.26905628 [55,] 1.11360522 0.26905628 [56,] 0.11360522 1.11360522 [57,] 0.11360522 0.11360522 [58,] 0.11360522 0.11360522 [59,] 1.11360522 0.11360522 [60,] 1.11360522 1.11360522 [61,] 0.26905628 1.11360522 [62,] 0.26905628 0.26905628 [63,] 1.11360522 0.26905628 [64,] 0.26905628 1.11360522 [65,] 0.26905628 0.26905628 [66,] 1.26905628 0.26905628 [67,] 0.26905628 1.26905628 [68,] 0.11360522 0.26905628 [69,] 0.26905628 0.11360522 [70,] 0.26905628 0.26905628 [71,] 0.11360522 0.26905628 [72,] 0.11360522 0.11360522 [73,] 0.26905628 0.11360522 [74,] 0.11360522 0.26905628 [75,] 1.11360522 0.11360522 [76,] 0.11360522 1.11360522 [77,] 0.11360522 0.11360522 [78,] 1.11360522 0.11360522 [79,] 1.26905628 1.11360522 [80,] 0.26905628 1.26905628 [81,] 0.11360522 0.26905628 [82,] 0.26905628 0.11360522 [83,] 0.26905628 0.26905628 [84,] 0.11360522 0.26905628 [85,] 0.26905628 0.11360522 [86,] -0.88639478 0.26905628 [87,] -0.11887434 -0.88639478 [88,] -0.73094372 -0.11887434 [89,] -0.88639478 -0.73094372 [90,] -0.73094372 -0.88639478 [91,] 0.03657672 -0.73094372 [92,] -0.73094372 0.03657672 [93,] -0.73094372 -0.73094372 [94,] 0.03657672 -0.73094372 [95,] -0.88639478 0.03657672 [96,] 0.03657672 -0.88639478 [97,] -0.73094372 0.03657672 [98,] -0.73094372 -0.73094372 [99,] -0.88639478 -0.73094372 [100,] -0.88639478 -0.88639478 [101,] -0.73094372 -0.88639478 [102,] -0.73094372 -0.73094372 [103,] -0.73094372 -0.73094372 [104,] 0.03657672 -0.73094372 [105,] -0.73094372 0.03657672 [106,] -0.73094372 -0.73094372 [107,] 0.03657672 -0.73094372 [108,] -0.73094372 0.03657672 [109,] -0.73094372 -0.73094372 [110,] 0.03657672 -0.73094372 [111,] 0.03657672 0.03657672 [112,] -0.73094372 0.03657672 [113,] 0.03657672 -0.73094372 [114,] -0.73094372 0.03657672 [115,] -0.73094372 -0.73094372 [116,] -0.88639478 -0.73094372 [117,] -0.73094372 -0.88639478 [118,] -0.73094372 -0.73094372 [119,] -0.88639478 -0.73094372 [120,] -0.73094372 -0.88639478 [121,] -0.73094372 -0.73094372 [122,] 0.03657672 -0.73094372 [123,] -0.88639478 0.03657672 [124,] -0.88639478 -0.88639478 [125,] 0.03657672 -0.88639478 [126,] -0.73094372 0.03657672 [127,] -0.88639478 -0.73094372 [128,] -0.73094372 -0.88639478 [129,] -0.88639478 -0.73094372 [130,] -0.73094372 -0.88639478 [131,] -0.88639478 -0.73094372 [132,] -0.73094372 -0.88639478 [133,] -0.73094372 -0.73094372 [134,] -0.73094372 -0.73094372 [135,] -0.73094372 -0.73094372 [136,] -0.88639478 -0.73094372 [137,] -0.11887434 -0.88639478 [138,] 0.03657672 -0.11887434 [139,] -0.73094372 0.03657672 [140,] -0.88639478 -0.73094372 [141,] -0.11887434 -0.88639478 [142,] -0.73094372 -0.11887434 [143,] -0.88639478 -0.73094372 [144,] -0.73094372 -0.88639478 [145,] -0.11887434 -0.73094372 [146,] 0.03657672 -0.11887434 [147,] 0.03657672 0.03657672 [148,] -0.73094372 0.03657672 [149,] -0.88639478 -0.73094372 [150,] -0.88639478 -0.88639478 [151,] -0.73094372 -0.88639478 [152,] -0.73094372 -0.73094372 [153,] -0.73094372 -0.73094372 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 0.26905628 1.11360522 2 0.26905628 0.26905628 3 0.26905628 0.26905628 4 0.26905628 0.26905628 5 0.11360522 0.26905628 6 0.26905628 0.11360522 7 1.26905628 0.26905628 8 0.11360522 1.26905628 9 0.26905628 0.11360522 10 1.26905628 0.26905628 11 0.26905628 1.26905628 12 0.26905628 0.26905628 13 1.26905628 0.26905628 14 0.11360522 1.26905628 15 1.11360522 0.11360522 16 1.26905628 1.11360522 17 1.26905628 1.26905628 18 0.11360522 1.26905628 19 1.11360522 0.11360522 20 0.26905628 1.11360522 21 0.11360522 0.26905628 22 0.11360522 0.11360522 23 0.11360522 0.11360522 24 1.11360522 0.11360522 25 0.26905628 1.11360522 26 0.11360522 0.26905628 27 0.26905628 0.11360522 28 0.11360522 0.26905628 29 0.26905628 0.11360522 30 0.26905628 0.26905628 31 0.26905628 0.26905628 32 0.26905628 0.26905628 33 1.11360522 0.26905628 34 0.26905628 1.11360522 35 0.26905628 0.26905628 36 1.26905628 0.26905628 37 0.11360522 1.26905628 38 0.11360522 0.11360522 39 1.26905628 0.11360522 40 0.11360522 1.26905628 41 0.11360522 0.11360522 42 0.11360522 0.11360522 43 1.26905628 0.11360522 44 0.26905628 1.26905628 45 0.11360522 0.26905628 46 0.26905628 0.11360522 47 0.11360522 0.26905628 48 0.11360522 0.11360522 49 0.26905628 0.11360522 50 1.26905628 0.26905628 51 1.26905628 1.26905628 52 0.11360522 1.26905628 53 0.26905628 0.11360522 54 0.26905628 0.26905628 55 1.11360522 0.26905628 56 0.11360522 1.11360522 57 0.11360522 0.11360522 58 0.11360522 0.11360522 59 1.11360522 0.11360522 60 1.11360522 1.11360522 61 0.26905628 1.11360522 62 0.26905628 0.26905628 63 1.11360522 0.26905628 64 0.26905628 1.11360522 65 0.26905628 0.26905628 66 1.26905628 0.26905628 67 0.26905628 1.26905628 68 0.11360522 0.26905628 69 0.26905628 0.11360522 70 0.26905628 0.26905628 71 0.11360522 0.26905628 72 0.11360522 0.11360522 73 0.26905628 0.11360522 74 0.11360522 0.26905628 75 1.11360522 0.11360522 76 0.11360522 1.11360522 77 0.11360522 0.11360522 78 1.11360522 0.11360522 79 1.26905628 1.11360522 80 0.26905628 1.26905628 81 0.11360522 0.26905628 82 0.26905628 0.11360522 83 0.26905628 0.26905628 84 0.11360522 0.26905628 85 0.26905628 0.11360522 86 -0.88639478 0.26905628 87 -0.11887434 -0.88639478 88 -0.73094372 -0.11887434 89 -0.88639478 -0.73094372 90 -0.73094372 -0.88639478 91 0.03657672 -0.73094372 92 -0.73094372 0.03657672 93 -0.73094372 -0.73094372 94 0.03657672 -0.73094372 95 -0.88639478 0.03657672 96 0.03657672 -0.88639478 97 -0.73094372 0.03657672 98 -0.73094372 -0.73094372 99 -0.88639478 -0.73094372 100 -0.88639478 -0.88639478 101 -0.73094372 -0.88639478 102 -0.73094372 -0.73094372 103 -0.73094372 -0.73094372 104 0.03657672 -0.73094372 105 -0.73094372 0.03657672 106 -0.73094372 -0.73094372 107 0.03657672 -0.73094372 108 -0.73094372 0.03657672 109 -0.73094372 -0.73094372 110 0.03657672 -0.73094372 111 0.03657672 0.03657672 112 -0.73094372 0.03657672 113 0.03657672 -0.73094372 114 -0.73094372 0.03657672 115 -0.73094372 -0.73094372 116 -0.88639478 -0.73094372 117 -0.73094372 -0.88639478 118 -0.73094372 -0.73094372 119 -0.88639478 -0.73094372 120 -0.73094372 -0.88639478 121 -0.73094372 -0.73094372 122 0.03657672 -0.73094372 123 -0.88639478 0.03657672 124 -0.88639478 -0.88639478 125 0.03657672 -0.88639478 126 -0.73094372 0.03657672 127 -0.88639478 -0.73094372 128 -0.73094372 -0.88639478 129 -0.88639478 -0.73094372 130 -0.73094372 -0.88639478 131 -0.88639478 -0.73094372 132 -0.73094372 -0.88639478 133 -0.73094372 -0.73094372 134 -0.73094372 -0.73094372 135 -0.73094372 -0.73094372 136 -0.88639478 -0.73094372 137 -0.11887434 -0.88639478 138 0.03657672 -0.11887434 139 -0.73094372 0.03657672 140 -0.88639478 -0.73094372 141 -0.11887434 -0.88639478 142 -0.73094372 -0.11887434 143 -0.88639478 -0.73094372 144 -0.73094372 -0.88639478 145 -0.11887434 -0.73094372 146 0.03657672 -0.11887434 147 0.03657672 0.03657672 148 -0.73094372 0.03657672 149 -0.88639478 -0.73094372 150 -0.88639478 -0.88639478 151 -0.73094372 -0.88639478 152 -0.73094372 -0.73094372 153 -0.73094372 -0.73094372 > 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/fisher/rcomp/tmp/7003d1355956097.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/fisher/rcomp/tmp/8shmy1355956097.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/fisher/rcomp/tmp/9ywy61355956097.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/fisher/rcomp/tmp/10jksv1355956097.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/fisher/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/fisher/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/fisher/rcomp/tmp/11wr4a1355956098.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/fisher/rcomp/tmp/1269oy1355956098.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/fisher/rcomp/tmp/135zc21355956098.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/fisher/rcomp/tmp/14n9151355956098.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/fisher/rcomp/tmp/154wv01355956098.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/fisher/rcomp/tmp/168j1p1355956098.tab") + } > > try(system("convert tmp/1c7r91355956097.ps tmp/1c7r91355956097.png",intern=TRUE)) character(0) > try(system("convert tmp/2erzu1355956097.ps tmp/2erzu1355956097.png",intern=TRUE)) character(0) > try(system("convert tmp/3t2wk1355956097.ps tmp/3t2wk1355956097.png",intern=TRUE)) character(0) > try(system("convert tmp/4qigw1355956097.ps tmp/4qigw1355956097.png",intern=TRUE)) character(0) > try(system("convert tmp/5desc1355956097.ps tmp/5desc1355956097.png",intern=TRUE)) character(0) > try(system("convert tmp/6af781355956097.ps tmp/6af781355956097.png",intern=TRUE)) character(0) > try(system("convert tmp/7003d1355956097.ps tmp/7003d1355956097.png",intern=TRUE)) character(0) > try(system("convert tmp/8shmy1355956097.ps tmp/8shmy1355956097.png",intern=TRUE)) character(0) > try(system("convert tmp/9ywy61355956097.ps tmp/9ywy61355956097.png",intern=TRUE)) character(0) > try(system("convert tmp/10jksv1355956097.ps tmp/10jksv1355956097.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 7.318 1.681 9.012