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(0,0,104.7,102.8,0,113.9,0,0,113.2,105.9,108.8,102.3,0,100.7,115.5,100.7,109.9,114.6,0,100.5,114.8,116.5,112.9,102,106,105.3,118.8,106.1,109.3,117.2,0,104.2,112.5,122.4,113.3,100,110.7,112.8,109.8,117.3,109.1,115.9,0,0,116.8,115.7,0,0,0,0,103.1,0,0,102.7,0,0,104.5,105.1,0,0,0,0,111.5,0,0,111.7,0,0),dim=c(1,68),dimnames=list(c('productie*dummy'),1:68)) > y <- array(NA,dim=c(1,68),dimnames=list(c('productie*dummy'),1:68)) > for (i in 1:dim(x)[1]) + { + for (j in 1:dim(x)[2]) + { + y[i,j] <- as.numeric(x[i,j]) + } + } > par3 = 'Linear Trend' > par2 = 'Do not include Seasonal Dummies' > par1 = '1' > #'GNU S' R Code compiled by R2WASP v. 1.0.44 () > #Author: Prof. Dr. P. Wessa > #To cite this work: AUTHOR(S), (YEAR), YOUR SOFTWARE TITLE (vNUMBER) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_YOURPAGE.wasp/ > #Source of accompanying publication: Office for Research, Development, and Education > #Technical description: Write here your technical program description (don't use hard returns!) > library(lattice) > library(lmtest) Loading required package: zoo > n25 <- 25 #minimum number of obs. for Goldfeld-Quandt test > par1 <- as.numeric(par1) > x <- t(y) > k <- length(x[1,]) > n <- length(x[,1]) > x1 <- cbind(x[,par1], x[,1:k!=par1]) > mycolnames <- c(colnames(x)[par1], colnames(x)[1:k!=par1]) > colnames(x1) <- mycolnames #colnames(x)[par1] > x <- x1 > if (par3 == 'First Differences'){ + x2 <- array(0, dim=c(n-1,k), dimnames=list(1:(n-1), paste('(1-B)',colnames(x),sep=''))) + for (i in 1:n-1) { + for (j in 1:k) { + x2[i,j] <- x[i+1,j] - x[i,j] + } + } + x <- x2 + } > if (par2 == 'Include Monthly Dummies'){ + x2 <- array(0, dim=c(n,11), dimnames=list(1:n, paste('M', seq(1:11), sep =''))) + for (i in 1:11){ + x2[seq(i,n,12),i] <- 1 + } + x <- cbind(x, x2) + } > if (par2 == 'Include Quarterly Dummies'){ + x2 <- array(0, dim=c(n,3), dimnames=list(1:n, paste('Q', seq(1:3), sep =''))) + for (i in 1:3){ + x2[seq(i,n,4),i] <- 1 + } + x <- cbind(x, x2) + } > k <- length(x[1,]) > if (par3 == 'Linear Trend'){ + x <- cbind(x, c(1:n)) + colnames(x)[k+1] <- 't' + } > x productie*dummy t 1 0.0 1 2 0.0 2 3 104.7 3 4 102.8 4 5 0.0 5 6 113.9 6 7 0.0 7 8 0.0 8 9 113.2 9 10 105.9 10 11 108.8 11 12 102.3 12 13 0.0 13 14 100.7 14 15 115.5 15 16 100.7 16 17 109.9 17 18 114.6 18 19 0.0 19 20 100.5 20 21 114.8 21 22 116.5 22 23 112.9 23 24 102.0 24 25 106.0 25 26 105.3 26 27 118.8 27 28 106.1 28 29 109.3 29 30 117.2 30 31 0.0 31 32 104.2 32 33 112.5 33 34 122.4 34 35 113.3 35 36 100.0 36 37 110.7 37 38 112.8 38 39 109.8 39 40 117.3 40 41 109.1 41 42 115.9 42 43 0.0 43 44 0.0 44 45 116.8 45 46 115.7 46 47 0.0 47 48 0.0 48 49 0.0 49 50 0.0 50 51 103.1 51 52 0.0 52 53 0.0 53 54 102.7 54 55 0.0 55 56 0.0 56 57 104.5 57 58 105.1 58 59 0.0 59 60 0.0 60 61 0.0 61 62 0.0 62 63 111.5 63 64 0.0 64 65 0.0 65 66 111.7 66 67 0.0 67 68 0.0 68 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) t 94.7631 -0.7853 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -93.98 -50.98 23.26 45.06 68.77 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 94.7631 12.7375 7.440 2.66e-10 *** t -0.7853 0.3209 -2.447 0.0171 * --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 51.94 on 66 degrees of freedom Multiple R-squared: 0.08319, Adjusted R-squared: 0.0693 F-statistic: 5.989 on 1 and 66 DF, p-value: 0.01706 > 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.80999677 0.3800065 0.1900032 [2,] 0.71673093 0.5665381 0.2832691 [3,] 0.84499726 0.3100055 0.1550027 [4,] 0.86411935 0.2717613 0.1358806 [5,] 0.86856733 0.2628653 0.1314327 [6,] 0.82127682 0.3574464 0.1787232 [7,] 0.75332006 0.4933599 0.2466799 [8,] 0.66917595 0.6616481 0.3308240 [9,] 0.86268708 0.2746258 0.1373129 [10,] 0.81331830 0.3733634 0.1866817 [11,] 0.75746091 0.4850782 0.2425391 [12,] 0.68733340 0.6253332 0.3126666 [13,] 0.60919237 0.7816153 0.3908076 [14,] 0.52712677 0.9457465 0.4728732 [15,] 0.81489796 0.3702041 0.1851020 [16,] 0.76181571 0.4763686 0.2381843 [17,] 0.70084447 0.5983111 0.2991555 [18,] 0.63244236 0.7351153 0.3675576 [19,] 0.55858106 0.8828379 0.4414189 [20,] 0.48832806 0.9766561 0.5116719 [21,] 0.41649488 0.8329898 0.5835051 [22,] 0.34859750 0.6971950 0.6514025 [23,] 0.28338329 0.5667666 0.7166167 [24,] 0.22794453 0.4558891 0.7720555 [25,] 0.17868459 0.3573692 0.8213154 [26,] 0.13695941 0.2739188 0.8630406 [27,] 0.40645286 0.8129057 0.5935471 [28,] 0.33939632 0.6787926 0.6606037 [29,] 0.27726773 0.5545355 0.7227323 [30,] 0.22693445 0.4538689 0.7730656 [31,] 0.18029803 0.3605961 0.8197020 [32,] 0.14120061 0.2824012 0.8587994 [33,] 0.10976368 0.2195274 0.8902363 [34,] 0.08637087 0.1727417 0.9136291 [35,] 0.06871293 0.1374259 0.9312871 [36,] 0.05973346 0.1194669 0.9402665 [37,] 0.05328915 0.1065783 0.9467108 [38,] 0.05695778 0.1139156 0.9430422 [39,] 0.12966432 0.2593286 0.8703357 [40,] 0.20694357 0.4138871 0.7930564 [41,] 0.22411906 0.4482381 0.7758809 [42,] 0.28319879 0.5663976 0.7168012 [43,] 0.33413741 0.6682748 0.6658626 [44,] 0.36520649 0.7304130 0.6347935 [45,] 0.38501395 0.7700279 0.6149861 [46,] 0.40278240 0.8055648 0.5972176 [47,] 0.40907369 0.8181474 0.5909263 [48,] 0.40424921 0.8084984 0.5957508 [49,] 0.40896894 0.8179379 0.5910311 [50,] 0.41065437 0.8213087 0.5893456 [51,] 0.39314365 0.7862873 0.6068563 [52,] 0.40054429 0.8010886 0.5994557 [53,] 0.39535441 0.7907088 0.6046456 [54,] 0.51385937 0.9722813 0.4861406 [55,] 0.42470468 0.8494094 0.5752953 [56,] 0.34107770 0.6821554 0.6589223 [57,] 0.28106421 0.5621284 0.7189358 [58,] 0.28823139 0.5764628 0.7117686 [59,] 0.30704920 0.6140984 0.6929508 > postscript(file="/var/www/rcomp/tmp/1iy4c1292746944.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/2t73f1292746944.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/3t73f1292746944.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/4t73f1292746944.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/5t73f1292746944.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 = 68 Frequency = 1 1 2 3 4 5 6 7 8 -93.97775 -93.19242 12.29292 11.17825 -90.83642 23.84891 -89.26576 -88.48042 9 10 11 12 13 14 15 16 25.50491 18.99024 22.67557 16.96091 -84.55376 16.93157 32.51690 18.50223 17 18 19 20 21 22 23 24 28.48757 33.97290 -79.84177 21.44356 36.52890 39.01423 36.19956 26.08489 25 26 27 28 29 30 31 32 30.87023 30.95556 45.24089 33.32622 37.31155 45.99689 -70.41778 34.56755 33 34 35 36 37 38 39 40 43.65288 54.33822 46.02355 33.50888 44.99421 47.87955 45.66488 53.95021 41 42 43 44 45 46 47 48 46.53554 54.12087 -60.99379 -60.20846 57.37687 57.06220 -57.85246 -57.06713 49 50 51 52 53 54 55 56 -56.28180 -55.49647 48.38887 -53.92580 -53.14047 50.34486 -51.56981 -50.78447 57 58 59 60 61 62 63 64 54.50086 55.88619 -48.42848 -47.64314 -46.85781 -46.07248 66.21285 -44.50182 65 66 67 68 -43.71648 68.76885 -42.14582 -41.36049 > postscript(file="/var/www/rcomp/tmp/63h201292746944.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 = 68 Frequency = 1 lag(myerror, k = 1) myerror 0 -93.97775 NA 1 -93.19242 -93.97775 2 12.29292 -93.19242 3 11.17825 12.29292 4 -90.83642 11.17825 5 23.84891 -90.83642 6 -89.26576 23.84891 7 -88.48042 -89.26576 8 25.50491 -88.48042 9 18.99024 25.50491 10 22.67557 18.99024 11 16.96091 22.67557 12 -84.55376 16.96091 13 16.93157 -84.55376 14 32.51690 16.93157 15 18.50223 32.51690 16 28.48757 18.50223 17 33.97290 28.48757 18 -79.84177 33.97290 19 21.44356 -79.84177 20 36.52890 21.44356 21 39.01423 36.52890 22 36.19956 39.01423 23 26.08489 36.19956 24 30.87023 26.08489 25 30.95556 30.87023 26 45.24089 30.95556 27 33.32622 45.24089 28 37.31155 33.32622 29 45.99689 37.31155 30 -70.41778 45.99689 31 34.56755 -70.41778 32 43.65288 34.56755 33 54.33822 43.65288 34 46.02355 54.33822 35 33.50888 46.02355 36 44.99421 33.50888 37 47.87955 44.99421 38 45.66488 47.87955 39 53.95021 45.66488 40 46.53554 53.95021 41 54.12087 46.53554 42 -60.99379 54.12087 43 -60.20846 -60.99379 44 57.37687 -60.20846 45 57.06220 57.37687 46 -57.85246 57.06220 47 -57.06713 -57.85246 48 -56.28180 -57.06713 49 -55.49647 -56.28180 50 48.38887 -55.49647 51 -53.92580 48.38887 52 -53.14047 -53.92580 53 50.34486 -53.14047 54 -51.56981 50.34486 55 -50.78447 -51.56981 56 54.50086 -50.78447 57 55.88619 54.50086 58 -48.42848 55.88619 59 -47.64314 -48.42848 60 -46.85781 -47.64314 61 -46.07248 -46.85781 62 66.21285 -46.07248 63 -44.50182 66.21285 64 -43.71648 -44.50182 65 68.76885 -43.71648 66 -42.14582 68.76885 67 -41.36049 -42.14582 68 NA -41.36049 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -93.19242 -93.97775 [2,] 12.29292 -93.19242 [3,] 11.17825 12.29292 [4,] -90.83642 11.17825 [5,] 23.84891 -90.83642 [6,] -89.26576 23.84891 [7,] -88.48042 -89.26576 [8,] 25.50491 -88.48042 [9,] 18.99024 25.50491 [10,] 22.67557 18.99024 [11,] 16.96091 22.67557 [12,] -84.55376 16.96091 [13,] 16.93157 -84.55376 [14,] 32.51690 16.93157 [15,] 18.50223 32.51690 [16,] 28.48757 18.50223 [17,] 33.97290 28.48757 [18,] -79.84177 33.97290 [19,] 21.44356 -79.84177 [20,] 36.52890 21.44356 [21,] 39.01423 36.52890 [22,] 36.19956 39.01423 [23,] 26.08489 36.19956 [24,] 30.87023 26.08489 [25,] 30.95556 30.87023 [26,] 45.24089 30.95556 [27,] 33.32622 45.24089 [28,] 37.31155 33.32622 [29,] 45.99689 37.31155 [30,] -70.41778 45.99689 [31,] 34.56755 -70.41778 [32,] 43.65288 34.56755 [33,] 54.33822 43.65288 [34,] 46.02355 54.33822 [35,] 33.50888 46.02355 [36,] 44.99421 33.50888 [37,] 47.87955 44.99421 [38,] 45.66488 47.87955 [39,] 53.95021 45.66488 [40,] 46.53554 53.95021 [41,] 54.12087 46.53554 [42,] -60.99379 54.12087 [43,] -60.20846 -60.99379 [44,] 57.37687 -60.20846 [45,] 57.06220 57.37687 [46,] -57.85246 57.06220 [47,] -57.06713 -57.85246 [48,] -56.28180 -57.06713 [49,] -55.49647 -56.28180 [50,] 48.38887 -55.49647 [51,] -53.92580 48.38887 [52,] -53.14047 -53.92580 [53,] 50.34486 -53.14047 [54,] -51.56981 50.34486 [55,] -50.78447 -51.56981 [56,] 54.50086 -50.78447 [57,] 55.88619 54.50086 [58,] -48.42848 55.88619 [59,] -47.64314 -48.42848 [60,] -46.85781 -47.64314 [61,] -46.07248 -46.85781 [62,] 66.21285 -46.07248 [63,] -44.50182 66.21285 [64,] -43.71648 -44.50182 [65,] 68.76885 -43.71648 [66,] -42.14582 68.76885 [67,] -41.36049 -42.14582 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -93.19242 -93.97775 2 12.29292 -93.19242 3 11.17825 12.29292 4 -90.83642 11.17825 5 23.84891 -90.83642 6 -89.26576 23.84891 7 -88.48042 -89.26576 8 25.50491 -88.48042 9 18.99024 25.50491 10 22.67557 18.99024 11 16.96091 22.67557 12 -84.55376 16.96091 13 16.93157 -84.55376 14 32.51690 16.93157 15 18.50223 32.51690 16 28.48757 18.50223 17 33.97290 28.48757 18 -79.84177 33.97290 19 21.44356 -79.84177 20 36.52890 21.44356 21 39.01423 36.52890 22 36.19956 39.01423 23 26.08489 36.19956 24 30.87023 26.08489 25 30.95556 30.87023 26 45.24089 30.95556 27 33.32622 45.24089 28 37.31155 33.32622 29 45.99689 37.31155 30 -70.41778 45.99689 31 34.56755 -70.41778 32 43.65288 34.56755 33 54.33822 43.65288 34 46.02355 54.33822 35 33.50888 46.02355 36 44.99421 33.50888 37 47.87955 44.99421 38 45.66488 47.87955 39 53.95021 45.66488 40 46.53554 53.95021 41 54.12087 46.53554 42 -60.99379 54.12087 43 -60.20846 -60.99379 44 57.37687 -60.20846 45 57.06220 57.37687 46 -57.85246 57.06220 47 -57.06713 -57.85246 48 -56.28180 -57.06713 49 -55.49647 -56.28180 50 48.38887 -55.49647 51 -53.92580 48.38887 52 -53.14047 -53.92580 53 50.34486 -53.14047 54 -51.56981 50.34486 55 -50.78447 -51.56981 56 54.50086 -50.78447 57 55.88619 54.50086 58 -48.42848 55.88619 59 -47.64314 -48.42848 60 -46.85781 -47.64314 61 -46.07248 -46.85781 62 66.21285 -46.07248 63 -44.50182 66.21285 64 -43.71648 -44.50182 65 68.76885 -43.71648 66 -42.14582 68.76885 67 -41.36049 -42.14582 > 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/7wqkl1292746944.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/8wqkl1292746944.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/9wqkl1292746944.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/10phj51292746944.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/11shzt1292746944.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/12d0yz1292746944.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/13aae81292746944.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/14k1db1292746944.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/15okth1292746944.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/162cr81292746944.tab") + } > > try(system("convert tmp/1iy4c1292746944.ps tmp/1iy4c1292746944.png",intern=TRUE)) character(0) > try(system("convert tmp/2t73f1292746944.ps tmp/2t73f1292746944.png",intern=TRUE)) character(0) > try(system("convert tmp/3t73f1292746944.ps tmp/3t73f1292746944.png",intern=TRUE)) character(0) > try(system("convert tmp/4t73f1292746944.ps tmp/4t73f1292746944.png",intern=TRUE)) character(0) > try(system("convert tmp/5t73f1292746944.ps tmp/5t73f1292746944.png",intern=TRUE)) character(0) > try(system("convert tmp/63h201292746944.ps tmp/63h201292746944.png",intern=TRUE)) character(0) > try(system("convert tmp/7wqkl1292746944.ps tmp/7wqkl1292746944.png",intern=TRUE)) character(0) > try(system("convert tmp/8wqkl1292746944.ps tmp/8wqkl1292746944.png",intern=TRUE)) character(0) > try(system("convert tmp/9wqkl1292746944.ps tmp/9wqkl1292746944.png",intern=TRUE)) character(0) > try(system("convert tmp/10phj51292746944.ps tmp/10phj51292746944.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 3.290 1.580 4.854