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(562000,4814,561000,3908,555000,5250,544000,3937,537000,4004,543000,5560,594000,3922,611000,3759,613000,4138,611000,4634,594000,3996,595000,4308,591000,4143,589000,4429,584000,5219,573000,4929,567000,5755,569000,5592,621000,4163,629000,4962,628000,5208,612000,4755,595000,4491,597000,5732,593000,5731,590000,5040,580000,6102,574000,4904,573000,5369,573000,5578,620000,4619,626000,4731,620000,5011,588000,5299,566000,4146,557000,4625,561000,4736,549000,4219,532000,5116,526000,4205,511000,4121,499000,5103,555000,4300,565000,4578,542000,3809,527000,5526,510000,4247,514000,3830,517000,4394,508000,4826,493000,4409,490000,4569,469000,4106,478000,4794,528000,3914,534000,3793,518000,4405,506000,4022,502000,4100,516000,4788),dim=c(2,60),dimnames=list(c('werkloos','bouw'),1:60)) > y <- array(NA,dim=c(2,60),dimnames=list(c('werkloos','bouw'),1:60)) > for (i in 1:dim(x)[1]) + { + for (j in 1:dim(x)[2]) + { + y[i,j] <- as.numeric(x[i,j]) + } + } > par3 = 'Linear Trend' > par2 = 'Do not include Seasonal Dummies' > par1 = '1' > #'GNU S' R Code compiled by R2WASP v. 1.0.44 () > #Author: Prof. Dr. P. Wessa > #To cite this work: AUTHOR(S), (YEAR), YOUR SOFTWARE TITLE (vNUMBER) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_YOURPAGE.wasp/ > #Source of accompanying publication: Office for Research, Development, and Education > #Technical description: Write here your technical program description (don't use hard returns!) > library(lattice) > library(lmtest) Loading required package: zoo Attaching package: 'zoo' The following object(s) are masked from package:base : as.Date.numeric > n25 <- 25 #minimum number of obs. for Goldfeld-Quandt test > par1 <- as.numeric(par1) > x <- t(y) > k <- length(x[1,]) > n <- length(x[,1]) > x1 <- cbind(x[,par1], x[,1:k!=par1]) > mycolnames <- c(colnames(x)[par1], colnames(x)[1:k!=par1]) > colnames(x1) <- mycolnames #colnames(x)[par1] > x <- x1 > if (par3 == 'First Differences'){ + x2 <- array(0, dim=c(n-1,k), dimnames=list(1:(n-1), paste('(1-B)',colnames(x),sep=''))) + for (i in 1:n-1) { + for (j in 1:k) { + x2[i,j] <- x[i+1,j] - x[i,j] + } + } + x <- x2 + } > if (par2 == 'Include Monthly Dummies'){ + x2 <- array(0, dim=c(n,11), dimnames=list(1:n, paste('M', seq(1:11), sep =''))) + for (i in 1:11){ + x2[seq(i,n,12),i] <- 1 + } + x <- cbind(x, x2) + } > if (par2 == 'Include Quarterly Dummies'){ + x2 <- array(0, dim=c(n,3), dimnames=list(1:n, paste('Q', seq(1:3), sep =''))) + for (i in 1:3){ + x2[seq(i,n,4),i] <- 1 + } + x <- cbind(x, x2) + } > k <- length(x[1,]) > if (par3 == 'Linear Trend'){ + x <- cbind(x, c(1:n)) + colnames(x)[k+1] <- 't' + } > x werkloos bouw t 1 562000 4814 1 2 561000 3908 2 3 555000 5250 3 4 544000 3937 4 5 537000 4004 5 6 543000 5560 6 7 594000 3922 7 8 611000 3759 8 9 613000 4138 9 10 611000 4634 10 11 594000 3996 11 12 595000 4308 12 13 591000 4143 13 14 589000 4429 14 15 584000 5219 15 16 573000 4929 16 17 567000 5755 17 18 569000 5592 18 19 621000 4163 19 20 629000 4962 20 21 628000 5208 21 22 612000 4755 22 23 595000 4491 23 24 597000 5732 24 25 593000 5731 25 26 590000 5040 26 27 580000 6102 27 28 574000 4904 28 29 573000 5369 29 30 573000 5578 30 31 620000 4619 31 32 626000 4731 32 33 620000 5011 33 34 588000 5299 34 35 566000 4146 35 36 557000 4625 36 37 561000 4736 37 38 549000 4219 38 39 532000 5116 39 40 526000 4205 40 41 511000 4121 41 42 499000 5103 42 43 555000 4300 43 44 565000 4578 44 45 542000 3809 45 46 527000 5526 46 47 510000 4247 47 48 514000 3830 48 49 517000 4394 49 50 508000 4826 50 51 493000 4409 51 52 490000 4569 52 53 469000 4106 53 54 478000 4794 54 55 528000 3914 55 56 534000 3793 56 57 518000 4405 57 58 506000 4022 58 59 502000 4100 59 60 516000 4788 60 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) bouw t 566709.674 8.701 -1553.215 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -62769 -19153 4477 18144 67828 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 566709.674 34135.292 16.602 < 2e-16 *** bouw 8.701 6.904 1.260 0.213 t -1553.215 237.173 -6.549 1.79e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 31470 on 57 degrees of freedom Multiple R-squared: 0.4568, Adjusted R-squared: 0.4377 F-statistic: 23.97 on 2 and 57 DF, p-value: 2.797e-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.005944997 0.01188999 0.99405500 [2,] 0.457778806 0.91555761 0.54222119 [3,] 0.537328090 0.92534382 0.46267191 [4,] 0.478681673 0.95736335 0.52131833 [5,] 0.374373442 0.74874688 0.62562656 [6,] 0.329155368 0.65831074 0.67084463 [7,] 0.272352073 0.54470415 0.72764793 [8,] 0.253344644 0.50668929 0.74665536 [9,] 0.231745554 0.46349111 0.76825445 [10,] 0.196092996 0.39218599 0.80390700 [11,] 0.239012927 0.47802585 0.76098707 [12,] 0.245001825 0.49000365 0.75499818 [13,] 0.263675052 0.52735010 0.73632495 [14,] 0.203726416 0.40745283 0.79627358 [15,] 0.217785097 0.43557019 0.78221490 [16,] 0.214597568 0.42919514 0.78540243 [17,] 0.163631255 0.32726251 0.83636875 [18,] 0.184396541 0.36879308 0.81560346 [19,] 0.136055438 0.27211088 0.86394456 [20,] 0.101630973 0.20326195 0.89836903 [21,] 0.100934617 0.20186923 0.89906538 [22,] 0.079434077 0.15886815 0.92056592 [23,] 0.130675945 0.26135189 0.86932406 [24,] 0.141341488 0.28268298 0.85865851 [25,] 0.132986339 0.26597268 0.86701366 [26,] 0.131113410 0.26222682 0.86888659 [27,] 0.190416831 0.38083366 0.80958317 [28,] 0.335794291 0.67158858 0.66420571 [29,] 0.436006644 0.87201329 0.56399336 [30,] 0.611893721 0.77621256 0.38810628 [31,] 0.697039381 0.60592124 0.30296062 [32,] 0.751233481 0.49753304 0.24876652 [33,] 0.786882206 0.42623559 0.21311779 [34,] 0.817189727 0.36562055 0.18281027 [35,] 0.835841210 0.32831758 0.16415879 [36,] 0.879424389 0.24115122 0.12057561 [37,] 0.923707024 0.15258595 0.07629298 [38,] 0.908023773 0.18395245 0.09197623 [39,] 0.952654900 0.09469020 0.04734510 [40,] 0.952380392 0.09523922 0.04761961 [41,] 0.968956136 0.06208773 0.03104386 [42,] 0.953782890 0.09243422 0.04621711 [43,] 0.925673643 0.14865271 0.07432636 [44,] 0.917255162 0.16548968 0.08274484 [45,] 0.931284386 0.13743123 0.06871561 [46,] 0.891909434 0.21618113 0.10809057 [47,] 0.835805940 0.32838812 0.16419406 [48,] 0.887074120 0.22585176 0.11292588 [49,] 0.967278796 0.06544241 0.03272120 > postscript(file="/var/www/html/rcomp/tmp/112bc1258816737.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/2t6a71258816737.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/3gjjs1258816737.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/4uuxs1258816737.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/5l3th1258816737.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 = 60 Frequency = 1 1 2 3 4 5 6 -45044.2642 -36607.7193 -52731.5784 -50753.6258 -56783.3945 -62769.3205 7 8 9 10 11 12 4036.5375 24008.0556 24263.4977 19500.8939 9605.5045 9443.9302 13 14 15 16 17 18 8432.8509 5497.5090 -4823.2616 -11746.6850 -23380.7005 -18409.1823 19 20 21 22 23 24 47578.1150 50179.0332 48591.7412 38086.6211 24936.9652 17691.9321 25 26 27 28 29 30 15253.8482 19819.6249 2132.1151 8109.4243 4616.5591 4351.2132 31 32 33 34 35 36 61248.9243 67827.5994 60944.4650 27991.7206 17577.4737 5962.7910 37 38 39 40 41 42 10550.1674 4601.9271 -18649.8769 -15169.8257 -27885.7061 -46877.1162 43 44 45 46 47 48 17663.2003 26797.4684 12041.9424 -16344.8844 -20662.7742 -11481.1392 49 50 51 52 53 54 -11835.4279 -23041.1519 -32859.5169 -35698.5017 -51116.6093 -46549.8526 55 56 57 58 59 60 12660.4599 21266.5257 1494.5771 -5619.6303 -8745.1127 821.6439 > postscript(file="/var/www/html/rcomp/tmp/6s6br1258816737.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 = 60 Frequency = 1 lag(myerror, k = 1) myerror 0 -45044.2642 NA 1 -36607.7193 -45044.2642 2 -52731.5784 -36607.7193 3 -50753.6258 -52731.5784 4 -56783.3945 -50753.6258 5 -62769.3205 -56783.3945 6 4036.5375 -62769.3205 7 24008.0556 4036.5375 8 24263.4977 24008.0556 9 19500.8939 24263.4977 10 9605.5045 19500.8939 11 9443.9302 9605.5045 12 8432.8509 9443.9302 13 5497.5090 8432.8509 14 -4823.2616 5497.5090 15 -11746.6850 -4823.2616 16 -23380.7005 -11746.6850 17 -18409.1823 -23380.7005 18 47578.1150 -18409.1823 19 50179.0332 47578.1150 20 48591.7412 50179.0332 21 38086.6211 48591.7412 22 24936.9652 38086.6211 23 17691.9321 24936.9652 24 15253.8482 17691.9321 25 19819.6249 15253.8482 26 2132.1151 19819.6249 27 8109.4243 2132.1151 28 4616.5591 8109.4243 29 4351.2132 4616.5591 30 61248.9243 4351.2132 31 67827.5994 61248.9243 32 60944.4650 67827.5994 33 27991.7206 60944.4650 34 17577.4737 27991.7206 35 5962.7910 17577.4737 36 10550.1674 5962.7910 37 4601.9271 10550.1674 38 -18649.8769 4601.9271 39 -15169.8257 -18649.8769 40 -27885.7061 -15169.8257 41 -46877.1162 -27885.7061 42 17663.2003 -46877.1162 43 26797.4684 17663.2003 44 12041.9424 26797.4684 45 -16344.8844 12041.9424 46 -20662.7742 -16344.8844 47 -11481.1392 -20662.7742 48 -11835.4279 -11481.1392 49 -23041.1519 -11835.4279 50 -32859.5169 -23041.1519 51 -35698.5017 -32859.5169 52 -51116.6093 -35698.5017 53 -46549.8526 -51116.6093 54 12660.4599 -46549.8526 55 21266.5257 12660.4599 56 1494.5771 21266.5257 57 -5619.6303 1494.5771 58 -8745.1127 -5619.6303 59 821.6439 -8745.1127 60 NA 821.6439 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -36607.7193 -45044.264 [2,] -52731.5784 -36607.719 [3,] -50753.6258 -52731.578 [4,] -56783.3945 -50753.626 [5,] -62769.3205 -56783.394 [6,] 4036.5375 -62769.321 [7,] 24008.0556 4036.537 [8,] 24263.4977 24008.056 [9,] 19500.8939 24263.498 [10,] 9605.5045 19500.894 [11,] 9443.9302 9605.505 [12,] 8432.8509 9443.930 [13,] 5497.5090 8432.851 [14,] -4823.2616 5497.509 [15,] -11746.6850 -4823.262 [16,] -23380.7005 -11746.685 [17,] -18409.1823 -23380.700 [18,] 47578.1150 -18409.182 [19,] 50179.0332 47578.115 [20,] 48591.7412 50179.033 [21,] 38086.6211 48591.741 [22,] 24936.9652 38086.621 [23,] 17691.9321 24936.965 [24,] 15253.8482 17691.932 [25,] 19819.6249 15253.848 [26,] 2132.1151 19819.625 [27,] 8109.4243 2132.115 [28,] 4616.5591 8109.424 [29,] 4351.2132 4616.559 [30,] 61248.9243 4351.213 [31,] 67827.5994 61248.924 [32,] 60944.4650 67827.599 [33,] 27991.7206 60944.465 [34,] 17577.4737 27991.721 [35,] 5962.7910 17577.474 [36,] 10550.1674 5962.791 [37,] 4601.9271 10550.167 [38,] -18649.8769 4601.927 [39,] -15169.8257 -18649.877 [40,] -27885.7061 -15169.826 [41,] -46877.1162 -27885.706 [42,] 17663.2003 -46877.116 [43,] 26797.4684 17663.200 [44,] 12041.9424 26797.468 [45,] -16344.8844 12041.942 [46,] -20662.7742 -16344.884 [47,] -11481.1392 -20662.774 [48,] -11835.4279 -11481.139 [49,] -23041.1519 -11835.428 [50,] -32859.5169 -23041.152 [51,] -35698.5017 -32859.517 [52,] -51116.6093 -35698.502 [53,] -46549.8526 -51116.609 [54,] 12660.4599 -46549.853 [55,] 21266.5257 12660.460 [56,] 1494.5771 21266.526 [57,] -5619.6303 1494.577 [58,] -8745.1127 -5619.630 [59,] 821.6439 -8745.113 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -36607.7193 -45044.264 2 -52731.5784 -36607.719 3 -50753.6258 -52731.578 4 -56783.3945 -50753.626 5 -62769.3205 -56783.394 6 4036.5375 -62769.321 7 24008.0556 4036.537 8 24263.4977 24008.056 9 19500.8939 24263.498 10 9605.5045 19500.894 11 9443.9302 9605.505 12 8432.8509 9443.930 13 5497.5090 8432.851 14 -4823.2616 5497.509 15 -11746.6850 -4823.262 16 -23380.7005 -11746.685 17 -18409.1823 -23380.700 18 47578.1150 -18409.182 19 50179.0332 47578.115 20 48591.7412 50179.033 21 38086.6211 48591.741 22 24936.9652 38086.621 23 17691.9321 24936.965 24 15253.8482 17691.932 25 19819.6249 15253.848 26 2132.1151 19819.625 27 8109.4243 2132.115 28 4616.5591 8109.424 29 4351.2132 4616.559 30 61248.9243 4351.213 31 67827.5994 61248.924 32 60944.4650 67827.599 33 27991.7206 60944.465 34 17577.4737 27991.721 35 5962.7910 17577.474 36 10550.1674 5962.791 37 4601.9271 10550.167 38 -18649.8769 4601.927 39 -15169.8257 -18649.877 40 -27885.7061 -15169.826 41 -46877.1162 -27885.706 42 17663.2003 -46877.116 43 26797.4684 17663.200 44 12041.9424 26797.468 45 -16344.8844 12041.942 46 -20662.7742 -16344.884 47 -11481.1392 -20662.774 48 -11835.4279 -11481.139 49 -23041.1519 -11835.428 50 -32859.5169 -23041.152 51 -35698.5017 -32859.517 52 -51116.6093 -35698.502 53 -46549.8526 -51116.609 54 12660.4599 -46549.853 55 21266.5257 12660.460 56 1494.5771 21266.526 57 -5619.6303 1494.577 58 -8745.1127 -5619.630 59 821.6439 -8745.113 > 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/7rgba1258816737.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/8wb0r1258816737.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/9wart1258816737.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/10es8b1258816737.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/11m2dw1258816737.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/12a63t1258816737.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/13wi2u1258816737.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/14ctdo1258816737.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/1553ur1258816737.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/16295o1258816737.tab") + } > > system("convert tmp/112bc1258816737.ps tmp/112bc1258816737.png") > system("convert tmp/2t6a71258816737.ps tmp/2t6a71258816737.png") > system("convert tmp/3gjjs1258816737.ps tmp/3gjjs1258816737.png") > system("convert tmp/4uuxs1258816737.ps tmp/4uuxs1258816737.png") > system("convert tmp/5l3th1258816737.ps tmp/5l3th1258816737.png") > system("convert tmp/6s6br1258816737.ps tmp/6s6br1258816737.png") > system("convert tmp/7rgba1258816737.ps tmp/7rgba1258816737.png") > system("convert tmp/8wb0r1258816737.ps tmp/8wb0r1258816737.png") > system("convert tmp/9wart1258816737.ps tmp/9wart1258816737.png") > system("convert tmp/10es8b1258816737.ps tmp/10es8b1258816737.png") > > > proc.time() user system elapsed 2.433 1.593 2.993