R version 2.9.0 (2009-04-17) Copyright (C) 2009 The R Foundation for Statistical Computing ISBN 3-900051-07-0 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > x <- array(list(172.69,104.31,172.98,103.88,172.98,103.88,172.89,103.86,173.38,103.89,173.20,103.98,173.24,103.98,172.86,104.29,172.86,104.29,172.74,104.24,172.28,103.98,171.05,103.54,171.07,103.44,171.07,103.32,171.07,103.30,171.11,103.26,170.72,103.14,170.49,103.11,170.48,102.91,170.48,103.23,170.48,103.23,170.57,103.14,170.39,102.91,170.04,102.42,169.67,102.10,169.57,102.07,169.57,102.06,169.53,101.98,169.24,101.83,169.29,101.75,169.21,101.56,168.58,101.66,168.58,101.65,168.55,101.61,168.46,101.52,167.39,101.31,167.16,101.19,167.16,101.11,167.16,101.10,167.17,101.07,166.52,100.98,166.35,100.93,166.19,100.92,166.19,101.02,166.19,101.01,166.07,100.97,166.64,100.89,166.26,100.62,166.44,100.53,166.27,100.48,166.27,100.48,166.30,100.47,165.97,100.52,164.58,100.49,164.28,100.47,163.93,100.44),dim=c(2,56),dimnames=list(c('Gemconsprijsblazers','consumptieindexkleding'),1:56)) > y <- array(NA,dim=c(2,56),dimnames=list(c('Gemconsprijsblazers','consumptieindexkleding'),1:56)) > 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 Gemconsprijsblazers consumptieindexkleding 1 172.69 104.31 2 172.98 103.88 3 172.98 103.88 4 172.89 103.86 5 173.38 103.89 6 173.20 103.98 7 173.24 103.98 8 172.86 104.29 9 172.86 104.29 10 172.74 104.24 11 172.28 103.98 12 171.05 103.54 13 171.07 103.44 14 171.07 103.32 15 171.07 103.30 16 171.11 103.26 17 170.72 103.14 18 170.49 103.11 19 170.48 102.91 20 170.48 103.23 21 170.48 103.23 22 170.57 103.14 23 170.39 102.91 24 170.04 102.42 25 169.67 102.10 26 169.57 102.07 27 169.57 102.06 28 169.53 101.98 29 169.24 101.83 30 169.29 101.75 31 169.21 101.56 32 168.58 101.66 33 168.58 101.65 34 168.55 101.61 35 168.46 101.52 36 167.39 101.31 37 167.16 101.19 38 167.16 101.11 39 167.16 101.10 40 167.17 101.07 41 166.52 100.98 42 166.35 100.93 43 166.19 100.92 44 166.19 101.02 45 166.19 101.01 46 166.07 100.97 47 166.64 100.89 48 166.26 100.62 49 166.44 100.53 50 166.27 100.48 51 166.27 100.48 52 166.30 100.47 53 165.97 100.52 54 164.58 100.49 55 164.28 100.47 56 163.93 100.44 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) consumptieindexkleding -31.517 1.964 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -1.785136 -0.439613 0.006655 0.513839 1.295541 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) -31.51702 6.72097 -4.689 1.90e-05 *** consumptieindexkleding 1.96368 0.06577 29.858 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.6422 on 54 degrees of freedom Multiple R-squared: 0.9429, Adjusted R-squared: 0.9418 F-statistic: 891.5 on 1 and 54 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.0555280255 0.1110560509 0.9444720 [2,] 0.0256417491 0.0512834982 0.9743583 [3,] 0.0126649377 0.0253298754 0.9873351 [4,] 0.0038205558 0.0076411115 0.9961794 [5,] 0.0010602948 0.0021205895 0.9989397 [6,] 0.0003382406 0.0006764811 0.9996618 [7,] 0.0066633920 0.0133267840 0.9933366 [8,] 0.3353517024 0.6707034048 0.6646483 [9,] 0.3827301347 0.7654602695 0.6172699 [10,] 0.3177634264 0.6355268528 0.6822366 [11,] 0.2474029722 0.4948059444 0.7525970 [12,] 0.1809413932 0.3618827864 0.8190586 [13,] 0.1335218086 0.2670436171 0.8664782 [14,] 0.1060708127 0.2121416254 0.8939292 [15,] 0.0737943299 0.1475886597 0.9262057 [16,] 0.0838875101 0.1677750202 0.9161125 [17,] 0.1104633802 0.2209267603 0.8895366 [18,] 0.1349673242 0.2699346484 0.8650327 [19,] 0.1752167878 0.3504335756 0.8247832 [20,] 0.2244569032 0.4489138064 0.7755431 [21,] 0.2538349778 0.5076699556 0.7461650 [22,] 0.2354776928 0.4709553856 0.7645223 [23,] 0.2049173011 0.4098346022 0.7950827 [24,] 0.1741773656 0.3483547312 0.8258226 [25,] 0.1386069547 0.2772139094 0.8613930 [26,] 0.1218326439 0.2436652878 0.8781674 [27,] 0.1570978105 0.3141956211 0.8429022 [28,] 0.1173772449 0.2347544898 0.8826228 [29,] 0.0852758355 0.1705516709 0.9147242 [30,] 0.0618642809 0.1237285617 0.9381357 [31,] 0.0497271409 0.0994542819 0.9502729 [32,] 0.0465194934 0.0930389867 0.9534805 [33,] 0.0407365340 0.0814730679 0.9592635 [34,] 0.0320681775 0.0641363551 0.9679318 [35,] 0.0249059357 0.0498118714 0.9750941 [36,] 0.0204113069 0.0408226138 0.9795887 [37,] 0.0176706840 0.0353413680 0.9823293 [38,] 0.0147000832 0.0294001664 0.9852999 [39,] 0.0124852300 0.0249704601 0.9875148 [40,] 0.0118211543 0.0236423086 0.9881788 [41,] 0.0104141331 0.0208282662 0.9895859 [42,] 0.0127932510 0.0255865020 0.9872067 [43,] 0.0147217131 0.0294434263 0.9852783 [44,] 0.0198125215 0.0396250431 0.9801875 [45,] 0.0099187974 0.0198375949 0.9900812 [46,] 0.0117479240 0.0234958480 0.9882521 [47,] 0.0228626590 0.0457253180 0.9771373 > postscript(file="/var/www/html/rcomp/tmp/1lr6g1293184310.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(x[,1], type='l', main='Actuals and Interpolation', ylab='value of Actuals and Interpolation (dots)', xlab='time or index') > points(x[,1]-mysum$resid) > grid() > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/2lr6g1293184310.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(mysum$resid, type='b', pch=19, main='Residuals', ylab='value of Residuals', xlab='time or index') > grid() > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/3eini1293184310.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > hist(mysum$resid, main='Residual Histogram', xlab='values of Residuals') > grid() > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/4eini1293184310.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > densityplot(~mysum$resid,col='black',main='Residual Density Plot', xlab='values of Residuals') > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/5eini1293184310.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 = 56 Frequency = 1 1 2 3 4 5 6 -0.62458272 0.50980028 0.50980028 0.45907391 0.89016347 0.53343214 7 8 9 10 11 12 0.57343214 -0.41530909 -0.41530909 -0.43712502 -0.38656786 -0.75254805 13 14 15 16 17 18 -0.53617991 -0.30053814 -0.26126452 -0.14271726 -0.29707549 -0.46816505 19 20 21 22 23 24 -0.08542878 -0.71380682 -0.71380682 -0.44707549 -0.17542878 0.43677510 25 26 27 28 29 30 0.69515315 0.65406359 0.67370040 0.79079491 0.79534712 1.00244163 31 32 33 34 35 36 1.29554109 0.46917295 0.48880977 0.53735702 0.62408835 -0.03353856 37 38 39 40 41 42 -0.02789679 0.12919772 0.14883453 0.21774497 -0.25552370 -0.32733963 43 44 45 46 47 48 -0.46770282 -0.66407096 -0.64443415 -0.68588689 0.04120762 0.19140159 49 50 51 52 53 54 0.54813292 0.47631699 0.47631699 0.52595380 0.09776973 -1.23331983 55 56 -1.49404620 -1.78513576 > postscript(file="/var/www/html/rcomp/tmp/6ps5l1293184310.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 = 56 Frequency = 1 lag(myerror, k = 1) myerror 0 -0.62458272 NA 1 0.50980028 -0.62458272 2 0.50980028 0.50980028 3 0.45907391 0.50980028 4 0.89016347 0.45907391 5 0.53343214 0.89016347 6 0.57343214 0.53343214 7 -0.41530909 0.57343214 8 -0.41530909 -0.41530909 9 -0.43712502 -0.41530909 10 -0.38656786 -0.43712502 11 -0.75254805 -0.38656786 12 -0.53617991 -0.75254805 13 -0.30053814 -0.53617991 14 -0.26126452 -0.30053814 15 -0.14271726 -0.26126452 16 -0.29707549 -0.14271726 17 -0.46816505 -0.29707549 18 -0.08542878 -0.46816505 19 -0.71380682 -0.08542878 20 -0.71380682 -0.71380682 21 -0.44707549 -0.71380682 22 -0.17542878 -0.44707549 23 0.43677510 -0.17542878 24 0.69515315 0.43677510 25 0.65406359 0.69515315 26 0.67370040 0.65406359 27 0.79079491 0.67370040 28 0.79534712 0.79079491 29 1.00244163 0.79534712 30 1.29554109 1.00244163 31 0.46917295 1.29554109 32 0.48880977 0.46917295 33 0.53735702 0.48880977 34 0.62408835 0.53735702 35 -0.03353856 0.62408835 36 -0.02789679 -0.03353856 37 0.12919772 -0.02789679 38 0.14883453 0.12919772 39 0.21774497 0.14883453 40 -0.25552370 0.21774497 41 -0.32733963 -0.25552370 42 -0.46770282 -0.32733963 43 -0.66407096 -0.46770282 44 -0.64443415 -0.66407096 45 -0.68588689 -0.64443415 46 0.04120762 -0.68588689 47 0.19140159 0.04120762 48 0.54813292 0.19140159 49 0.47631699 0.54813292 50 0.47631699 0.47631699 51 0.52595380 0.47631699 52 0.09776973 0.52595380 53 -1.23331983 0.09776973 54 -1.49404620 -1.23331983 55 -1.78513576 -1.49404620 56 NA -1.78513576 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 0.50980028 -0.62458272 [2,] 0.50980028 0.50980028 [3,] 0.45907391 0.50980028 [4,] 0.89016347 0.45907391 [5,] 0.53343214 0.89016347 [6,] 0.57343214 0.53343214 [7,] -0.41530909 0.57343214 [8,] -0.41530909 -0.41530909 [9,] -0.43712502 -0.41530909 [10,] -0.38656786 -0.43712502 [11,] -0.75254805 -0.38656786 [12,] -0.53617991 -0.75254805 [13,] -0.30053814 -0.53617991 [14,] -0.26126452 -0.30053814 [15,] -0.14271726 -0.26126452 [16,] -0.29707549 -0.14271726 [17,] -0.46816505 -0.29707549 [18,] -0.08542878 -0.46816505 [19,] -0.71380682 -0.08542878 [20,] -0.71380682 -0.71380682 [21,] -0.44707549 -0.71380682 [22,] -0.17542878 -0.44707549 [23,] 0.43677510 -0.17542878 [24,] 0.69515315 0.43677510 [25,] 0.65406359 0.69515315 [26,] 0.67370040 0.65406359 [27,] 0.79079491 0.67370040 [28,] 0.79534712 0.79079491 [29,] 1.00244163 0.79534712 [30,] 1.29554109 1.00244163 [31,] 0.46917295 1.29554109 [32,] 0.48880977 0.46917295 [33,] 0.53735702 0.48880977 [34,] 0.62408835 0.53735702 [35,] -0.03353856 0.62408835 [36,] -0.02789679 -0.03353856 [37,] 0.12919772 -0.02789679 [38,] 0.14883453 0.12919772 [39,] 0.21774497 0.14883453 [40,] -0.25552370 0.21774497 [41,] -0.32733963 -0.25552370 [42,] -0.46770282 -0.32733963 [43,] -0.66407096 -0.46770282 [44,] -0.64443415 -0.66407096 [45,] -0.68588689 -0.64443415 [46,] 0.04120762 -0.68588689 [47,] 0.19140159 0.04120762 [48,] 0.54813292 0.19140159 [49,] 0.47631699 0.54813292 [50,] 0.47631699 0.47631699 [51,] 0.52595380 0.47631699 [52,] 0.09776973 0.52595380 [53,] -1.23331983 0.09776973 [54,] -1.49404620 -1.23331983 [55,] -1.78513576 -1.49404620 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 0.50980028 -0.62458272 2 0.50980028 0.50980028 3 0.45907391 0.50980028 4 0.89016347 0.45907391 5 0.53343214 0.89016347 6 0.57343214 0.53343214 7 -0.41530909 0.57343214 8 -0.41530909 -0.41530909 9 -0.43712502 -0.41530909 10 -0.38656786 -0.43712502 11 -0.75254805 -0.38656786 12 -0.53617991 -0.75254805 13 -0.30053814 -0.53617991 14 -0.26126452 -0.30053814 15 -0.14271726 -0.26126452 16 -0.29707549 -0.14271726 17 -0.46816505 -0.29707549 18 -0.08542878 -0.46816505 19 -0.71380682 -0.08542878 20 -0.71380682 -0.71380682 21 -0.44707549 -0.71380682 22 -0.17542878 -0.44707549 23 0.43677510 -0.17542878 24 0.69515315 0.43677510 25 0.65406359 0.69515315 26 0.67370040 0.65406359 27 0.79079491 0.67370040 28 0.79534712 0.79079491 29 1.00244163 0.79534712 30 1.29554109 1.00244163 31 0.46917295 1.29554109 32 0.48880977 0.46917295 33 0.53735702 0.48880977 34 0.62408835 0.53735702 35 -0.03353856 0.62408835 36 -0.02789679 -0.03353856 37 0.12919772 -0.02789679 38 0.14883453 0.12919772 39 0.21774497 0.14883453 40 -0.25552370 0.21774497 41 -0.32733963 -0.25552370 42 -0.46770282 -0.32733963 43 -0.66407096 -0.46770282 44 -0.64443415 -0.66407096 45 -0.68588689 -0.64443415 46 0.04120762 -0.68588689 47 0.19140159 0.04120762 48 0.54813292 0.19140159 49 0.47631699 0.54813292 50 0.47631699 0.47631699 51 0.52595380 0.47631699 52 0.09776973 0.52595380 53 -1.23331983 0.09776973 54 -1.49404620 -1.23331983 55 -1.78513576 -1.49404620 > plot(z,main=paste('Residual Lag plot, lowess, and regression line'), ylab='values of Residuals', xlab='lagged values of Residuals') > lines(lowess(z)) > abline(lm(z)) > grid() > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/7ps5l1293184310.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > acf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Autocorrelation Function') > grid() > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/8hjmo1293184310.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > pacf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Partial Autocorrelation Function') > grid() > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/9hjmo1293184310.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > opar <- par(mfrow = c(2,2), oma = c(0, 0, 1.1, 0)) > plot(mylm, las = 1, sub='Residual Diagnostics') > par(opar) > dev.off() null device 1 > if (n > n25) { + postscript(file="/var/www/html/rcomp/tmp/10ss391293184310.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) + plot(kp3:nmkm3,gqarr[,2], main='Goldfeld-Quandt test',ylab='2-sided p-value',xlab='breakpoint') + grid() + dev.off() + } null device 1 > > #Note: the /var/www/html/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/html/rcomp/createtable") > > a<-table.start() > a<-table.row.start(a) > a<-table.element(a, 'Multiple Linear Regression - Estimated Regression Equation', 1, TRUE) > a<-table.row.end(a) > myeq <- colnames(x)[1] > myeq <- paste(myeq, '[t] = ', sep='') > for (i in 1:k){ + if (mysum$coefficients[i,1] > 0) myeq <- paste(myeq, '+', '') + myeq <- paste(myeq, mysum$coefficients[i,1], sep=' ') + if (rownames(mysum$coefficients)[i] != '(Intercept)') { + myeq <- paste(myeq, rownames(mysum$coefficients)[i], sep='') + if (rownames(mysum$coefficients)[i] != 't') myeq <- paste(myeq, '[t]', sep='') + } + } > myeq <- paste(myeq, ' + e[t]') > a<-table.row.start(a) > a<-table.element(a, myeq) > a<-table.row.end(a) > a<-table.end(a) > table.save(a,file="/var/www/html/rcomp/tmp/11vb1x1293184310.tab") > a<-table.start() > a<-table.row.start(a) > a<-table.element(a,hyperlink('http://www.xycoon.com/ols1.htm','Multiple Linear Regression - Ordinary Least Squares',''), 6, TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'Variable',header=TRUE) > a<-table.element(a,'Parameter',header=TRUE) > a<-table.element(a,'S.D.',header=TRUE) > a<-table.element(a,'T-STAT
H0: parameter = 0',header=TRUE) > a<-table.element(a,'2-tail p-value',header=TRUE) > a<-table.element(a,'1-tail p-value',header=TRUE) > a<-table.row.end(a) > for (i in 1:k){ + a<-table.row.start(a) + a<-table.element(a,rownames(mysum$coefficients)[i],header=TRUE) + a<-table.element(a,mysum$coefficients[i,1]) + a<-table.element(a, round(mysum$coefficients[i,2],6)) + a<-table.element(a, round(mysum$coefficients[i,3],4)) + a<-table.element(a, round(mysum$coefficients[i,4],6)) + a<-table.element(a, round(mysum$coefficients[i,4]/2,6)) + a<-table.row.end(a) + } > a<-table.end(a) > table.save(a,file="/var/www/html/rcomp/tmp/12ok101293184310.tab") > a<-table.start() > a<-table.row.start(a) > a<-table.element(a, 'Multiple Linear Regression - Regression Statistics', 2, TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Multiple R',1,TRUE) > a<-table.element(a, sqrt(mysum$r.squared)) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'R-squared',1,TRUE) > a<-table.element(a, mysum$r.squared) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Adjusted R-squared',1,TRUE) > a<-table.element(a, mysum$adj.r.squared) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'F-TEST (value)',1,TRUE) > a<-table.element(a, mysum$fstatistic[1]) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'F-TEST (DF numerator)',1,TRUE) > a<-table.element(a, mysum$fstatistic[2]) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'F-TEST (DF denominator)',1,TRUE) > a<-table.element(a, mysum$fstatistic[3]) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'p-value',1,TRUE) > a<-table.element(a, 1-pf(mysum$fstatistic[1],mysum$fstatistic[2],mysum$fstatistic[3])) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Multiple Linear Regression - Residual Statistics', 2, TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Residual Standard Deviation',1,TRUE) > a<-table.element(a, mysum$sigma) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Sum Squared Residuals',1,TRUE) > a<-table.element(a, sum(myerror*myerror)) > a<-table.row.end(a) > a<-table.end(a) > table.save(a,file="/var/www/html/rcomp/tmp/13vlyu1293184310.tab") > a<-table.start() > a<-table.row.start(a) > a<-table.element(a, 'Multiple Linear Regression - Actuals, Interpolation, and Residuals', 4, TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Time or Index', 1, TRUE) > a<-table.element(a, 'Actuals', 1, TRUE) > a<-table.element(a, 'Interpolation
Forecast', 1, TRUE) > a<-table.element(a, 'Residuals
Prediction Error', 1, TRUE) > a<-table.row.end(a) > for (i in 1:n) { + a<-table.row.start(a) + a<-table.element(a,i, 1, TRUE) + a<-table.element(a,x[i]) + a<-table.element(a,x[i]-mysum$resid[i]) + a<-table.element(a,mysum$resid[i]) + a<-table.row.end(a) + } > a<-table.end(a) > table.save(a,file="/var/www/html/rcomp/tmp/146cfx1293184310.tab") > if (n > n25) { + a<-table.start() + a<-table.row.start(a) + a<-table.element(a,'Goldfeld-Quandt test for Heteroskedasticity',4,TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'p-values',header=TRUE) + a<-table.element(a,'Alternative Hypothesis',3,header=TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'breakpoint index',header=TRUE) + a<-table.element(a,'greater',header=TRUE) + a<-table.element(a,'2-sided',header=TRUE) + a<-table.element(a,'less',header=TRUE) + a<-table.row.end(a) + for (mypoint in kp3:nmkm3) { + a<-table.row.start(a) + a<-table.element(a,mypoint,header=TRUE) + a<-table.element(a,gqarr[mypoint-kp3+1,1]) + a<-table.element(a,gqarr[mypoint-kp3+1,2]) + a<-table.element(a,gqarr[mypoint-kp3+1,3]) + a<-table.row.end(a) + } + a<-table.end(a) + table.save(a,file="/var/www/html/rcomp/tmp/15rve21293184310.tab") + a<-table.start() + a<-table.row.start(a) + a<-table.element(a,'Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity',4,TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'Description',header=TRUE) + a<-table.element(a,'# significant tests',header=TRUE) + a<-table.element(a,'% significant tests',header=TRUE) + a<-table.element(a,'OK/NOK',header=TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'1% type I error level',header=TRUE) + a<-table.element(a,numsignificant1) + a<-table.element(a,numsignificant1/numgqtests) + if (numsignificant1/numgqtests < 0.01) dum <- 'OK' else dum <- 'NOK' + a<-table.element(a,dum) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'5% type I error level',header=TRUE) + a<-table.element(a,numsignificant5) + a<-table.element(a,numsignificant5/numgqtests) + if (numsignificant5/numgqtests < 0.05) dum <- 'OK' else dum <- 'NOK' + a<-table.element(a,dum) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'10% type I error level',header=TRUE) + a<-table.element(a,numsignificant10) + a<-table.element(a,numsignificant10/numgqtests) + if (numsignificant10/numgqtests < 0.1) dum <- 'OK' else dum <- 'NOK' + a<-table.element(a,dum) + a<-table.row.end(a) + a<-table.end(a) + table.save(a,file="/var/www/html/rcomp/tmp/1655tt1293184310.tab") + } > > try(system("convert tmp/1lr6g1293184310.ps tmp/1lr6g1293184310.png",intern=TRUE)) character(0) > try(system("convert tmp/2lr6g1293184310.ps tmp/2lr6g1293184310.png",intern=TRUE)) character(0) > try(system("convert tmp/3eini1293184310.ps tmp/3eini1293184310.png",intern=TRUE)) character(0) > try(system("convert tmp/4eini1293184310.ps tmp/4eini1293184310.png",intern=TRUE)) character(0) > try(system("convert tmp/5eini1293184310.ps tmp/5eini1293184310.png",intern=TRUE)) character(0) > try(system("convert tmp/6ps5l1293184310.ps tmp/6ps5l1293184310.png",intern=TRUE)) character(0) > try(system("convert tmp/7ps5l1293184310.ps tmp/7ps5l1293184310.png",intern=TRUE)) character(0) > try(system("convert tmp/8hjmo1293184310.ps tmp/8hjmo1293184310.png",intern=TRUE)) character(0) > try(system("convert tmp/9hjmo1293184310.ps tmp/9hjmo1293184310.png",intern=TRUE)) character(0) > try(system("convert tmp/10ss391293184310.ps tmp/10ss391293184310.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.423 1.615 6.700