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(8.1,92.9,7.7,107.7,7.5,103.5,7.6,91.1,7.8,79.8,7.8,71.9,7.8,82.9,7.5,90.1,7.5,100.7,7.1,90.7,7.5,108.8,7.5,44.1,7.6,93.6,7.7,107.4,7.7,96.5,7.9,93.6,8.1,76.5,8.2,76.7,8.2,84,8.2,103.3,7.9,88.5,7.3,99,6.9,105.9,6.6,44.7,6.7,94,6.9,107.1,7,104.8,7.1,102.5,7.2,77.7,7.1,85.2,6.9,91.3,7,106.5,6.8,92.4,6.4,97.5,6.7,107,6.6,51.1,6.4,98.6,6.3,102.2,6.2,114.3,6.5,99.4,6.8,72.5,6.8,92.3,6.4,99.4,6.1,85.9,5.8,109.4,6.1,97.6,7.2,104.7,7.3,56.9,6.9,86.7,6.1,108.5,5.8,103.4,6.2,86.2,7.1,71,7.7,75.9,7.9,87.1,7.7,102,7.4,88.5,7.5,87.8,8,100.8,8.1,50.6,8,85.9),dim=c(2,61),dimnames=list(c('Werkloosheidsgraad','Bruto_index'),1:61)) > y <- array(NA,dim=c(2,61),dimnames=list(c('Werkloosheidsgraad','Bruto_index'),1:61)) > 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 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 Werkloosheidsgraad Bruto_index t 1 8.1 92.9 1 2 7.7 107.7 2 3 7.5 103.5 3 4 7.6 91.1 4 5 7.8 79.8 5 6 7.8 71.9 6 7 7.8 82.9 7 8 7.5 90.1 8 9 7.5 100.7 9 10 7.1 90.7 10 11 7.5 108.8 11 12 7.5 44.1 12 13 7.6 93.6 13 14 7.7 107.4 14 15 7.7 96.5 15 16 7.9 93.6 16 17 8.1 76.5 17 18 8.2 76.7 18 19 8.2 84.0 19 20 8.2 103.3 20 21 7.9 88.5 21 22 7.3 99.0 22 23 6.9 105.9 23 24 6.6 44.7 24 25 6.7 94.0 25 26 6.9 107.1 26 27 7.0 104.8 27 28 7.1 102.5 28 29 7.2 77.7 29 30 7.1 85.2 30 31 6.9 91.3 31 32 7.0 106.5 32 33 6.8 92.4 33 34 6.4 97.5 34 35 6.7 107.0 35 36 6.6 51.1 36 37 6.4 98.6 37 38 6.3 102.2 38 39 6.2 114.3 39 40 6.5 99.4 40 41 6.8 72.5 41 42 6.8 92.3 42 43 6.4 99.4 43 44 6.1 85.9 44 45 5.8 109.4 45 46 6.1 97.6 46 47 7.2 104.7 47 48 7.3 56.9 48 49 6.9 86.7 49 50 6.1 108.5 50 51 5.8 103.4 51 52 6.2 86.2 52 53 7.1 71.0 53 54 7.7 75.9 54 55 7.9 87.1 55 56 7.7 102.0 56 57 7.4 88.5 57 58 7.5 87.8 58 59 8.0 100.8 59 60 8.1 50.6 60 61 8.0 85.9 61 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) Bruto_index t 8.54364 -0.01014 -0.01419 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -1.150103 -0.427163 -0.007493 0.443575 1.315031 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 8.543643 0.469041 18.215 < 2e-16 *** Bruto_index -0.010136 0.004804 -2.110 0.03917 * t -0.014186 0.004404 -3.221 0.00209 ** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.6047 on 58 degrees of freedom Multiple R-squared: 0.1958, Adjusted R-squared: 0.1681 F-statistic: 7.063 on 2 and 58 DF, p-value: 0.001798 > 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,] 2.166959e-03 0.0043339179 0.9978330 [2,] 6.922696e-03 0.0138453913 0.9930773 [3,] 1.546820e-03 0.0030936407 0.9984532 [4,] 6.043792e-04 0.0012087583 0.9993956 [5,] 5.809191e-04 0.0011618382 0.9994191 [6,] 6.664171e-04 0.0013328341 0.9993336 [7,] 2.023476e-04 0.0004046952 0.9997977 [8,] 1.560914e-04 0.0003121828 0.9998439 [9,] 1.661408e-04 0.0003322815 0.9998339 [10,] 9.576628e-05 0.0001915326 0.9999042 [11,] 1.178626e-04 0.0002357251 0.9998821 [12,] 2.232092e-04 0.0004464185 0.9997768 [13,] 3.773188e-04 0.0007546375 0.9996227 [14,] 5.302848e-04 0.0010605697 0.9994697 [15,] 1.039210e-03 0.0020784203 0.9989608 [16,] 1.047578e-03 0.0020951550 0.9989524 [17,] 3.155591e-03 0.0063111817 0.9968444 [18,] 1.445657e-02 0.0289131314 0.9855434 [19,] 7.308408e-02 0.1461681698 0.9269159 [20,] 1.023311e-01 0.2046622598 0.8976689 [21,] 1.018791e-01 0.2037581680 0.8981209 [22,] 9.474569e-02 0.1894913781 0.9052543 [23,] 9.321987e-02 0.1864397377 0.9067801 [24,] 8.081806e-02 0.1616361242 0.9191819 [25,] 7.515217e-02 0.1503043304 0.9248478 [26,] 7.047829e-02 0.1409565709 0.9295217 [27,] 9.448833e-02 0.1889766624 0.9055117 [28,] 9.890246e-02 0.1978049293 0.9010975 [29,] 1.039420e-01 0.2078840100 0.8960580 [30,] 1.299449e-01 0.2598898113 0.8700551 [31,] 9.889091e-02 0.1977818100 0.9011091 [32,] 8.975977e-02 0.1795195413 0.9102402 [33,] 7.912338e-02 0.1582467672 0.9208766 [34,] 7.303721e-02 0.1460744144 0.9269628 [35,] 6.535406e-02 0.1307081194 0.9346459 [36,] 5.673434e-02 0.1134686749 0.9432657 [37,] 7.986120e-02 0.1597223915 0.9201388 [38,] 7.166912e-02 0.1433382348 0.9283309 [39,] 5.244941e-02 0.1048988125 0.9475506 [40,] 4.444325e-02 0.0888864934 0.9555568 [41,] 2.986916e-02 0.0597383155 0.9701308 [42,] 1.601176e-01 0.3202351310 0.8398824 [43,] 2.357348e-01 0.4714696800 0.7642652 [44,] 3.161637e-01 0.6323273595 0.6838363 [45,] 2.312205e-01 0.4624410201 0.7687795 [46,] 3.803099e-01 0.7606198512 0.6196901 [47,] 8.120002e-01 0.3759996593 0.1879998 [48,] 8.655764e-01 0.2688472361 0.1344236 [49,] 8.130749e-01 0.3738502744 0.1869251 [50,] 8.559544e-01 0.2880912323 0.1440456 > postscript(file="/var/www/html/rcomp/tmp/1emmb1261134723.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/2g8ew1261134723.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/32cqg1261134723.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/4powo1261134723.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/5frb21261134723.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 = 61 Frequency = 1 1 2 3 4 5 6 0.512187714 0.276387786 0.048001772 0.036499658 0.136147265 0.070257645 7 8 9 10 11 12 0.195940500 -0.016893862 0.104734549 -0.382440902 0.215208333 -0.426412324 13 14 15 16 17 18 0.189510758 0.443574721 0.347276771 0.532067700 0.572925870 0.689138739 19 20 21 22 23 24 0.777317988 0.987130554 0.551301777 0.071916577 -0.243958618 -1.150102891 25 26 27 28 29 30 -0.536207030 -0.189238345 -0.098365750 -0.007493155 -0.144683031 -0.154476560 31 32 33 34 35 36 -0.278460643 -0.010206127 -0.338939628 -0.673059821 -0.262581130 -0.915004021 37 38 39 40 41 42 -0.619353158 -0.668677515 -0.631844939 -0.468687328 -0.427163035 -0.212282413 43 44 45 46 47 48 -0.526130386 -0.948782221 -0.996397994 -0.801818442 0.384333585 0.014013183 49 50 51 52 53 54 -0.069745097 -0.634592256 -0.972100769 -0.732256210 0.027860568 0.691713153 55 56 57 58 59 60 1.019423230 0.984636914 0.561985079 0.669075449 1.315030524 0.920383459 61 1.192373782 > postscript(file="/var/www/html/rcomp/tmp/6rlsz1261134723.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 = 61 Frequency = 1 lag(myerror, k = 1) myerror 0 0.512187714 NA 1 0.276387786 0.512187714 2 0.048001772 0.276387786 3 0.036499658 0.048001772 4 0.136147265 0.036499658 5 0.070257645 0.136147265 6 0.195940500 0.070257645 7 -0.016893862 0.195940500 8 0.104734549 -0.016893862 9 -0.382440902 0.104734549 10 0.215208333 -0.382440902 11 -0.426412324 0.215208333 12 0.189510758 -0.426412324 13 0.443574721 0.189510758 14 0.347276771 0.443574721 15 0.532067700 0.347276771 16 0.572925870 0.532067700 17 0.689138739 0.572925870 18 0.777317988 0.689138739 19 0.987130554 0.777317988 20 0.551301777 0.987130554 21 0.071916577 0.551301777 22 -0.243958618 0.071916577 23 -1.150102891 -0.243958618 24 -0.536207030 -1.150102891 25 -0.189238345 -0.536207030 26 -0.098365750 -0.189238345 27 -0.007493155 -0.098365750 28 -0.144683031 -0.007493155 29 -0.154476560 -0.144683031 30 -0.278460643 -0.154476560 31 -0.010206127 -0.278460643 32 -0.338939628 -0.010206127 33 -0.673059821 -0.338939628 34 -0.262581130 -0.673059821 35 -0.915004021 -0.262581130 36 -0.619353158 -0.915004021 37 -0.668677515 -0.619353158 38 -0.631844939 -0.668677515 39 -0.468687328 -0.631844939 40 -0.427163035 -0.468687328 41 -0.212282413 -0.427163035 42 -0.526130386 -0.212282413 43 -0.948782221 -0.526130386 44 -0.996397994 -0.948782221 45 -0.801818442 -0.996397994 46 0.384333585 -0.801818442 47 0.014013183 0.384333585 48 -0.069745097 0.014013183 49 -0.634592256 -0.069745097 50 -0.972100769 -0.634592256 51 -0.732256210 -0.972100769 52 0.027860568 -0.732256210 53 0.691713153 0.027860568 54 1.019423230 0.691713153 55 0.984636914 1.019423230 56 0.561985079 0.984636914 57 0.669075449 0.561985079 58 1.315030524 0.669075449 59 0.920383459 1.315030524 60 1.192373782 0.920383459 61 NA 1.192373782 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 0.276387786 0.512187714 [2,] 0.048001772 0.276387786 [3,] 0.036499658 0.048001772 [4,] 0.136147265 0.036499658 [5,] 0.070257645 0.136147265 [6,] 0.195940500 0.070257645 [7,] -0.016893862 0.195940500 [8,] 0.104734549 -0.016893862 [9,] -0.382440902 0.104734549 [10,] 0.215208333 -0.382440902 [11,] -0.426412324 0.215208333 [12,] 0.189510758 -0.426412324 [13,] 0.443574721 0.189510758 [14,] 0.347276771 0.443574721 [15,] 0.532067700 0.347276771 [16,] 0.572925870 0.532067700 [17,] 0.689138739 0.572925870 [18,] 0.777317988 0.689138739 [19,] 0.987130554 0.777317988 [20,] 0.551301777 0.987130554 [21,] 0.071916577 0.551301777 [22,] -0.243958618 0.071916577 [23,] -1.150102891 -0.243958618 [24,] -0.536207030 -1.150102891 [25,] -0.189238345 -0.536207030 [26,] -0.098365750 -0.189238345 [27,] -0.007493155 -0.098365750 [28,] -0.144683031 -0.007493155 [29,] -0.154476560 -0.144683031 [30,] -0.278460643 -0.154476560 [31,] -0.010206127 -0.278460643 [32,] -0.338939628 -0.010206127 [33,] -0.673059821 -0.338939628 [34,] -0.262581130 -0.673059821 [35,] -0.915004021 -0.262581130 [36,] -0.619353158 -0.915004021 [37,] -0.668677515 -0.619353158 [38,] -0.631844939 -0.668677515 [39,] -0.468687328 -0.631844939 [40,] -0.427163035 -0.468687328 [41,] -0.212282413 -0.427163035 [42,] -0.526130386 -0.212282413 [43,] -0.948782221 -0.526130386 [44,] -0.996397994 -0.948782221 [45,] -0.801818442 -0.996397994 [46,] 0.384333585 -0.801818442 [47,] 0.014013183 0.384333585 [48,] -0.069745097 0.014013183 [49,] -0.634592256 -0.069745097 [50,] -0.972100769 -0.634592256 [51,] -0.732256210 -0.972100769 [52,] 0.027860568 -0.732256210 [53,] 0.691713153 0.027860568 [54,] 1.019423230 0.691713153 [55,] 0.984636914 1.019423230 [56,] 0.561985079 0.984636914 [57,] 0.669075449 0.561985079 [58,] 1.315030524 0.669075449 [59,] 0.920383459 1.315030524 [60,] 1.192373782 0.920383459 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 0.276387786 0.512187714 2 0.048001772 0.276387786 3 0.036499658 0.048001772 4 0.136147265 0.036499658 5 0.070257645 0.136147265 6 0.195940500 0.070257645 7 -0.016893862 0.195940500 8 0.104734549 -0.016893862 9 -0.382440902 0.104734549 10 0.215208333 -0.382440902 11 -0.426412324 0.215208333 12 0.189510758 -0.426412324 13 0.443574721 0.189510758 14 0.347276771 0.443574721 15 0.532067700 0.347276771 16 0.572925870 0.532067700 17 0.689138739 0.572925870 18 0.777317988 0.689138739 19 0.987130554 0.777317988 20 0.551301777 0.987130554 21 0.071916577 0.551301777 22 -0.243958618 0.071916577 23 -1.150102891 -0.243958618 24 -0.536207030 -1.150102891 25 -0.189238345 -0.536207030 26 -0.098365750 -0.189238345 27 -0.007493155 -0.098365750 28 -0.144683031 -0.007493155 29 -0.154476560 -0.144683031 30 -0.278460643 -0.154476560 31 -0.010206127 -0.278460643 32 -0.338939628 -0.010206127 33 -0.673059821 -0.338939628 34 -0.262581130 -0.673059821 35 -0.915004021 -0.262581130 36 -0.619353158 -0.915004021 37 -0.668677515 -0.619353158 38 -0.631844939 -0.668677515 39 -0.468687328 -0.631844939 40 -0.427163035 -0.468687328 41 -0.212282413 -0.427163035 42 -0.526130386 -0.212282413 43 -0.948782221 -0.526130386 44 -0.996397994 -0.948782221 45 -0.801818442 -0.996397994 46 0.384333585 -0.801818442 47 0.014013183 0.384333585 48 -0.069745097 0.014013183 49 -0.634592256 -0.069745097 50 -0.972100769 -0.634592256 51 -0.732256210 -0.972100769 52 0.027860568 -0.732256210 53 0.691713153 0.027860568 54 1.019423230 0.691713153 55 0.984636914 1.019423230 56 0.561985079 0.984636914 57 0.669075449 0.561985079 58 1.315030524 0.669075449 59 0.920383459 1.315030524 60 1.192373782 0.920383459 > 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/7nyk01261134723.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/8gs3i1261134723.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/9j0ta1261134723.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/10laam1261134723.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/11e2e71261134723.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/125itr1261134723.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/13rt531261134723.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/14x2if1261134723.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/156vef1261134723.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/16erep1261134723.tab") + } > > try(system("convert tmp/1emmb1261134723.ps tmp/1emmb1261134723.png",intern=TRUE)) character(0) > try(system("convert tmp/2g8ew1261134723.ps tmp/2g8ew1261134723.png",intern=TRUE)) character(0) > try(system("convert tmp/32cqg1261134723.ps tmp/32cqg1261134723.png",intern=TRUE)) character(0) > try(system("convert tmp/4powo1261134723.ps tmp/4powo1261134723.png",intern=TRUE)) character(0) > try(system("convert tmp/5frb21261134723.ps tmp/5frb21261134723.png",intern=TRUE)) character(0) > try(system("convert tmp/6rlsz1261134723.ps tmp/6rlsz1261134723.png",intern=TRUE)) character(0) > try(system("convert tmp/7nyk01261134723.ps tmp/7nyk01261134723.png",intern=TRUE)) character(0) > try(system("convert tmp/8gs3i1261134723.ps tmp/8gs3i1261134723.png",intern=TRUE)) character(0) > try(system("convert tmp/9j0ta1261134723.ps tmp/9j0ta1261134723.png",intern=TRUE)) character(0) > try(system("convert tmp/10laam1261134723.ps tmp/10laam1261134723.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.456 1.561 3.491