R version 2.9.0 (2009-04-17) Copyright (C) 2009 The R Foundation for Statistical Computing ISBN 3-900051-07-0 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > x <- array(list(403.5 + ,0 + ,395.1 + ,395.3 + ,403.3 + ,0 + ,403.5 + ,395.1 + ,405.7 + ,0 + ,403.3 + ,403.5 + ,406.7 + ,0 + ,405.7 + ,403.3 + ,407.2 + ,0 + ,406.7 + ,405.7 + ,412.4 + ,0 + ,407.2 + ,406.7 + ,415.9 + ,0 + ,412.4 + ,407.2 + ,414.0 + ,0 + ,415.9 + ,412.4 + ,411.8 + ,0 + ,414.0 + ,415.9 + ,409.9 + ,0 + ,411.8 + ,414.0 + ,412.4 + ,0 + ,409.9 + ,411.8 + ,415.9 + ,0 + ,412.4 + ,409.9 + ,416.3 + ,0 + ,415.9 + ,412.4 + ,417.2 + ,0 + ,416.3 + ,415.9 + ,421.8 + ,0 + ,417.2 + ,416.3 + ,421.4 + ,0 + ,421.8 + ,417.2 + ,415.1 + ,0 + ,421.4 + ,421.8 + ,412.4 + ,0 + ,415.1 + ,421.4 + ,411.8 + ,0 + ,412.4 + ,415.1 + ,408.8 + ,0 + ,411.8 + ,412.4 + ,404.5 + ,0 + ,408.8 + ,411.8 + ,402.5 + ,0 + ,404.5 + ,408.8 + ,409.4 + ,0 + ,402.5 + ,404.5 + ,410.7 + ,0 + ,409.4 + ,402.5 + ,413.4 + ,0 + ,410.7 + ,409.4 + ,415.2 + ,0 + ,413.4 + ,410.7 + ,417.7 + ,0 + ,415.2 + ,413.4 + ,417.8 + ,0 + ,417.7 + ,415.2 + ,417.9 + ,0 + ,417.8 + ,417.7 + ,418.4 + ,0 + ,417.9 + ,417.8 + ,418.2 + ,0 + ,418.4 + ,417.9 + ,416.6 + ,0 + ,418.2 + ,418.4 + ,418.9 + ,0 + ,416.6 + ,418.2 + ,421.0 + ,0 + ,418.9 + ,416.6 + ,423.5 + ,0 + ,421.0 + ,418.9 + ,432.3 + ,0 + ,423.5 + ,421.0 + ,432.3 + ,0 + ,432.3 + ,423.5 + ,428.6 + ,0 + ,432.3 + ,432.3 + ,426.7 + ,0 + ,428.6 + ,432.3 + ,427.3 + ,0 + ,426.7 + ,428.6 + ,428.5 + ,0 + ,427.3 + ,426.7 + ,437.0 + ,0 + ,428.5 + ,427.3 + ,442.0 + ,0 + ,437.0 + ,428.5 + ,444.9 + ,0 + ,442.0 + ,437.0 + ,441.4 + ,0 + ,444.9 + ,442.0 + ,440.3 + ,0 + ,441.4 + ,444.9 + ,447.1 + ,0 + ,440.3 + ,441.4 + ,455.3 + ,0 + ,447.1 + ,440.3 + ,478.6 + ,0 + ,455.3 + ,447.1 + ,486.5 + ,0 + ,478.6 + ,455.3 + ,487.8 + ,0 + ,486.5 + ,478.6 + ,485.9 + ,0 + ,487.8 + ,486.5 + ,483.8 + ,0 + ,485.9 + ,487.8 + ,488.4 + ,0 + ,483.8 + ,485.9 + ,494.0 + ,0 + ,488.4 + ,483.8 + ,493.6 + ,0 + ,494.0 + ,488.4 + ,487.3 + ,0 + ,493.6 + ,494.0 + ,482.1 + ,0 + ,487.3 + ,493.6 + ,484.2 + ,0 + ,482.1 + ,487.3 + ,496.8 + ,0 + ,484.2 + ,482.1 + ,501.1 + ,0 + ,496.8 + ,484.2 + ,499.8 + ,0 + ,501.1 + ,496.8 + ,495.5 + ,0 + ,499.8 + ,501.1 + ,498.1 + ,0 + ,495.5 + ,499.8 + ,503.8 + ,0 + ,498.1 + ,495.5 + ,516.2 + ,0 + ,503.8 + ,498.1 + ,526.1 + ,0 + ,516.2 + ,503.8 + ,527.1 + ,0 + ,526.1 + ,516.2 + ,525.1 + ,0 + ,527.1 + ,526.1 + ,528.9 + ,0 + ,525.1 + ,527.1 + ,540.1 + ,0 + ,528.9 + ,525.1 + ,549.0 + ,0 + ,540.1 + ,528.9 + ,556.0 + ,0 + ,549.0 + ,540.1 + ,568.9 + ,0 + ,556.0 + ,549.0 + ,589.1 + ,0 + ,568.9 + ,556.0 + ,590.3 + ,0 + ,589.1 + ,568.9 + ,603.3 + ,0 + ,590.3 + ,589.1 + ,638.8 + ,0 + ,603.3 + ,590.3 + ,643.0 + ,0 + ,638.8 + ,603.3 + ,656.7 + ,0 + ,643.0 + ,638.8 + ,656.1 + ,0 + ,656.7 + ,643.0 + ,654.1 + ,0 + ,656.1 + ,656.7 + ,659.9 + ,0 + ,654.1 + ,656.1 + ,662.1 + ,0 + ,659.9 + ,654.1 + ,669.2 + ,0 + ,662.1 + ,659.9 + ,673.1 + ,0 + ,669.2 + ,662.1 + ,678.3 + ,0 + ,673.1 + ,669.2 + ,677.4 + ,0 + ,678.3 + ,673.1 + ,678.5 + ,0 + ,677.4 + ,678.3 + ,672.4 + ,0 + ,678.5 + ,677.4 + ,665.3 + ,0 + ,672.4 + ,678.5 + ,667.9 + ,0 + ,665.3 + ,672.4 + ,672.1 + ,0 + ,667.9 + ,665.3 + ,662.5 + ,0 + ,672.1 + ,667.9 + ,682.3 + ,0 + ,662.5 + ,672.1 + ,692.1 + ,0 + ,682.3 + ,662.5 + ,702.7 + ,0 + ,692.1 + ,682.3 + ,721.4 + ,0 + ,702.7 + ,692.1 + ,733.2 + ,0 + ,721.4 + ,702.7 + ,747.7 + ,0 + ,733.2 + ,721.4 + ,737.6 + ,0 + ,747.7 + ,733.2 + ,729.3 + ,0 + ,737.6 + ,747.7 + ,706.1 + ,0 + ,729.3 + ,737.6 + ,674.3 + ,0 + ,706.1 + ,729.3 + ,659.0 + ,0 + ,674.3 + ,706.1 + ,645.7 + ,0 + ,659.0 + ,674.3 + ,646.1 + ,0 + ,645.7 + ,659.0 + ,633.0 + ,1 + ,646.1 + ,645.7 + ,622.3 + ,1 + ,633.0 + ,646.1 + ,628.2 + ,1 + ,622.3 + ,633.0 + ,637.3 + ,1 + ,628.2 + ,622.3 + ,639.6 + ,1 + ,637.3 + ,628.2 + ,638.5 + ,1 + ,639.6 + ,637.3 + ,650.5 + ,1 + ,638.5 + ,639.6 + ,655.4 + ,1 + ,650.5 + ,638.5) + ,dim=c(4 + ,115) + ,dimnames=list(c('Y' + ,'X' + ,'Y1' + ,'Y2') + ,1:115)) > y <- array(NA,dim=c(4,115),dimnames=list(c('Y','X','Y1','Y2'),1:115)) > for (i in 1:dim(x)[1]) + { + for (j in 1:dim(x)[2]) + { + y[i,j] <- as.numeric(x[i,j]) + } + } > par3 = '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.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 Y X Y1 Y2 t 1 403.5 0 395.1 395.3 1 2 403.3 0 403.5 395.1 2 3 405.7 0 403.3 403.5 3 4 406.7 0 405.7 403.3 4 5 407.2 0 406.7 405.7 5 6 412.4 0 407.2 406.7 6 7 415.9 0 412.4 407.2 7 8 414.0 0 415.9 412.4 8 9 411.8 0 414.0 415.9 9 10 409.9 0 411.8 414.0 10 11 412.4 0 409.9 411.8 11 12 415.9 0 412.4 409.9 12 13 416.3 0 415.9 412.4 13 14 417.2 0 416.3 415.9 14 15 421.8 0 417.2 416.3 15 16 421.4 0 421.8 417.2 16 17 415.1 0 421.4 421.8 17 18 412.4 0 415.1 421.4 18 19 411.8 0 412.4 415.1 19 20 408.8 0 411.8 412.4 20 21 404.5 0 408.8 411.8 21 22 402.5 0 404.5 408.8 22 23 409.4 0 402.5 404.5 23 24 410.7 0 409.4 402.5 24 25 413.4 0 410.7 409.4 25 26 415.2 0 413.4 410.7 26 27 417.7 0 415.2 413.4 27 28 417.8 0 417.7 415.2 28 29 417.9 0 417.8 417.7 29 30 418.4 0 417.9 417.8 30 31 418.2 0 418.4 417.9 31 32 416.6 0 418.2 418.4 32 33 418.9 0 416.6 418.2 33 34 421.0 0 418.9 416.6 34 35 423.5 0 421.0 418.9 35 36 432.3 0 423.5 421.0 36 37 432.3 0 432.3 423.5 37 38 428.6 0 432.3 432.3 38 39 426.7 0 428.6 432.3 39 40 427.3 0 426.7 428.6 40 41 428.5 0 427.3 426.7 41 42 437.0 0 428.5 427.3 42 43 442.0 0 437.0 428.5 43 44 444.9 0 442.0 437.0 44 45 441.4 0 444.9 442.0 45 46 440.3 0 441.4 444.9 46 47 447.1 0 440.3 441.4 47 48 455.3 0 447.1 440.3 48 49 478.6 0 455.3 447.1 49 50 486.5 0 478.6 455.3 50 51 487.8 0 486.5 478.6 51 52 485.9 0 487.8 486.5 52 53 483.8 0 485.9 487.8 53 54 488.4 0 483.8 485.9 54 55 494.0 0 488.4 483.8 55 56 493.6 0 494.0 488.4 56 57 487.3 0 493.6 494.0 57 58 482.1 0 487.3 493.6 58 59 484.2 0 482.1 487.3 59 60 496.8 0 484.2 482.1 60 61 501.1 0 496.8 484.2 61 62 499.8 0 501.1 496.8 62 63 495.5 0 499.8 501.1 63 64 498.1 0 495.5 499.8 64 65 503.8 0 498.1 495.5 65 66 516.2 0 503.8 498.1 66 67 526.1 0 516.2 503.8 67 68 527.1 0 526.1 516.2 68 69 525.1 0 527.1 526.1 69 70 528.9 0 525.1 527.1 70 71 540.1 0 528.9 525.1 71 72 549.0 0 540.1 528.9 72 73 556.0 0 549.0 540.1 73 74 568.9 0 556.0 549.0 74 75 589.1 0 568.9 556.0 75 76 590.3 0 589.1 568.9 76 77 603.3 0 590.3 589.1 77 78 638.8 0 603.3 590.3 78 79 643.0 0 638.8 603.3 79 80 656.7 0 643.0 638.8 80 81 656.1 0 656.7 643.0 81 82 654.1 0 656.1 656.7 82 83 659.9 0 654.1 656.1 83 84 662.1 0 659.9 654.1 84 85 669.2 0 662.1 659.9 85 86 673.1 0 669.2 662.1 86 87 678.3 0 673.1 669.2 87 88 677.4 0 678.3 673.1 88 89 678.5 0 677.4 678.3 89 90 672.4 0 678.5 677.4 90 91 665.3 0 672.4 678.5 91 92 667.9 0 665.3 672.4 92 93 672.1 0 667.9 665.3 93 94 662.5 0 672.1 667.9 94 95 682.3 0 662.5 672.1 95 96 692.1 0 682.3 662.5 96 97 702.7 0 692.1 682.3 97 98 721.4 0 702.7 692.1 98 99 733.2 0 721.4 702.7 99 100 747.7 0 733.2 721.4 100 101 737.6 0 747.7 733.2 101 102 729.3 0 737.6 747.7 102 103 706.1 0 729.3 737.6 103 104 674.3 0 706.1 729.3 104 105 659.0 0 674.3 706.1 105 106 645.7 0 659.0 674.3 106 107 646.1 0 645.7 659.0 107 108 633.0 1 646.1 645.7 108 109 622.3 1 633.0 646.1 109 110 628.2 1 622.3 633.0 110 111 637.3 1 628.2 622.3 111 112 639.6 1 637.3 628.2 112 113 638.5 1 639.6 637.3 113 114 650.5 1 638.5 639.6 114 115 655.4 1 650.5 638.5 115 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) X Y1 Y2 t 14.3225 -3.1810 1.4792 -0.5187 0.1334 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -20.0666 -3.5972 -0.4959 3.7778 27.8648 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 14.32250 6.27913 2.281 0.0245 * X -3.18099 3.24808 -0.979 0.3296 Y1 1.47915 0.08157 18.134 < 2e-16 *** Y2 -0.51866 0.08114 -6.392 4.07e-09 *** t 0.13339 0.06534 2.042 0.0436 * --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 7.277 on 110 degrees of freedom Multiple R-squared: 0.9959, Adjusted R-squared: 0.9957 F-statistic: 6654 on 4 and 110 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.297690e-02 4.595380e-02 0.9770231 [2,] 2.433115e-02 4.866230e-02 0.9756689 [3,] 2.909905e-02 5.819811e-02 0.9709009 [4,] 1.060035e-02 2.120070e-02 0.9893997 [5,] 3.821292e-03 7.642585e-03 0.9961787 [6,] 1.256333e-03 2.512667e-03 0.9987437 [7,] 3.812032e-04 7.624064e-04 0.9996188 [8,] 2.536672e-04 5.073343e-04 0.9997463 [9,] 7.642271e-05 1.528454e-04 0.9999236 [10,] 2.002524e-04 4.005047e-04 0.9997997 [11,] 1.624485e-04 3.248971e-04 0.9998376 [12,] 9.847524e-05 1.969505e-04 0.9999015 [13,] 8.996522e-05 1.799304e-04 0.9999100 [14,] 6.611736e-05 1.322347e-04 0.9999339 [15,] 2.517528e-05 5.035057e-05 0.9999748 [16,] 5.447067e-05 1.089413e-04 0.9999455 [17,] 2.163513e-05 4.327025e-05 0.9999784 [18,] 1.034192e-05 2.068384e-05 0.9999897 [19,] 4.243815e-06 8.487630e-06 0.9999958 [20,] 2.108131e-06 4.216262e-06 0.9999979 [21,] 7.651253e-07 1.530251e-06 0.9999992 [22,] 2.822214e-07 5.644429e-07 0.9999997 [23,] 1.048186e-07 2.096371e-07 0.9999999 [24,] 3.546459e-08 7.092918e-08 1.0000000 [25,] 1.216911e-08 2.433821e-08 1.0000000 [26,] 6.212592e-09 1.242518e-08 1.0000000 [27,] 2.412855e-09 4.825710e-09 1.0000000 [28,] 1.110396e-09 2.220791e-09 1.0000000 [29,] 1.618685e-08 3.237370e-08 1.0000000 [30,] 6.224988e-09 1.244998e-08 1.0000000 [31,] 2.440821e-09 4.881641e-09 1.0000000 [32,] 8.523222e-10 1.704644e-09 1.0000000 [33,] 3.323688e-10 6.647375e-10 1.0000000 [34,] 1.214412e-10 2.428823e-10 1.0000000 [35,] 9.446810e-10 1.889362e-09 1.0000000 [36,] 5.203738e-10 1.040748e-09 1.0000000 [37,] 2.512964e-10 5.025927e-10 1.0000000 [38,] 1.303720e-10 2.607439e-10 1.0000000 [39,] 5.170315e-11 1.034063e-10 1.0000000 [40,] 1.895345e-10 3.790691e-10 1.0000000 [41,] 2.890598e-10 5.781196e-10 1.0000000 [42,] 1.341921e-06 2.683843e-06 0.9999987 [43,] 1.014177e-06 2.028353e-06 0.9999990 [44,] 5.544311e-07 1.108862e-06 0.9999994 [45,] 2.834092e-07 5.668184e-07 0.9999997 [46,] 1.334366e-07 2.668732e-07 0.9999999 [47,] 1.113933e-07 2.227867e-07 0.9999999 [48,] 5.931540e-08 1.186308e-07 0.9999999 [49,] 3.597403e-08 7.194806e-08 1.0000000 [50,] 4.183048e-08 8.366096e-08 1.0000000 [51,] 2.339448e-08 4.678897e-08 1.0000000 [52,] 1.411774e-08 2.823547e-08 1.0000000 [53,] 5.327457e-08 1.065491e-07 0.9999999 [54,] 3.113108e-08 6.226215e-08 1.0000000 [55,] 2.338393e-08 4.676785e-08 1.0000000 [56,] 2.068784e-08 4.137567e-08 1.0000000 [57,] 1.236155e-08 2.472309e-08 1.0000000 [58,] 7.419131e-09 1.483826e-08 1.0000000 [59,] 1.212551e-08 2.425102e-08 1.0000000 [60,] 7.018722e-09 1.403744e-08 1.0000000 [61,] 7.472327e-09 1.494465e-08 1.0000000 [62,] 7.319196e-09 1.463839e-08 1.0000000 [63,] 5.270219e-09 1.054044e-08 1.0000000 [64,] 7.309627e-09 1.461925e-08 1.0000000 [65,] 5.325856e-09 1.065171e-08 1.0000000 [66,] 4.372940e-09 8.745880e-09 1.0000000 [67,] 5.619442e-09 1.123888e-08 1.0000000 [68,] 1.495990e-08 2.991980e-08 1.0000000 [69,] 2.839616e-07 5.679232e-07 0.9999997 [70,] 3.421524e-07 6.843048e-07 0.9999997 [71,] 1.024143e-04 2.048285e-04 0.9998976 [72,] 1.679254e-03 3.358508e-03 0.9983207 [73,] 1.398623e-03 2.797246e-03 0.9986014 [74,] 3.150578e-03 6.301155e-03 0.9968494 [75,] 2.792961e-03 5.585922e-03 0.9972070 [76,] 1.873437e-03 3.746875e-03 0.9981266 [77,] 1.391428e-03 2.782857e-03 0.9986086 [78,] 8.822913e-04 1.764583e-03 0.9991177 [79,] 5.589378e-04 1.117876e-03 0.9994411 [80,] 3.251390e-04 6.502779e-04 0.9996749 [81,] 2.573195e-04 5.146389e-04 0.9997427 [82,] 1.460640e-04 2.921280e-04 0.9998539 [83,] 1.889913e-04 3.779825e-04 0.9998110 [84,] 1.862116e-04 3.724232e-04 0.9998138 [85,] 1.008492e-04 2.016984e-04 0.9998992 [86,] 5.912166e-05 1.182433e-04 0.9999409 [87,] 1.650845e-03 3.301689e-03 0.9983492 [88,] 9.942215e-03 1.988443e-02 0.9900578 [89,] 1.415753e-02 2.831505e-02 0.9858425 [90,] 9.648274e-03 1.929655e-02 0.9903517 [91,] 1.226678e-02 2.453357e-02 0.9877332 [92,] 7.783198e-03 1.556640e-02 0.9922168 [93,] 7.863661e-02 1.572732e-01 0.9213634 [94,] 8.006866e-02 1.601373e-01 0.9199313 [95,] 5.041312e-01 9.917377e-01 0.4958688 [96,] 8.472235e-01 3.055531e-01 0.1527765 [97,] 8.221473e-01 3.557053e-01 0.1778527 [98,] 8.991385e-01 2.017230e-01 0.1008615 [99,] 8.073661e-01 3.852678e-01 0.1926339 [100,] 6.573460e-01 6.853080e-01 0.3426540 > postscript(file="/var/www/html/rcomp/tmp/1t2f41258473450.ps",horizontal=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/www/html/rcomp/tmp/23wx21258473450.ps",horizontal=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/www/html/rcomp/tmp/3salx1258473450.ps",horizontal=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/www/html/rcomp/tmp/4kxn31258473450.ps",horizontal=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/www/html/rcomp/tmp/57a5j1258473450.ps",horizontal=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 = 115 Frequency = 1 1 2 3 4 5 6 9.65679098 -3.20520619 3.71396521 0.92687995 1.05911909 5.90481258 7 8 9 10 11 12 1.83916258 -2.67423497 -0.38193093 -0.14663618 3.88931548 2.57259590 13 14 15 16 17 18 -1.04117910 0.94907537 4.29191308 -2.57878240 -6.03468219 0.24312317 19 20 21 22 23 24 0.23589734 -3.41037774 -3.71750559 -1.04651581 6.44816859 -3.62868556 25 26 27 28 29 30 0.59377038 -1.05907300 0.04544204 -2.75224179 -1.63690003 -1.36633822 31 32 33 34 35 36 -2.38743721 -3.56566648 0.86385621 -1.40143549 -0.94812937 5.10978430 37 38 39 40 41 42 -6.74349623 -6.01269190 -2.57321838 -1.21525419 -2.02158500 4.88123878 43 44 45 46 47 48 -2.20255196 -2.42310506 -7.75274308 -2.30499085 4.17338342 1.61123694 49 50 51 52 53 54 16.17567835 -6.26895360 -4.70290444 -4.56179018 -3.31053443 3.27684513 55 56 57 58 59 60 0.85017471 -5.58063701 -8.51787849 -4.74007312 1.65058101 8.31394979 61 62 63 64 65 66 -5.06757161 -6.32621924 -6.60647974 1.54622917 1.03681444 6.22077090 67 68 69 70 71 72 0.60224982 -6.74338060 -5.22120412 1.92236934 6.33088635 0.50189686 73 74 75 76 77 78 0.01302845 7.04163470 11.65779344 -10.46377329 11.10475341 27.86477874 79 80 81 82 83 84 -13.83594754 11.93059538 -6.88881075 -1.02908951 7.28463065 -0.26515632 85 86 87 88 89 90 6.45553870 0.86121906 3.84161150 -2.86060024 2.13427095 -6.19297754 91 92 93 94 95 96 -3.83301511 5.97175947 2.51010146 -12.08721410 23.95762106 -0.64209690 97 98 99 100 101 102 5.59825939 13.56871097 3.07295811 9.68448629 -15.87643826 -1.84984649 103 104 105 106 107 108 -18.14472278 -20.06664952 -0.49587802 -7.79157579 4.21228463 -13.32993074 109 110 111 112 113 114 -4.57896521 10.22014832 4.91011883 -3.32346902 -3.23911678 11.44747570 115 -2.10626111 > postscript(file="/var/www/html/rcomp/tmp/6ingw1258473450.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > dum <- cbind(lag(myerror,k=1),myerror) > dum Time Series: Start = 0 End = 115 Frequency = 1 lag(myerror, k = 1) myerror 0 9.65679098 NA 1 -3.20520619 9.65679098 2 3.71396521 -3.20520619 3 0.92687995 3.71396521 4 1.05911909 0.92687995 5 5.90481258 1.05911909 6 1.83916258 5.90481258 7 -2.67423497 1.83916258 8 -0.38193093 -2.67423497 9 -0.14663618 -0.38193093 10 3.88931548 -0.14663618 11 2.57259590 3.88931548 12 -1.04117910 2.57259590 13 0.94907537 -1.04117910 14 4.29191308 0.94907537 15 -2.57878240 4.29191308 16 -6.03468219 -2.57878240 17 0.24312317 -6.03468219 18 0.23589734 0.24312317 19 -3.41037774 0.23589734 20 -3.71750559 -3.41037774 21 -1.04651581 -3.71750559 22 6.44816859 -1.04651581 23 -3.62868556 6.44816859 24 0.59377038 -3.62868556 25 -1.05907300 0.59377038 26 0.04544204 -1.05907300 27 -2.75224179 0.04544204 28 -1.63690003 -2.75224179 29 -1.36633822 -1.63690003 30 -2.38743721 -1.36633822 31 -3.56566648 -2.38743721 32 0.86385621 -3.56566648 33 -1.40143549 0.86385621 34 -0.94812937 -1.40143549 35 5.10978430 -0.94812937 36 -6.74349623 5.10978430 37 -6.01269190 -6.74349623 38 -2.57321838 -6.01269190 39 -1.21525419 -2.57321838 40 -2.02158500 -1.21525419 41 4.88123878 -2.02158500 42 -2.20255196 4.88123878 43 -2.42310506 -2.20255196 44 -7.75274308 -2.42310506 45 -2.30499085 -7.75274308 46 4.17338342 -2.30499085 47 1.61123694 4.17338342 48 16.17567835 1.61123694 49 -6.26895360 16.17567835 50 -4.70290444 -6.26895360 51 -4.56179018 -4.70290444 52 -3.31053443 -4.56179018 53 3.27684513 -3.31053443 54 0.85017471 3.27684513 55 -5.58063701 0.85017471 56 -8.51787849 -5.58063701 57 -4.74007312 -8.51787849 58 1.65058101 -4.74007312 59 8.31394979 1.65058101 60 -5.06757161 8.31394979 61 -6.32621924 -5.06757161 62 -6.60647974 -6.32621924 63 1.54622917 -6.60647974 64 1.03681444 1.54622917 65 6.22077090 1.03681444 66 0.60224982 6.22077090 67 -6.74338060 0.60224982 68 -5.22120412 -6.74338060 69 1.92236934 -5.22120412 70 6.33088635 1.92236934 71 0.50189686 6.33088635 72 0.01302845 0.50189686 73 7.04163470 0.01302845 74 11.65779344 7.04163470 75 -10.46377329 11.65779344 76 11.10475341 -10.46377329 77 27.86477874 11.10475341 78 -13.83594754 27.86477874 79 11.93059538 -13.83594754 80 -6.88881075 11.93059538 81 -1.02908951 -6.88881075 82 7.28463065 -1.02908951 83 -0.26515632 7.28463065 84 6.45553870 -0.26515632 85 0.86121906 6.45553870 86 3.84161150 0.86121906 87 -2.86060024 3.84161150 88 2.13427095 -2.86060024 89 -6.19297754 2.13427095 90 -3.83301511 -6.19297754 91 5.97175947 -3.83301511 92 2.51010146 5.97175947 93 -12.08721410 2.51010146 94 23.95762106 -12.08721410 95 -0.64209690 23.95762106 96 5.59825939 -0.64209690 97 13.56871097 5.59825939 98 3.07295811 13.56871097 99 9.68448629 3.07295811 100 -15.87643826 9.68448629 101 -1.84984649 -15.87643826 102 -18.14472278 -1.84984649 103 -20.06664952 -18.14472278 104 -0.49587802 -20.06664952 105 -7.79157579 -0.49587802 106 4.21228463 -7.79157579 107 -13.32993074 4.21228463 108 -4.57896521 -13.32993074 109 10.22014832 -4.57896521 110 4.91011883 10.22014832 111 -3.32346902 4.91011883 112 -3.23911678 -3.32346902 113 11.44747570 -3.23911678 114 -2.10626111 11.44747570 115 NA -2.10626111 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -3.20520619 9.65679098 [2,] 3.71396521 -3.20520619 [3,] 0.92687995 3.71396521 [4,] 1.05911909 0.92687995 [5,] 5.90481258 1.05911909 [6,] 1.83916258 5.90481258 [7,] -2.67423497 1.83916258 [8,] -0.38193093 -2.67423497 [9,] -0.14663618 -0.38193093 [10,] 3.88931548 -0.14663618 [11,] 2.57259590 3.88931548 [12,] -1.04117910 2.57259590 [13,] 0.94907537 -1.04117910 [14,] 4.29191308 0.94907537 [15,] -2.57878240 4.29191308 [16,] -6.03468219 -2.57878240 [17,] 0.24312317 -6.03468219 [18,] 0.23589734 0.24312317 [19,] -3.41037774 0.23589734 [20,] -3.71750559 -3.41037774 [21,] -1.04651581 -3.71750559 [22,] 6.44816859 -1.04651581 [23,] -3.62868556 6.44816859 [24,] 0.59377038 -3.62868556 [25,] -1.05907300 0.59377038 [26,] 0.04544204 -1.05907300 [27,] -2.75224179 0.04544204 [28,] -1.63690003 -2.75224179 [29,] -1.36633822 -1.63690003 [30,] -2.38743721 -1.36633822 [31,] -3.56566648 -2.38743721 [32,] 0.86385621 -3.56566648 [33,] -1.40143549 0.86385621 [34,] -0.94812937 -1.40143549 [35,] 5.10978430 -0.94812937 [36,] -6.74349623 5.10978430 [37,] -6.01269190 -6.74349623 [38,] -2.57321838 -6.01269190 [39,] -1.21525419 -2.57321838 [40,] -2.02158500 -1.21525419 [41,] 4.88123878 -2.02158500 [42,] -2.20255196 4.88123878 [43,] -2.42310506 -2.20255196 [44,] -7.75274308 -2.42310506 [45,] -2.30499085 -7.75274308 [46,] 4.17338342 -2.30499085 [47,] 1.61123694 4.17338342 [48,] 16.17567835 1.61123694 [49,] -6.26895360 16.17567835 [50,] -4.70290444 -6.26895360 [51,] -4.56179018 -4.70290444 [52,] -3.31053443 -4.56179018 [53,] 3.27684513 -3.31053443 [54,] 0.85017471 3.27684513 [55,] -5.58063701 0.85017471 [56,] -8.51787849 -5.58063701 [57,] -4.74007312 -8.51787849 [58,] 1.65058101 -4.74007312 [59,] 8.31394979 1.65058101 [60,] -5.06757161 8.31394979 [61,] -6.32621924 -5.06757161 [62,] -6.60647974 -6.32621924 [63,] 1.54622917 -6.60647974 [64,] 1.03681444 1.54622917 [65,] 6.22077090 1.03681444 [66,] 0.60224982 6.22077090 [67,] -6.74338060 0.60224982 [68,] -5.22120412 -6.74338060 [69,] 1.92236934 -5.22120412 [70,] 6.33088635 1.92236934 [71,] 0.50189686 6.33088635 [72,] 0.01302845 0.50189686 [73,] 7.04163470 0.01302845 [74,] 11.65779344 7.04163470 [75,] -10.46377329 11.65779344 [76,] 11.10475341 -10.46377329 [77,] 27.86477874 11.10475341 [78,] -13.83594754 27.86477874 [79,] 11.93059538 -13.83594754 [80,] -6.88881075 11.93059538 [81,] -1.02908951 -6.88881075 [82,] 7.28463065 -1.02908951 [83,] -0.26515632 7.28463065 [84,] 6.45553870 -0.26515632 [85,] 0.86121906 6.45553870 [86,] 3.84161150 0.86121906 [87,] -2.86060024 3.84161150 [88,] 2.13427095 -2.86060024 [89,] -6.19297754 2.13427095 [90,] -3.83301511 -6.19297754 [91,] 5.97175947 -3.83301511 [92,] 2.51010146 5.97175947 [93,] -12.08721410 2.51010146 [94,] 23.95762106 -12.08721410 [95,] -0.64209690 23.95762106 [96,] 5.59825939 -0.64209690 [97,] 13.56871097 5.59825939 [98,] 3.07295811 13.56871097 [99,] 9.68448629 3.07295811 [100,] -15.87643826 9.68448629 [101,] -1.84984649 -15.87643826 [102,] -18.14472278 -1.84984649 [103,] -20.06664952 -18.14472278 [104,] -0.49587802 -20.06664952 [105,] -7.79157579 -0.49587802 [106,] 4.21228463 -7.79157579 [107,] -13.32993074 4.21228463 [108,] -4.57896521 -13.32993074 [109,] 10.22014832 -4.57896521 [110,] 4.91011883 10.22014832 [111,] -3.32346902 4.91011883 [112,] -3.23911678 -3.32346902 [113,] 11.44747570 -3.23911678 [114,] -2.10626111 11.44747570 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -3.20520619 9.65679098 2 3.71396521 -3.20520619 3 0.92687995 3.71396521 4 1.05911909 0.92687995 5 5.90481258 1.05911909 6 1.83916258 5.90481258 7 -2.67423497 1.83916258 8 -0.38193093 -2.67423497 9 -0.14663618 -0.38193093 10 3.88931548 -0.14663618 11 2.57259590 3.88931548 12 -1.04117910 2.57259590 13 0.94907537 -1.04117910 14 4.29191308 0.94907537 15 -2.57878240 4.29191308 16 -6.03468219 -2.57878240 17 0.24312317 -6.03468219 18 0.23589734 0.24312317 19 -3.41037774 0.23589734 20 -3.71750559 -3.41037774 21 -1.04651581 -3.71750559 22 6.44816859 -1.04651581 23 -3.62868556 6.44816859 24 0.59377038 -3.62868556 25 -1.05907300 0.59377038 26 0.04544204 -1.05907300 27 -2.75224179 0.04544204 28 -1.63690003 -2.75224179 29 -1.36633822 -1.63690003 30 -2.38743721 -1.36633822 31 -3.56566648 -2.38743721 32 0.86385621 -3.56566648 33 -1.40143549 0.86385621 34 -0.94812937 -1.40143549 35 5.10978430 -0.94812937 36 -6.74349623 5.10978430 37 -6.01269190 -6.74349623 38 -2.57321838 -6.01269190 39 -1.21525419 -2.57321838 40 -2.02158500 -1.21525419 41 4.88123878 -2.02158500 42 -2.20255196 4.88123878 43 -2.42310506 -2.20255196 44 -7.75274308 -2.42310506 45 -2.30499085 -7.75274308 46 4.17338342 -2.30499085 47 1.61123694 4.17338342 48 16.17567835 1.61123694 49 -6.26895360 16.17567835 50 -4.70290444 -6.26895360 51 -4.56179018 -4.70290444 52 -3.31053443 -4.56179018 53 3.27684513 -3.31053443 54 0.85017471 3.27684513 55 -5.58063701 0.85017471 56 -8.51787849 -5.58063701 57 -4.74007312 -8.51787849 58 1.65058101 -4.74007312 59 8.31394979 1.65058101 60 -5.06757161 8.31394979 61 -6.32621924 -5.06757161 62 -6.60647974 -6.32621924 63 1.54622917 -6.60647974 64 1.03681444 1.54622917 65 6.22077090 1.03681444 66 0.60224982 6.22077090 67 -6.74338060 0.60224982 68 -5.22120412 -6.74338060 69 1.92236934 -5.22120412 70 6.33088635 1.92236934 71 0.50189686 6.33088635 72 0.01302845 0.50189686 73 7.04163470 0.01302845 74 11.65779344 7.04163470 75 -10.46377329 11.65779344 76 11.10475341 -10.46377329 77 27.86477874 11.10475341 78 -13.83594754 27.86477874 79 11.93059538 -13.83594754 80 -6.88881075 11.93059538 81 -1.02908951 -6.88881075 82 7.28463065 -1.02908951 83 -0.26515632 7.28463065 84 6.45553870 -0.26515632 85 0.86121906 6.45553870 86 3.84161150 0.86121906 87 -2.86060024 3.84161150 88 2.13427095 -2.86060024 89 -6.19297754 2.13427095 90 -3.83301511 -6.19297754 91 5.97175947 -3.83301511 92 2.51010146 5.97175947 93 -12.08721410 2.51010146 94 23.95762106 -12.08721410 95 -0.64209690 23.95762106 96 5.59825939 -0.64209690 97 13.56871097 5.59825939 98 3.07295811 13.56871097 99 9.68448629 3.07295811 100 -15.87643826 9.68448629 101 -1.84984649 -15.87643826 102 -18.14472278 -1.84984649 103 -20.06664952 -18.14472278 104 -0.49587802 -20.06664952 105 -7.79157579 -0.49587802 106 4.21228463 -7.79157579 107 -13.32993074 4.21228463 108 -4.57896521 -13.32993074 109 10.22014832 -4.57896521 110 4.91011883 10.22014832 111 -3.32346902 4.91011883 112 -3.23911678 -3.32346902 113 11.44747570 -3.23911678 114 -2.10626111 11.44747570 > 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/www/html/rcomp/tmp/7fiml1258473450.ps",horizontal=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/www/html/rcomp/tmp/89us11258473450.ps",horizontal=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/www/html/rcomp/tmp/9p7u81258473450.ps",horizontal=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/www/html/rcomp/tmp/10vhw51258473450.ps",horizontal=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/www/html/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/html/rcomp/createtable") > > a<-table.start() > a<-table.row.start(a) > a<-table.element(a, '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/www/html/rcomp/tmp/11wq6f1258473450.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/www/html/rcomp/tmp/12n8cs1258473450.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/www/html/rcomp/tmp/1389ht1258473450.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/www/html/rcomp/tmp/14cqka1258473450.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/www/html/rcomp/tmp/15hrcf1258473450.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/www/html/rcomp/tmp/16bc6k1258473450.tab") + } > > system("convert tmp/1t2f41258473450.ps tmp/1t2f41258473450.png") > system("convert tmp/23wx21258473450.ps tmp/23wx21258473450.png") > system("convert tmp/3salx1258473450.ps tmp/3salx1258473450.png") > system("convert tmp/4kxn31258473450.ps tmp/4kxn31258473450.png") > system("convert tmp/57a5j1258473450.ps tmp/57a5j1258473450.png") > system("convert tmp/6ingw1258473450.ps tmp/6ingw1258473450.png") > system("convert tmp/7fiml1258473450.ps tmp/7fiml1258473450.png") > system("convert tmp/89us11258473450.ps tmp/89us11258473450.png") > system("convert tmp/9p7u81258473450.ps tmp/9p7u81258473450.png") > system("convert tmp/10vhw51258473450.ps tmp/10vhw51258473450.png") > > > proc.time() user system elapsed 3.215 1.636 4.475