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(627,216.234,696,213.586,825,209.465,677,204.045,656,200.237,785,203.666,412,241.476,352,260.307,839,243.324,729,244.460,696,233.575,641,237.217,695,235.243,638,230.354,762,227.184,635,221.678,721,217.142,854,219.452,418,256.446,367,265.845,824,248.624,687,241.114,601,229.245,676,231.805,740,219.277,691,219.313,683,212.610,594,214.771,729,211.142,731,211.457,386,240.048,331,240.636,707,230.580,715,208.795,657,197.922,653,194.596,642,194.581,643,185.686,718,178.106,654,172.608,632,167.302,731,168.053,392,202.300,344,202.388,792,182.516,852,173.476,649,166.444,629,171.297,685,169.701,617,164.182,715,161.914,715,159.612,629,151.001,916,158.114,531,186.530,357,187.069,917,174.330,828,169.362,708,166.827,858,178.037,775,186.413,785,189.226,1006,191.563,789,188.906,734,186.005,906,195.309,532,223.532,387,226.899,991,214.126,841,206.903,892,204.442,782,220.375),dim=c(2,72),dimnames=list(c('faillissementen','werklozen'),1:72)) > y <- array(NA,dim=c(2,72),dimnames=list(c('faillissementen','werklozen'),1:72)) > 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 = '2' > #'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 werklozen faillissementen 1 216.234 627 2 213.586 696 3 209.465 825 4 204.045 677 5 200.237 656 6 203.666 785 7 241.476 412 8 260.307 352 9 243.324 839 10 244.460 729 11 233.575 696 12 237.217 641 13 235.243 695 14 230.354 638 15 227.184 762 16 221.678 635 17 217.142 721 18 219.452 854 19 256.446 418 20 265.845 367 21 248.624 824 22 241.114 687 23 229.245 601 24 231.805 676 25 219.277 740 26 219.313 691 27 212.610 683 28 214.771 594 29 211.142 729 30 211.457 731 31 240.048 386 32 240.636 331 33 230.580 707 34 208.795 715 35 197.922 657 36 194.596 653 37 194.581 642 38 185.686 643 39 178.106 718 40 172.608 654 41 167.302 632 42 168.053 731 43 202.300 392 44 202.388 344 45 182.516 792 46 173.476 852 47 166.444 649 48 171.297 629 49 169.701 685 50 164.182 617 51 161.914 715 52 159.612 715 53 151.001 629 54 158.114 916 55 186.530 531 56 187.069 357 57 174.330 917 58 169.362 828 59 166.827 708 60 178.037 858 61 186.413 775 62 189.226 785 63 191.563 1006 64 188.906 789 65 186.005 734 66 195.309 906 67 223.532 532 68 226.899 387 69 214.126 991 70 206.903 841 71 204.442 892 72 220.375 782 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) faillissementen 245.83503 -0.06004 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -57.070 -21.291 5.424 19.714 52.261 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 245.83503 14.08555 17.453 < 2e-16 *** faillissementen -0.06004 0.02018 -2.976 0.00401 ** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 26.61 on 70 degrees of freedom Multiple R-squared: 0.1123, Adjusted R-squared: 0.09961 F-statistic: 8.855 on 1 and 70 DF, p-value: 0.00401 > 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.027725378 0.055450756 0.972274622 [2,] 0.007319096 0.014638193 0.992680904 [3,] 0.009269663 0.018539326 0.990730337 [4,] 0.008821153 0.017642306 0.991178847 [5,] 0.140847131 0.281694262 0.859152869 [6,] 0.180619599 0.361239197 0.819380401 [7,] 0.137167990 0.274335979 0.862832010 [8,] 0.102719038 0.205438075 0.897280962 [9,] 0.078802218 0.157604436 0.921197782 [10,] 0.051258099 0.102516198 0.948741901 [11,] 0.035105662 0.070211324 0.964894338 [12,] 0.022261646 0.044523291 0.977738354 [13,] 0.013637906 0.027275811 0.986362094 [14,] 0.008751927 0.017503855 0.991248073 [15,] 0.008352554 0.016705108 0.991647446 [16,] 0.010907971 0.021815942 0.989092029 [17,] 0.039908898 0.079817795 0.960091102 [18,] 0.045507402 0.091014804 0.954492598 [19,] 0.037543113 0.075086226 0.962456887 [20,] 0.034254769 0.068509537 0.965745231 [21,] 0.028272537 0.056545073 0.971727463 [22,] 0.024187495 0.048374991 0.975812505 [23,] 0.022761489 0.045522978 0.977238511 [24,] 0.023867677 0.047735354 0.976132323 [25,] 0.021216879 0.042433759 0.978783121 [26,] 0.018811142 0.037622284 0.981188858 [27,] 0.022295244 0.044590489 0.977704756 [28,] 0.033132477 0.066264953 0.966867523 [29,] 0.052728753 0.105457505 0.947271247 [30,] 0.057253402 0.114506803 0.942746598 [31,] 0.083199662 0.166399324 0.916800338 [32,] 0.119104190 0.238208380 0.880895810 [33,] 0.155180250 0.310360501 0.844819750 [34,] 0.226578888 0.453157777 0.773421112 [35,] 0.306306642 0.612613285 0.693693358 [36,] 0.446083373 0.892166746 0.553916627 [37,] 0.614511768 0.770976463 0.385488232 [38,] 0.689787682 0.620424637 0.310212318 [39,] 0.692671005 0.614657990 0.307328995 [40,] 0.692665184 0.614669632 0.307334816 [41,] 0.661573534 0.676852932 0.338426466 [42,] 0.647164319 0.705671362 0.352835681 [43,] 0.705091560 0.589816880 0.294908440 [44,] 0.725616890 0.548766220 0.274383110 [45,] 0.738074646 0.523850709 0.261925354 [46,] 0.788670244 0.422659512 0.211329756 [47,] 0.828034144 0.343931712 0.171965856 [48,] 0.874812474 0.250375052 0.125187526 [49,] 0.958584883 0.082830234 0.041415117 [50,] 0.972927060 0.054145881 0.027072940 [51,] 0.964910804 0.070178392 0.035089196 [52,] 0.968173519 0.063652962 0.031826481 [53,] 0.958395594 0.083208813 0.041604406 [54,] 0.965934011 0.068131978 0.034065989 [55,] 0.990036251 0.019927497 0.009963749 [56,] 0.990481252 0.019037495 0.009518748 [57,] 0.988889660 0.022220680 0.011110340 [58,] 0.985519347 0.028961306 0.014480653 [59,] 0.969562794 0.060874413 0.030437206 [60,] 0.967464224 0.065071551 0.032535776 [61,] 0.993669935 0.012660131 0.006330065 [62,] 0.995095232 0.009809536 0.004904768 [63,] 0.976931150 0.046137699 0.023068850 > postscript(file="/var/www/html/rcomp/tmp/12gu41291992853.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/www/html/rcomp/tmp/22gu41291992853.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/www/html/rcomp/tmp/3c7b71291992853.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/www/html/rcomp/tmp/4c7b71291992853.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/www/html/rcomp/tmp/5c7b71291992853.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 = 72 Frequency = 1 1 2 3 4 5 6 7 8.042975 9.537617 13.161556 -1.144110 -6.212915 4.961025 20.376743 8 9 10 11 12 13 14 35.605446 47.861092 42.392880 29.526617 29.866511 31.134579 22.823396 15 16 17 18 19 20 21 27.098144 13.967281 14.594574 24.889666 35.706973 42.044021 52.260518 22 23 24 25 26 27 28 36.525272 19.492980 26.555851 17.870302 14.964426 7.781119 4.598712 29 30 31 32 33 34 35 9.074880 9.509957 17.387748 14.673642 27.192038 5.887344 -8.467876 36 37 38 39 40 41 42 -12.034029 -12.709451 -21.544412 -24.621541 -33.961991 -40.588833 -33.894043 43 44 45 46 47 48 49 -20.000022 -22.793860 -15.768707 -21.206410 -40.426183 -36.773948 -35.007804 50 51 52 53 54 55 56 -44.609408 -40.993656 -43.295656 -57.069948 -32.725960 -27.424700 -37.332362 57 58 59 60 61 62 63 -16.449922 -26.761329 -36.500924 -16.285181 -12.892358 -9.478975 6.126486 64 65 66 67 68 69 70 -9.558822 -15.761928 3.868657 9.637338 4.298786 27.788912 11.560169 71 72 12.161121 21.489910 > postscript(file="/var/www/html/rcomp/tmp/6nysa1291992853.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 = 72 Frequency = 1 lag(myerror, k = 1) myerror 0 8.042975 NA 1 9.537617 8.042975 2 13.161556 9.537617 3 -1.144110 13.161556 4 -6.212915 -1.144110 5 4.961025 -6.212915 6 20.376743 4.961025 7 35.605446 20.376743 8 47.861092 35.605446 9 42.392880 47.861092 10 29.526617 42.392880 11 29.866511 29.526617 12 31.134579 29.866511 13 22.823396 31.134579 14 27.098144 22.823396 15 13.967281 27.098144 16 14.594574 13.967281 17 24.889666 14.594574 18 35.706973 24.889666 19 42.044021 35.706973 20 52.260518 42.044021 21 36.525272 52.260518 22 19.492980 36.525272 23 26.555851 19.492980 24 17.870302 26.555851 25 14.964426 17.870302 26 7.781119 14.964426 27 4.598712 7.781119 28 9.074880 4.598712 29 9.509957 9.074880 30 17.387748 9.509957 31 14.673642 17.387748 32 27.192038 14.673642 33 5.887344 27.192038 34 -8.467876 5.887344 35 -12.034029 -8.467876 36 -12.709451 -12.034029 37 -21.544412 -12.709451 38 -24.621541 -21.544412 39 -33.961991 -24.621541 40 -40.588833 -33.961991 41 -33.894043 -40.588833 42 -20.000022 -33.894043 43 -22.793860 -20.000022 44 -15.768707 -22.793860 45 -21.206410 -15.768707 46 -40.426183 -21.206410 47 -36.773948 -40.426183 48 -35.007804 -36.773948 49 -44.609408 -35.007804 50 -40.993656 -44.609408 51 -43.295656 -40.993656 52 -57.069948 -43.295656 53 -32.725960 -57.069948 54 -27.424700 -32.725960 55 -37.332362 -27.424700 56 -16.449922 -37.332362 57 -26.761329 -16.449922 58 -36.500924 -26.761329 59 -16.285181 -36.500924 60 -12.892358 -16.285181 61 -9.478975 -12.892358 62 6.126486 -9.478975 63 -9.558822 6.126486 64 -15.761928 -9.558822 65 3.868657 -15.761928 66 9.637338 3.868657 67 4.298786 9.637338 68 27.788912 4.298786 69 11.560169 27.788912 70 12.161121 11.560169 71 21.489910 12.161121 72 NA 21.489910 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 9.537617 8.042975 [2,] 13.161556 9.537617 [3,] -1.144110 13.161556 [4,] -6.212915 -1.144110 [5,] 4.961025 -6.212915 [6,] 20.376743 4.961025 [7,] 35.605446 20.376743 [8,] 47.861092 35.605446 [9,] 42.392880 47.861092 [10,] 29.526617 42.392880 [11,] 29.866511 29.526617 [12,] 31.134579 29.866511 [13,] 22.823396 31.134579 [14,] 27.098144 22.823396 [15,] 13.967281 27.098144 [16,] 14.594574 13.967281 [17,] 24.889666 14.594574 [18,] 35.706973 24.889666 [19,] 42.044021 35.706973 [20,] 52.260518 42.044021 [21,] 36.525272 52.260518 [22,] 19.492980 36.525272 [23,] 26.555851 19.492980 [24,] 17.870302 26.555851 [25,] 14.964426 17.870302 [26,] 7.781119 14.964426 [27,] 4.598712 7.781119 [28,] 9.074880 4.598712 [29,] 9.509957 9.074880 [30,] 17.387748 9.509957 [31,] 14.673642 17.387748 [32,] 27.192038 14.673642 [33,] 5.887344 27.192038 [34,] -8.467876 5.887344 [35,] -12.034029 -8.467876 [36,] -12.709451 -12.034029 [37,] -21.544412 -12.709451 [38,] -24.621541 -21.544412 [39,] -33.961991 -24.621541 [40,] -40.588833 -33.961991 [41,] -33.894043 -40.588833 [42,] -20.000022 -33.894043 [43,] -22.793860 -20.000022 [44,] -15.768707 -22.793860 [45,] -21.206410 -15.768707 [46,] -40.426183 -21.206410 [47,] -36.773948 -40.426183 [48,] -35.007804 -36.773948 [49,] -44.609408 -35.007804 [50,] -40.993656 -44.609408 [51,] -43.295656 -40.993656 [52,] -57.069948 -43.295656 [53,] -32.725960 -57.069948 [54,] -27.424700 -32.725960 [55,] -37.332362 -27.424700 [56,] -16.449922 -37.332362 [57,] -26.761329 -16.449922 [58,] -36.500924 -26.761329 [59,] -16.285181 -36.500924 [60,] -12.892358 -16.285181 [61,] -9.478975 -12.892358 [62,] 6.126486 -9.478975 [63,] -9.558822 6.126486 [64,] -15.761928 -9.558822 [65,] 3.868657 -15.761928 [66,] 9.637338 3.868657 [67,] 4.298786 9.637338 [68,] 27.788912 4.298786 [69,] 11.560169 27.788912 [70,] 12.161121 11.560169 [71,] 21.489910 12.161121 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 9.537617 8.042975 2 13.161556 9.537617 3 -1.144110 13.161556 4 -6.212915 -1.144110 5 4.961025 -6.212915 6 20.376743 4.961025 7 35.605446 20.376743 8 47.861092 35.605446 9 42.392880 47.861092 10 29.526617 42.392880 11 29.866511 29.526617 12 31.134579 29.866511 13 22.823396 31.134579 14 27.098144 22.823396 15 13.967281 27.098144 16 14.594574 13.967281 17 24.889666 14.594574 18 35.706973 24.889666 19 42.044021 35.706973 20 52.260518 42.044021 21 36.525272 52.260518 22 19.492980 36.525272 23 26.555851 19.492980 24 17.870302 26.555851 25 14.964426 17.870302 26 7.781119 14.964426 27 4.598712 7.781119 28 9.074880 4.598712 29 9.509957 9.074880 30 17.387748 9.509957 31 14.673642 17.387748 32 27.192038 14.673642 33 5.887344 27.192038 34 -8.467876 5.887344 35 -12.034029 -8.467876 36 -12.709451 -12.034029 37 -21.544412 -12.709451 38 -24.621541 -21.544412 39 -33.961991 -24.621541 40 -40.588833 -33.961991 41 -33.894043 -40.588833 42 -20.000022 -33.894043 43 -22.793860 -20.000022 44 -15.768707 -22.793860 45 -21.206410 -15.768707 46 -40.426183 -21.206410 47 -36.773948 -40.426183 48 -35.007804 -36.773948 49 -44.609408 -35.007804 50 -40.993656 -44.609408 51 -43.295656 -40.993656 52 -57.069948 -43.295656 53 -32.725960 -57.069948 54 -27.424700 -32.725960 55 -37.332362 -27.424700 56 -16.449922 -37.332362 57 -26.761329 -16.449922 58 -36.500924 -26.761329 59 -16.285181 -36.500924 60 -12.892358 -16.285181 61 -9.478975 -12.892358 62 6.126486 -9.478975 63 -9.558822 6.126486 64 -15.761928 -9.558822 65 3.868657 -15.761928 66 9.637338 3.868657 67 4.298786 9.637338 68 27.788912 4.298786 69 11.560169 27.788912 70 12.161121 11.560169 71 21.489910 12.161121 > 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/7yqav1291992853.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/www/html/rcomp/tmp/8yqav1291992853.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/www/html/rcomp/tmp/9yqav1291992853.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/www/html/rcomp/tmp/10qh9y1291992853.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/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/11ch7m1291992853.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/12x0691291992853.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/13ta3i1291992853.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/14wa261291992853.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/157j1r1291992853.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/16lbh01291992853.tab") + } > try(system("convert tmp/12gu41291992853.ps tmp/12gu41291992853.png",intern=TRUE)) character(0) > try(system("convert tmp/22gu41291992853.ps tmp/22gu41291992853.png",intern=TRUE)) character(0) > try(system("convert tmp/3c7b71291992853.ps tmp/3c7b71291992853.png",intern=TRUE)) character(0) > try(system("convert tmp/4c7b71291992853.ps tmp/4c7b71291992853.png",intern=TRUE)) character(0) > try(system("convert tmp/5c7b71291992853.ps tmp/5c7b71291992853.png",intern=TRUE)) character(0) > try(system("convert tmp/6nysa1291992853.ps tmp/6nysa1291992853.png",intern=TRUE)) character(0) > try(system("convert tmp/7yqav1291992853.ps tmp/7yqav1291992853.png",intern=TRUE)) character(0) > try(system("convert tmp/8yqav1291992853.ps tmp/8yqav1291992853.png",intern=TRUE)) character(0) > try(system("convert tmp/9yqav1291992853.ps tmp/9yqav1291992853.png",intern=TRUE)) character(0) > try(system("convert tmp/10qh9y1291992853.ps tmp/10qh9y1291992853.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.659 1.630 7.243