R version 2.8.0 (2008-10-20) Copyright (C) 2008 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(519,0,517,0,510,0,509,0,501,0,507,0,569,0,580,0,578,0,565,0,547,0,555,0,562,0,561,0,555,0,544,0,537,0,543,0,594,0,611,0,613,0,611,0,594,0,595,0,591,0,589,0,584,0,573,0,567,0,569,0,621,0,629,0,628,0,612,0,595,0,597,0,593,0,590,0,580,0,574,0,573,0,573,0,620,0,626,0,620,0,588,0,566,0,557,0,561,1,549,1,532,1,526,1,511,1,499,1,555,1,565,1,542,1,527,1,510,1,514,1,517,1,508,1,493,1,490,1,469,1,478,1),dim=c(2,66),dimnames=list(c('Aantal_werklozen','Dummyvariabele'),1:66)) > y <- array(NA,dim=c(2,66),dimnames=list(c('Aantal_werklozen','Dummyvariabele'),1:66)) > 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' > #'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 Aantal_werklozen Dummyvariabele 1 519 0 2 517 0 3 510 0 4 509 0 5 501 0 6 507 0 7 569 0 8 580 0 9 578 0 10 565 0 11 547 0 12 555 0 13 562 0 14 561 0 15 555 0 16 544 0 17 537 0 18 543 0 19 594 0 20 611 0 21 613 0 22 611 0 23 594 0 24 595 0 25 591 0 26 589 0 27 584 0 28 573 0 29 567 0 30 569 0 31 621 0 32 629 0 33 628 0 34 612 0 35 595 0 36 597 0 37 593 0 38 590 0 39 580 0 40 574 0 41 573 0 42 573 0 43 620 0 44 626 0 45 620 0 46 588 0 47 566 0 48 557 0 49 561 1 50 549 1 51 532 1 52 526 1 53 511 1 54 499 1 55 555 1 56 565 1 57 542 1 58 527 1 59 510 1 60 514 1 61 517 1 62 508 1 63 493 1 64 490 1 65 469 1 66 478 1 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) Dummyvariabele 574.83 -55.61 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -73.833 -19.333 -1.333 20.167 54.167 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 574.833 4.695 122.446 < 2e-16 *** Dummyvariabele -55.611 8.989 -6.186 4.85e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 32.52 on 64 degrees of freedom Multiple R-squared: 0.3742, Adjusted R-squared: 0.3644 F-statistic: 38.27 on 1 and 64 DF, p-value: 4.853e-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.03457085 0.06914170 0.96542915 [2,] 0.01221812 0.02443624 0.98778188 [3,] 0.52813310 0.94373381 0.47186690 [4,] 0.81882392 0.36235216 0.18117608 [5,] 0.88961496 0.22077009 0.11038504 [6,] 0.88355206 0.23289587 0.11644794 [7,] 0.85284717 0.29430565 0.14715283 [8,] 0.82414656 0.35170688 0.17585344 [9,] 0.80176306 0.39647389 0.19823694 [10,] 0.77431370 0.45137261 0.22568630 [11,] 0.74061238 0.51877524 0.25938762 [12,] 0.72090207 0.55819587 0.27909793 [13,] 0.73400951 0.53198098 0.26599049 [14,] 0.74322473 0.51355053 0.25677527 [15,] 0.83308986 0.33382028 0.16691014 [16,] 0.93132823 0.13734354 0.06867177 [17,] 0.96941924 0.06116152 0.03058076 [18,] 0.98257855 0.03484290 0.01742145 [19,] 0.98136236 0.03727528 0.01863764 [20,] 0.97950320 0.04099360 0.02049680 [21,] 0.97509161 0.04981677 0.02490839 [22,] 0.96851862 0.06296275 0.03148138 [23,] 0.95858595 0.08282809 0.04141405 [24,] 0.94643272 0.10713457 0.05356728 [25,] 0.93569495 0.12861009 0.06430505 [26,] 0.92355960 0.15288080 0.07644040 [27,] 0.94602325 0.10795351 0.05397675 [28,] 0.97028382 0.05943236 0.02971618 [29,] 0.98308199 0.03383602 0.01691801 [30,] 0.98299188 0.03401625 0.01700812 [31,] 0.97604683 0.04790634 0.02395317 [32,] 0.96738745 0.06522511 0.03261255 [33,] 0.95431036 0.09137927 0.04568964 [34,] 0.93580489 0.12839021 0.06419511 [35,] 0.91057265 0.17885469 0.08942735 [36,] 0.88237751 0.23524499 0.11762249 [37,] 0.85154964 0.29690071 0.14845036 [38,] 0.81977064 0.36045873 0.18022936 [39,] 0.82529667 0.34940666 0.17470333 [40,] 0.86332308 0.27335385 0.13667692 [41,] 0.90055826 0.19888349 0.09944174 [42,] 0.87788452 0.24423096 0.12211548 [43,] 0.83258642 0.33482715 0.16741358 [44,] 0.77762690 0.44474620 0.22237310 [45,] 0.81038745 0.37922509 0.18961255 [46,] 0.80935885 0.38128230 0.19064115 [47,] 0.76523830 0.46952339 0.23476170 [48,] 0.70301460 0.59397080 0.29698540 [49,] 0.62489717 0.75020565 0.37510283 [50,] 0.55949933 0.88100133 0.44050067 [51,] 0.62054097 0.75891806 0.37945903 [52,] 0.83643312 0.32713376 0.16356688 [53,] 0.89924668 0.20150664 0.10075332 [54,] 0.90800289 0.18399422 0.09199711 [55,] 0.85662150 0.28675701 0.14337850 [56,] 0.81415196 0.37169607 0.18584804 [57,] 0.83101543 0.33796915 0.16898457 > postscript(file="/var/www/html/rcomp/tmp/1ppbr1227471267.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/2k3eo1227471267.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/3s58v1227471267.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/4r3gf1227471267.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/5m87y1227471267.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 = 66 Frequency = 1 1 2 3 4 5 6 -55.8333333 -57.8333333 -64.8333333 -65.8333333 -73.8333333 -67.8333333 7 8 9 10 11 12 -5.8333333 5.1666667 3.1666667 -9.8333333 -27.8333333 -19.8333333 13 14 15 16 17 18 -12.8333333 -13.8333333 -19.8333333 -30.8333333 -37.8333333 -31.8333333 19 20 21 22 23 24 19.1666667 36.1666667 38.1666667 36.1666667 19.1666667 20.1666667 25 26 27 28 29 30 16.1666667 14.1666667 9.1666667 -1.8333333 -7.8333333 -5.8333333 31 32 33 34 35 36 46.1666667 54.1666667 53.1666667 37.1666667 20.1666667 22.1666667 37 38 39 40 41 42 18.1666667 15.1666667 5.1666667 -0.8333333 -1.8333333 -1.8333333 43 44 45 46 47 48 45.1666667 51.1666667 45.1666667 13.1666667 -8.8333333 -17.8333333 49 50 51 52 53 54 41.7777778 29.7777778 12.7777778 6.7777778 -8.2222222 -20.2222222 55 56 57 58 59 60 35.7777778 45.7777778 22.7777778 7.7777778 -9.2222222 -5.2222222 61 62 63 64 65 66 -2.2222222 -11.2222222 -26.2222222 -29.2222222 -50.2222222 -41.2222222 > postscript(file="/var/www/html/rcomp/tmp/6sghh1227471267.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 = 66 Frequency = 1 lag(myerror, k = 1) myerror 0 -55.8333333 NA 1 -57.8333333 -55.8333333 2 -64.8333333 -57.8333333 3 -65.8333333 -64.8333333 4 -73.8333333 -65.8333333 5 -67.8333333 -73.8333333 6 -5.8333333 -67.8333333 7 5.1666667 -5.8333333 8 3.1666667 5.1666667 9 -9.8333333 3.1666667 10 -27.8333333 -9.8333333 11 -19.8333333 -27.8333333 12 -12.8333333 -19.8333333 13 -13.8333333 -12.8333333 14 -19.8333333 -13.8333333 15 -30.8333333 -19.8333333 16 -37.8333333 -30.8333333 17 -31.8333333 -37.8333333 18 19.1666667 -31.8333333 19 36.1666667 19.1666667 20 38.1666667 36.1666667 21 36.1666667 38.1666667 22 19.1666667 36.1666667 23 20.1666667 19.1666667 24 16.1666667 20.1666667 25 14.1666667 16.1666667 26 9.1666667 14.1666667 27 -1.8333333 9.1666667 28 -7.8333333 -1.8333333 29 -5.8333333 -7.8333333 30 46.1666667 -5.8333333 31 54.1666667 46.1666667 32 53.1666667 54.1666667 33 37.1666667 53.1666667 34 20.1666667 37.1666667 35 22.1666667 20.1666667 36 18.1666667 22.1666667 37 15.1666667 18.1666667 38 5.1666667 15.1666667 39 -0.8333333 5.1666667 40 -1.8333333 -0.8333333 41 -1.8333333 -1.8333333 42 45.1666667 -1.8333333 43 51.1666667 45.1666667 44 45.1666667 51.1666667 45 13.1666667 45.1666667 46 -8.8333333 13.1666667 47 -17.8333333 -8.8333333 48 41.7777778 -17.8333333 49 29.7777778 41.7777778 50 12.7777778 29.7777778 51 6.7777778 12.7777778 52 -8.2222222 6.7777778 53 -20.2222222 -8.2222222 54 35.7777778 -20.2222222 55 45.7777778 35.7777778 56 22.7777778 45.7777778 57 7.7777778 22.7777778 58 -9.2222222 7.7777778 59 -5.2222222 -9.2222222 60 -2.2222222 -5.2222222 61 -11.2222222 -2.2222222 62 -26.2222222 -11.2222222 63 -29.2222222 -26.2222222 64 -50.2222222 -29.2222222 65 -41.2222222 -50.2222222 66 NA -41.2222222 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -57.8333333 -55.8333333 [2,] -64.8333333 -57.8333333 [3,] -65.8333333 -64.8333333 [4,] -73.8333333 -65.8333333 [5,] -67.8333333 -73.8333333 [6,] -5.8333333 -67.8333333 [7,] 5.1666667 -5.8333333 [8,] 3.1666667 5.1666667 [9,] -9.8333333 3.1666667 [10,] -27.8333333 -9.8333333 [11,] -19.8333333 -27.8333333 [12,] -12.8333333 -19.8333333 [13,] -13.8333333 -12.8333333 [14,] -19.8333333 -13.8333333 [15,] -30.8333333 -19.8333333 [16,] -37.8333333 -30.8333333 [17,] -31.8333333 -37.8333333 [18,] 19.1666667 -31.8333333 [19,] 36.1666667 19.1666667 [20,] 38.1666667 36.1666667 [21,] 36.1666667 38.1666667 [22,] 19.1666667 36.1666667 [23,] 20.1666667 19.1666667 [24,] 16.1666667 20.1666667 [25,] 14.1666667 16.1666667 [26,] 9.1666667 14.1666667 [27,] -1.8333333 9.1666667 [28,] -7.8333333 -1.8333333 [29,] -5.8333333 -7.8333333 [30,] 46.1666667 -5.8333333 [31,] 54.1666667 46.1666667 [32,] 53.1666667 54.1666667 [33,] 37.1666667 53.1666667 [34,] 20.1666667 37.1666667 [35,] 22.1666667 20.1666667 [36,] 18.1666667 22.1666667 [37,] 15.1666667 18.1666667 [38,] 5.1666667 15.1666667 [39,] -0.8333333 5.1666667 [40,] -1.8333333 -0.8333333 [41,] -1.8333333 -1.8333333 [42,] 45.1666667 -1.8333333 [43,] 51.1666667 45.1666667 [44,] 45.1666667 51.1666667 [45,] 13.1666667 45.1666667 [46,] -8.8333333 13.1666667 [47,] -17.8333333 -8.8333333 [48,] 41.7777778 -17.8333333 [49,] 29.7777778 41.7777778 [50,] 12.7777778 29.7777778 [51,] 6.7777778 12.7777778 [52,] -8.2222222 6.7777778 [53,] -20.2222222 -8.2222222 [54,] 35.7777778 -20.2222222 [55,] 45.7777778 35.7777778 [56,] 22.7777778 45.7777778 [57,] 7.7777778 22.7777778 [58,] -9.2222222 7.7777778 [59,] -5.2222222 -9.2222222 [60,] -2.2222222 -5.2222222 [61,] -11.2222222 -2.2222222 [62,] -26.2222222 -11.2222222 [63,] -29.2222222 -26.2222222 [64,] -50.2222222 -29.2222222 [65,] -41.2222222 -50.2222222 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -57.8333333 -55.8333333 2 -64.8333333 -57.8333333 3 -65.8333333 -64.8333333 4 -73.8333333 -65.8333333 5 -67.8333333 -73.8333333 6 -5.8333333 -67.8333333 7 5.1666667 -5.8333333 8 3.1666667 5.1666667 9 -9.8333333 3.1666667 10 -27.8333333 -9.8333333 11 -19.8333333 -27.8333333 12 -12.8333333 -19.8333333 13 -13.8333333 -12.8333333 14 -19.8333333 -13.8333333 15 -30.8333333 -19.8333333 16 -37.8333333 -30.8333333 17 -31.8333333 -37.8333333 18 19.1666667 -31.8333333 19 36.1666667 19.1666667 20 38.1666667 36.1666667 21 36.1666667 38.1666667 22 19.1666667 36.1666667 23 20.1666667 19.1666667 24 16.1666667 20.1666667 25 14.1666667 16.1666667 26 9.1666667 14.1666667 27 -1.8333333 9.1666667 28 -7.8333333 -1.8333333 29 -5.8333333 -7.8333333 30 46.1666667 -5.8333333 31 54.1666667 46.1666667 32 53.1666667 54.1666667 33 37.1666667 53.1666667 34 20.1666667 37.1666667 35 22.1666667 20.1666667 36 18.1666667 22.1666667 37 15.1666667 18.1666667 38 5.1666667 15.1666667 39 -0.8333333 5.1666667 40 -1.8333333 -0.8333333 41 -1.8333333 -1.8333333 42 45.1666667 -1.8333333 43 51.1666667 45.1666667 44 45.1666667 51.1666667 45 13.1666667 45.1666667 46 -8.8333333 13.1666667 47 -17.8333333 -8.8333333 48 41.7777778 -17.8333333 49 29.7777778 41.7777778 50 12.7777778 29.7777778 51 6.7777778 12.7777778 52 -8.2222222 6.7777778 53 -20.2222222 -8.2222222 54 35.7777778 -20.2222222 55 45.7777778 35.7777778 56 22.7777778 45.7777778 57 7.7777778 22.7777778 58 -9.2222222 7.7777778 59 -5.2222222 -9.2222222 60 -2.2222222 -5.2222222 61 -11.2222222 -2.2222222 62 -26.2222222 -11.2222222 63 -29.2222222 -26.2222222 64 -50.2222222 -29.2222222 65 -41.2222222 -50.2222222 > 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/73lys1227471267.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/8lgjq1227471267.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/9z0k31227471267.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/10lmkq1227471267.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/11a44i1227471267.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/12plke1227471267.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/13gsaf1227471267.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/143cu41227471267.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/15k64t1227471267.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/16v65z1227471268.tab") + } > > system("convert tmp/1ppbr1227471267.ps tmp/1ppbr1227471267.png") > system("convert tmp/2k3eo1227471267.ps tmp/2k3eo1227471267.png") > system("convert tmp/3s58v1227471267.ps tmp/3s58v1227471267.png") > system("convert tmp/4r3gf1227471267.ps tmp/4r3gf1227471267.png") > system("convert tmp/5m87y1227471267.ps tmp/5m87y1227471267.png") > system("convert tmp/6sghh1227471267.ps tmp/6sghh1227471267.png") > system("convert tmp/73lys1227471267.ps tmp/73lys1227471267.png") > system("convert tmp/8lgjq1227471267.ps tmp/8lgjq1227471267.png") > system("convert tmp/9z0k31227471267.ps tmp/9z0k31227471267.png") > system("convert tmp/10lmkq1227471267.ps tmp/10lmkq1227471267.png") > > > proc.time() user system elapsed 2.507 1.569 2.917