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 = '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 Huurprijs Slaapkamers Bewoonbareopp Terras Garage Nieuwbouw 1 475 2 60 0 0 0 2 530 1 67 1 0 0 3 550 2 91 1 1 0 4 550 1 150 0 2 0 5 625 3 110 1 2 0 6 650 2 86 1 2 1 7 650 2 86 0 0 1 8 720 3 145 1 2 1 9 795 3 150 1 0 0 10 515 2 85 1 2 0 11 535 2 100 1 2 0 12 550 2 84 0 0 0 13 600 2 94 1 0 0 14 600 2 149 0 1 0 15 660 3 105 1 2 0 16 695 2 106 1 0 0 17 720 3 132 1 0 0 18 750 2 130 1 2 0 19 750 3 165 1 2 0 20 850 2 127 1 2 1 21 850 2 119 1 0 1 22 875 3 126 1 2 1 23 900 2 133 1 2 1 24 595 2 89 1 1 1 25 765 3 147 1 2 1 26 495 1 59 1 0 1 27 525 1 58 0 0 1 28 525 1 56 0 0 1 29 595 2 90 1 2 0 30 650 1 80 1 0 1 31 695 3 135 0 0 1 32 615 2 125 0 2 0 33 460 2 80 1 0 0 34 650 2 100 1 1 1 35 650 2 76 1 0 1 36 475 1 65 1 1 0 37 530 2 75 1 1 0 38 575 2 95 1 2 1 39 650 2 85 1 1 1 40 650 1 106 1 0 1 41 875 2 135 1 0 1 42 500 2 95 0 1 1 43 625 2 60 1 2 0 44 730 2 112 1 2 1 45 750 2 150 1 1 1 46 700 2 100 0 2 0 47 830 2 125 1 0 1 48 995 2 100 1 2 1 49 850 3 150 1 2 1 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) Slaapkamers Bewoonbareopp Terras Garage 261.560 27.971 2.244 69.834 1.168 Nieuwbouw 95.129 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -126.9372 -52.9611 0.6942 44.0387 285.8435 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 261.5599 51.8397 5.046 8.72e-06 *** Slaapkamers 27.9707 25.3500 1.103 0.275999 Bewoonbareopp 2.2436 0.5128 4.375 7.60e-05 *** Terras 69.8339 29.7234 2.349 0.023463 * Garage 1.1676 14.4776 0.081 0.936095 Nieuwbouw 95.1290 24.4938 3.884 0.000350 *** --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 Residual standard error: 83.68 on 43 degrees of freedom Multiple R-squared: 0.6245, Adjusted R-squared: 0.5808 F-statistic: 14.3 on 5 and 43 DF, p-value: 3.003e-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.1314320749 0.262864150 0.8685679 [2,] 0.0521740857 0.104348171 0.9478259 [3,] 0.0208800144 0.041760029 0.9791200 [4,] 0.0073368027 0.014673605 0.9926632 [5,] 0.0028364110 0.005672822 0.9971636 [6,] 0.0011480514 0.002296103 0.9988519 [7,] 0.0015569754 0.003113951 0.9984430 [8,] 0.0014704030 0.002940806 0.9985296 [9,] 0.0006398139 0.001279628 0.9993602 [10,] 0.0103591789 0.020718358 0.9896408 [11,] 0.0053334910 0.010666982 0.9946665 [12,] 0.0150825845 0.030165169 0.9849174 [13,] 0.0127619546 0.025523909 0.9872380 [14,] 0.0153245803 0.030649161 0.9846754 [15,] 0.0218508899 0.043701780 0.9781491 [16,] 0.0444581455 0.088916291 0.9555419 [17,] 0.0457435140 0.091487028 0.9542565 [18,] 0.0675847334 0.135169467 0.9324153 [19,] 0.0421303234 0.084260647 0.9578697 [20,] 0.0261464376 0.052292875 0.9738536 [21,] 0.0166182164 0.033236433 0.9833818 [22,] 0.0097041299 0.019408260 0.9902959 [23,] 0.0064921274 0.012984255 0.9935079 [24,] 0.0037886792 0.007577358 0.9962113 [25,] 0.0056127589 0.011225518 0.9943872 [26,] 0.0035325250 0.007065050 0.9964675 [27,] 0.0016480356 0.003296071 0.9983520 [28,] 0.0009599408 0.001919882 0.9990401 [29,] 0.0009238912 0.001847782 0.9990761 [30,] 0.0021921623 0.004384325 0.9978078 [31,] 0.0010380429 0.002076086 0.9989620 [32,] 0.0006468476 0.001293695 0.9993532 > postscript(file="/var/www/html/freestat/rcomp/tmp/19peb1290527265.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/29peb1290527265.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/39peb1290527265.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/42gve1290527265.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/52gve1290527265.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 22.8844873 20.3162318 -42.6677788 -78.4016267 -39.4339263 -27.7465177 7 8 9 10 11 12 44.4226121 -118.0879551 43.1583990 -65.3739582 -79.0275475 44.0387443 13 14 15 16 17 18 1.7691184 -52.9610914 6.7839369 69.8462469 8.5427062 68.6652737 19 20 21 22 23 24 -37.8304206 80.2670046 100.5508158 79.5399248 116.8055689 -88.3096205 25 26 27 28 29 30 -77.5751003 -91.8641742 10.2132981 14.7004433 3.4081787 16.0208007 31 32 33 34 35 36 -48.4830990 14.7170365 -106.8208648 -57.9889194 -2.9755613 -31.3642381 37 38 39 40 41 42 -26.7706168 -122.9386714 -24.3353300 -42.3120876 89.6536538 -126.9371566 43 44 45 46 47 48 100.7153575 -6.0794060 -70.1675506 155.8063521 67.0893801 285.8434655 49 0.6941818 > postscript(file="/var/www/html/freestat/rcomp/tmp/6c7cz1290527265.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 22.8844873 NA 1 20.3162318 22.8844873 2 -42.6677788 20.3162318 3 -78.4016267 -42.6677788 4 -39.4339263 -78.4016267 5 -27.7465177 -39.4339263 6 44.4226121 -27.7465177 7 -118.0879551 44.4226121 8 43.1583990 -118.0879551 9 -65.3739582 43.1583990 10 -79.0275475 -65.3739582 11 44.0387443 -79.0275475 12 1.7691184 44.0387443 13 -52.9610914 1.7691184 14 6.7839369 -52.9610914 15 69.8462469 6.7839369 16 8.5427062 69.8462469 17 68.6652737 8.5427062 18 -37.8304206 68.6652737 19 80.2670046 -37.8304206 20 100.5508158 80.2670046 21 79.5399248 100.5508158 22 116.8055689 79.5399248 23 -88.3096205 116.8055689 24 -77.5751003 -88.3096205 25 -91.8641742 -77.5751003 26 10.2132981 -91.8641742 27 14.7004433 10.2132981 28 3.4081787 14.7004433 29 16.0208007 3.4081787 30 -48.4830990 16.0208007 31 14.7170365 -48.4830990 32 -106.8208648 14.7170365 33 -57.9889194 -106.8208648 34 -2.9755613 -57.9889194 35 -31.3642381 -2.9755613 36 -26.7706168 -31.3642381 37 -122.9386714 -26.7706168 38 -24.3353300 -122.9386714 39 -42.3120876 -24.3353300 40 89.6536538 -42.3120876 41 -126.9371566 89.6536538 42 100.7153575 -126.9371566 43 -6.0794060 100.7153575 44 -70.1675506 -6.0794060 45 155.8063521 -70.1675506 46 67.0893801 155.8063521 47 285.8434655 67.0893801 48 0.6941818 285.8434655 49 NA 0.6941818 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 20.3162318 22.884487 [2,] -42.6677788 20.316232 [3,] -78.4016267 -42.667779 [4,] -39.4339263 -78.401627 [5,] -27.7465177 -39.433926 [6,] 44.4226121 -27.746518 [7,] -118.0879551 44.422612 [8,] 43.1583990 -118.087955 [9,] -65.3739582 43.158399 [10,] -79.0275475 -65.373958 [11,] 44.0387443 -79.027548 [12,] 1.7691184 44.038744 [13,] -52.9610914 1.769118 [14,] 6.7839369 -52.961091 [15,] 69.8462469 6.783937 [16,] 8.5427062 69.846247 [17,] 68.6652737 8.542706 [18,] -37.8304206 68.665274 [19,] 80.2670046 -37.830421 [20,] 100.5508158 80.267005 [21,] 79.5399248 100.550816 [22,] 116.8055689 79.539925 [23,] -88.3096205 116.805569 [24,] -77.5751003 -88.309621 [25,] -91.8641742 -77.575100 [26,] 10.2132981 -91.864174 [27,] 14.7004433 10.213298 [28,] 3.4081787 14.700443 [29,] 16.0208007 3.408179 [30,] -48.4830990 16.020801 [31,] 14.7170365 -48.483099 [32,] -106.8208648 14.717036 [33,] -57.9889194 -106.820865 [34,] -2.9755613 -57.988919 [35,] -31.3642381 -2.975561 [36,] -26.7706168 -31.364238 [37,] -122.9386714 -26.770617 [38,] -24.3353300 -122.938671 [39,] -42.3120876 -24.335330 [40,] 89.6536538 -42.312088 [41,] -126.9371566 89.653654 [42,] 100.7153575 -126.937157 [43,] -6.0794060 100.715357 [44,] -70.1675506 -6.079406 [45,] 155.8063521 -70.167551 [46,] 67.0893801 155.806352 [47,] 285.8434655 67.089380 [48,] 0.6941818 285.843466 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 20.3162318 22.884487 2 -42.6677788 20.316232 3 -78.4016267 -42.667779 4 -39.4339263 -78.401627 5 -27.7465177 -39.433926 6 44.4226121 -27.746518 7 -118.0879551 44.422612 8 43.1583990 -118.087955 9 -65.3739582 43.158399 10 -79.0275475 -65.373958 11 44.0387443 -79.027548 12 1.7691184 44.038744 13 -52.9610914 1.769118 14 6.7839369 -52.961091 15 69.8462469 6.783937 16 8.5427062 69.846247 17 68.6652737 8.542706 18 -37.8304206 68.665274 19 80.2670046 -37.830421 20 100.5508158 80.267005 21 79.5399248 100.550816 22 116.8055689 79.539925 23 -88.3096205 116.805569 24 -77.5751003 -88.309621 25 -91.8641742 -77.575100 26 10.2132981 -91.864174 27 14.7004433 10.213298 28 3.4081787 14.700443 29 16.0208007 3.408179 30 -48.4830990 16.020801 31 14.7170365 -48.483099 32 -106.8208648 14.717036 33 -57.9889194 -106.820865 34 -2.9755613 -57.988919 35 -31.3642381 -2.975561 36 -26.7706168 -31.364238 37 -122.9386714 -26.770617 38 -24.3353300 -122.938671 39 -42.3120876 -24.335330 40 89.6536538 -42.312088 41 -126.9371566 89.653654 42 100.7153575 -126.937157 43 -6.0794060 100.715357 44 -70.1675506 -6.079406 45 155.8063521 -70.167551 46 67.0893801 155.806352 47 285.8434655 67.089380 48 0.6941818 285.843466 > 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/7c7cz1290527265.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/85zt21290527265.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/95zt21290527265.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/10qiv01290527266.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/11u0c51290527266.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/12x1st1290527266.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/13bb821290527266.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/14wto81290527266.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/150cnw1290527266.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/163cm21290527266.tab") + } > > try(system("convert tmp/19peb1290527265.ps tmp/19peb1290527265.png",intern=TRUE)) character(0) > try(system("convert tmp/29peb1290527265.ps tmp/29peb1290527265.png",intern=TRUE)) character(0) > try(system("convert tmp/39peb1290527265.ps tmp/39peb1290527265.png",intern=TRUE)) character(0) > try(system("convert tmp/42gve1290527265.ps tmp/42gve1290527265.png",intern=TRUE)) character(0) > try(system("convert tmp/52gve1290527265.ps tmp/52gve1290527265.png",intern=TRUE)) character(0) > try(system("convert tmp/6c7cz1290527265.ps tmp/6c7cz1290527265.png",intern=TRUE)) character(0) > try(system("convert tmp/7c7cz1290527265.ps tmp/7c7cz1290527265.png",intern=TRUE)) character(0) > try(system("convert tmp/85zt21290527265.ps tmp/85zt21290527265.png",intern=TRUE)) character(0) > try(system("convert tmp/95zt21290527265.ps tmp/95zt21290527265.png",intern=TRUE)) character(0) > try(system("convert tmp/10qiv01290527266.ps tmp/10qiv01290527266.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 3.859 2.581 15.429