R version 2.8.0 (2008-10-20) Copyright (C) 2008 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. Natural language support but running in an English locale 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(475,2,60,0,0,0,530,1,67,1,0,0,550,2,91,1,1,0,550,1,150,0,2,0,625,3,110,1,2,0,650,2,86,1,2,1,650,2,86,0,0,1,720,3,145,1,2,1,795,3,150,1,0,0,515,2,85,1,2,0,535,2,100,1,2,0,550,2,84,0,0,0,600,2,94,1,0,0,600,2,149,0,1,0,660,3,105,1,2,0,695,2,106,1,0,0,720,3,132,1,0,0,750,2,130,1,2,0,750,3,165,1,2,0,850,2,127,1,2,1,850,2,119,1,0,1,875,3,126,1,2,1,900,2,133,1,2,1,595,2,89,1,1,1,765,3,147,1,2,1,495,1,59,1,0,1,525,1,58,0,0,1,525,1,56,0,0,1,595,2,90,1,2,0,650,1,80,1,0,1,695,3,135,0,0,1,615,2,125,0,2,0,460,2,80,1,0,0,650,2,100,1,1,1,650,2,76,1,0,1,475,1,65,1,1,0,530,2,75,1,1,0,575,2,95,1,2,1,650,2,85,1,1,1,650,1,106,1,0,1,875,2,135,1,0,1,500,2,95,0,1,1,625,2,60,1,2,0,730,2,112,1,2,1,750,2,150,1,1,1,700,2,100,0,2,0,830,2,125,1,0,1,995,2,100,1,2,1,850,3,150,1,2,1),dim=c(6,49),dimnames=list(c('Huurprijs','Slaapkamers','Bewoonbareopp','Terras','Garage','Nieuwbouw'),1:49)) > y <- array(NA,dim=c(6,49),dimnames=list(c('Huurprijs','Slaapkamers','Bewoonbareopp','Terras','Garage','Nieuwbouw'),1:49)) > 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 = '3' > #'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 Bewoonbareopp Huurprijs Slaapkamers Terras Garage Nieuwbouw 1 60 475 2 0 0 0 2 67 530 1 1 0 0 3 91 550 2 1 1 0 4 150 550 1 0 2 0 5 110 625 3 1 2 0 6 86 650 2 1 2 1 7 86 650 2 0 0 1 8 145 720 3 1 2 1 9 150 795 3 1 0 0 10 85 515 2 1 2 0 11 100 535 2 1 2 0 12 84 550 2 0 0 0 13 94 600 2 1 0 0 14 149 600 2 0 1 0 15 105 660 3 1 2 0 16 106 695 2 1 0 0 17 132 720 3 1 0 0 18 130 750 2 1 2 0 19 165 750 3 1 2 0 20 127 850 2 1 2 1 21 119 850 2 1 0 1 22 126 875 3 1 2 1 23 133 900 2 1 2 1 24 89 595 2 1 1 1 25 147 765 3 1 2 1 26 59 495 1 1 0 1 27 58 525 1 0 0 1 28 56 525 1 0 0 1 29 90 595 2 1 2 0 30 80 650 1 1 0 1 31 135 695 3 0 0 1 32 125 615 2 0 2 0 33 80 460 2 1 0 0 34 100 650 2 1 1 1 35 76 650 2 1 0 1 36 65 475 1 1 1 0 37 75 530 2 1 1 0 38 95 575 2 1 2 1 39 85 650 2 1 1 1 40 106 650 1 1 0 1 41 135 875 2 1 0 1 42 95 500 2 0 1 1 43 60 625 2 1 2 0 44 112 730 2 1 2 1 45 150 750 2 1 1 1 46 100 700 2 0 2 0 47 125 830 2 1 0 1 48 100 995 2 1 2 1 49 150 850 3 1 2 1 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) Huurprijs Slaapkamers Terras Garage Nieuwbouw -5.6705 0.1373 14.8450 -12.2216 3.4755 -8.1790 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -47.1687 -13.0346 0.2197 7.8926 58.3677 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) -5.67046 16.15697 -0.351 0.7273 Huurprijs 0.13729 0.03138 4.375 7.6e-05 *** Slaapkamers 14.84505 5.94227 2.498 0.0164 * Terras -12.22158 7.58462 -1.611 0.1144 Garage 3.47548 3.54213 0.981 0.3320 Nieuwbouw -8.17901 6.93058 -1.180 0.2444 --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 Residual standard error: 20.7 on 43 degrees of freedom Multiple R-squared: 0.5696, Adjusted R-squared: 0.5196 F-statistic: 11.38 on 5 and 43 DF, p-value: 4.948e-07 > 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.63953504 0.7209299 0.3604650 [2,] 0.47422859 0.9484572 0.5257714 [3,] 0.33181164 0.6636233 0.6681884 [4,] 0.23311341 0.4662268 0.7668866 [5,] 0.17181197 0.3436239 0.8281880 [6,] 0.22401092 0.4480218 0.7759891 [7,] 0.40272886 0.8054577 0.5972711 [8,] 0.35989287 0.7197857 0.6401071 [9,] 0.31830904 0.6366181 0.6816910 [10,] 0.53713997 0.9257201 0.4628600 [11,] 0.56122091 0.8775582 0.4387791 [12,] 0.57489344 0.8502131 0.4251066 [13,] 0.47890980 0.9578196 0.5210902 [14,] 0.51956381 0.9608724 0.4804362 [15,] 0.46937224 0.9387445 0.5306278 [16,] 0.44634051 0.8926810 0.5536595 [17,] 0.43492805 0.8698561 0.5650719 [18,] 0.38468842 0.7693768 0.6153116 [19,] 0.34013276 0.6802655 0.6598672 [20,] 0.36562976 0.7312595 0.6343702 [21,] 0.32673131 0.6534626 0.6732687 [22,] 0.26447866 0.5289573 0.7355213 [23,] 0.22372093 0.4474419 0.7762791 [24,] 0.25556268 0.5111254 0.7444373 [25,] 0.19653441 0.3930688 0.8034656 [26,] 0.13684042 0.2736808 0.8631596 [27,] 0.24829684 0.4965937 0.7517032 [28,] 0.19302981 0.3860596 0.8069702 [29,] 0.12790995 0.2558199 0.8720900 [30,] 0.07626289 0.1525258 0.9237371 [31,] 0.09377419 0.1875484 0.9062258 [32,] 0.07543009 0.1508602 0.9245699 > postscript(file="/var/www/html/freestat/rcomp/tmp/1mkpn1290526697.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/freestat/rcomp/tmp/2wto81290526697.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/freestat/rcomp/tmp/3wto81290526697.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/freestat/rcomp/tmp/4wto81290526697.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/freestat/rcomp/tmp/5wto81290526697.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 = 49 Frequency = 1 1 2 3 4 5 6 -29.2300523 -2.7141029 0.2196702 58.3676520 -9.3972374 -13.8053119 7 8 9 10 11 12 -19.0759378 20.7396854 14.2152537 -4.4508305 7.8034674 -15.5264350 13 14 15 16 17 18 -0.1691057 39.1338306 -19.2022160 -1.2111904 6.5116364 8.2871704 19 20 21 22 23 24 28.4421248 -0.2623324 -1.3113739 -19.5395055 -1.1265876 0.2208480 25 26 27 28 29 30 16.5618557 2.2698831 -15.0702544 -17.0702544 -10.4336387 1.9906922 31 32 33 34 35 36 8.9011871 9.5990748 5.0508087 3.6701674 -16.8543533 -0.6389016 37 38 39 40 41 42 -13.0346278 5.4910708 -11.3298326 27.9906922 11.2564986 7.0413484 43 44 45 46 47 48 -44.5521918 1.2118799 39.9416571 -27.0701590 7.4343282 -47.1686723 49 7.8926220 > postscript(file="/var/www/html/freestat/rcomp/tmp/6pk6t1290526697.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 = 49 Frequency = 1 lag(myerror, k = 1) myerror 0 -29.2300523 NA 1 -2.7141029 -29.2300523 2 0.2196702 -2.7141029 3 58.3676520 0.2196702 4 -9.3972374 58.3676520 5 -13.8053119 -9.3972374 6 -19.0759378 -13.8053119 7 20.7396854 -19.0759378 8 14.2152537 20.7396854 9 -4.4508305 14.2152537 10 7.8034674 -4.4508305 11 -15.5264350 7.8034674 12 -0.1691057 -15.5264350 13 39.1338306 -0.1691057 14 -19.2022160 39.1338306 15 -1.2111904 -19.2022160 16 6.5116364 -1.2111904 17 8.2871704 6.5116364 18 28.4421248 8.2871704 19 -0.2623324 28.4421248 20 -1.3113739 -0.2623324 21 -19.5395055 -1.3113739 22 -1.1265876 -19.5395055 23 0.2208480 -1.1265876 24 16.5618557 0.2208480 25 2.2698831 16.5618557 26 -15.0702544 2.2698831 27 -17.0702544 -15.0702544 28 -10.4336387 -17.0702544 29 1.9906922 -10.4336387 30 8.9011871 1.9906922 31 9.5990748 8.9011871 32 5.0508087 9.5990748 33 3.6701674 5.0508087 34 -16.8543533 3.6701674 35 -0.6389016 -16.8543533 36 -13.0346278 -0.6389016 37 5.4910708 -13.0346278 38 -11.3298326 5.4910708 39 27.9906922 -11.3298326 40 11.2564986 27.9906922 41 7.0413484 11.2564986 42 -44.5521918 7.0413484 43 1.2118799 -44.5521918 44 39.9416571 1.2118799 45 -27.0701590 39.9416571 46 7.4343282 -27.0701590 47 -47.1686723 7.4343282 48 7.8926220 -47.1686723 49 NA 7.8926220 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -2.7141029 -29.2300523 [2,] 0.2196702 -2.7141029 [3,] 58.3676520 0.2196702 [4,] -9.3972374 58.3676520 [5,] -13.8053119 -9.3972374 [6,] -19.0759378 -13.8053119 [7,] 20.7396854 -19.0759378 [8,] 14.2152537 20.7396854 [9,] -4.4508305 14.2152537 [10,] 7.8034674 -4.4508305 [11,] -15.5264350 7.8034674 [12,] -0.1691057 -15.5264350 [13,] 39.1338306 -0.1691057 [14,] -19.2022160 39.1338306 [15,] -1.2111904 -19.2022160 [16,] 6.5116364 -1.2111904 [17,] 8.2871704 6.5116364 [18,] 28.4421248 8.2871704 [19,] -0.2623324 28.4421248 [20,] -1.3113739 -0.2623324 [21,] -19.5395055 -1.3113739 [22,] -1.1265876 -19.5395055 [23,] 0.2208480 -1.1265876 [24,] 16.5618557 0.2208480 [25,] 2.2698831 16.5618557 [26,] -15.0702544 2.2698831 [27,] -17.0702544 -15.0702544 [28,] -10.4336387 -17.0702544 [29,] 1.9906922 -10.4336387 [30,] 8.9011871 1.9906922 [31,] 9.5990748 8.9011871 [32,] 5.0508087 9.5990748 [33,] 3.6701674 5.0508087 [34,] -16.8543533 3.6701674 [35,] -0.6389016 -16.8543533 [36,] -13.0346278 -0.6389016 [37,] 5.4910708 -13.0346278 [38,] -11.3298326 5.4910708 [39,] 27.9906922 -11.3298326 [40,] 11.2564986 27.9906922 [41,] 7.0413484 11.2564986 [42,] -44.5521918 7.0413484 [43,] 1.2118799 -44.5521918 [44,] 39.9416571 1.2118799 [45,] -27.0701590 39.9416571 [46,] 7.4343282 -27.0701590 [47,] -47.1686723 7.4343282 [48,] 7.8926220 -47.1686723 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -2.7141029 -29.2300523 2 0.2196702 -2.7141029 3 58.3676520 0.2196702 4 -9.3972374 58.3676520 5 -13.8053119 -9.3972374 6 -19.0759378 -13.8053119 7 20.7396854 -19.0759378 8 14.2152537 20.7396854 9 -4.4508305 14.2152537 10 7.8034674 -4.4508305 11 -15.5264350 7.8034674 12 -0.1691057 -15.5264350 13 39.1338306 -0.1691057 14 -19.2022160 39.1338306 15 -1.2111904 -19.2022160 16 6.5116364 -1.2111904 17 8.2871704 6.5116364 18 28.4421248 8.2871704 19 -0.2623324 28.4421248 20 -1.3113739 -0.2623324 21 -19.5395055 -1.3113739 22 -1.1265876 -19.5395055 23 0.2208480 -1.1265876 24 16.5618557 0.2208480 25 2.2698831 16.5618557 26 -15.0702544 2.2698831 27 -17.0702544 -15.0702544 28 -10.4336387 -17.0702544 29 1.9906922 -10.4336387 30 8.9011871 1.9906922 31 9.5990748 8.9011871 32 5.0508087 9.5990748 33 3.6701674 5.0508087 34 -16.8543533 3.6701674 35 -0.6389016 -16.8543533 36 -13.0346278 -0.6389016 37 5.4910708 -13.0346278 38 -11.3298326 5.4910708 39 27.9906922 -11.3298326 40 11.2564986 27.9906922 41 7.0413484 11.2564986 42 -44.5521918 7.0413484 43 1.2118799 -44.5521918 44 39.9416571 1.2118799 45 -27.0701590 39.9416571 46 7.4343282 -27.0701590 47 -47.1686723 7.4343282 48 7.8926220 -47.1686723 > 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/freestat/rcomp/tmp/70cnw1290526697.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/freestat/rcomp/tmp/80cnw1290526697.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/freestat/rcomp/tmp/9tl4h1290526697.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/freestat/rcomp/tmp/10tl4h1290526697.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/freestat/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/html/freestat/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/freestat/rcomp/tmp/11w43n1290526697.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/freestat/rcomp/tmp/12hm1s1290526697.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/freestat/rcomp/tmp/13vwzj1290526697.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/freestat/rcomp/tmp/14zegp1290526697.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/freestat/rcomp/tmp/152fev1290526697.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/freestat/rcomp/tmp/16ypum1290526697.tab") + } > > try(system("convert tmp/1mkpn1290526697.ps tmp/1mkpn1290526697.png",intern=TRUE)) character(0) > try(system("convert tmp/2wto81290526697.ps tmp/2wto81290526697.png",intern=TRUE)) character(0) > try(system("convert tmp/3wto81290526697.ps tmp/3wto81290526697.png",intern=TRUE)) character(0) > try(system("convert tmp/4wto81290526697.ps tmp/4wto81290526697.png",intern=TRUE)) character(0) > try(system("convert tmp/5wto81290526697.ps tmp/5wto81290526697.png",intern=TRUE)) character(0) > try(system("convert tmp/6pk6t1290526697.ps tmp/6pk6t1290526697.png",intern=TRUE)) character(0) > try(system("convert tmp/70cnw1290526697.ps tmp/70cnw1290526697.png",intern=TRUE)) character(0) > try(system("convert tmp/80cnw1290526697.ps tmp/80cnw1290526697.png",intern=TRUE)) character(0) > try(system("convert tmp/9tl4h1290526697.ps tmp/9tl4h1290526697.png",intern=TRUE)) character(0) > try(system("convert tmp/10tl4h1290526697.ps tmp/10tl4h1290526697.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 3.833 2.525 8.931