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(5.7,97.33,6.1,97.89,6,98.69,5.9,99.01,5.8,99.18,5.7,98.45,5.6,98.13,5.4,98.29,5.4,99.1,5.5,99.26,5.6,98.85,5.7,98.05,5.9,98.53,6.1,99.34,6,100.14,5.8,100.3,5.8,100.22,5.7,99.9,5.5,99.58,5.3,99.9,5.2,100.78,5.2,100.78,5,100.46,5.1,100.06,5.1,100.28,5.2,100.78,4.9,101.58,4.8,102.06,4.5,102.02,4.5,101.68,4.4,101.32,4.4,101.81,4.2,102.3,4.1,102.12,3.9,102.1,3.8,101.75,3.9,101.5,4.2,102.16,4.1,103.47,3.8,104.05,3.6,104.09,3.7,103.55,3.5,102.77,3.4,102.89,3.1,103.6,3.1,103.76,3.1,103.92,3.2,103.35,3.3,103.32,3.5,104.2,3.6,105.44,3.5,105.81,3.3,106.25,3.2,105.94,3.1,105.82,3.2,105.96,3,106.49,3,106.32,3.1,105.88,3.4,105.07),dim=c(2,60),dimnames=list(c('manwerk','infl'),1:60)) > y <- array(NA,dim=c(2,60),dimnames=list(c('manwerk','infl'),1:60)) > 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 manwerk infl 1 5.7 97.33 2 6.1 97.89 3 6.0 98.69 4 5.9 99.01 5 5.8 99.18 6 5.7 98.45 7 5.6 98.13 8 5.4 98.29 9 5.4 99.10 10 5.5 99.26 11 5.6 98.85 12 5.7 98.05 13 5.9 98.53 14 6.1 99.34 15 6.0 100.14 16 5.8 100.30 17 5.8 100.22 18 5.7 99.90 19 5.5 99.58 20 5.3 99.90 21 5.2 100.78 22 5.2 100.78 23 5.0 100.46 24 5.1 100.06 25 5.1 100.28 26 5.2 100.78 27 4.9 101.58 28 4.8 102.06 29 4.5 102.02 30 4.5 101.68 31 4.4 101.32 32 4.4 101.81 33 4.2 102.30 34 4.1 102.12 35 3.9 102.10 36 3.8 101.75 37 3.9 101.50 38 4.2 102.16 39 4.1 103.47 40 3.8 104.05 41 3.6 104.09 42 3.7 103.55 43 3.5 102.77 44 3.4 102.89 45 3.1 103.60 46 3.1 103.76 47 3.1 103.92 48 3.2 103.35 49 3.3 103.32 50 3.5 104.20 51 3.6 105.44 52 3.5 105.81 53 3.3 106.25 54 3.2 105.94 55 3.1 105.82 56 3.2 105.96 57 3.0 106.49 58 3.0 106.32 59 3.1 105.88 60 3.4 105.07 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) infl 43.1130 -0.3792 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -0.72829 -0.24552 0.04882 0.29882 0.86118 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 43.11299 2.10718 20.46 <2e-16 *** infl -0.37921 0.02069 -18.32 <2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.409 on 58 degrees of freedom Multiple R-squared: 0.8527, Adjusted R-squared: 0.8502 F-statistic: 335.8 on 1 and 58 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.097470049 0.1949400981 0.9025299509 [2,] 0.056338289 0.1126765782 0.9436617109 [3,] 0.044176119 0.0883522384 0.9558238808 [4,] 0.079482599 0.1589651978 0.9205174011 [5,] 0.090292777 0.1805855533 0.9097072233 [6,] 0.058116392 0.1162327836 0.9418836082 [7,] 0.031349449 0.0626988980 0.9686505510 [8,] 0.016169327 0.0323386539 0.9838306730 [9,] 0.010137033 0.0202740658 0.9898629671 [10,] 0.017015719 0.0340314382 0.9829842809 [11,] 0.017047411 0.0340948221 0.9829525889 [12,] 0.013438248 0.0268764964 0.9865617518 [13,] 0.011481455 0.0229629095 0.9885185453 [14,] 0.009258935 0.0185178709 0.9907410645 [15,] 0.009241817 0.0184836330 0.9907581835 [16,] 0.017218962 0.0344379232 0.9827810384 [17,] 0.033261593 0.0665231851 0.9667384075 [18,] 0.046450473 0.0929009462 0.9535495269 [19,] 0.078125473 0.1562509461 0.9218745270 [20,] 0.094008646 0.1880172923 0.9059913539 [21,] 0.106324859 0.2126497187 0.8936751406 [22,] 0.136920964 0.2738419281 0.8630790359 [23,] 0.197809917 0.3956198347 0.8021900826 [24,] 0.311940481 0.6238809615 0.6880595193 [25,] 0.428713867 0.8574277350 0.5712861325 [26,] 0.544521496 0.9109570080 0.4554785040 [27,] 0.663161129 0.6736777411 0.3368388706 [28,] 0.751214302 0.4975713968 0.2487856984 [29,] 0.806394579 0.3872108424 0.1936054212 [30,] 0.847688303 0.3046233949 0.1523116974 [31,] 0.877008880 0.2459822407 0.1229911203 [32,] 0.911804766 0.1763904681 0.0881952340 [33,] 0.926765089 0.1464698227 0.0732349114 [34,] 0.956768084 0.0864638312 0.0432319156 [35,] 0.990496297 0.0190074066 0.0095037033 [36,] 0.995481507 0.0090369864 0.0045184932 [37,] 0.995196935 0.0096061294 0.0048030647 [38,] 0.997373169 0.0052536615 0.0026268308 [39,] 0.997401346 0.0051973083 0.0025986542 [40,] 0.996727184 0.0065456312 0.0032728156 [41,] 0.995949331 0.0081013376 0.0040506688 [42,] 0.994880214 0.0102395711 0.0051197855 [43,] 0.994014321 0.0119713581 0.0059856791 [44,] 0.993753066 0.0124938681 0.0062469340 [45,] 0.996467694 0.0070646126 0.0035323063 [46,] 0.994737679 0.0105246420 0.0052623210 [47,] 0.995882748 0.0082345039 0.0041172519 [48,] 0.998789633 0.0024207341 0.0012103670 [49,] 0.999824347 0.0003513058 0.0001756529 [50,] 0.999262427 0.0014751457 0.0007375729 [51,] 0.996990607 0.0060187862 0.0030093931 > postscript(file="/var/www/html/rcomp/tmp/1trp21258653813.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/rcomp/tmp/2usio1258653813.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/rcomp/tmp/3ur8q1258653813.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/rcomp/tmp/4caaq1258653813.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/rcomp/tmp/5xbzg1258653813.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 = 60 Frequency = 1 1 2 3 4 5 6 -0.50440047 0.10795757 0.31132621 0.33267367 0.29713950 -0.07968438 7 8 9 10 11 12 -0.30103183 -0.44035811 -0.13319736 0.02747637 -0.02800006 -0.23136870 13 14 15 16 17 18 0.15065248 0.65781323 0.86118187 0.72185560 0.69151874 0.47017128 19 20 21 22 23 24 0.14882382 0.07017128 0.30387678 0.30387678 -0.01747067 -0.06915499 25 26 27 28 29 30 0.01427138 0.30387678 0.30724542 0.38926661 0.07409818 -0.05483350 31 32 33 34 35 36 -0.29134938 -0.10553609 -0.11972280 -0.28798074 -0.49556496 -0.72828874 37 38 39 40 41 42 -0.72309144 -0.17281231 0.22395384 0.14389610 -0.04093547 -0.14570930 43 44 45 46 47 48 -0.64149372 -0.69598843 -0.72674876 -0.66607503 -0.60540130 -0.72155146 49 50 51 52 53 54 -0.63292778 -0.09922228 0.47099911 0.51130711 0.47815986 0.26060451 55 56 57 58 59 60 0.11509921 0.26818873 0.26917045 0.20470461 0.13785186 0.13069111 > postscript(file="/var/www/html/rcomp/tmp/60bpo1258653813.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 = 60 Frequency = 1 lag(myerror, k = 1) myerror 0 -0.50440047 NA 1 0.10795757 -0.50440047 2 0.31132621 0.10795757 3 0.33267367 0.31132621 4 0.29713950 0.33267367 5 -0.07968438 0.29713950 6 -0.30103183 -0.07968438 7 -0.44035811 -0.30103183 8 -0.13319736 -0.44035811 9 0.02747637 -0.13319736 10 -0.02800006 0.02747637 11 -0.23136870 -0.02800006 12 0.15065248 -0.23136870 13 0.65781323 0.15065248 14 0.86118187 0.65781323 15 0.72185560 0.86118187 16 0.69151874 0.72185560 17 0.47017128 0.69151874 18 0.14882382 0.47017128 19 0.07017128 0.14882382 20 0.30387678 0.07017128 21 0.30387678 0.30387678 22 -0.01747067 0.30387678 23 -0.06915499 -0.01747067 24 0.01427138 -0.06915499 25 0.30387678 0.01427138 26 0.30724542 0.30387678 27 0.38926661 0.30724542 28 0.07409818 0.38926661 29 -0.05483350 0.07409818 30 -0.29134938 -0.05483350 31 -0.10553609 -0.29134938 32 -0.11972280 -0.10553609 33 -0.28798074 -0.11972280 34 -0.49556496 -0.28798074 35 -0.72828874 -0.49556496 36 -0.72309144 -0.72828874 37 -0.17281231 -0.72309144 38 0.22395384 -0.17281231 39 0.14389610 0.22395384 40 -0.04093547 0.14389610 41 -0.14570930 -0.04093547 42 -0.64149372 -0.14570930 43 -0.69598843 -0.64149372 44 -0.72674876 -0.69598843 45 -0.66607503 -0.72674876 46 -0.60540130 -0.66607503 47 -0.72155146 -0.60540130 48 -0.63292778 -0.72155146 49 -0.09922228 -0.63292778 50 0.47099911 -0.09922228 51 0.51130711 0.47099911 52 0.47815986 0.51130711 53 0.26060451 0.47815986 54 0.11509921 0.26060451 55 0.26818873 0.11509921 56 0.26917045 0.26818873 57 0.20470461 0.26917045 58 0.13785186 0.20470461 59 0.13069111 0.13785186 60 NA 0.13069111 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 0.10795757 -0.50440047 [2,] 0.31132621 0.10795757 [3,] 0.33267367 0.31132621 [4,] 0.29713950 0.33267367 [5,] -0.07968438 0.29713950 [6,] -0.30103183 -0.07968438 [7,] -0.44035811 -0.30103183 [8,] -0.13319736 -0.44035811 [9,] 0.02747637 -0.13319736 [10,] -0.02800006 0.02747637 [11,] -0.23136870 -0.02800006 [12,] 0.15065248 -0.23136870 [13,] 0.65781323 0.15065248 [14,] 0.86118187 0.65781323 [15,] 0.72185560 0.86118187 [16,] 0.69151874 0.72185560 [17,] 0.47017128 0.69151874 [18,] 0.14882382 0.47017128 [19,] 0.07017128 0.14882382 [20,] 0.30387678 0.07017128 [21,] 0.30387678 0.30387678 [22,] -0.01747067 0.30387678 [23,] -0.06915499 -0.01747067 [24,] 0.01427138 -0.06915499 [25,] 0.30387678 0.01427138 [26,] 0.30724542 0.30387678 [27,] 0.38926661 0.30724542 [28,] 0.07409818 0.38926661 [29,] -0.05483350 0.07409818 [30,] -0.29134938 -0.05483350 [31,] -0.10553609 -0.29134938 [32,] -0.11972280 -0.10553609 [33,] -0.28798074 -0.11972280 [34,] -0.49556496 -0.28798074 [35,] -0.72828874 -0.49556496 [36,] -0.72309144 -0.72828874 [37,] -0.17281231 -0.72309144 [38,] 0.22395384 -0.17281231 [39,] 0.14389610 0.22395384 [40,] -0.04093547 0.14389610 [41,] -0.14570930 -0.04093547 [42,] -0.64149372 -0.14570930 [43,] -0.69598843 -0.64149372 [44,] -0.72674876 -0.69598843 [45,] -0.66607503 -0.72674876 [46,] -0.60540130 -0.66607503 [47,] -0.72155146 -0.60540130 [48,] -0.63292778 -0.72155146 [49,] -0.09922228 -0.63292778 [50,] 0.47099911 -0.09922228 [51,] 0.51130711 0.47099911 [52,] 0.47815986 0.51130711 [53,] 0.26060451 0.47815986 [54,] 0.11509921 0.26060451 [55,] 0.26818873 0.11509921 [56,] 0.26917045 0.26818873 [57,] 0.20470461 0.26917045 [58,] 0.13785186 0.20470461 [59,] 0.13069111 0.13785186 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 0.10795757 -0.50440047 2 0.31132621 0.10795757 3 0.33267367 0.31132621 4 0.29713950 0.33267367 5 -0.07968438 0.29713950 6 -0.30103183 -0.07968438 7 -0.44035811 -0.30103183 8 -0.13319736 -0.44035811 9 0.02747637 -0.13319736 10 -0.02800006 0.02747637 11 -0.23136870 -0.02800006 12 0.15065248 -0.23136870 13 0.65781323 0.15065248 14 0.86118187 0.65781323 15 0.72185560 0.86118187 16 0.69151874 0.72185560 17 0.47017128 0.69151874 18 0.14882382 0.47017128 19 0.07017128 0.14882382 20 0.30387678 0.07017128 21 0.30387678 0.30387678 22 -0.01747067 0.30387678 23 -0.06915499 -0.01747067 24 0.01427138 -0.06915499 25 0.30387678 0.01427138 26 0.30724542 0.30387678 27 0.38926661 0.30724542 28 0.07409818 0.38926661 29 -0.05483350 0.07409818 30 -0.29134938 -0.05483350 31 -0.10553609 -0.29134938 32 -0.11972280 -0.10553609 33 -0.28798074 -0.11972280 34 -0.49556496 -0.28798074 35 -0.72828874 -0.49556496 36 -0.72309144 -0.72828874 37 -0.17281231 -0.72309144 38 0.22395384 -0.17281231 39 0.14389610 0.22395384 40 -0.04093547 0.14389610 41 -0.14570930 -0.04093547 42 -0.64149372 -0.14570930 43 -0.69598843 -0.64149372 44 -0.72674876 -0.69598843 45 -0.66607503 -0.72674876 46 -0.60540130 -0.66607503 47 -0.72155146 -0.60540130 48 -0.63292778 -0.72155146 49 -0.09922228 -0.63292778 50 0.47099911 -0.09922228 51 0.51130711 0.47099911 52 0.47815986 0.51130711 53 0.26060451 0.47815986 54 0.11509921 0.26060451 55 0.26818873 0.11509921 56 0.26917045 0.26818873 57 0.20470461 0.26917045 58 0.13785186 0.20470461 59 0.13069111 0.13785186 > 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/7s0831258653813.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/rcomp/tmp/8f5yb1258653813.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/rcomp/tmp/9x4an1258653813.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/rcomp/tmp/1060ur1258653813.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/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/11ydic1258653813.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/12uhgi1258653813.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/13mivc1258653813.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/14qwxg1258653813.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/15127y1258653813.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/168ety1258653813.tab") + } > > system("convert tmp/1trp21258653813.ps tmp/1trp21258653813.png") > system("convert tmp/2usio1258653813.ps tmp/2usio1258653813.png") > system("convert tmp/3ur8q1258653813.ps tmp/3ur8q1258653813.png") > system("convert tmp/4caaq1258653813.ps tmp/4caaq1258653813.png") > system("convert tmp/5xbzg1258653813.ps tmp/5xbzg1258653813.png") > system("convert tmp/60bpo1258653813.ps tmp/60bpo1258653813.png") > system("convert tmp/7s0831258653813.ps tmp/7s0831258653813.png") > system("convert tmp/8f5yb1258653813.ps tmp/8f5yb1258653813.png") > system("convert tmp/9x4an1258653813.ps tmp/9x4an1258653813.png") > system("convert tmp/1060ur1258653813.ps tmp/1060ur1258653813.png") > > > proc.time() user system elapsed 2.453 1.548 2.856