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(95.1,117.1,97,118.7,112.7,126.5,102.9,127.5,97.4,134.6,111.4,131.8,87.4,135.9,96.8,142.7,114.1,141.7,110.3,153.4,103.9,145,101.6,137.7,94.6,148.3,95.9,152.2,104.7,169.4,102.8,168.6,98.1,161.1,113.9,174.1,80.9,179,95.7,190.6,113.2,190,105.9,181.6,108.8,174.8,102.3,180.5,99,196.8,100.7,193.8,115.5,197,100.7,216.3,109.9,221.4,114.6,217.9,85.4,229.7,100.5,227.4,114.8,204.2,116.5,196.6,112.9,198.8,102,207.5,106,190.7,105.3,201.6,118.8,210.5,106.1,223.5,109.3,223.8,117.2,231.2,92.5,244,104.2,234.7,112.5,250.2,122.4,265.7,113.3,287.6,100,283.3,110.7,295.4,112.8,312.3,109.8,333.8,117.3,347.7,109.1,383.2,115.9,407.1,96,413.6,99.8,362.7,116.8,321.9,115.7,239.4,99.4,191,94.3,159.7,91,163.4),dim=c(2,61),dimnames=list(c('tot.ind.prod.index','prijsindex.grondst.incl.energie'),1:61)) > y <- array(NA,dim=c(2,61),dimnames=list(c('tot.ind.prod.index','prijsindex.grondst.incl.energie'),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 = '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 tot.ind.prod.index prijsindex.grondst.incl.energie 1 95.1 117.1 2 97.0 118.7 3 112.7 126.5 4 102.9 127.5 5 97.4 134.6 6 111.4 131.8 7 87.4 135.9 8 96.8 142.7 9 114.1 141.7 10 110.3 153.4 11 103.9 145.0 12 101.6 137.7 13 94.6 148.3 14 95.9 152.2 15 104.7 169.4 16 102.8 168.6 17 98.1 161.1 18 113.9 174.1 19 80.9 179.0 20 95.7 190.6 21 113.2 190.0 22 105.9 181.6 23 108.8 174.8 24 102.3 180.5 25 99.0 196.8 26 100.7 193.8 27 115.5 197.0 28 100.7 216.3 29 109.9 221.4 30 114.6 217.9 31 85.4 229.7 32 100.5 227.4 33 114.8 204.2 34 116.5 196.6 35 112.9 198.8 36 102.0 207.5 37 106.0 190.7 38 105.3 201.6 39 118.8 210.5 40 106.1 223.5 41 109.3 223.8 42 117.2 231.2 43 92.5 244.0 44 104.2 234.7 45 112.5 250.2 46 122.4 265.7 47 113.3 287.6 48 100.0 283.3 49 110.7 295.4 50 112.8 312.3 51 109.8 333.8 52 117.3 347.7 53 109.1 383.2 54 115.9 407.1 55 96.0 413.6 56 99.8 362.7 57 116.8 321.9 58 115.7 239.4 59 99.4 191.0 60 94.3 159.7 61 91.0 163.4 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) prijsindex.grondst.incl.energie 97.06515 0.03818 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -22.9994 -5.2473 0.5378 7.3780 15.1904 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 97.06515 3.50988 27.66 <2e-16 *** prijsindex.grondst.incl.energie 0.03818 0.01564 2.44 0.0177 * --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 8.759 on 59 degrees of freedom Multiple R-squared: 0.09169, Adjusted R-squared: 0.0763 F-statistic: 5.956 on 1 and 59 DF, p-value: 0.01769 > 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.4885204 0.9770408 0.5114796 [2,] 0.4284589 0.8569178 0.5715411 [3,] 0.7155703 0.5688594 0.2844297 [4,] 0.6092867 0.7814265 0.3907133 [5,] 0.7026633 0.5946735 0.2973367 [6,] 0.6252079 0.7495843 0.3747921 [7,] 0.5216073 0.9567854 0.4783927 [8,] 0.4211908 0.8423816 0.5788092 [9,] 0.4401103 0.8802206 0.5598897 [10,] 0.4084542 0.8169085 0.5915458 [11,] 0.3212802 0.6425603 0.6787198 [12,] 0.2441190 0.4882381 0.7558810 [13,] 0.1983372 0.3966743 0.8016628 [14,] 0.2162736 0.4325471 0.7837264 [15,] 0.6464238 0.7071523 0.3535762 [16,] 0.6094202 0.7811596 0.3905798 [17,] 0.6542419 0.6915163 0.3457581 [18,] 0.5876542 0.8246917 0.4123458 [19,] 0.5390670 0.9218659 0.4609330 [20,] 0.4645228 0.9290457 0.5354772 [21,] 0.4153264 0.8306529 0.5846736 [22,] 0.3543912 0.7087823 0.6456088 [23,] 0.3970083 0.7940166 0.6029917 [24,] 0.3454354 0.6908707 0.6545646 [25,] 0.2938500 0.5877001 0.7061500 [26,] 0.2881895 0.5763790 0.7118105 [27,] 0.6121333 0.7757335 0.3878667 [28,] 0.5670736 0.8658528 0.4329264 [29,] 0.5807642 0.8384717 0.4192358 [30,] 0.6267399 0.7465201 0.3732601 [31,] 0.6085361 0.7829278 0.3914639 [32,] 0.5442587 0.9114826 0.4557413 [33,] 0.4681841 0.9363682 0.5318159 [34,] 0.3916736 0.7833472 0.6083264 [35,] 0.4829372 0.9658745 0.5170628 [36,] 0.4043061 0.8086122 0.5956939 [37,] 0.3403214 0.6806427 0.6596786 [38,] 0.3877174 0.7754347 0.6122826 [39,] 0.4953679 0.9907357 0.5046321 [40,] 0.4136000 0.8272000 0.5864000 [41,] 0.3678507 0.7357014 0.6321493 [42,] 0.5547321 0.8905357 0.4452679 [43,] 0.5142101 0.9715798 0.4857899 [44,] 0.4777619 0.9555237 0.5222381 [45,] 0.3991287 0.7982574 0.6008713 [46,] 0.3382229 0.6764457 0.6617771 [47,] 0.2540367 0.5080735 0.7459633 [48,] 0.2528873 0.5057745 0.7471127 [49,] 0.1749356 0.3498711 0.8250644 [50,] 0.1503188 0.3006375 0.8496812 [51,] 0.2490779 0.4981557 0.7509221 [52,] 0.7223288 0.5553424 0.2776712 > postscript(file="/var/www/html/rcomp/tmp/1e3qm1258643623.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/2ckcf1258643623.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/3vpk91258643623.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/4mlvi1258643623.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/570cj1258643623.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.436027343 -4.597115347 10.805080634 0.966900632 -4.804177385 6 7 8 9 10 9.302726621 -14.853811388 -5.713435405 11.624744598 7.378038569 11 12 13 14 15 1.298750590 -0.722535393 -8.127243418 -6.976145428 1.167158531 16 17 18 19 20 -0.702297467 -5.115947449 10.187712519 -22.999369493 -8.642257521 21 22 23 24 25 8.880650481 1.901362501 5.060986518 -1.656639496 -5.578973536 26 27 28 29 30 -3.764433528 10.913390464 -4.623483583 4.381798405 9.215428413 31 32 33 34 35 -20.435095615 -5.247281610 9.938494447 11.928662465 8.244666460 36 37 38 39 40 -2.987499561 1.653924479 0.537762453 13.697960431 0.501620400 41 42 43 44 45 3.690166399 11.307634381 -13.881069650 -1.825995627 5.882214335 46 47 48 49 50 15.190424298 5.254282245 -7.881543745 2.356478226 3.811236185 51 52 53 54 55 -0.009633867 6.959664100 -2.595725986 3.291771956 -16.856398059 56 57 58 59 60 -11.113035936 7.444708162 9.494558361 -4.957529522 -8.862495446 61 -12.303761455 > postscript(file="/var/www/html/rcomp/tmp/6vrex1258643623.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 -6.436027343 NA 1 -4.597115347 -6.436027343 2 10.805080634 -4.597115347 3 0.966900632 10.805080634 4 -4.804177385 0.966900632 5 9.302726621 -4.804177385 6 -14.853811388 9.302726621 7 -5.713435405 -14.853811388 8 11.624744598 -5.713435405 9 7.378038569 11.624744598 10 1.298750590 7.378038569 11 -0.722535393 1.298750590 12 -8.127243418 -0.722535393 13 -6.976145428 -8.127243418 14 1.167158531 -6.976145428 15 -0.702297467 1.167158531 16 -5.115947449 -0.702297467 17 10.187712519 -5.115947449 18 -22.999369493 10.187712519 19 -8.642257521 -22.999369493 20 8.880650481 -8.642257521 21 1.901362501 8.880650481 22 5.060986518 1.901362501 23 -1.656639496 5.060986518 24 -5.578973536 -1.656639496 25 -3.764433528 -5.578973536 26 10.913390464 -3.764433528 27 -4.623483583 10.913390464 28 4.381798405 -4.623483583 29 9.215428413 4.381798405 30 -20.435095615 9.215428413 31 -5.247281610 -20.435095615 32 9.938494447 -5.247281610 33 11.928662465 9.938494447 34 8.244666460 11.928662465 35 -2.987499561 8.244666460 36 1.653924479 -2.987499561 37 0.537762453 1.653924479 38 13.697960431 0.537762453 39 0.501620400 13.697960431 40 3.690166399 0.501620400 41 11.307634381 3.690166399 42 -13.881069650 11.307634381 43 -1.825995627 -13.881069650 44 5.882214335 -1.825995627 45 15.190424298 5.882214335 46 5.254282245 15.190424298 47 -7.881543745 5.254282245 48 2.356478226 -7.881543745 49 3.811236185 2.356478226 50 -0.009633867 3.811236185 51 6.959664100 -0.009633867 52 -2.595725986 6.959664100 53 3.291771956 -2.595725986 54 -16.856398059 3.291771956 55 -11.113035936 -16.856398059 56 7.444708162 -11.113035936 57 9.494558361 7.444708162 58 -4.957529522 9.494558361 59 -8.862495446 -4.957529522 60 -12.303761455 -8.862495446 61 NA -12.303761455 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -4.597115347 -6.436027343 [2,] 10.805080634 -4.597115347 [3,] 0.966900632 10.805080634 [4,] -4.804177385 0.966900632 [5,] 9.302726621 -4.804177385 [6,] -14.853811388 9.302726621 [7,] -5.713435405 -14.853811388 [8,] 11.624744598 -5.713435405 [9,] 7.378038569 11.624744598 [10,] 1.298750590 7.378038569 [11,] -0.722535393 1.298750590 [12,] -8.127243418 -0.722535393 [13,] -6.976145428 -8.127243418 [14,] 1.167158531 -6.976145428 [15,] -0.702297467 1.167158531 [16,] -5.115947449 -0.702297467 [17,] 10.187712519 -5.115947449 [18,] -22.999369493 10.187712519 [19,] -8.642257521 -22.999369493 [20,] 8.880650481 -8.642257521 [21,] 1.901362501 8.880650481 [22,] 5.060986518 1.901362501 [23,] -1.656639496 5.060986518 [24,] -5.578973536 -1.656639496 [25,] -3.764433528 -5.578973536 [26,] 10.913390464 -3.764433528 [27,] -4.623483583 10.913390464 [28,] 4.381798405 -4.623483583 [29,] 9.215428413 4.381798405 [30,] -20.435095615 9.215428413 [31,] -5.247281610 -20.435095615 [32,] 9.938494447 -5.247281610 [33,] 11.928662465 9.938494447 [34,] 8.244666460 11.928662465 [35,] -2.987499561 8.244666460 [36,] 1.653924479 -2.987499561 [37,] 0.537762453 1.653924479 [38,] 13.697960431 0.537762453 [39,] 0.501620400 13.697960431 [40,] 3.690166399 0.501620400 [41,] 11.307634381 3.690166399 [42,] -13.881069650 11.307634381 [43,] -1.825995627 -13.881069650 [44,] 5.882214335 -1.825995627 [45,] 15.190424298 5.882214335 [46,] 5.254282245 15.190424298 [47,] -7.881543745 5.254282245 [48,] 2.356478226 -7.881543745 [49,] 3.811236185 2.356478226 [50,] -0.009633867 3.811236185 [51,] 6.959664100 -0.009633867 [52,] -2.595725986 6.959664100 [53,] 3.291771956 -2.595725986 [54,] -16.856398059 3.291771956 [55,] -11.113035936 -16.856398059 [56,] 7.444708162 -11.113035936 [57,] 9.494558361 7.444708162 [58,] -4.957529522 9.494558361 [59,] -8.862495446 -4.957529522 [60,] -12.303761455 -8.862495446 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -4.597115347 -6.436027343 2 10.805080634 -4.597115347 3 0.966900632 10.805080634 4 -4.804177385 0.966900632 5 9.302726621 -4.804177385 6 -14.853811388 9.302726621 7 -5.713435405 -14.853811388 8 11.624744598 -5.713435405 9 7.378038569 11.624744598 10 1.298750590 7.378038569 11 -0.722535393 1.298750590 12 -8.127243418 -0.722535393 13 -6.976145428 -8.127243418 14 1.167158531 -6.976145428 15 -0.702297467 1.167158531 16 -5.115947449 -0.702297467 17 10.187712519 -5.115947449 18 -22.999369493 10.187712519 19 -8.642257521 -22.999369493 20 8.880650481 -8.642257521 21 1.901362501 8.880650481 22 5.060986518 1.901362501 23 -1.656639496 5.060986518 24 -5.578973536 -1.656639496 25 -3.764433528 -5.578973536 26 10.913390464 -3.764433528 27 -4.623483583 10.913390464 28 4.381798405 -4.623483583 29 9.215428413 4.381798405 30 -20.435095615 9.215428413 31 -5.247281610 -20.435095615 32 9.938494447 -5.247281610 33 11.928662465 9.938494447 34 8.244666460 11.928662465 35 -2.987499561 8.244666460 36 1.653924479 -2.987499561 37 0.537762453 1.653924479 38 13.697960431 0.537762453 39 0.501620400 13.697960431 40 3.690166399 0.501620400 41 11.307634381 3.690166399 42 -13.881069650 11.307634381 43 -1.825995627 -13.881069650 44 5.882214335 -1.825995627 45 15.190424298 5.882214335 46 5.254282245 15.190424298 47 -7.881543745 5.254282245 48 2.356478226 -7.881543745 49 3.811236185 2.356478226 50 -0.009633867 3.811236185 51 6.959664100 -0.009633867 52 -2.595725986 6.959664100 53 3.291771956 -2.595725986 54 -16.856398059 3.291771956 55 -11.113035936 -16.856398059 56 7.444708162 -11.113035936 57 9.494558361 7.444708162 58 -4.957529522 9.494558361 59 -8.862495446 -4.957529522 60 -12.303761455 -8.862495446 > 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/7fcig1258643623.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/80plh1258643623.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/9orli1258643623.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/101w841258643623.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/11sedw1258643623.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/12kpfr1258643623.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/135qw91258643624.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/14ev311258643624.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/15ev651258643624.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/16eado1258643624.tab") + } > > system("convert tmp/1e3qm1258643623.ps tmp/1e3qm1258643623.png") > system("convert tmp/2ckcf1258643623.ps tmp/2ckcf1258643623.png") > system("convert tmp/3vpk91258643623.ps tmp/3vpk91258643623.png") > system("convert tmp/4mlvi1258643623.ps tmp/4mlvi1258643623.png") > system("convert tmp/570cj1258643623.ps tmp/570cj1258643623.png") > system("convert tmp/6vrex1258643623.ps tmp/6vrex1258643623.png") > system("convert tmp/7fcig1258643623.ps tmp/7fcig1258643623.png") > system("convert tmp/80plh1258643623.ps tmp/80plh1258643623.png") > system("convert tmp/9orli1258643623.ps tmp/9orli1258643623.png") > system("convert tmp/101w841258643623.ps tmp/101w841258643623.png") > > > proc.time() user system elapsed 2.517 1.616 5.880