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(100.5 + ,99.5 + ,101.5 + ,467 + ,9 + ,99 + ,93.5 + ,99.2 + ,460 + ,9 + ,104.1 + ,104.6 + ,107.8 + ,448 + ,9 + ,98.6 + ,95.3 + ,92.3 + ,443 + ,9 + ,101.4 + ,102.8 + ,99.2 + ,436 + ,9 + ,102.1 + ,103.3 + ,101.6 + ,431 + ,9 + ,93 + ,100.2 + ,87 + ,484 + ,9 + ,96.9 + ,107.9 + ,71.4 + ,510 + ,9 + ,91.2 + ,107.5 + ,104.7 + ,513 + ,9 + ,96.9 + ,119.8 + ,115.1 + ,503 + ,9 + ,94 + ,112 + ,102.5 + ,471 + ,9 + ,90.4 + ,102.1 + ,75.3 + ,471 + ,9 + ,105.2 + ,105.3 + ,96.7 + ,476 + ,9 + ,103.4 + ,101.3 + ,94.6 + ,475 + ,9 + ,111.7 + ,108.4 + ,98.6 + ,470 + ,9 + ,114.2 + ,107.4 + ,99.5 + ,461 + ,9 + ,111.4 + ,109.1 + ,92 + ,455 + ,9 + ,106.3 + ,109.5 + ,93.6 + ,456 + ,9 + ,111.8 + ,111.4 + ,89.3 + ,517 + ,9 + ,101.5 + ,110.1 + ,66.9 + ,525 + ,9 + ,103 + ,117 + ,108.8 + ,523 + ,9 + ,105.2 + ,129.6 + ,113.2 + ,519 + ,9 + ,101.1 + ,113.5 + ,105.5 + ,509 + ,9 + ,100.7 + ,113.3 + ,77.8 + ,512 + ,9 + ,116.7 + ,110.1 + ,102.1 + ,519 + ,9 + ,109 + ,107.4 + ,97 + ,517 + ,9 + ,119.5 + ,110.1 + ,95.5 + ,510 + ,9 + ,115.1 + ,112.5 + ,99.3 + ,509 + ,9 + ,107.1 + ,106 + ,86.4 + ,501 + ,9 + ,109.7 + ,117.6 + ,92.4 + ,507 + ,9 + ,110.4 + ,117.8 + ,85.7 + ,569 + ,9 + ,105 + ,113.5 + ,61.9 + ,580 + ,9 + ,115.8 + ,121.2 + ,104.9 + ,578 + ,9 + ,116.4 + ,130.4 + ,107.9 + ,565 + ,9 + ,111.1 + ,115.2 + ,95.6 + ,547 + ,9 + ,119.5 + ,117.9 + ,79.8 + ,555 + ,9 + ,110.9 + ,110.7 + ,94.8 + ,562 + ,9 + ,115.1 + ,107.6 + ,93.7 + ,561 + ,9 + ,125.2 + ,124.3 + ,108.1 + ,555 + ,9 + ,116 + ,115.1 + ,96.9 + ,544 + ,9 + ,112.9 + ,112.5 + ,88.8 + ,537 + ,9 + ,121.7 + ,127.9 + ,106.7 + ,543 + ,10 + ,123.2 + ,117.4 + ,86.8 + ,594 + ,10 + ,116.6 + ,119.3 + ,69.8 + ,611 + ,10 + ,136.2 + ,130.4 + ,110.9 + ,613 + ,10 + ,120.9 + ,126 + ,105.4 + ,611 + ,10 + ,119.6 + ,125.4 + ,99.2 + ,594 + ,10 + ,125.9 + ,130.5 + ,84.4 + ,595 + ,10 + ,116.1 + ,115.9 + ,87.2 + ,591 + ,10 + ,107.5 + ,108.7 + ,91.9 + ,589 + ,10 + ,116.7 + ,124 + ,97.9 + ,584 + ,10 + ,112.5 + ,119.4 + ,94.5 + ,573 + ,10 + ,113 + ,118.6 + ,85 + ,567 + ,10 + ,126.4 + ,131.3 + ,100.3 + ,569 + ,10 + ,114.1 + ,111.1 + ,78.7 + ,621 + ,10 + ,112.5 + ,124.8 + ,65.8 + ,629 + ,10 + ,112.4 + ,132.3 + ,104.8 + ,628 + ,10 + ,113.1 + ,126.7 + ,96 + ,612 + ,10 + ,116.3 + ,131.7 + ,103.3 + ,595 + ,10 + ,111.7 + ,130.9 + ,82.9 + ,597 + ,10 + ,118.8 + ,122.1 + ,91.4 + ,593 + ,10 + ,116.5 + ,113.2 + ,94.5 + ,590 + ,10 + ,125.1 + ,133.6 + ,109.3 + ,580 + ,10 + ,113.1 + ,119.2 + ,92.1 + ,574 + ,10 + ,119.6 + ,129.4 + ,99.3 + ,573 + ,10 + ,114.4 + ,131.4 + ,109.6 + ,573 + ,10 + ,114 + ,117.1 + ,87.5 + ,620 + ,10 + ,117.8 + ,130.5 + ,73.1 + ,626 + ,10 + ,117 + ,132.3 + ,110.7 + ,620 + ,10 + ,120.9 + ,140.8 + ,111.6 + ,588 + ,10 + ,115 + ,137.5 + ,110.7 + ,566 + ,10 + ,117.3 + ,128.6 + ,84 + ,557 + ,10 + ,119.4 + ,126.7 + ,101.6 + ,561 + ,10 + ,114.9 + ,120.8 + ,102.1 + ,549 + ,10 + ,125.8 + ,139.3 + ,113.9 + ,532 + ,10 + ,117.6 + ,128.6 + ,99 + ,526 + ,10 + ,117.6 + ,131.3 + ,100.4 + ,511 + ,10 + ,114.9 + ,136.3 + ,109.5 + ,499 + ,10 + ,121.9 + ,128.8 + ,93.1 + ,555 + ,10 + ,117 + ,133.2 + ,77 + ,565 + ,10 + ,106.4 + ,136.3 + ,108 + ,542 + ,10 + ,110.5 + ,151.1 + ,119.9 + ,527 + ,10 + ,113.6 + ,145 + ,105.9 + ,510 + ,11 + ,114.2 + ,134.4 + ,78.2 + ,514 + ,11 + ,125.4 + ,135.7 + ,100.3 + ,517 + ,11 + ,124.6 + ,128.7 + ,102.2 + ,508 + ,11 + ,120.2 + ,129.2 + ,97 + ,493 + ,11 + ,120.8 + ,138.6 + ,101.3 + ,490 + ,11 + ,111.4 + ,132.7 + ,89.2 + ,469 + ,11 + ,124.1 + ,132.5 + ,93.3 + ,478 + ,11 + ,120.2 + ,137.3 + ,88.5 + ,528 + ,11 + ,125.5 + ,127.1 + ,61.5 + ,534 + ,11 + ,116 + ,143.7 + ,96.3 + ,518 + ,11 + ,117 + ,149.9 + ,95.4 + ,506 + ,11 + ,105.7 + ,131.6 + ,79.9 + ,502 + ,11 + ,102 + ,138.8 + ,66.7 + ,516 + ,11 + ,106.4 + ,122.5 + ,71.2 + ,528 + ,11 + ,96.9 + ,122 + ,73.1 + ,533 + ,11 + ,107.6 + ,135.6 + ,81 + ,536 + ,11 + ,98.8 + ,133.4 + ,77.2 + ,537 + ,11 + ,101.1 + ,127.3 + ,67.7 + ,524 + ,11 + ,105.7 + ,138.9 + ,76.7 + ,536 + ,11 + ,104.6 + ,131.4 + ,73.3 + ,587 + ,11 + ,103.2 + ,131.6 + ,54.1 + ,597 + ,11 + ,101.6 + ,135.8 + ,85 + ,581 + ,11 + ,106.7 + ,141.6 + ,85.9 + ,564 + ,11 + ,99.5 + ,132.6 + ,79.3 + ,558 + ,11 + ,101 + ,132.3 + ,67.2 + ,575 + ,11 + ,104.9 + ,120.6 + ,72.4 + ,580 + ,11 + ,118.4 + ,123.8 + ,76.1 + ,575 + ,11 + ,129 + ,145.1 + ,89.8 + ,563 + ,11 + ,123.7 + ,135 + ,84 + ,552 + ,11 + ,127.6 + ,127.6 + ,75.4 + ,537 + ,11 + ,129.4 + ,142 + ,90 + ,545 + ,11 + ,128.3 + ,130.1 + ,76.8 + ,601 + ,11 + ,124.8 + ,131 + ,59.6 + ,604 + ,11 + ,125.2 + ,141.3 + ,92.1 + ,586 + ,11 + ,129.6 + ,139.6 + ,88.4 + ,564 + ,11 + ,124.8 + ,142.2 + ,82.8 + ,549 + ,11 + ,121.9 + ,140 + ,69.4 + ,551 + ,11 + ,129.2 + ,132 + ,73.4 + ,556 + ,11) + ,dim=c(5 + ,121) + ,dimnames=list(c('chemie' + ,'vm' + ,'textiel' + ,'werkloosheid' + ,'maand') + ,1:121)) > y <- array(NA,dim=c(5,121),dimnames=list(c('chemie','vm','textiel','werkloosheid','maand'),1:121)) > 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 = '4' > 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 werkloosheid chemie vm textiel maand t 1 467 100.5 99.5 101.5 9 1 2 460 99.0 93.5 99.2 9 2 3 448 104.1 104.6 107.8 9 3 4 443 98.6 95.3 92.3 9 4 5 436 101.4 102.8 99.2 9 5 6 431 102.1 103.3 101.6 9 6 7 484 93.0 100.2 87.0 9 7 8 510 96.9 107.9 71.4 9 8 9 513 91.2 107.5 104.7 9 9 10 503 96.9 119.8 115.1 9 10 11 471 94.0 112.0 102.5 9 11 12 471 90.4 102.1 75.3 9 12 13 476 105.2 105.3 96.7 9 13 14 475 103.4 101.3 94.6 9 14 15 470 111.7 108.4 98.6 9 15 16 461 114.2 107.4 99.5 9 16 17 455 111.4 109.1 92.0 9 17 18 456 106.3 109.5 93.6 9 18 19 517 111.8 111.4 89.3 9 19 20 525 101.5 110.1 66.9 9 20 21 523 103.0 117.0 108.8 9 21 22 519 105.2 129.6 113.2 9 22 23 509 101.1 113.5 105.5 9 23 24 512 100.7 113.3 77.8 9 24 25 519 116.7 110.1 102.1 9 25 26 517 109.0 107.4 97.0 9 26 27 510 119.5 110.1 95.5 9 27 28 509 115.1 112.5 99.3 9 28 29 501 107.1 106.0 86.4 9 29 30 507 109.7 117.6 92.4 9 30 31 569 110.4 117.8 85.7 9 31 32 580 105.0 113.5 61.9 9 32 33 578 115.8 121.2 104.9 9 33 34 565 116.4 130.4 107.9 9 34 35 547 111.1 115.2 95.6 9 35 36 555 119.5 117.9 79.8 9 36 37 562 110.9 110.7 94.8 9 37 38 561 115.1 107.6 93.7 9 38 39 555 125.2 124.3 108.1 9 39 40 544 116.0 115.1 96.9 9 40 41 537 112.9 112.5 88.8 9 41 42 543 121.7 127.9 106.7 10 42 43 594 123.2 117.4 86.8 10 43 44 611 116.6 119.3 69.8 10 44 45 613 136.2 130.4 110.9 10 45 46 611 120.9 126.0 105.4 10 46 47 594 119.6 125.4 99.2 10 47 48 595 125.9 130.5 84.4 10 48 49 591 116.1 115.9 87.2 10 49 50 589 107.5 108.7 91.9 10 50 51 584 116.7 124.0 97.9 10 51 52 573 112.5 119.4 94.5 10 52 53 567 113.0 118.6 85.0 10 53 54 569 126.4 131.3 100.3 10 54 55 621 114.1 111.1 78.7 10 55 56 629 112.5 124.8 65.8 10 56 57 628 112.4 132.3 104.8 10 57 58 612 113.1 126.7 96.0 10 58 59 595 116.3 131.7 103.3 10 59 60 597 111.7 130.9 82.9 10 60 61 593 118.8 122.1 91.4 10 61 62 590 116.5 113.2 94.5 10 62 63 580 125.1 133.6 109.3 10 63 64 574 113.1 119.2 92.1 10 64 65 573 119.6 129.4 99.3 10 65 66 573 114.4 131.4 109.6 10 66 67 620 114.0 117.1 87.5 10 67 68 626 117.8 130.5 73.1 10 68 69 620 117.0 132.3 110.7 10 69 70 588 120.9 140.8 111.6 10 70 71 566 115.0 137.5 110.7 10 71 72 557 117.3 128.6 84.0 10 72 73 561 119.4 126.7 101.6 10 73 74 549 114.9 120.8 102.1 10 74 75 532 125.8 139.3 113.9 10 75 76 526 117.6 128.6 99.0 10 76 77 511 117.6 131.3 100.4 10 77 78 499 114.9 136.3 109.5 10 78 79 555 121.9 128.8 93.1 10 79 80 565 117.0 133.2 77.0 10 80 81 542 106.4 136.3 108.0 10 81 82 527 110.5 151.1 119.9 10 82 83 510 113.6 145.0 105.9 11 83 84 514 114.2 134.4 78.2 11 84 85 517 125.4 135.7 100.3 11 85 86 508 124.6 128.7 102.2 11 86 87 493 120.2 129.2 97.0 11 87 88 490 120.8 138.6 101.3 11 88 89 469 111.4 132.7 89.2 11 89 90 478 124.1 132.5 93.3 11 90 91 528 120.2 137.3 88.5 11 91 92 534 125.5 127.1 61.5 11 92 93 518 116.0 143.7 96.3 11 93 94 506 117.0 149.9 95.4 11 94 95 502 105.7 131.6 79.9 11 95 96 516 102.0 138.8 66.7 11 96 97 528 106.4 122.5 71.2 11 97 98 533 96.9 122.0 73.1 11 98 99 536 107.6 135.6 81.0 11 99 100 537 98.8 133.4 77.2 11 100 101 524 101.1 127.3 67.7 11 101 102 536 105.7 138.9 76.7 11 102 103 587 104.6 131.4 73.3 11 103 104 597 103.2 131.6 54.1 11 104 105 581 101.6 135.8 85.0 11 105 106 564 106.7 141.6 85.9 11 106 107 558 99.5 132.6 79.3 11 107 108 575 101.0 132.3 67.2 11 108 109 580 104.9 120.6 72.4 11 109 110 575 118.4 123.8 76.1 11 110 111 563 129.0 145.1 89.8 11 111 112 552 123.7 135.0 84.0 11 112 113 537 127.6 127.6 75.4 11 113 114 545 129.4 142.0 90.0 11 114 115 601 128.3 130.1 76.8 11 115 116 604 124.8 131.0 59.6 11 116 117 586 125.2 141.3 92.1 11 117 118 564 129.6 139.6 88.4 11 118 119 549 124.8 142.2 82.8 11 119 120 551 121.9 140.0 69.4 11 120 121 556 129.2 132.0 73.4 11 121 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) chemie vm textiel maand t 541.6486 1.6579 1.3006 -1.0743 -27.4715 0.3911 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -74.51 -29.87 -5.37 27.13 92.94 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 541.6486 136.3023 3.974 0.000124 *** chemie 1.6579 0.4581 3.619 0.000441 *** vm 1.3006 0.6067 2.144 0.034152 * textiel -1.0743 0.3520 -3.052 0.002826 ** maand -27.4715 13.5673 -2.025 0.045201 * t 0.3911 0.3747 1.044 0.298759 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 39.96 on 115 degrees of freedom Multiple R-squared: 0.3102, Adjusted R-squared: 0.2802 F-statistic: 10.34 on 5 and 115 DF, p-value: 3.308e-08 > 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.036056495 0.0721129910 0.9639435045 [2,] 0.008900279 0.0178005582 0.9910997209 [3,] 0.005368708 0.0107374157 0.9946312921 [4,] 0.001469055 0.0029381096 0.9985309452 [5,] 0.077768427 0.1555368539 0.9222315731 [6,] 0.053749640 0.1074992807 0.9462503596 [7,] 0.032236136 0.0644722725 0.9677638638 [8,] 0.019386932 0.0387738640 0.9806130680 [9,] 0.015100623 0.0302012463 0.9848993769 [10,] 0.013797481 0.0275949621 0.9862025189 [11,] 0.029961007 0.0599220144 0.9700389928 [12,] 0.021839762 0.0436795249 0.9781602375 [13,] 0.018197079 0.0363941571 0.9818029214 [14,] 0.010880341 0.0217606826 0.9891196587 [15,] 0.006455908 0.0129118160 0.9935440920 [16,] 0.004360679 0.0087213578 0.9956393211 [17,] 0.006695816 0.0133916330 0.9933041835 [18,] 0.004924621 0.0098492418 0.9950753791 [19,] 0.004050279 0.0081005580 0.9959497210 [20,] 0.002990196 0.0059803911 0.9970098044 [21,] 0.003184659 0.0063693184 0.9968153408 [22,] 0.003712586 0.0074251727 0.9962874137 [23,] 0.006357762 0.0127155235 0.9936422382 [24,] 0.007468506 0.0149370121 0.9925314940 [25,] 0.012908578 0.0258171561 0.9870914219 [26,] 0.008771654 0.0175433071 0.9912283465 [27,] 0.006466343 0.0129326852 0.9935336574 [28,] 0.005754969 0.0115099387 0.9942450307 [29,] 0.004745947 0.0094918940 0.9952540530 [30,] 0.004337045 0.0086740893 0.9956629553 [31,] 0.003383842 0.0067676833 0.9966161583 [32,] 0.004296069 0.0085921381 0.9957039309 [33,] 0.013088522 0.0261770441 0.9869114779 [34,] 0.009319185 0.0186383697 0.9906808152 [35,] 0.014099396 0.0281987928 0.9859006036 [36,] 0.011383628 0.0227672553 0.9886163724 [37,] 0.016971080 0.0339421596 0.9830289202 [38,] 0.017073821 0.0341476417 0.9829261792 [39,] 0.013633503 0.0272670062 0.9863664969 [40,] 0.011140844 0.0222816885 0.9888591558 [41,] 0.007897274 0.0157945488 0.9921027256 [42,] 0.005464847 0.0109296937 0.9945351531 [43,] 0.005004963 0.0100099267 0.9949950367 [44,] 0.005136417 0.0102728346 0.9948635827 [45,] 0.006750519 0.0135010380 0.9932494810 [46,] 0.009278241 0.0185564828 0.9907217586 [47,] 0.008781452 0.0175629044 0.9912185478 [48,] 0.006530497 0.0130609943 0.9934695029 [49,] 0.011852021 0.0237040417 0.9881479792 [50,] 0.013214184 0.0264283675 0.9867858163 [51,] 0.017306135 0.0346122703 0.9826938648 [52,] 0.021906357 0.0438127145 0.9780936428 [53,] 0.021082128 0.0421642566 0.9789178717 [54,] 0.017941693 0.0358833857 0.9820583071 [55,] 0.027477090 0.0549541806 0.9725229097 [56,] 0.029938034 0.0598760686 0.9700619657 [57,] 0.041019999 0.0820399986 0.9589800007 [58,] 0.051665501 0.1033310021 0.9483344990 [59,] 0.078290719 0.1565814389 0.9217092806 [60,] 0.129531514 0.2590630290 0.8704684855 [61,] 0.379572343 0.7591446863 0.6204276569 [62,] 0.624118553 0.7517628931 0.3758814465 [63,] 0.773364158 0.4532716836 0.2266358418 [64,] 0.865072639 0.2698547229 0.1349273615 [65,] 0.908217140 0.1835657206 0.0917828603 [66,] 0.921788914 0.1564221720 0.0782110860 [67,] 0.959496263 0.0810074736 0.0405037368 [68,] 0.973104064 0.0537918726 0.0268959363 [69,] 0.987231564 0.0255368718 0.0127684359 [70,] 0.995368360 0.0092632793 0.0046316397 [71,] 0.994535875 0.0109282500 0.0054641250 [72,] 0.994314642 0.0113707158 0.0056853579 [73,] 0.991779452 0.0164410958 0.0082205479 [74,] 0.989470113 0.0210597749 0.0105298874 [75,] 0.995176877 0.0096462466 0.0048231233 [76,] 0.997362315 0.0052753704 0.0026376852 [77,] 0.998678629 0.0026427428 0.0013213714 [78,] 0.999001920 0.0019961600 0.0009980800 [79,] 0.998936728 0.0021265444 0.0010632722 [80,] 0.998866345 0.0022673096 0.0011336548 [81,] 0.999388277 0.0012234462 0.0006117231 [82,] 0.999563282 0.0008734361 0.0004367181 [83,] 0.999403013 0.0011939747 0.0005969873 [84,] 0.999256673 0.0014866533 0.0007433267 [85,] 0.998860426 0.0022791483 0.0011395742 [86,] 0.998237671 0.0035246573 0.0017623286 [87,] 0.997720761 0.0045584781 0.0022792391 [88,] 0.997102542 0.0057949158 0.0028974579 [89,] 0.995487445 0.0090251101 0.0045125551 [90,] 0.994161580 0.0116768396 0.0058384198 [91,] 0.990347562 0.0193048754 0.0096524377 [92,] 0.986947190 0.0261056209 0.0130528105 [93,] 0.995196323 0.0096073537 0.0048036768 [94,] 0.996964830 0.0060703390 0.0030351695 [95,] 0.994167268 0.0116654634 0.0058327317 [96,] 0.988796185 0.0224076306 0.0112038153 [97,] 0.982324860 0.0353502805 0.0176751403 [98,] 0.965744737 0.0685105265 0.0342552632 [99,] 0.939593105 0.1208137908 0.0604068954 [100,] 0.892513224 0.2149735512 0.1074867756 [101,] 0.820450780 0.3590984396 0.1795492198 [102,] 0.714432278 0.5711354433 0.2855677217 [103,] 0.577901326 0.8441973477 0.4220986738 [104,] 0.431805069 0.8636101383 0.5681949309 > postscript(file="/var/fisher/rcomp/tmp/1fogp1353451017.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/2uyo01353451017.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/3lffk1353451017.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/4ceox1353451017.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/5whoy1353451017.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 = 121 Frequency = 1 1 2 3 4 5 6 7 -14.784624 -14.356077 -40.400342 -41.229157 -55.604325 -60.227942 -4.185311 8 9 10 11 12 13 14 -11.816551 36.537543 11.871561 -19.103214 -29.871239 -30.970880 -26.431356 15 16 17 18 19 20 21 -50.520281 -61.788665 -73.806162 -63.543329 -19.143726 -16.832456 14.329307 22 23 24 25 26 27 28 -5.370133 3.703978 -22.522604 -12.172170 -3.764795 -33.687113 -26.822563 29 30 31 32 33 34 35 -27.355140 -34.698197 18.292042 17.877418 33.761923 10.633217 7.584364 36 37 38 39 40 41 42 -19.219163 27.127033 21.622888 -7.763351 -3.968397 -11.540412 6.151053 43 44 45 46 47 48 49 46.550646 53.366997 52.198595 74.987382 53.871094 21.501978 55.355582 50 51 52 53 54 55 56 81.636259 47.538707 45.440960 29.055307 8.367390 83.435815 62.019944 57 58 59 60 61 62 63 92.938442 73.216253 51.859224 40.218770 44.633782 59.961817 24.679835 64 65 66 67 68 69 70 38.434258 20.735442 37.429662 79.558155 45.968307 78.956872 30.011446 71 72 73 74 75 76 77 20.727124 -9.586004 11.920521 15.200820 -31.646113 -26.533112 -43.931902 78 79 80 81 82 83 84 -48.573516 -12.434155 -17.720923 5.733758 -22.919667 -25.085504 -38.443448 85 86 87 88 89 90 91 -32.351413 -29.270617 -43.603771 -55.595984 -66.728415 -74.510094 -29.835176 92 93 94 95 96 97 98 -48.753496 -33.598576 -56.678413 -35.185722 -38.988202 -8.639420 14.411054 99 100 101 102 103 104 105 -9.921072 4.056301 -15.420246 -16.856144 41.678430 32.721240 46.716660 106 107 108 109 110 111 112 14.293448 24.454349 25.967240 44.914106 16.954237 -25.995874 -21.694840 113 114 115 116 117 118 119 -43.166326 -41.585649 17.143335 5.905948 8.370638 -23.079206 -39.910249 120 121 -45.028004 -37.819526 > postscript(file="/var/fisher/rcomp/tmp/6l84t1353451017.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 = 121 Frequency = 1 lag(myerror, k = 1) myerror 0 -14.784624 NA 1 -14.356077 -14.784624 2 -40.400342 -14.356077 3 -41.229157 -40.400342 4 -55.604325 -41.229157 5 -60.227942 -55.604325 6 -4.185311 -60.227942 7 -11.816551 -4.185311 8 36.537543 -11.816551 9 11.871561 36.537543 10 -19.103214 11.871561 11 -29.871239 -19.103214 12 -30.970880 -29.871239 13 -26.431356 -30.970880 14 -50.520281 -26.431356 15 -61.788665 -50.520281 16 -73.806162 -61.788665 17 -63.543329 -73.806162 18 -19.143726 -63.543329 19 -16.832456 -19.143726 20 14.329307 -16.832456 21 -5.370133 14.329307 22 3.703978 -5.370133 23 -22.522604 3.703978 24 -12.172170 -22.522604 25 -3.764795 -12.172170 26 -33.687113 -3.764795 27 -26.822563 -33.687113 28 -27.355140 -26.822563 29 -34.698197 -27.355140 30 18.292042 -34.698197 31 17.877418 18.292042 32 33.761923 17.877418 33 10.633217 33.761923 34 7.584364 10.633217 35 -19.219163 7.584364 36 27.127033 -19.219163 37 21.622888 27.127033 38 -7.763351 21.622888 39 -3.968397 -7.763351 40 -11.540412 -3.968397 41 6.151053 -11.540412 42 46.550646 6.151053 43 53.366997 46.550646 44 52.198595 53.366997 45 74.987382 52.198595 46 53.871094 74.987382 47 21.501978 53.871094 48 55.355582 21.501978 49 81.636259 55.355582 50 47.538707 81.636259 51 45.440960 47.538707 52 29.055307 45.440960 53 8.367390 29.055307 54 83.435815 8.367390 55 62.019944 83.435815 56 92.938442 62.019944 57 73.216253 92.938442 58 51.859224 73.216253 59 40.218770 51.859224 60 44.633782 40.218770 61 59.961817 44.633782 62 24.679835 59.961817 63 38.434258 24.679835 64 20.735442 38.434258 65 37.429662 20.735442 66 79.558155 37.429662 67 45.968307 79.558155 68 78.956872 45.968307 69 30.011446 78.956872 70 20.727124 30.011446 71 -9.586004 20.727124 72 11.920521 -9.586004 73 15.200820 11.920521 74 -31.646113 15.200820 75 -26.533112 -31.646113 76 -43.931902 -26.533112 77 -48.573516 -43.931902 78 -12.434155 -48.573516 79 -17.720923 -12.434155 80 5.733758 -17.720923 81 -22.919667 5.733758 82 -25.085504 -22.919667 83 -38.443448 -25.085504 84 -32.351413 -38.443448 85 -29.270617 -32.351413 86 -43.603771 -29.270617 87 -55.595984 -43.603771 88 -66.728415 -55.595984 89 -74.510094 -66.728415 90 -29.835176 -74.510094 91 -48.753496 -29.835176 92 -33.598576 -48.753496 93 -56.678413 -33.598576 94 -35.185722 -56.678413 95 -38.988202 -35.185722 96 -8.639420 -38.988202 97 14.411054 -8.639420 98 -9.921072 14.411054 99 4.056301 -9.921072 100 -15.420246 4.056301 101 -16.856144 -15.420246 102 41.678430 -16.856144 103 32.721240 41.678430 104 46.716660 32.721240 105 14.293448 46.716660 106 24.454349 14.293448 107 25.967240 24.454349 108 44.914106 25.967240 109 16.954237 44.914106 110 -25.995874 16.954237 111 -21.694840 -25.995874 112 -43.166326 -21.694840 113 -41.585649 -43.166326 114 17.143335 -41.585649 115 5.905948 17.143335 116 8.370638 5.905948 117 -23.079206 8.370638 118 -39.910249 -23.079206 119 -45.028004 -39.910249 120 -37.819526 -45.028004 121 NA -37.819526 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -14.356077 -14.784624 [2,] -40.400342 -14.356077 [3,] -41.229157 -40.400342 [4,] -55.604325 -41.229157 [5,] -60.227942 -55.604325 [6,] -4.185311 -60.227942 [7,] -11.816551 -4.185311 [8,] 36.537543 -11.816551 [9,] 11.871561 36.537543 [10,] -19.103214 11.871561 [11,] -29.871239 -19.103214 [12,] -30.970880 -29.871239 [13,] -26.431356 -30.970880 [14,] -50.520281 -26.431356 [15,] -61.788665 -50.520281 [16,] -73.806162 -61.788665 [17,] -63.543329 -73.806162 [18,] -19.143726 -63.543329 [19,] -16.832456 -19.143726 [20,] 14.329307 -16.832456 [21,] -5.370133 14.329307 [22,] 3.703978 -5.370133 [23,] -22.522604 3.703978 [24,] -12.172170 -22.522604 [25,] -3.764795 -12.172170 [26,] -33.687113 -3.764795 [27,] -26.822563 -33.687113 [28,] -27.355140 -26.822563 [29,] -34.698197 -27.355140 [30,] 18.292042 -34.698197 [31,] 17.877418 18.292042 [32,] 33.761923 17.877418 [33,] 10.633217 33.761923 [34,] 7.584364 10.633217 [35,] -19.219163 7.584364 [36,] 27.127033 -19.219163 [37,] 21.622888 27.127033 [38,] -7.763351 21.622888 [39,] -3.968397 -7.763351 [40,] -11.540412 -3.968397 [41,] 6.151053 -11.540412 [42,] 46.550646 6.151053 [43,] 53.366997 46.550646 [44,] 52.198595 53.366997 [45,] 74.987382 52.198595 [46,] 53.871094 74.987382 [47,] 21.501978 53.871094 [48,] 55.355582 21.501978 [49,] 81.636259 55.355582 [50,] 47.538707 81.636259 [51,] 45.440960 47.538707 [52,] 29.055307 45.440960 [53,] 8.367390 29.055307 [54,] 83.435815 8.367390 [55,] 62.019944 83.435815 [56,] 92.938442 62.019944 [57,] 73.216253 92.938442 [58,] 51.859224 73.216253 [59,] 40.218770 51.859224 [60,] 44.633782 40.218770 [61,] 59.961817 44.633782 [62,] 24.679835 59.961817 [63,] 38.434258 24.679835 [64,] 20.735442 38.434258 [65,] 37.429662 20.735442 [66,] 79.558155 37.429662 [67,] 45.968307 79.558155 [68,] 78.956872 45.968307 [69,] 30.011446 78.956872 [70,] 20.727124 30.011446 [71,] -9.586004 20.727124 [72,] 11.920521 -9.586004 [73,] 15.200820 11.920521 [74,] -31.646113 15.200820 [75,] -26.533112 -31.646113 [76,] -43.931902 -26.533112 [77,] -48.573516 -43.931902 [78,] -12.434155 -48.573516 [79,] -17.720923 -12.434155 [80,] 5.733758 -17.720923 [81,] -22.919667 5.733758 [82,] -25.085504 -22.919667 [83,] -38.443448 -25.085504 [84,] -32.351413 -38.443448 [85,] -29.270617 -32.351413 [86,] -43.603771 -29.270617 [87,] -55.595984 -43.603771 [88,] -66.728415 -55.595984 [89,] -74.510094 -66.728415 [90,] -29.835176 -74.510094 [91,] -48.753496 -29.835176 [92,] -33.598576 -48.753496 [93,] -56.678413 -33.598576 [94,] -35.185722 -56.678413 [95,] -38.988202 -35.185722 [96,] -8.639420 -38.988202 [97,] 14.411054 -8.639420 [98,] -9.921072 14.411054 [99,] 4.056301 -9.921072 [100,] -15.420246 4.056301 [101,] -16.856144 -15.420246 [102,] 41.678430 -16.856144 [103,] 32.721240 41.678430 [104,] 46.716660 32.721240 [105,] 14.293448 46.716660 [106,] 24.454349 14.293448 [107,] 25.967240 24.454349 [108,] 44.914106 25.967240 [109,] 16.954237 44.914106 [110,] -25.995874 16.954237 [111,] -21.694840 -25.995874 [112,] -43.166326 -21.694840 [113,] -41.585649 -43.166326 [114,] 17.143335 -41.585649 [115,] 5.905948 17.143335 [116,] 8.370638 5.905948 [117,] -23.079206 8.370638 [118,] -39.910249 -23.079206 [119,] -45.028004 -39.910249 [120,] -37.819526 -45.028004 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -14.356077 -14.784624 2 -40.400342 -14.356077 3 -41.229157 -40.400342 4 -55.604325 -41.229157 5 -60.227942 -55.604325 6 -4.185311 -60.227942 7 -11.816551 -4.185311 8 36.537543 -11.816551 9 11.871561 36.537543 10 -19.103214 11.871561 11 -29.871239 -19.103214 12 -30.970880 -29.871239 13 -26.431356 -30.970880 14 -50.520281 -26.431356 15 -61.788665 -50.520281 16 -73.806162 -61.788665 17 -63.543329 -73.806162 18 -19.143726 -63.543329 19 -16.832456 -19.143726 20 14.329307 -16.832456 21 -5.370133 14.329307 22 3.703978 -5.370133 23 -22.522604 3.703978 24 -12.172170 -22.522604 25 -3.764795 -12.172170 26 -33.687113 -3.764795 27 -26.822563 -33.687113 28 -27.355140 -26.822563 29 -34.698197 -27.355140 30 18.292042 -34.698197 31 17.877418 18.292042 32 33.761923 17.877418 33 10.633217 33.761923 34 7.584364 10.633217 35 -19.219163 7.584364 36 27.127033 -19.219163 37 21.622888 27.127033 38 -7.763351 21.622888 39 -3.968397 -7.763351 40 -11.540412 -3.968397 41 6.151053 -11.540412 42 46.550646 6.151053 43 53.366997 46.550646 44 52.198595 53.366997 45 74.987382 52.198595 46 53.871094 74.987382 47 21.501978 53.871094 48 55.355582 21.501978 49 81.636259 55.355582 50 47.538707 81.636259 51 45.440960 47.538707 52 29.055307 45.440960 53 8.367390 29.055307 54 83.435815 8.367390 55 62.019944 83.435815 56 92.938442 62.019944 57 73.216253 92.938442 58 51.859224 73.216253 59 40.218770 51.859224 60 44.633782 40.218770 61 59.961817 44.633782 62 24.679835 59.961817 63 38.434258 24.679835 64 20.735442 38.434258 65 37.429662 20.735442 66 79.558155 37.429662 67 45.968307 79.558155 68 78.956872 45.968307 69 30.011446 78.956872 70 20.727124 30.011446 71 -9.586004 20.727124 72 11.920521 -9.586004 73 15.200820 11.920521 74 -31.646113 15.200820 75 -26.533112 -31.646113 76 -43.931902 -26.533112 77 -48.573516 -43.931902 78 -12.434155 -48.573516 79 -17.720923 -12.434155 80 5.733758 -17.720923 81 -22.919667 5.733758 82 -25.085504 -22.919667 83 -38.443448 -25.085504 84 -32.351413 -38.443448 85 -29.270617 -32.351413 86 -43.603771 -29.270617 87 -55.595984 -43.603771 88 -66.728415 -55.595984 89 -74.510094 -66.728415 90 -29.835176 -74.510094 91 -48.753496 -29.835176 92 -33.598576 -48.753496 93 -56.678413 -33.598576 94 -35.185722 -56.678413 95 -38.988202 -35.185722 96 -8.639420 -38.988202 97 14.411054 -8.639420 98 -9.921072 14.411054 99 4.056301 -9.921072 100 -15.420246 4.056301 101 -16.856144 -15.420246 102 41.678430 -16.856144 103 32.721240 41.678430 104 46.716660 32.721240 105 14.293448 46.716660 106 24.454349 14.293448 107 25.967240 24.454349 108 44.914106 25.967240 109 16.954237 44.914106 110 -25.995874 16.954237 111 -21.694840 -25.995874 112 -43.166326 -21.694840 113 -41.585649 -43.166326 114 17.143335 -41.585649 115 5.905948 17.143335 116 8.370638 5.905948 117 -23.079206 8.370638 118 -39.910249 -23.079206 119 -45.028004 -39.910249 120 -37.819526 -45.028004 > 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/7lpjj1353451017.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/8vl0f1353451017.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/9ayij1353451017.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/10g9451353451017.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/11dhig1353451017.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/12u4041353451017.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/13zxzy1353451017.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/14ukm51353451017.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/156l9w1353451017.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/16jzfq1353451017.tab") + } > > try(system("convert tmp/1fogp1353451017.ps tmp/1fogp1353451017.png",intern=TRUE)) character(0) > try(system("convert tmp/2uyo01353451017.ps tmp/2uyo01353451017.png",intern=TRUE)) character(0) > try(system("convert tmp/3lffk1353451017.ps tmp/3lffk1353451017.png",intern=TRUE)) character(0) > try(system("convert tmp/4ceox1353451017.ps tmp/4ceox1353451017.png",intern=TRUE)) character(0) > try(system("convert tmp/5whoy1353451017.ps tmp/5whoy1353451017.png",intern=TRUE)) character(0) > try(system("convert tmp/6l84t1353451017.ps tmp/6l84t1353451017.png",intern=TRUE)) character(0) > try(system("convert tmp/7lpjj1353451017.ps tmp/7lpjj1353451017.png",intern=TRUE)) character(0) > try(system("convert tmp/8vl0f1353451017.ps tmp/8vl0f1353451017.png",intern=TRUE)) character(0) > try(system("convert tmp/9ayij1353451017.ps tmp/9ayij1353451017.png",intern=TRUE)) character(0) > try(system("convert tmp/10g9451353451017.ps tmp/10g9451353451017.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 6.847 1.327 8.181