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(1038.00,0,934.00,0,988.00,0,870.00,0,854.00,0,834.00,0,872.00,0,954.00,0,870.00,0,1238.00,0,1082.00,0,1053.00,0,934.00,0,787.00,0,1081.00,0,908.00,0,995.00,0,825.00,0,822.00,0,856.00,0,887.00,0,1094.00,0,990.00,0,936.00,0,1097.00,0,918.00,0,926.00,0,907.00,0,899.00,0,971.00,0,1087.00,0,1000.00,0,1071.00,0,1190.00,0,1116.00,0,1070.00,0,1314.00,0,1068.00,0,1185.00,0,1215.00,0,1145.00,0,1251.00,1,1363.00,1,1368.00,1,1535.00,1,1853.00,1,1866.00,1,2023.00,1,1373.00,1,1968.00,1,1424.00,1,1160.00,1,1243.00,1,1375.00,1,1539.00,1,1773.00,1,1906.00,1,2076.00,1,2004.00,1),dim=c(2,59),dimnames=list(c('Asielaanvragen','Verandering'),1:59)) > y <- array(NA,dim=c(2,59),dimnames=list(c('Asielaanvragen','Verandering'),1:59)) > for (i in 1:dim(x)[1]) + { + for (j in 1:dim(x)[2]) + { + y[i,j] <- as.numeric(x[i,j]) + } + } > par3 = 'No Linear Trend' > par2 = 'Do not include Seasonal Dummies' > par1 = '1' > #'GNU S' R Code compiled by R2WASP v. 1.0.44 () > #Author: Prof. Dr. P. Wessa > #To cite this work: AUTHOR(S), (YEAR), YOUR SOFTWARE TITLE (vNUMBER) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_YOURPAGE.wasp/ > #Source of accompanying publication: Office for Research, Development, and Education > #Technical description: Write here your technical program description (don't use hard returns!) > library(lattice) > library(lmtest) Loading required package: zoo Attaching package: 'zoo' The following object(s) are masked from package:base : as.Date.numeric > n25 <- 25 #minimum number of obs. for Goldfeld-Quandt test > par1 <- as.numeric(par1) > x <- t(y) > k <- length(x[1,]) > n <- length(x[,1]) > x1 <- cbind(x[,par1], x[,1:k!=par1]) > mycolnames <- c(colnames(x)[par1], colnames(x)[1:k!=par1]) > colnames(x1) <- mycolnames #colnames(x)[par1] > x <- x1 > if (par3 == 'First Differences'){ + x2 <- array(0, dim=c(n-1,k), dimnames=list(1:(n-1), paste('(1-B)',colnames(x),sep=''))) + for (i in 1:n-1) { + for (j in 1:k) { + x2[i,j] <- x[i+1,j] - x[i,j] + } + } + x <- x2 + } > if (par2 == 'Include Monthly Dummies'){ + x2 <- array(0, dim=c(n,11), dimnames=list(1:n, paste('M', seq(1:11), sep =''))) + for (i in 1:11){ + x2[seq(i,n,12),i] <- 1 + } + x <- cbind(x, x2) + } > if (par2 == 'Include Quarterly Dummies'){ + x2 <- array(0, dim=c(n,3), dimnames=list(1:n, paste('Q', seq(1:3), sep =''))) + for (i in 1:3){ + x2[seq(i,n,4),i] <- 1 + } + x <- cbind(x, x2) + } > k <- length(x[1,]) > if (par3 == 'Linear Trend'){ + x <- cbind(x, c(1:n)) + colnames(x)[k+1] <- 't' + } > x Asielaanvragen Verandering 1 1038 0 2 934 0 3 988 0 4 870 0 5 854 0 6 834 0 7 872 0 8 954 0 9 870 0 10 1238 0 11 1082 0 12 1053 0 13 934 0 14 787 0 15 1081 0 16 908 0 17 995 0 18 825 0 19 822 0 20 856 0 21 887 0 22 1094 0 23 990 0 24 936 0 25 1097 0 26 918 0 27 926 0 28 907 0 29 899 0 30 971 0 31 1087 0 32 1000 0 33 1071 0 34 1190 0 35 1116 0 36 1070 0 37 1314 0 38 1068 0 39 1185 0 40 1215 0 41 1145 0 42 1251 1 43 1363 1 44 1368 1 45 1535 1 46 1853 1 47 1866 1 48 2023 1 49 1373 1 50 1968 1 51 1424 1 52 1160 1 53 1243 1 54 1375 1 55 1539 1 56 1773 1 57 1906 1 58 2076 1 59 2004 1 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) Verandering 997.1 619.6 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -456.7 -127.1 -26.1 109.4 459.3 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 997.10 31.45 31.71 < 2e-16 *** Verandering 619.57 56.93 10.88 1.55e-15 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 201.4 on 57 degrees of freedom Multiple R-squared: 0.6751, Adjusted R-squared: 0.6694 F-statistic: 118.4 on 1 and 57 DF, p-value: 1.547e-15 > 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,] 9.388196e-02 1.877639e-01 0.9061180 [2,] 5.648006e-02 1.129601e-01 0.9435199 [3,] 2.331093e-02 4.662186e-02 0.9766891 [4,] 8.821292e-03 1.764258e-02 0.9911787 [5,] 3.443202e-03 6.886404e-03 0.9965568 [6,] 6.719173e-02 1.343835e-01 0.9328083 [7,] 5.211916e-02 1.042383e-01 0.9478808 [8,] 3.336619e-02 6.673237e-02 0.9666338 [9,] 1.776840e-02 3.553680e-02 0.9822316 [10,] 1.971298e-02 3.942596e-02 0.9802870 [11,] 1.469899e-02 2.939798e-02 0.9853010 [12,] 8.213696e-03 1.642739e-02 0.9917863 [13,] 4.220761e-03 8.441523e-03 0.9957792 [14,] 3.511202e-03 7.022403e-03 0.9964888 [15,] 2.899359e-03 5.798719e-03 0.9971006 [16,] 1.898953e-03 3.797906e-03 0.9981010 [17,] 1.067758e-03 2.135516e-03 0.9989322 [18,] 9.291303e-04 1.858261e-03 0.9990709 [19,] 4.648969e-04 9.297938e-04 0.9995351 [20,] 2.254341e-04 4.508681e-04 0.9997746 [21,] 1.846921e-04 3.693841e-04 0.9998153 [22,] 9.306033e-05 1.861207e-04 0.9999069 [23,] 4.546481e-05 9.092962e-05 0.9999545 [24,] 2.390407e-05 4.780814e-05 0.9999761 [25,] 1.336333e-05 2.672666e-05 0.9999866 [26,] 6.226074e-06 1.245215e-05 0.9999938 [27,] 4.600346e-06 9.200691e-06 0.9999954 [28,] 2.175875e-06 4.351750e-06 0.9999978 [29,] 1.348170e-06 2.696339e-06 0.9999987 [30,] 2.608300e-06 5.216601e-06 0.9999974 [31,] 1.920211e-06 3.840421e-06 0.9999981 [32,] 1.040637e-06 2.081275e-06 0.9999990 [33,] 7.316045e-06 1.463209e-05 0.9999927 [34,] 3.675195e-06 7.350391e-06 0.9999963 [35,] 3.294388e-06 6.588776e-06 0.9999967 [36,] 3.463223e-06 6.926447e-06 0.9999965 [37,] 2.024424e-06 4.048848e-06 0.9999980 [38,] 2.280362e-06 4.560724e-06 0.9999977 [39,] 1.878878e-06 3.757756e-06 0.9999981 [40,] 1.591801e-06 3.183601e-06 0.9999984 [41,] 1.260023e-06 2.520046e-06 0.9999987 [42,] 9.370726e-06 1.874145e-05 0.9999906 [43,] 2.337529e-05 4.675059e-05 0.9999766 [44,] 2.074768e-04 4.149535e-04 0.9997925 [45,] 2.227780e-04 4.455560e-04 0.9997772 [46,] 6.129065e-04 1.225813e-03 0.9993871 [47,] 4.355076e-04 8.710151e-04 0.9995645 [48,] 4.801868e-03 9.603737e-03 0.9951981 [49,] 3.436595e-02 6.873190e-02 0.9656340 [50,] 1.563113e-01 3.126227e-01 0.8436887 > postscript(file="/var/www/html/rcomp/tmp/1orb51292949091.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/2orb51292949091.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/3hiaq1292949091.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/4hiaq1292949091.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/5hiaq1292949091.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 = 59 Frequency = 1 1 2 3 4 5 6 40.902439 -63.097561 -9.097561 -127.097561 -143.097561 -163.097561 7 8 9 10 11 12 -125.097561 -43.097561 -127.097561 240.902439 84.902439 55.902439 13 14 15 16 17 18 -63.097561 -210.097561 83.902439 -89.097561 -2.097561 -172.097561 19 20 21 22 23 24 -175.097561 -141.097561 -110.097561 96.902439 -7.097561 -61.097561 25 26 27 28 29 30 99.902439 -79.097561 -71.097561 -90.097561 -98.097561 -26.097561 31 32 33 34 35 36 89.902439 2.902439 73.902439 192.902439 118.902439 72.902439 37 38 39 40 41 42 316.902439 70.902439 187.902439 217.902439 147.902439 -365.666667 43 44 45 46 47 48 -253.666667 -248.666667 -81.666667 236.333333 249.333333 406.333333 49 50 51 52 53 54 -243.666667 351.333333 -192.666667 -456.666667 -373.666667 -241.666667 55 56 57 58 59 -77.666667 156.333333 289.333333 459.333333 387.333333 > postscript(file="/var/www/html/rcomp/tmp/6as9t1292949091.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 = 59 Frequency = 1 lag(myerror, k = 1) myerror 0 40.902439 NA 1 -63.097561 40.902439 2 -9.097561 -63.097561 3 -127.097561 -9.097561 4 -143.097561 -127.097561 5 -163.097561 -143.097561 6 -125.097561 -163.097561 7 -43.097561 -125.097561 8 -127.097561 -43.097561 9 240.902439 -127.097561 10 84.902439 240.902439 11 55.902439 84.902439 12 -63.097561 55.902439 13 -210.097561 -63.097561 14 83.902439 -210.097561 15 -89.097561 83.902439 16 -2.097561 -89.097561 17 -172.097561 -2.097561 18 -175.097561 -172.097561 19 -141.097561 -175.097561 20 -110.097561 -141.097561 21 96.902439 -110.097561 22 -7.097561 96.902439 23 -61.097561 -7.097561 24 99.902439 -61.097561 25 -79.097561 99.902439 26 -71.097561 -79.097561 27 -90.097561 -71.097561 28 -98.097561 -90.097561 29 -26.097561 -98.097561 30 89.902439 -26.097561 31 2.902439 89.902439 32 73.902439 2.902439 33 192.902439 73.902439 34 118.902439 192.902439 35 72.902439 118.902439 36 316.902439 72.902439 37 70.902439 316.902439 38 187.902439 70.902439 39 217.902439 187.902439 40 147.902439 217.902439 41 -365.666667 147.902439 42 -253.666667 -365.666667 43 -248.666667 -253.666667 44 -81.666667 -248.666667 45 236.333333 -81.666667 46 249.333333 236.333333 47 406.333333 249.333333 48 -243.666667 406.333333 49 351.333333 -243.666667 50 -192.666667 351.333333 51 -456.666667 -192.666667 52 -373.666667 -456.666667 53 -241.666667 -373.666667 54 -77.666667 -241.666667 55 156.333333 -77.666667 56 289.333333 156.333333 57 459.333333 289.333333 58 387.333333 459.333333 59 NA 387.333333 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -63.097561 40.902439 [2,] -9.097561 -63.097561 [3,] -127.097561 -9.097561 [4,] -143.097561 -127.097561 [5,] -163.097561 -143.097561 [6,] -125.097561 -163.097561 [7,] -43.097561 -125.097561 [8,] -127.097561 -43.097561 [9,] 240.902439 -127.097561 [10,] 84.902439 240.902439 [11,] 55.902439 84.902439 [12,] -63.097561 55.902439 [13,] -210.097561 -63.097561 [14,] 83.902439 -210.097561 [15,] -89.097561 83.902439 [16,] -2.097561 -89.097561 [17,] -172.097561 -2.097561 [18,] -175.097561 -172.097561 [19,] -141.097561 -175.097561 [20,] -110.097561 -141.097561 [21,] 96.902439 -110.097561 [22,] -7.097561 96.902439 [23,] -61.097561 -7.097561 [24,] 99.902439 -61.097561 [25,] -79.097561 99.902439 [26,] -71.097561 -79.097561 [27,] -90.097561 -71.097561 [28,] -98.097561 -90.097561 [29,] -26.097561 -98.097561 [30,] 89.902439 -26.097561 [31,] 2.902439 89.902439 [32,] 73.902439 2.902439 [33,] 192.902439 73.902439 [34,] 118.902439 192.902439 [35,] 72.902439 118.902439 [36,] 316.902439 72.902439 [37,] 70.902439 316.902439 [38,] 187.902439 70.902439 [39,] 217.902439 187.902439 [40,] 147.902439 217.902439 [41,] -365.666667 147.902439 [42,] -253.666667 -365.666667 [43,] -248.666667 -253.666667 [44,] -81.666667 -248.666667 [45,] 236.333333 -81.666667 [46,] 249.333333 236.333333 [47,] 406.333333 249.333333 [48,] -243.666667 406.333333 [49,] 351.333333 -243.666667 [50,] -192.666667 351.333333 [51,] -456.666667 -192.666667 [52,] -373.666667 -456.666667 [53,] -241.666667 -373.666667 [54,] -77.666667 -241.666667 [55,] 156.333333 -77.666667 [56,] 289.333333 156.333333 [57,] 459.333333 289.333333 [58,] 387.333333 459.333333 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -63.097561 40.902439 2 -9.097561 -63.097561 3 -127.097561 -9.097561 4 -143.097561 -127.097561 5 -163.097561 -143.097561 6 -125.097561 -163.097561 7 -43.097561 -125.097561 8 -127.097561 -43.097561 9 240.902439 -127.097561 10 84.902439 240.902439 11 55.902439 84.902439 12 -63.097561 55.902439 13 -210.097561 -63.097561 14 83.902439 -210.097561 15 -89.097561 83.902439 16 -2.097561 -89.097561 17 -172.097561 -2.097561 18 -175.097561 -172.097561 19 -141.097561 -175.097561 20 -110.097561 -141.097561 21 96.902439 -110.097561 22 -7.097561 96.902439 23 -61.097561 -7.097561 24 99.902439 -61.097561 25 -79.097561 99.902439 26 -71.097561 -79.097561 27 -90.097561 -71.097561 28 -98.097561 -90.097561 29 -26.097561 -98.097561 30 89.902439 -26.097561 31 2.902439 89.902439 32 73.902439 2.902439 33 192.902439 73.902439 34 118.902439 192.902439 35 72.902439 118.902439 36 316.902439 72.902439 37 70.902439 316.902439 38 187.902439 70.902439 39 217.902439 187.902439 40 147.902439 217.902439 41 -365.666667 147.902439 42 -253.666667 -365.666667 43 -248.666667 -253.666667 44 -81.666667 -248.666667 45 236.333333 -81.666667 46 249.333333 236.333333 47 406.333333 249.333333 48 -243.666667 406.333333 49 351.333333 -243.666667 50 -192.666667 351.333333 51 -456.666667 -192.666667 52 -373.666667 -456.666667 53 -241.666667 -373.666667 54 -77.666667 -241.666667 55 156.333333 -77.666667 56 289.333333 156.333333 57 459.333333 289.333333 58 387.333333 459.333333 > 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/7kj9w1292949091.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/8kj9w1292949091.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/9kj9w1292949091.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/10dsqh1292949091.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/11yt651292949091.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/122u5t1292949091.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/13y3321292949091.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/1414j71292949091.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/15cd1a1292949091.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/168ng11292949091.tab") + } > > try(system("convert tmp/1orb51292949091.ps tmp/1orb51292949091.png",intern=TRUE)) character(0) > try(system("convert tmp/2orb51292949091.ps tmp/2orb51292949091.png",intern=TRUE)) character(0) > try(system("convert tmp/3hiaq1292949091.ps tmp/3hiaq1292949091.png",intern=TRUE)) character(0) > try(system("convert tmp/4hiaq1292949091.ps tmp/4hiaq1292949091.png",intern=TRUE)) character(0) > try(system("convert tmp/5hiaq1292949091.ps tmp/5hiaq1292949091.png",intern=TRUE)) character(0) > try(system("convert tmp/6as9t1292949091.ps tmp/6as9t1292949091.png",intern=TRUE)) character(0) > try(system("convert tmp/7kj9w1292949091.ps tmp/7kj9w1292949091.png",intern=TRUE)) character(0) > try(system("convert tmp/8kj9w1292949091.ps tmp/8kj9w1292949091.png",intern=TRUE)) character(0) > try(system("convert tmp/9kj9w1292949091.ps tmp/9kj9w1292949091.png",intern=TRUE)) character(0) > try(system("convert tmp/10dsqh1292949091.ps tmp/10dsqh1292949091.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.489 1.688 7.198