R version 2.12.0 (2010-10-15) 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(284 + ,14.3 + ,0 + ,3 + ,0 + ,9.3 + ,164 + ,14.6 + ,22 + ,14 + ,0 + ,14.2 + ,130 + ,17.5 + ,19 + ,17 + ,0 + ,17.3 + ,178 + ,17.2 + ,18 + ,14 + ,0 + ,23 + ,150 + ,17.2 + ,13 + ,10 + ,0 + ,16.3 + ,104 + ,14.1 + ,16 + ,7 + ,0 + ,18.4 + ,111 + ,10.4 + ,11 + ,4 + ,0 + ,14.2 + ,51 + ,6.8 + ,22 + ,1 + ,1 + ,9.1 + ,70 + ,4.1 + ,19 + ,6 + ,0 + ,5.9 + ,42 + ,6.5 + ,23 + ,2 + ,1 + ,7.2 + ,126 + ,6.1 + ,11 + ,2 + ,0 + ,6.8 + ,68 + ,6.3 + ,24 + ,8 + ,7 + ,8 + ,135 + ,9.3 + ,14 + ,10 + ,0 + ,14.3 + ,231 + ,16.4 + ,11 + ,13 + ,0 + ,14.6 + ,185 + ,16.1 + ,17 + ,10 + ,0 + ,17.5 + ,181 + ,18 + ,20 + ,14 + ,0 + ,17.2 + ,138 + ,17.6 + ,19 + ,13 + ,0 + ,17.2 + ,158 + ,14 + ,12 + ,6 + ,0 + ,14.1 + ,122 + ,10.5 + ,19 + ,6 + ,2 + ,10.4 + ,40 + ,6.9 + ,26 + ,9 + ,3 + ,6.8 + ,62 + ,2.8 + ,13 + ,2 + ,5 + ,4.1 + ,89 + ,0.7 + ,12 + ,4 + ,5 + ,6.5 + ,33 + ,3.6 + ,20 + ,3 + ,7 + ,6.1 + ,150 + ,6.7 + ,15 + ,4 + ,2 + ,6.3 + ,196 + ,12.5 + ,15 + ,10 + ,0 + ,9.3 + ,196 + ,14.4 + ,17 + ,15 + ,0 + ,16.4 + ,225 + ,16.5 + ,11 + ,14 + ,0 + ,16.1 + ,213 + ,18.7 + ,20 + ,18 + ,0 + ,18 + ,258 + ,19.4 + ,9 + ,10 + ,0 + ,17.6 + ,156 + ,15.8 + ,10 + ,5 + ,0 + ,14 + ,90 + ,11.3 + ,17 + ,5 + ,0 + ,10.5 + ,48 + ,9.7 + ,25 + ,7 + ,0 + ,6.9 + ,46 + ,2.9 + ,19 + ,2 + ,7 + ,2.8 + ,49 + ,0.1 + ,18 + ,0 + ,14 + ,0.7 + ,29 + ,2.5 + ,24 + ,4 + ,10 + ,3.6 + ,118 + ,6.7 + ,13 + ,7 + ,2 + ,6.7 + ,223 + ,10.3 + ,6 + ,8 + ,0 + ,12.5 + ,172 + ,11.2 + ,14 + ,6 + ,0 + ,14.4 + ,259 + ,17.4 + ,9 + ,3 + ,0 + ,16.5 + ,252 + ,20.5 + ,13 + ,12 + ,0 + ,18.7 + ,136 + ,17 + ,23 + ,15 + ,0 + ,19.4 + ,143 + ,14.2 + ,18 + ,8 + ,0 + ,15.8 + ,119 + ,10.6 + ,16 + ,6 + ,0 + ,11.3 + ,24 + ,6.1 + ,21 + ,1 + ,6 + ,9.7) + ,dim=c(6 + ,44) + ,dimnames=list(c('UrenZonneschijn' + ,'GemiddeldeTemperatuur' + ,'Neerslagdagen' + ,'Onweersdagen' + ,'Sneeuwdagen' + ,'GemTemperatuurAuto') + ,1:44)) > y <- array(NA,dim=c(6,44),dimnames=list(c('UrenZonneschijn','GemiddeldeTemperatuur','Neerslagdagen','Onweersdagen','Sneeuwdagen','GemTemperatuurAuto'),1:44)) > 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 = '2' > #'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 GemiddeldeTemperatuur UrenZonneschijn Neerslagdagen Onweersdagen Sneeuwdagen 1 14.3 284 0 3 0 2 14.6 164 22 14 0 3 17.5 130 19 17 0 4 17.2 178 18 14 0 5 17.2 150 13 10 0 6 14.1 104 16 7 0 7 10.4 111 11 4 0 8 6.8 51 22 1 1 9 4.1 70 19 6 0 10 6.5 42 23 2 1 11 6.1 126 11 2 0 12 6.3 68 24 8 7 13 9.3 135 14 10 0 14 16.4 231 11 13 0 15 16.1 185 17 10 0 16 18.0 181 20 14 0 17 17.6 138 19 13 0 18 14.0 158 12 6 0 19 10.5 122 19 6 2 20 6.9 40 26 9 3 21 2.8 62 13 2 5 22 0.7 89 12 4 5 23 3.6 33 20 3 7 24 6.7 150 15 4 2 25 12.5 196 15 10 0 26 14.4 196 17 15 0 27 16.5 225 11 14 0 28 18.7 213 20 18 0 29 19.4 258 9 10 0 30 15.8 156 10 5 0 31 11.3 90 17 5 0 32 9.7 48 25 7 0 33 2.9 46 19 2 7 34 0.1 49 18 0 14 35 2.5 29 24 4 10 36 6.7 118 13 7 2 37 10.3 223 6 8 0 38 11.2 172 14 6 0 39 17.4 259 9 3 0 40 20.5 252 13 12 0 41 17.0 136 23 15 0 42 14.2 143 18 8 0 43 10.6 119 16 6 0 44 6.1 24 21 1 6 GemTemperatuurAuto 1 9.3 2 14.2 3 17.3 4 23.0 5 16.3 6 18.4 7 14.2 8 9.1 9 5.9 10 7.2 11 6.8 12 8.0 13 14.3 14 14.6 15 17.5 16 17.2 17 17.2 18 14.1 19 10.4 20 6.8 21 4.1 22 6.5 23 6.1 24 6.3 25 9.3 26 16.4 27 16.1 28 18.0 29 17.6 30 14.0 31 10.5 32 6.9 33 2.8 34 0.7 35 3.6 36 6.7 37 12.5 38 14.4 39 16.5 40 18.7 41 19.4 42 15.8 43 11.3 44 9.7 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) UrenZonneschijn Neerslagdagen Onweersdagen -4.045302 0.038144 0.213147 0.001013 Sneeuwdagen GemTemperatuurAuto -0.208606 0.587554 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -3.9874 -0.6995 0.0338 0.9501 3.5326 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) -4.045302 2.255823 -1.793 0.080892 . UrenZonneschijn 0.038144 0.009171 4.159 0.000176 *** Neerslagdagen 0.213147 0.098636 2.161 0.037069 * Onweersdagen 0.001013 0.107129 0.009 0.992505 Sneeuwdagen -0.208606 0.123561 -1.688 0.099550 . GemTemperatuurAuto 0.587554 0.094520 6.216 2.88e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.79 on 38 degrees of freedom Multiple R-squared: 0.9118, Adjusted R-squared: 0.9002 F-statistic: 78.59 on 5 and 38 DF, p-value: < 2.2e-16 > 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.7191151 0.5617697 0.2808849 [2,] 0.5684284 0.8631433 0.4315716 [3,] 0.4308323 0.8616646 0.5691677 [4,] 0.7323767 0.5352466 0.2676233 [5,] 0.8958348 0.2083304 0.1041652 [6,] 0.8442469 0.3115062 0.1557531 [7,] 0.7801296 0.4397409 0.2198704 [8,] 0.7156615 0.5686769 0.2843385 [9,] 0.7456493 0.5087015 0.2543507 [10,] 0.6876133 0.6247734 0.3123867 [11,] 0.5964877 0.8070246 0.4035123 [12,] 0.5076158 0.9847684 0.4923842 [13,] 0.4122105 0.8244210 0.5877895 [14,] 0.7164042 0.5671916 0.2835958 [15,] 0.6528116 0.6943769 0.3471884 [16,] 0.6281020 0.7437961 0.3718980 [17,] 0.5285475 0.9429049 0.4714525 [18,] 0.5801142 0.8397717 0.4198858 [19,] 0.4776218 0.9552436 0.5223782 [20,] 0.3722442 0.7444883 0.6277558 [21,] 0.3533236 0.7066472 0.6466764 [22,] 0.7689990 0.4620020 0.2310010 [23,] 0.8448552 0.3102895 0.1551448 [24,] 0.7954763 0.4090473 0.2045237 [25,] 0.7060552 0.5878896 0.2939448 [26,] 0.5745694 0.8508612 0.4254306 [27,] 0.6971986 0.6056028 0.3028014 > postscript(file="/var/www/rcomp/tmp/1rkw91293195438.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/2rkw91293195438.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/3jceu1293195438.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/4jceu1293195438.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/5jceu1293195438.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 = 44 Frequency = 1 1 2 3 4 5 6 2.045238951 -0.656914562 2.354951244 -2.908811178 3.165604110 -0.050055589 7 8 9 10 11 12 -0.480562682 -0.928392439 -2.047178997 0.017092274 -1.002792443 -0.612272392 13 14 15 16 17 18 -3.200281418 0.698070658 -0.827071984 0.758276695 2.212609862 1.170272289 19 20 21 22 23 24 0.142575175 0.499082184 0.341527668 -3.987357075 -0.003243893 -1.461861890 25 26 27 28 29 30 0.397582936 -2.305406887 0.144588478 -0.236412421 1.334865060 3.532621046 31 32 33 34 35 36 2.114508465 2.524532999 0.953976717 0.948822967 0.290433083 -0.053034687 37 38 39 40 41 42 -2.792119876 -2.766297127 -0.049878692 1.162804866 -0.458333765 -0.337321308 43 44 0.050435566 0.305128011 > postscript(file="/var/www/rcomp/tmp/6c3dx1293195438.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 = 44 Frequency = 1 lag(myerror, k = 1) myerror 0 2.045238951 NA 1 -0.656914562 2.045238951 2 2.354951244 -0.656914562 3 -2.908811178 2.354951244 4 3.165604110 -2.908811178 5 -0.050055589 3.165604110 6 -0.480562682 -0.050055589 7 -0.928392439 -0.480562682 8 -2.047178997 -0.928392439 9 0.017092274 -2.047178997 10 -1.002792443 0.017092274 11 -0.612272392 -1.002792443 12 -3.200281418 -0.612272392 13 0.698070658 -3.200281418 14 -0.827071984 0.698070658 15 0.758276695 -0.827071984 16 2.212609862 0.758276695 17 1.170272289 2.212609862 18 0.142575175 1.170272289 19 0.499082184 0.142575175 20 0.341527668 0.499082184 21 -3.987357075 0.341527668 22 -0.003243893 -3.987357075 23 -1.461861890 -0.003243893 24 0.397582936 -1.461861890 25 -2.305406887 0.397582936 26 0.144588478 -2.305406887 27 -0.236412421 0.144588478 28 1.334865060 -0.236412421 29 3.532621046 1.334865060 30 2.114508465 3.532621046 31 2.524532999 2.114508465 32 0.953976717 2.524532999 33 0.948822967 0.953976717 34 0.290433083 0.948822967 35 -0.053034687 0.290433083 36 -2.792119876 -0.053034687 37 -2.766297127 -2.792119876 38 -0.049878692 -2.766297127 39 1.162804866 -0.049878692 40 -0.458333765 1.162804866 41 -0.337321308 -0.458333765 42 0.050435566 -0.337321308 43 0.305128011 0.050435566 44 NA 0.305128011 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -0.656914562 2.045238951 [2,] 2.354951244 -0.656914562 [3,] -2.908811178 2.354951244 [4,] 3.165604110 -2.908811178 [5,] -0.050055589 3.165604110 [6,] -0.480562682 -0.050055589 [7,] -0.928392439 -0.480562682 [8,] -2.047178997 -0.928392439 [9,] 0.017092274 -2.047178997 [10,] -1.002792443 0.017092274 [11,] -0.612272392 -1.002792443 [12,] -3.200281418 -0.612272392 [13,] 0.698070658 -3.200281418 [14,] -0.827071984 0.698070658 [15,] 0.758276695 -0.827071984 [16,] 2.212609862 0.758276695 [17,] 1.170272289 2.212609862 [18,] 0.142575175 1.170272289 [19,] 0.499082184 0.142575175 [20,] 0.341527668 0.499082184 [21,] -3.987357075 0.341527668 [22,] -0.003243893 -3.987357075 [23,] -1.461861890 -0.003243893 [24,] 0.397582936 -1.461861890 [25,] -2.305406887 0.397582936 [26,] 0.144588478 -2.305406887 [27,] -0.236412421 0.144588478 [28,] 1.334865060 -0.236412421 [29,] 3.532621046 1.334865060 [30,] 2.114508465 3.532621046 [31,] 2.524532999 2.114508465 [32,] 0.953976717 2.524532999 [33,] 0.948822967 0.953976717 [34,] 0.290433083 0.948822967 [35,] -0.053034687 0.290433083 [36,] -2.792119876 -0.053034687 [37,] -2.766297127 -2.792119876 [38,] -0.049878692 -2.766297127 [39,] 1.162804866 -0.049878692 [40,] -0.458333765 1.162804866 [41,] -0.337321308 -0.458333765 [42,] 0.050435566 -0.337321308 [43,] 0.305128011 0.050435566 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -0.656914562 2.045238951 2 2.354951244 -0.656914562 3 -2.908811178 2.354951244 4 3.165604110 -2.908811178 5 -0.050055589 3.165604110 6 -0.480562682 -0.050055589 7 -0.928392439 -0.480562682 8 -2.047178997 -0.928392439 9 0.017092274 -2.047178997 10 -1.002792443 0.017092274 11 -0.612272392 -1.002792443 12 -3.200281418 -0.612272392 13 0.698070658 -3.200281418 14 -0.827071984 0.698070658 15 0.758276695 -0.827071984 16 2.212609862 0.758276695 17 1.170272289 2.212609862 18 0.142575175 1.170272289 19 0.499082184 0.142575175 20 0.341527668 0.499082184 21 -3.987357075 0.341527668 22 -0.003243893 -3.987357075 23 -1.461861890 -0.003243893 24 0.397582936 -1.461861890 25 -2.305406887 0.397582936 26 0.144588478 -2.305406887 27 -0.236412421 0.144588478 28 1.334865060 -0.236412421 29 3.532621046 1.334865060 30 2.114508465 3.532621046 31 2.524532999 2.114508465 32 0.953976717 2.524532999 33 0.948822967 0.953976717 34 0.290433083 0.948822967 35 -0.053034687 0.290433083 36 -2.792119876 -0.053034687 37 -2.766297127 -2.792119876 38 -0.049878692 -2.766297127 39 1.162804866 -0.049878692 40 -0.458333765 1.162804866 41 -0.337321308 -0.458333765 42 0.050435566 -0.337321308 43 0.305128011 0.050435566 > 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/7nuu01293195438.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/8nuu01293195438.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/9nuu01293195438.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/10gmul1293195438.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/1114ar1293195438.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/12mn9x1293195438.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/13bo911293195439.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/14ep7o1293195439.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/150poc1293195439.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/1638401293195439.tab") + } > > try(system("convert tmp/1rkw91293195438.ps tmp/1rkw91293195438.png",intern=TRUE)) character(0) > try(system("convert tmp/2rkw91293195438.ps tmp/2rkw91293195438.png",intern=TRUE)) character(0) > try(system("convert tmp/3jceu1293195438.ps tmp/3jceu1293195438.png",intern=TRUE)) character(0) > try(system("convert tmp/4jceu1293195438.ps tmp/4jceu1293195438.png",intern=TRUE)) character(0) > try(system("convert tmp/5jceu1293195438.ps tmp/5jceu1293195438.png",intern=TRUE)) character(0) > try(system("convert tmp/6c3dx1293195438.ps tmp/6c3dx1293195438.png",intern=TRUE)) character(0) > try(system("convert tmp/7nuu01293195438.ps tmp/7nuu01293195438.png",intern=TRUE)) character(0) > try(system("convert tmp/8nuu01293195438.ps tmp/8nuu01293195438.png",intern=TRUE)) character(0) > try(system("convert tmp/9nuu01293195438.ps tmp/9nuu01293195438.png",intern=TRUE)) character(0) > try(system("convert tmp/10gmul1293195438.ps tmp/10gmul1293195438.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.89 1.66 4.55