R version 2.12.1 (2010-12-16) Copyright (C) 2010 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i486-pc-linux-gnu (32-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > x <- array(list(1260,2100,2,3,1080,1800,1,1,0660,1650,56,2,1324,2350,2,2,0859,1620,35,1,1008,1230,28,3,0847,0896,1,1,1057,1762,6,2,0919,1532,4,3,0865,1632,12,1,0769,2281,23,2,1292,2153,5,3,0741,1235,6,2,1008,1654,4,3,0893,1685,9,1,0635,0999,56,2,0661,1652,23,2,0874,1456,5,2,1008,1236,7,3,0847,1254,6,1,0772,1287,8,2,1068,1780,23,3,0846,1596,65,1,0947,1578,2,2,1008,1624,2,3,1008,1598,3,3,0742,1236,6,2,0925,1542,8,1,1008,1256,26,3,0952,1586,1,2,1324,2210,4,1,1033,2362,62,1,0937,1562,2,1,0941,1569,5,1,0819,1365,3,2,0582,1456,33,2,1111,1852,2,3,1008,1365,12,3,0847,1258,45,1,0592,1479,16,2,1207,2012,2,3,1299,2165,4,1,0819,1365,5,2,1008,1452,68,3,0674,1685,15,2,1008,1563,16,3,1008,1236,15,3,0581,1452,13,2,0946,1785,18,1,0958,1596,1,1,0938,1563,5,1,0847,1258,6,1,0950,1583,7,2,1008,1586,8,3,1054,1756,9,1,0745,1862,12,2,1011,1685,6,3,0769,2210,23,2,1324,3210,2,1,0756,1260,5,2),dim=c(4,60),dimnames=list(c('Werkloosheidsuitkering','Loon','Duur','Gezinslast'),1:60)) > y <- array(NA,dim=c(4,60),dimnames=list(c('Werkloosheidsuitkering','Loon','Duur','Gezinslast'),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 > 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 Werkloosheidsuitkering Loon Duur Gezinslast t 1 1260 2100 2 3 1 2 1080 1800 1 1 2 3 660 1650 56 2 3 4 1324 2350 2 2 4 5 859 1620 35 1 5 6 1008 1230 28 3 6 7 847 896 1 1 7 8 1057 1762 6 2 8 9 919 1532 4 3 9 10 865 1632 12 1 10 11 769 2281 23 2 11 12 1292 2153 5 3 12 13 741 1235 6 2 13 14 1008 1654 4 3 14 15 893 1685 9 1 15 16 635 999 56 2 16 17 661 1652 23 2 17 18 874 1456 5 2 18 19 1008 1236 7 3 19 20 847 1254 6 1 20 21 772 1287 8 2 21 22 1068 1780 23 3 22 23 846 1596 65 1 23 24 947 1578 2 2 24 25 1008 1624 2 3 25 26 1008 1598 3 3 26 27 742 1236 6 2 27 28 925 1542 8 1 28 29 1008 1256 26 3 29 30 952 1586 1 2 30 31 1324 2210 4 1 31 32 1033 2362 62 1 32 33 937 1562 2 1 33 34 941 1569 5 1 34 35 819 1365 3 2 35 36 582 1456 33 2 36 37 1111 1852 2 3 37 38 1008 1365 12 3 38 39 847 1258 45 1 39 40 592 1479 16 2 40 41 1207 2012 2 3 41 42 1299 2165 4 1 42 43 819 1365 5 2 43 44 1008 1452 68 3 44 45 674 1685 15 2 45 46 1008 1563 16 3 46 47 1008 1236 15 3 47 48 581 1452 13 2 48 49 946 1785 18 1 49 50 958 1596 1 1 50 51 938 1563 5 1 51 52 847 1258 6 1 52 53 950 1583 7 2 53 54 1008 1586 8 3 54 55 1054 1756 9 1 55 56 745 1862 12 2 56 57 1011 1685 6 3 57 58 769 2210 23 2 58 59 1324 3210 2 1 59 60 756 1260 5 2 60 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) Loon Duur Gezinslast t 469.3193 0.2791 -2.8944 43.2420 -1.1733 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -343.97 -59.10 33.90 85.21 252.14 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 469.31933 106.94657 4.388 5.22e-05 *** Loon 0.27911 0.04954 5.634 6.24e-07 *** Duur -2.89443 1.10317 -2.624 0.0112 * Gezinslast 43.24200 23.67719 1.826 0.0732 . t -1.17333 1.08499 -1.081 0.2842 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 144.4 on 55 degrees of freedom Multiple R-squared: 0.441, Adjusted R-squared: 0.4004 F-statistic: 10.85 on 4 and 55 DF, p-value: 1.483e-06 > 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.23288770 0.46577540 0.7671123 [2,] 0.35843398 0.71686796 0.6415660 [3,] 0.22552696 0.45105392 0.7744730 [4,] 0.27129467 0.54258933 0.7287053 [5,] 0.45094304 0.90188609 0.5490570 [6,] 0.39857618 0.79715237 0.6014238 [7,] 0.29743420 0.59486839 0.7025658 [8,] 0.24856874 0.49713747 0.7514313 [9,] 0.28280183 0.56560365 0.7171982 [10,] 0.33764181 0.67528363 0.6623582 [11,] 0.26450463 0.52900925 0.7354954 [12,] 0.24879130 0.49758260 0.7512087 [13,] 0.20986139 0.41972278 0.7901386 [14,] 0.16515824 0.33031649 0.8348418 [15,] 0.19589172 0.39178344 0.8041083 [16,] 0.33578142 0.67156283 0.6642186 [17,] 0.26491331 0.52982662 0.7350867 [18,] 0.20211576 0.40423152 0.7978842 [19,] 0.14957372 0.29914744 0.8504263 [20,] 0.13302671 0.26605342 0.8669733 [21,] 0.10478226 0.20956452 0.8952177 [22,] 0.11175732 0.22351465 0.8882427 [23,] 0.07918906 0.15837813 0.9208109 [24,] 0.13522639 0.27045279 0.8647736 [25,] 0.10032097 0.20064193 0.8996790 [26,] 0.06914195 0.13828389 0.9308581 [27,] 0.04626963 0.09253926 0.9537304 [28,] 0.03525551 0.07051102 0.9647445 [29,] 0.09107192 0.18214384 0.9089281 [30,] 0.06201856 0.12403712 0.9379814 [31,] 0.04671466 0.09342933 0.9532853 [32,] 0.03950400 0.07900801 0.9604960 [33,] 0.15726220 0.31452440 0.8427378 [34,] 0.11759722 0.23519445 0.8824028 [35,] 0.16085629 0.32171258 0.8391437 [36,] 0.11855613 0.23711227 0.8814439 [37,] 0.31420314 0.62840628 0.6857969 [38,] 0.53053320 0.93893359 0.4694668 [39,] 0.44054177 0.88108354 0.5594582 [40,] 0.55307483 0.89385034 0.4469252 [41,] 0.86343260 0.27313480 0.1365674 [42,] 0.81782349 0.36435302 0.1821765 [43,] 0.77062663 0.45874674 0.2293734 [44,] 0.66190006 0.67619989 0.3380999 [45,] 0.53567549 0.92864902 0.4643245 > postscript(file="/var/www/rcomp/tmp/1fu761321714783.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/rcomp/tmp/29g751321714783.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/rcomp/tmp/30mho1321714783.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/rcomp/tmp/496ye1321714783.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/rcomp/tmp/5li6h1321714783.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 = 60 Frequency = 1 1 2 3 4 5 6 81.788527 70.284054 -190.724786 122.773346 1.454163 153.734898 7 8 9 10 11 12 95.465003 36.160315 -85.502204 -56.600317 -343.971845 120.585703 13 14 15 16 17 18 -126.882725 -24.686806 -46.209700 -18.771686 -269.372463 -52.593519 19 20 21 22 23 24 106.530585 25.269539 -95.220864 64.526279 103.105585 -15.288072 25 26 27 28 29 30 -9.195744 2.128843 -109.735181 38.061740 167.675860 -8.375375 31 32 33 34 35 36 242.559399 78.185011 32.979662 44.882516 -68.036830 -242.429561 37 38 39 40 41 42 44.247455 107.291013 159.329098 -283.361003 100.283389 243.025948 43 44 45 46 47 48 -52.861316 252.136498 -255.885166 72.991855 162.539313 -286.121692 49 50 51 52 53 54 44.822577 61.542188 63.503819 61.699740 34.815161 52.803592 55 56 57 58 59 60 141.906875 -230.064037 25.902970 -269.008504 -9.484874 -66.608250 > postscript(file="/var/www/rcomp/tmp/6hzxh1321714783.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 = 60 Frequency = 1 lag(myerror, k = 1) myerror 0 81.788527 NA 1 70.284054 81.788527 2 -190.724786 70.284054 3 122.773346 -190.724786 4 1.454163 122.773346 5 153.734898 1.454163 6 95.465003 153.734898 7 36.160315 95.465003 8 -85.502204 36.160315 9 -56.600317 -85.502204 10 -343.971845 -56.600317 11 120.585703 -343.971845 12 -126.882725 120.585703 13 -24.686806 -126.882725 14 -46.209700 -24.686806 15 -18.771686 -46.209700 16 -269.372463 -18.771686 17 -52.593519 -269.372463 18 106.530585 -52.593519 19 25.269539 106.530585 20 -95.220864 25.269539 21 64.526279 -95.220864 22 103.105585 64.526279 23 -15.288072 103.105585 24 -9.195744 -15.288072 25 2.128843 -9.195744 26 -109.735181 2.128843 27 38.061740 -109.735181 28 167.675860 38.061740 29 -8.375375 167.675860 30 242.559399 -8.375375 31 78.185011 242.559399 32 32.979662 78.185011 33 44.882516 32.979662 34 -68.036830 44.882516 35 -242.429561 -68.036830 36 44.247455 -242.429561 37 107.291013 44.247455 38 159.329098 107.291013 39 -283.361003 159.329098 40 100.283389 -283.361003 41 243.025948 100.283389 42 -52.861316 243.025948 43 252.136498 -52.861316 44 -255.885166 252.136498 45 72.991855 -255.885166 46 162.539313 72.991855 47 -286.121692 162.539313 48 44.822577 -286.121692 49 61.542188 44.822577 50 63.503819 61.542188 51 61.699740 63.503819 52 34.815161 61.699740 53 52.803592 34.815161 54 141.906875 52.803592 55 -230.064037 141.906875 56 25.902970 -230.064037 57 -269.008504 25.902970 58 -9.484874 -269.008504 59 -66.608250 -9.484874 60 NA -66.608250 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 70.284054 81.788527 [2,] -190.724786 70.284054 [3,] 122.773346 -190.724786 [4,] 1.454163 122.773346 [5,] 153.734898 1.454163 [6,] 95.465003 153.734898 [7,] 36.160315 95.465003 [8,] -85.502204 36.160315 [9,] -56.600317 -85.502204 [10,] -343.971845 -56.600317 [11,] 120.585703 -343.971845 [12,] -126.882725 120.585703 [13,] -24.686806 -126.882725 [14,] -46.209700 -24.686806 [15,] -18.771686 -46.209700 [16,] -269.372463 -18.771686 [17,] -52.593519 -269.372463 [18,] 106.530585 -52.593519 [19,] 25.269539 106.530585 [20,] -95.220864 25.269539 [21,] 64.526279 -95.220864 [22,] 103.105585 64.526279 [23,] -15.288072 103.105585 [24,] -9.195744 -15.288072 [25,] 2.128843 -9.195744 [26,] -109.735181 2.128843 [27,] 38.061740 -109.735181 [28,] 167.675860 38.061740 [29,] -8.375375 167.675860 [30,] 242.559399 -8.375375 [31,] 78.185011 242.559399 [32,] 32.979662 78.185011 [33,] 44.882516 32.979662 [34,] -68.036830 44.882516 [35,] -242.429561 -68.036830 [36,] 44.247455 -242.429561 [37,] 107.291013 44.247455 [38,] 159.329098 107.291013 [39,] -283.361003 159.329098 [40,] 100.283389 -283.361003 [41,] 243.025948 100.283389 [42,] -52.861316 243.025948 [43,] 252.136498 -52.861316 [44,] -255.885166 252.136498 [45,] 72.991855 -255.885166 [46,] 162.539313 72.991855 [47,] -286.121692 162.539313 [48,] 44.822577 -286.121692 [49,] 61.542188 44.822577 [50,] 63.503819 61.542188 [51,] 61.699740 63.503819 [52,] 34.815161 61.699740 [53,] 52.803592 34.815161 [54,] 141.906875 52.803592 [55,] -230.064037 141.906875 [56,] 25.902970 -230.064037 [57,] -269.008504 25.902970 [58,] -9.484874 -269.008504 [59,] -66.608250 -9.484874 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 70.284054 81.788527 2 -190.724786 70.284054 3 122.773346 -190.724786 4 1.454163 122.773346 5 153.734898 1.454163 6 95.465003 153.734898 7 36.160315 95.465003 8 -85.502204 36.160315 9 -56.600317 -85.502204 10 -343.971845 -56.600317 11 120.585703 -343.971845 12 -126.882725 120.585703 13 -24.686806 -126.882725 14 -46.209700 -24.686806 15 -18.771686 -46.209700 16 -269.372463 -18.771686 17 -52.593519 -269.372463 18 106.530585 -52.593519 19 25.269539 106.530585 20 -95.220864 25.269539 21 64.526279 -95.220864 22 103.105585 64.526279 23 -15.288072 103.105585 24 -9.195744 -15.288072 25 2.128843 -9.195744 26 -109.735181 2.128843 27 38.061740 -109.735181 28 167.675860 38.061740 29 -8.375375 167.675860 30 242.559399 -8.375375 31 78.185011 242.559399 32 32.979662 78.185011 33 44.882516 32.979662 34 -68.036830 44.882516 35 -242.429561 -68.036830 36 44.247455 -242.429561 37 107.291013 44.247455 38 159.329098 107.291013 39 -283.361003 159.329098 40 100.283389 -283.361003 41 243.025948 100.283389 42 -52.861316 243.025948 43 252.136498 -52.861316 44 -255.885166 252.136498 45 72.991855 -255.885166 46 162.539313 72.991855 47 -286.121692 162.539313 48 44.822577 -286.121692 49 61.542188 44.822577 50 63.503819 61.542188 51 61.699740 63.503819 52 34.815161 61.699740 53 52.803592 34.815161 54 141.906875 52.803592 55 -230.064037 141.906875 56 25.902970 -230.064037 57 -269.008504 25.902970 58 -9.484874 -269.008504 59 -66.608250 -9.484874 > 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/rcomp/tmp/7lbsa1321714783.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/rcomp/tmp/8f2rv1321714783.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/rcomp/tmp/9wy161321714783.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/rcomp/tmp/10f8bf1321714783.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/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/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/rcomp/tmp/11vs351321714783.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/rcomp/tmp/12z2jk1321714783.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/rcomp/tmp/13kq211321714783.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/rcomp/tmp/14qzib1321714783.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/rcomp/tmp/15bbmq1321714783.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/rcomp/tmp/16ddla1321714783.tab") + } > > try(system("convert tmp/1fu761321714783.ps tmp/1fu761321714783.png",intern=TRUE)) character(0) > try(system("convert tmp/29g751321714783.ps tmp/29g751321714783.png",intern=TRUE)) character(0) > try(system("convert tmp/30mho1321714783.ps tmp/30mho1321714783.png",intern=TRUE)) character(0) > try(system("convert tmp/496ye1321714783.ps tmp/496ye1321714783.png",intern=TRUE)) character(0) > try(system("convert tmp/5li6h1321714783.ps tmp/5li6h1321714783.png",intern=TRUE)) character(0) > try(system("convert tmp/6hzxh1321714783.ps tmp/6hzxh1321714783.png",intern=TRUE)) character(0) > try(system("convert tmp/7lbsa1321714783.ps tmp/7lbsa1321714783.png",intern=TRUE)) character(0) > try(system("convert tmp/8f2rv1321714783.ps tmp/8f2rv1321714783.png",intern=TRUE)) character(0) > try(system("convert tmp/9wy161321714783.ps tmp/9wy161321714783.png",intern=TRUE)) character(0) > try(system("convert tmp/10f8bf1321714783.ps tmp/10f8bf1321714783.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 4.176 0.668 4.899