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.9,1.4,8.8,1.2,8.3,1,7.5,1.7,7.2,2.4,7.4,2,8.8,2.1,9.3,2,9.3,1.8,8.7,2.7,8.2,2.3,8.3,1.9,8.5,2,8.6,2.3,8.5,2.8,8.2,2.4,8.1,2.3,7.9,2.7,8.6,2.7,8.7,2.9,8.7,3,8.5,2.2,8.4,2.3,8.5,2.8,8.7,2.8,8.7,2.8,8.6,2.2,8.5,2.6,8.3,2.8,8,2.5,8.2,2.4,8.1,2.3,8.1,1.9,8,1.7,7.9,2,7.9,2.1,8,1.7,8,1.8,7.9,1.8,8,1.8,7.7,1.3,7.2,1.3,7.5,1.3,7.3,1.2,7,1.4,7,2.2,7,2.9,7.2,3.1,7.3,3.5,7.1,3.6,6.8,4.4,6.4,4.1,6.1,5.1,6.5,5.8,7.7,5.9,7.9,5.4,7.5,5.5,6.9,4.8,6.6,3.2,6.9,2.7),dim=c(2,60),dimnames=list(c('werkloosheid','inflatie'),1:60)) > y <- array(NA,dim=c(2,60),dimnames=list(c('werkloosheid','inflatie'),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 = '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 werkloosheid inflatie t 1 8.9 1.4 1 2 8.8 1.2 2 3 8.3 1.0 3 4 7.5 1.7 4 5 7.2 2.4 5 6 7.4 2.0 6 7 8.8 2.1 7 8 9.3 2.0 8 9 9.3 1.8 9 10 8.7 2.7 10 11 8.2 2.3 11 12 8.3 1.9 12 13 8.5 2.0 13 14 8.6 2.3 14 15 8.5 2.8 15 16 8.2 2.4 16 17 8.1 2.3 17 18 7.9 2.7 18 19 8.6 2.7 19 20 8.7 2.9 20 21 8.7 3.0 21 22 8.5 2.2 22 23 8.4 2.3 23 24 8.5 2.8 24 25 8.7 2.8 25 26 8.7 2.8 26 27 8.6 2.2 27 28 8.5 2.6 28 29 8.3 2.8 29 30 8.0 2.5 30 31 8.2 2.4 31 32 8.1 2.3 32 33 8.1 1.9 33 34 8.0 1.7 34 35 7.9 2.0 35 36 7.9 2.1 36 37 8.0 1.7 37 38 8.0 1.8 38 39 7.9 1.8 39 40 8.0 1.8 40 41 7.7 1.3 41 42 7.2 1.3 42 43 7.5 1.3 43 44 7.3 1.2 44 45 7.0 1.4 45 46 7.0 2.2 46 47 7.0 2.9 47 48 7.2 3.1 48 49 7.3 3.5 49 50 7.1 3.6 50 51 6.8 4.4 51 52 6.4 4.1 52 53 6.1 5.1 53 54 6.5 5.8 54 55 7.7 5.9 55 56 7.9 5.4 56 57 7.5 5.5 57 58 6.9 4.8 58 59 6.6 3.2 59 60 6.9 2.7 60 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) inflatie t 8.88296 -0.01403 -0.03081 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -1.4953 -0.2482 0.1084 0.3293 0.8180 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 8.882963 0.167938 52.894 < 2e-16 *** inflatie -0.014029 0.068795 -0.204 0.839 t -0.030808 0.004597 -6.702 9.98e-09 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.5117 on 57 degrees of freedom Multiple R-squared: 0.5422, Adjusted R-squared: 0.5262 F-statistic: 33.76 on 2 and 57 DF, p-value: 2.130e-10 > 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.3323098 0.664619673 0.667690163 [2,] 0.9894722 0.021055548 0.010527774 [3,] 0.9973923 0.005215353 0.002607676 [4,] 0.9952099 0.009580266 0.004790133 [5,] 0.9928535 0.014293053 0.007146527 [6,] 0.9957330 0.008534041 0.004267021 [7,] 0.9976856 0.004628896 0.002314448 [8,] 0.9964294 0.007141167 0.003570583 [9,] 0.9933897 0.013220582 0.006610291 [10,] 0.9889665 0.022066950 0.011033475 [11,] 0.9894600 0.021079980 0.010539990 [12,] 0.9922939 0.015412128 0.007706064 [13,] 0.9966993 0.006601422 0.003300711 [14,] 0.9948422 0.010315693 0.005157846 [15,] 0.9922359 0.015528143 0.007764071 [16,] 0.9879881 0.024023869 0.012011935 [17,] 0.9825785 0.034842900 0.017421450 [18,] 0.9761955 0.047609017 0.023804509 [19,] 0.9638596 0.072280826 0.036140413 [20,] 0.9467948 0.106410353 0.053205177 [21,] 0.9249660 0.150067965 0.075033982 [22,] 0.9000387 0.199922502 0.099961251 [23,] 0.8669349 0.266130271 0.133065136 [24,] 0.8298820 0.340235941 0.170117970 [25,] 0.8251514 0.349697264 0.174848632 [26,] 0.7839291 0.432141858 0.216070929 [27,] 0.7409640 0.518072099 0.259036050 [28,] 0.6884079 0.623184205 0.311592103 [29,] 0.6304226 0.739154896 0.369577448 [30,] 0.5710697 0.857860676 0.428930338 [31,] 0.5050018 0.989996422 0.494998211 [32,] 0.4415563 0.883112592 0.558443704 [33,] 0.3929947 0.785989360 0.607005320 [34,] 0.3512999 0.702599708 0.648700146 [35,] 0.3629543 0.725908569 0.637045716 [36,] 0.3449823 0.689964508 0.655017746 [37,] 0.3129926 0.625985172 0.687007414 [38,] 0.2850170 0.570034043 0.714982979 [39,] 0.2514526 0.502905109 0.748547445 [40,] 0.2190795 0.438158970 0.780920515 [41,] 0.2014143 0.402828535 0.798585732 [42,] 0.1870368 0.374073556 0.812963222 [43,] 0.1697962 0.339592315 0.830203843 [44,] 0.1989569 0.397913768 0.801043116 [45,] 0.3014972 0.602994314 0.698502843 [46,] 0.3506363 0.701272599 0.649363700 [47,] 0.4563755 0.912751089 0.543624455 [48,] 0.3612170 0.722434082 0.638782959 [49,] 0.7346469 0.530706277 0.265353138 > postscript(file="/var/www/html/rcomp/tmp/1xpmc1258564161.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/2slbl1258564161.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/3v4ry1258564161.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/49brp1258564161.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/57g6b1258564161.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.067485654 -0.004512557 -0.476510768 -1.235882633 -1.495254497 -1.270058563 7 8 9 10 11 12 0.162152008 0.691556725 0.719558514 0.162992504 -0.311811561 -0.186615627 13 14 15 16 17 18 0.045594944 0.180611370 0.118433651 -0.156370415 -0.226965698 -0.390546345 19 20 21 22 23 24 0.340261299 0.473874798 0.506085369 0.325669594 0.257880165 0.395702446 25 26 27 28 29 30 0.626510090 0.657317734 0.579707813 0.516127167 0.349740665 0.076339527 31 32 33 34 35 36 0.305744244 0.235148960 0.260344895 0.188346684 0.123363110 0.155573681 37 38 39 40 41 42 0.280769616 0.312980187 0.243787831 0.374595475 0.098388482 -0.370803874 43 44 45 46 47 48 -0.039996230 -0.210591514 -0.476978015 -0.434946953 -0.394318817 -0.160705319 49 50 51 52 53 54 -0.024285966 -0.192075395 -0.450044332 -0.823445470 -1.078608553 -0.637980418 55 56 57 58 59 60 0.594230153 0.818023161 0.450233732 -0.128779115 -0.420418309 -0.096625302 > postscript(file="/var/www/html/rcomp/tmp/6aek41258564161.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.067485654 NA 1 -0.004512557 0.067485654 2 -0.476510768 -0.004512557 3 -1.235882633 -0.476510768 4 -1.495254497 -1.235882633 5 -1.270058563 -1.495254497 6 0.162152008 -1.270058563 7 0.691556725 0.162152008 8 0.719558514 0.691556725 9 0.162992504 0.719558514 10 -0.311811561 0.162992504 11 -0.186615627 -0.311811561 12 0.045594944 -0.186615627 13 0.180611370 0.045594944 14 0.118433651 0.180611370 15 -0.156370415 0.118433651 16 -0.226965698 -0.156370415 17 -0.390546345 -0.226965698 18 0.340261299 -0.390546345 19 0.473874798 0.340261299 20 0.506085369 0.473874798 21 0.325669594 0.506085369 22 0.257880165 0.325669594 23 0.395702446 0.257880165 24 0.626510090 0.395702446 25 0.657317734 0.626510090 26 0.579707813 0.657317734 27 0.516127167 0.579707813 28 0.349740665 0.516127167 29 0.076339527 0.349740665 30 0.305744244 0.076339527 31 0.235148960 0.305744244 32 0.260344895 0.235148960 33 0.188346684 0.260344895 34 0.123363110 0.188346684 35 0.155573681 0.123363110 36 0.280769616 0.155573681 37 0.312980187 0.280769616 38 0.243787831 0.312980187 39 0.374595475 0.243787831 40 0.098388482 0.374595475 41 -0.370803874 0.098388482 42 -0.039996230 -0.370803874 43 -0.210591514 -0.039996230 44 -0.476978015 -0.210591514 45 -0.434946953 -0.476978015 46 -0.394318817 -0.434946953 47 -0.160705319 -0.394318817 48 -0.024285966 -0.160705319 49 -0.192075395 -0.024285966 50 -0.450044332 -0.192075395 51 -0.823445470 -0.450044332 52 -1.078608553 -0.823445470 53 -0.637980418 -1.078608553 54 0.594230153 -0.637980418 55 0.818023161 0.594230153 56 0.450233732 0.818023161 57 -0.128779115 0.450233732 58 -0.420418309 -0.128779115 59 -0.096625302 -0.420418309 60 NA -0.096625302 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -0.004512557 0.067485654 [2,] -0.476510768 -0.004512557 [3,] -1.235882633 -0.476510768 [4,] -1.495254497 -1.235882633 [5,] -1.270058563 -1.495254497 [6,] 0.162152008 -1.270058563 [7,] 0.691556725 0.162152008 [8,] 0.719558514 0.691556725 [9,] 0.162992504 0.719558514 [10,] -0.311811561 0.162992504 [11,] -0.186615627 -0.311811561 [12,] 0.045594944 -0.186615627 [13,] 0.180611370 0.045594944 [14,] 0.118433651 0.180611370 [15,] -0.156370415 0.118433651 [16,] -0.226965698 -0.156370415 [17,] -0.390546345 -0.226965698 [18,] 0.340261299 -0.390546345 [19,] 0.473874798 0.340261299 [20,] 0.506085369 0.473874798 [21,] 0.325669594 0.506085369 [22,] 0.257880165 0.325669594 [23,] 0.395702446 0.257880165 [24,] 0.626510090 0.395702446 [25,] 0.657317734 0.626510090 [26,] 0.579707813 0.657317734 [27,] 0.516127167 0.579707813 [28,] 0.349740665 0.516127167 [29,] 0.076339527 0.349740665 [30,] 0.305744244 0.076339527 [31,] 0.235148960 0.305744244 [32,] 0.260344895 0.235148960 [33,] 0.188346684 0.260344895 [34,] 0.123363110 0.188346684 [35,] 0.155573681 0.123363110 [36,] 0.280769616 0.155573681 [37,] 0.312980187 0.280769616 [38,] 0.243787831 0.312980187 [39,] 0.374595475 0.243787831 [40,] 0.098388482 0.374595475 [41,] -0.370803874 0.098388482 [42,] -0.039996230 -0.370803874 [43,] -0.210591514 -0.039996230 [44,] -0.476978015 -0.210591514 [45,] -0.434946953 -0.476978015 [46,] -0.394318817 -0.434946953 [47,] -0.160705319 -0.394318817 [48,] -0.024285966 -0.160705319 [49,] -0.192075395 -0.024285966 [50,] -0.450044332 -0.192075395 [51,] -0.823445470 -0.450044332 [52,] -1.078608553 -0.823445470 [53,] -0.637980418 -1.078608553 [54,] 0.594230153 -0.637980418 [55,] 0.818023161 0.594230153 [56,] 0.450233732 0.818023161 [57,] -0.128779115 0.450233732 [58,] -0.420418309 -0.128779115 [59,] -0.096625302 -0.420418309 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -0.004512557 0.067485654 2 -0.476510768 -0.004512557 3 -1.235882633 -0.476510768 4 -1.495254497 -1.235882633 5 -1.270058563 -1.495254497 6 0.162152008 -1.270058563 7 0.691556725 0.162152008 8 0.719558514 0.691556725 9 0.162992504 0.719558514 10 -0.311811561 0.162992504 11 -0.186615627 -0.311811561 12 0.045594944 -0.186615627 13 0.180611370 0.045594944 14 0.118433651 0.180611370 15 -0.156370415 0.118433651 16 -0.226965698 -0.156370415 17 -0.390546345 -0.226965698 18 0.340261299 -0.390546345 19 0.473874798 0.340261299 20 0.506085369 0.473874798 21 0.325669594 0.506085369 22 0.257880165 0.325669594 23 0.395702446 0.257880165 24 0.626510090 0.395702446 25 0.657317734 0.626510090 26 0.579707813 0.657317734 27 0.516127167 0.579707813 28 0.349740665 0.516127167 29 0.076339527 0.349740665 30 0.305744244 0.076339527 31 0.235148960 0.305744244 32 0.260344895 0.235148960 33 0.188346684 0.260344895 34 0.123363110 0.188346684 35 0.155573681 0.123363110 36 0.280769616 0.155573681 37 0.312980187 0.280769616 38 0.243787831 0.312980187 39 0.374595475 0.243787831 40 0.098388482 0.374595475 41 -0.370803874 0.098388482 42 -0.039996230 -0.370803874 43 -0.210591514 -0.039996230 44 -0.476978015 -0.210591514 45 -0.434946953 -0.476978015 46 -0.394318817 -0.434946953 47 -0.160705319 -0.394318817 48 -0.024285966 -0.160705319 49 -0.192075395 -0.024285966 50 -0.450044332 -0.192075395 51 -0.823445470 -0.450044332 52 -1.078608553 -0.823445470 53 -0.637980418 -1.078608553 54 0.594230153 -0.637980418 55 0.818023161 0.594230153 56 0.450233732 0.818023161 57 -0.128779115 0.450233732 58 -0.420418309 -0.128779115 59 -0.096625302 -0.420418309 > 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/7ibmk1258564161.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/81spn1258564161.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/98uay1258564161.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/107tm61258564161.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/11wyrr1258564161.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/12i9d41258564161.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/13rbkg1258564161.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/14r6wc1258564161.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/1523of1258564161.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/16xazz1258564161.tab") + } > > system("convert tmp/1xpmc1258564161.ps tmp/1xpmc1258564161.png") > system("convert tmp/2slbl1258564161.ps tmp/2slbl1258564161.png") > system("convert tmp/3v4ry1258564161.ps tmp/3v4ry1258564161.png") > system("convert tmp/49brp1258564161.ps tmp/49brp1258564161.png") > system("convert tmp/57g6b1258564161.ps tmp/57g6b1258564161.png") > system("convert tmp/6aek41258564161.ps tmp/6aek41258564161.png") > system("convert tmp/7ibmk1258564161.ps tmp/7ibmk1258564161.png") > system("convert tmp/81spn1258564161.ps tmp/81spn1258564161.png") > system("convert tmp/98uay1258564161.ps tmp/98uay1258564161.png") > system("convert tmp/107tm61258564161.ps tmp/107tm61258564161.png") > > > proc.time() user system elapsed 2.420 1.541 2.873