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(96.8,610763,114.1,612613,110.3,611324,103.9,594167,101.6,595454,94.6,590865,95.9,589379,104.7,584428,102.8,573100,98.1,567456,113.9,569028,80.9,620735,95.7,628884,113.2,628232,105.9,612117,108.8,595404,102.3,597141,99,593408,100.7,590072,115.5,579799,100.7,574205,109.9,572775,114.6,572942,85.4,619567,100.5,625809,114.8,619916,116.5,587625,112.9,565742,102,557274,106,560576,105.3,548854,118.8,531673,106.1,525919,109.3,511038,117.2,498662,92.5,555362,104.2,564591,112.5,541657,122.4,527070,113.3,509846,100,514258,110.7,516922,112.8,507561,109.8,492622,117.3,490243,109.1,469357,115.9,477580,96,528379,99.8,533590,116.8,517945,115.7,506174,99.4,501866,94.3,516141,91,528222,93.2,532638,103.1,536322,94.1,536535,91.8,523597,102.7,536214,82.6,586570,89.1,596594),dim=c(2,61),dimnames=list(c('Tot_ind_productie','Tot_nietwerkende_werkzoekenden'),1:61)) > y <- array(NA,dim=c(2,61),dimnames=list(c('Tot_ind_productie','Tot_nietwerkende_werkzoekenden'),1:61)) > 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 Tot_nietwerkende_werkzoekenden Tot_ind_productie 1 610763 96.8 2 612613 114.1 3 611324 110.3 4 594167 103.9 5 595454 101.6 6 590865 94.6 7 589379 95.9 8 584428 104.7 9 573100 102.8 10 567456 98.1 11 569028 113.9 12 620735 80.9 13 628884 95.7 14 628232 113.2 15 612117 105.9 16 595404 108.8 17 597141 102.3 18 593408 99.0 19 590072 100.7 20 579799 115.5 21 574205 100.7 22 572775 109.9 23 572942 114.6 24 619567 85.4 25 625809 100.5 26 619916 114.8 27 587625 116.5 28 565742 112.9 29 557274 102.0 30 560576 106.0 31 548854 105.3 32 531673 118.8 33 525919 106.1 34 511038 109.3 35 498662 117.2 36 555362 92.5 37 564591 104.2 38 541657 112.5 39 527070 122.4 40 509846 113.3 41 514258 100.0 42 516922 110.7 43 507561 112.8 44 492622 109.8 45 490243 117.3 46 469357 109.1 47 477580 115.9 48 528379 96.0 49 533590 99.8 50 517945 116.8 51 506174 115.7 52 501866 99.4 53 516141 94.3 54 528222 91.0 55 532638 93.2 56 536322 103.1 57 536535 94.1 58 523597 91.8 59 536214 102.7 60 586570 82.6 61 596594 89.1 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) Tot_ind_productie 694667 -1305 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -82958 -36989 788 31625 81266 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 694667.1 57786.0 12.021 <2e-16 *** Tot_ind_productie -1304.8 551.2 -2.367 0.0212 * --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 40970 on 59 degrees of freedom Multiple R-squared: 0.08674, Adjusted R-squared: 0.07126 F-statistic: 5.604 on 1 and 59 DF, p-value: 0.02122 > 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.019580421 0.039160841 0.98041958 [2,] 0.004952748 0.009905497 0.99504725 [3,] 0.001228283 0.002456565 0.99877172 [4,] 0.001246961 0.002493921 0.99875304 [5,] 0.002279666 0.004559333 0.99772033 [6,] 0.002305256 0.004610513 0.99769474 [7,] 0.004001917 0.008003834 0.99599808 [8,] 0.003930352 0.007860705 0.99606965 [9,] 0.006305637 0.012611274 0.99369436 [10,] 0.015501226 0.031002451 0.98449877 [11,] 0.012569397 0.025138795 0.98743060 [12,] 0.008127438 0.016254876 0.99187256 [13,] 0.005070655 0.010141310 0.99492935 [14,] 0.003097628 0.006195257 0.99690237 [15,] 0.001970106 0.003940211 0.99802989 [16,] 0.001593352 0.003186705 0.99840665 [17,] 0.001476809 0.002953618 0.99852319 [18,] 0.001337170 0.002674340 0.99866283 [19,] 0.001183763 0.002367527 0.99881624 [20,] 0.001256032 0.002512065 0.99874397 [21,] 0.005234782 0.010469564 0.99476522 [22,] 0.041587483 0.083174966 0.95841252 [23,] 0.092835467 0.185670934 0.90716453 [24,] 0.159706432 0.319412864 0.84029357 [25,] 0.241231977 0.482463955 0.75876802 [26,] 0.331277360 0.662554720 0.66872264 [27,] 0.442069857 0.884139713 0.55793014 [28,] 0.592243678 0.815512643 0.40775632 [29,] 0.722676228 0.554647544 0.27732377 [30,] 0.834834865 0.330330270 0.16516514 [31,] 0.890232900 0.219534200 0.10976710 [32,] 0.888492123 0.223015754 0.11150788 [33,] 0.918570412 0.162859177 0.08142959 [34,] 0.936222306 0.127555387 0.06377769 [35,] 0.966015672 0.067968656 0.03398433 [36,] 0.967887838 0.064224324 0.03211216 [37,] 0.974525863 0.050948275 0.02547414 [38,] 0.971604820 0.056790360 0.02839518 [39,] 0.967102485 0.065795029 0.03289751 [40,] 0.967822754 0.064354492 0.03217725 [41,] 0.958696442 0.082607117 0.04130356 [42,] 0.983749006 0.032501988 0.01625099 [43,] 0.983714837 0.032570326 0.01628516 [44,] 0.975773836 0.048452327 0.02422616 [45,] 0.958769112 0.082461777 0.04123089 [46,] 0.941852659 0.116294683 0.05814734 [47,] 0.916962600 0.166074799 0.08303740 [48,] 0.910704992 0.178590017 0.08929501 [49,] 0.903824949 0.192350101 0.09617505 [50,] 0.888108378 0.223783244 0.11189162 [51,] 0.834804034 0.330391932 0.16519597 [52,] 0.706418602 0.587162795 0.29358140 > postscript(file="/var/www/html/rcomp/tmp/1gwxk1258622730.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/23fba1258622730.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/3w2mr1258622730.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/4tqyw1258622730.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/5zege1258622730.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 = 61 Frequency = 1 1 2 3 4 5 6 42398.7289 66821.4459 60574.2768 35066.6763 33352.6793 19630.2100 7 8 9 10 11 12 19840.4257 26371.5014 12564.4169 787.9446 22975.4896 31624.7058 13 14 15 16 17 18 59084.4695 81266.1427 55626.2390 42697.1048 35953.0262 27914.2478 19 20 21 22 23 24 26796.3761 35834.1397 10929.3761 21503.3643 27802.8365 36328.2218 25 26 27 28 29 30 62272.4198 75037.7928 44964.9211 18384.7083 -4305.4082 4215.7171 31 32 33 34 35 36 -8419.6298 -7986.0819 -30310.8047 -41016.5045 -43084.7320 -18612.8308 37 38 39 40 41 42 5882.1107 -6222.2042 -7891.8691 -36989.3792 -49930.9708 -33305.8106 43 44 45 46 47 48 -39926.7698 -58780.1138 -51373.2539 -82958.4608 -65862.9477 -41029.0961 49 50 51 52 53 54 -30859.9271 -24323.6445 -37529.9040 -63105.8396 -55485.2244 -47710.0028 55 56 57 58 59 60 -40423.4839 -23822.1487 -35352.1807 -51291.1777 -24452.0612 -322.1659 61 18182.9127 > postscript(file="/var/www/html/rcomp/tmp/6v3491258622730.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 = 61 Frequency = 1 lag(myerror, k = 1) myerror 0 42398.7289 NA 1 66821.4459 42398.7289 2 60574.2768 66821.4459 3 35066.6763 60574.2768 4 33352.6793 35066.6763 5 19630.2100 33352.6793 6 19840.4257 19630.2100 7 26371.5014 19840.4257 8 12564.4169 26371.5014 9 787.9446 12564.4169 10 22975.4896 787.9446 11 31624.7058 22975.4896 12 59084.4695 31624.7058 13 81266.1427 59084.4695 14 55626.2390 81266.1427 15 42697.1048 55626.2390 16 35953.0262 42697.1048 17 27914.2478 35953.0262 18 26796.3761 27914.2478 19 35834.1397 26796.3761 20 10929.3761 35834.1397 21 21503.3643 10929.3761 22 27802.8365 21503.3643 23 36328.2218 27802.8365 24 62272.4198 36328.2218 25 75037.7928 62272.4198 26 44964.9211 75037.7928 27 18384.7083 44964.9211 28 -4305.4082 18384.7083 29 4215.7171 -4305.4082 30 -8419.6298 4215.7171 31 -7986.0819 -8419.6298 32 -30310.8047 -7986.0819 33 -41016.5045 -30310.8047 34 -43084.7320 -41016.5045 35 -18612.8308 -43084.7320 36 5882.1107 -18612.8308 37 -6222.2042 5882.1107 38 -7891.8691 -6222.2042 39 -36989.3792 -7891.8691 40 -49930.9708 -36989.3792 41 -33305.8106 -49930.9708 42 -39926.7698 -33305.8106 43 -58780.1138 -39926.7698 44 -51373.2539 -58780.1138 45 -82958.4608 -51373.2539 46 -65862.9477 -82958.4608 47 -41029.0961 -65862.9477 48 -30859.9271 -41029.0961 49 -24323.6445 -30859.9271 50 -37529.9040 -24323.6445 51 -63105.8396 -37529.9040 52 -55485.2244 -63105.8396 53 -47710.0028 -55485.2244 54 -40423.4839 -47710.0028 55 -23822.1487 -40423.4839 56 -35352.1807 -23822.1487 57 -51291.1777 -35352.1807 58 -24452.0612 -51291.1777 59 -322.1659 -24452.0612 60 18182.9127 -322.1659 61 NA 18182.9127 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 66821.4459 42398.7289 [2,] 60574.2768 66821.4459 [3,] 35066.6763 60574.2768 [4,] 33352.6793 35066.6763 [5,] 19630.2100 33352.6793 [6,] 19840.4257 19630.2100 [7,] 26371.5014 19840.4257 [8,] 12564.4169 26371.5014 [9,] 787.9446 12564.4169 [10,] 22975.4896 787.9446 [11,] 31624.7058 22975.4896 [12,] 59084.4695 31624.7058 [13,] 81266.1427 59084.4695 [14,] 55626.2390 81266.1427 [15,] 42697.1048 55626.2390 [16,] 35953.0262 42697.1048 [17,] 27914.2478 35953.0262 [18,] 26796.3761 27914.2478 [19,] 35834.1397 26796.3761 [20,] 10929.3761 35834.1397 [21,] 21503.3643 10929.3761 [22,] 27802.8365 21503.3643 [23,] 36328.2218 27802.8365 [24,] 62272.4198 36328.2218 [25,] 75037.7928 62272.4198 [26,] 44964.9211 75037.7928 [27,] 18384.7083 44964.9211 [28,] -4305.4082 18384.7083 [29,] 4215.7171 -4305.4082 [30,] -8419.6298 4215.7171 [31,] -7986.0819 -8419.6298 [32,] -30310.8047 -7986.0819 [33,] -41016.5045 -30310.8047 [34,] -43084.7320 -41016.5045 [35,] -18612.8308 -43084.7320 [36,] 5882.1107 -18612.8308 [37,] -6222.2042 5882.1107 [38,] -7891.8691 -6222.2042 [39,] -36989.3792 -7891.8691 [40,] -49930.9708 -36989.3792 [41,] -33305.8106 -49930.9708 [42,] -39926.7698 -33305.8106 [43,] -58780.1138 -39926.7698 [44,] -51373.2539 -58780.1138 [45,] -82958.4608 -51373.2539 [46,] -65862.9477 -82958.4608 [47,] -41029.0961 -65862.9477 [48,] -30859.9271 -41029.0961 [49,] -24323.6445 -30859.9271 [50,] -37529.9040 -24323.6445 [51,] -63105.8396 -37529.9040 [52,] -55485.2244 -63105.8396 [53,] -47710.0028 -55485.2244 [54,] -40423.4839 -47710.0028 [55,] -23822.1487 -40423.4839 [56,] -35352.1807 -23822.1487 [57,] -51291.1777 -35352.1807 [58,] -24452.0612 -51291.1777 [59,] -322.1659 -24452.0612 [60,] 18182.9127 -322.1659 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 66821.4459 42398.7289 2 60574.2768 66821.4459 3 35066.6763 60574.2768 4 33352.6793 35066.6763 5 19630.2100 33352.6793 6 19840.4257 19630.2100 7 26371.5014 19840.4257 8 12564.4169 26371.5014 9 787.9446 12564.4169 10 22975.4896 787.9446 11 31624.7058 22975.4896 12 59084.4695 31624.7058 13 81266.1427 59084.4695 14 55626.2390 81266.1427 15 42697.1048 55626.2390 16 35953.0262 42697.1048 17 27914.2478 35953.0262 18 26796.3761 27914.2478 19 35834.1397 26796.3761 20 10929.3761 35834.1397 21 21503.3643 10929.3761 22 27802.8365 21503.3643 23 36328.2218 27802.8365 24 62272.4198 36328.2218 25 75037.7928 62272.4198 26 44964.9211 75037.7928 27 18384.7083 44964.9211 28 -4305.4082 18384.7083 29 4215.7171 -4305.4082 30 -8419.6298 4215.7171 31 -7986.0819 -8419.6298 32 -30310.8047 -7986.0819 33 -41016.5045 -30310.8047 34 -43084.7320 -41016.5045 35 -18612.8308 -43084.7320 36 5882.1107 -18612.8308 37 -6222.2042 5882.1107 38 -7891.8691 -6222.2042 39 -36989.3792 -7891.8691 40 -49930.9708 -36989.3792 41 -33305.8106 -49930.9708 42 -39926.7698 -33305.8106 43 -58780.1138 -39926.7698 44 -51373.2539 -58780.1138 45 -82958.4608 -51373.2539 46 -65862.9477 -82958.4608 47 -41029.0961 -65862.9477 48 -30859.9271 -41029.0961 49 -24323.6445 -30859.9271 50 -37529.9040 -24323.6445 51 -63105.8396 -37529.9040 52 -55485.2244 -63105.8396 53 -47710.0028 -55485.2244 54 -40423.4839 -47710.0028 55 -23822.1487 -40423.4839 56 -35352.1807 -23822.1487 57 -51291.1777 -35352.1807 58 -24452.0612 -51291.1777 59 -322.1659 -24452.0612 60 18182.9127 -322.1659 > 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/7qvqa1258622730.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/84lag1258622730.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/9lwv91258622730.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/10b2k11258622730.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/1194851258622730.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/126klb1258622730.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/132tk61258622730.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/1414v01258622730.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/15ip4u1258622730.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/1600fq1258622730.tab") + } > > system("convert tmp/1gwxk1258622730.ps tmp/1gwxk1258622730.png") > system("convert tmp/23fba1258622730.ps tmp/23fba1258622730.png") > system("convert tmp/3w2mr1258622730.ps tmp/3w2mr1258622730.png") > system("convert tmp/4tqyw1258622730.ps tmp/4tqyw1258622730.png") > system("convert tmp/5zege1258622730.ps tmp/5zege1258622730.png") > system("convert tmp/6v3491258622730.ps tmp/6v3491258622730.png") > system("convert tmp/7qvqa1258622730.ps tmp/7qvqa1258622730.png") > system("convert tmp/84lag1258622730.ps tmp/84lag1258622730.png") > system("convert tmp/9lwv91258622730.ps tmp/9lwv91258622730.png") > system("convert tmp/10b2k11258622730.ps tmp/10b2k11258622730.png") > > > proc.time() user system elapsed 2.459 1.518 2.890