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,121.8,97.0,127.6,112.7,129.9,102.9,128.0,97.4,123.5,111.4,124.0,87.4,127.4,96.8,127.6,114.1,128.4,110.3,131.4,103.9,135.1,101.6,134.0,94.6,144.5,95.9,147.3,104.7,150.9,102.8,148.7,98.1,141.4,113.9,138.9,80.9,139.8,95.7,145.6,113.2,147.9,105.9,148.5,108.8,151.1,102.3,157.5,99.0,167.5,100.7,172.3,115.5,173.5,100.7,187.5,109.9,205.5,114.6,195.1,85.4,204.5,100.5,204.5,114.8,201.7,116.5,207.0,112.9,206.6,102.0,210.6,106.0,211.1,105.3,215.0,118.8,223.9,106.1,238.2,109.3,238.9,117.2,229.6,92.5,232.2,104.2,222.1,112.5,221.6,122.4,227.3,113.3,221.0,100.0,213.6,110.7,243.4,112.8,253.8,109.8,265.3,117.3,268.2,109.1,268.5,115.9,266.9,96.0,268.4,99.8,250.8,116.8,231.2,115.7,192.0,99.4,171.4,94.3,160.0),dim=c(2,60),dimnames=list(c('TIP','Grondstofprijzen'),1:60)) > y <- array(NA,dim=c(2,60),dimnames=list(c('TIP','Grondstofprijzen'),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 TIP Grondstofprijzen 1 95.1 121.8 2 97.0 127.6 3 112.7 129.9 4 102.9 128.0 5 97.4 123.5 6 111.4 124.0 7 87.4 127.4 8 96.8 127.6 9 114.1 128.4 10 110.3 131.4 11 103.9 135.1 12 101.6 134.0 13 94.6 144.5 14 95.9 147.3 15 104.7 150.9 16 102.8 148.7 17 98.1 141.4 18 113.9 138.9 19 80.9 139.8 20 95.7 145.6 21 113.2 147.9 22 105.9 148.5 23 108.8 151.1 24 102.3 157.5 25 99.0 167.5 26 100.7 172.3 27 115.5 173.5 28 100.7 187.5 29 109.9 205.5 30 114.6 195.1 31 85.4 204.5 32 100.5 204.5 33 114.8 201.7 34 116.5 207.0 35 112.9 206.6 36 102.0 210.6 37 106.0 211.1 38 105.3 215.0 39 118.8 223.9 40 106.1 238.2 41 109.3 238.9 42 117.2 229.6 43 92.5 232.2 44 104.2 222.1 45 112.5 221.6 46 122.4 227.3 47 113.3 221.0 48 100.0 213.6 49 110.7 243.4 50 112.8 253.8 51 109.8 265.3 52 117.3 268.2 53 109.1 268.5 54 115.9 266.9 55 96.0 268.4 56 99.8 250.8 57 116.8 231.2 58 115.7 192.0 59 99.4 171.4 60 94.3 160.0 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) Grondstofprijzen 92.2540 0.0707 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -21.31279 -5.00358 -0.04789 6.61243 14.07518 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 92.25402 4.50132 20.495 < 2e-16 *** Grondstofprijzen 0.07070 0.02346 3.014 0.00382 ** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 8.44 on 58 degrees of freedom Multiple R-squared: 0.1354, Adjusted R-squared: 0.1205 F-statistic: 9.085 on 1 and 58 DF, p-value: 0.003817 > 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.2001971 0.4003941 0.7998029 [2,] 0.4485291 0.8970583 0.5514709 [3,] 0.7281309 0.5437382 0.2718691 [4,] 0.6407552 0.7184896 0.3592448 [5,] 0.7115985 0.5768030 0.2884015 [6,] 0.6362522 0.7274955 0.3637478 [7,] 0.5771160 0.8457680 0.4228840 [8,] 0.5030242 0.9939516 0.4969758 [9,] 0.5409691 0.9180619 0.4590309 [10,] 0.4711094 0.9422188 0.5288906 [11,] 0.4055125 0.8110251 0.5944875 [12,] 0.3222049 0.6444097 0.6777951 [13,] 0.2581006 0.5162012 0.7418994 [14,] 0.3419676 0.6839351 0.6580324 [15,] 0.7215200 0.5569600 0.2784800 [16,] 0.6840096 0.6319809 0.3159904 [17,] 0.7359365 0.5281270 0.2640635 [18,] 0.6797422 0.6405156 0.3202578 [19,] 0.6430046 0.7139908 0.3569954 [20,] 0.5681490 0.8637019 0.4318510 [21,] 0.5114509 0.9770982 0.4885491 [22,] 0.4438087 0.8876174 0.5561913 [23,] 0.5004402 0.9991196 0.4995598 [24,] 0.4455803 0.8911606 0.5544197 [25,] 0.3821609 0.7643219 0.6178391 [26,] 0.3739157 0.7478315 0.6260843 [27,] 0.7355758 0.5288485 0.2644242 [28,] 0.6994948 0.6010105 0.3005052 [29,] 0.7055896 0.5888209 0.2944104 [30,] 0.7266702 0.5466596 0.2733298 [31,] 0.6938899 0.6122202 0.3061101 [32,] 0.6473323 0.7053354 0.3526677 [33,] 0.5724997 0.8550006 0.4275003 [34,] 0.4976952 0.9953904 0.5023048 [35,] 0.5409314 0.9181373 0.4590686 [36,] 0.4695883 0.9391767 0.5304117 [37,] 0.3885957 0.7771914 0.6114043 [38,] 0.3899753 0.7799506 0.6100247 [39,] 0.5959595 0.8080811 0.4040405 [40,] 0.5256227 0.9487546 0.4743773 [41,] 0.4600916 0.9201832 0.5399084 [42,] 0.6252976 0.7494048 0.3747024 [43,] 0.5854018 0.8291964 0.4145982 [44,] 0.5400383 0.9199234 0.4599617 [45,] 0.4414004 0.8828009 0.5585996 [46,] 0.3529140 0.7058280 0.6470860 [47,] 0.2558645 0.5117290 0.7441355 [48,] 0.2269013 0.4538026 0.7730987 [49,] 0.1454707 0.2909415 0.8545293 [50,] 0.1345382 0.2690764 0.8654618 [51,] 0.1736741 0.3473481 0.8263259 > postscript(file="/var/www/html/rcomp/tmp/15h5z1260783623.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/2wkgb1260783623.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/3ow8n1260783623.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/45sk01260783623.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/57eni1260783623.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 -5.76564716 -4.27572476 11.26165826 1.59599403 -3.58584232 10.37880616 7 8 9 10 11 12 -13.86158415 -4.47572476 12.76771281 8.75560371 2.09400249 -0.12822417 13 14 15 16 17 18 -7.87060603 -6.76857452 1.77689456 0.03244123 -4.15142662 11.82533096 19 20 21 22 23 24 -21.23830177 -6.84837936 10.48900366 3.14658184 5.86275395 -1.08974546 25 26 27 28 29 30 -5.09677580 -3.73615036 10.97900600 -4.81083647 3.11650893 8.55182048 31 32 33 34 35 36 -21.31278804 -6.21278804 8.28518045 9.61045438 6.03873559 -5.14407654 37 38 39 40 41 42 -1.17942806 -2.15516989 10.71557311 -2.99548027 0.15502761 8.71256582 43 44 45 46 47 48 -16.17126207 -3.75716143 4.57819009 14.07518280 5.42061191 -7.35618564 49 50 51 52 53 54 1.23686396 2.60155241 -1.21153248 6.08342872 -2.13778219 4.77534267 55 56 57 58 59 60 -15.23071188 -10.18633849 8.19944097 9.87099988 -4.97251763 -9.26650305 > postscript(file="/var/www/html/rcomp/tmp/6p8il1260783623.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 -5.76564716 NA 1 -4.27572476 -5.76564716 2 11.26165826 -4.27572476 3 1.59599403 11.26165826 4 -3.58584232 1.59599403 5 10.37880616 -3.58584232 6 -13.86158415 10.37880616 7 -4.47572476 -13.86158415 8 12.76771281 -4.47572476 9 8.75560371 12.76771281 10 2.09400249 8.75560371 11 -0.12822417 2.09400249 12 -7.87060603 -0.12822417 13 -6.76857452 -7.87060603 14 1.77689456 -6.76857452 15 0.03244123 1.77689456 16 -4.15142662 0.03244123 17 11.82533096 -4.15142662 18 -21.23830177 11.82533096 19 -6.84837936 -21.23830177 20 10.48900366 -6.84837936 21 3.14658184 10.48900366 22 5.86275395 3.14658184 23 -1.08974546 5.86275395 24 -5.09677580 -1.08974546 25 -3.73615036 -5.09677580 26 10.97900600 -3.73615036 27 -4.81083647 10.97900600 28 3.11650893 -4.81083647 29 8.55182048 3.11650893 30 -21.31278804 8.55182048 31 -6.21278804 -21.31278804 32 8.28518045 -6.21278804 33 9.61045438 8.28518045 34 6.03873559 9.61045438 35 -5.14407654 6.03873559 36 -1.17942806 -5.14407654 37 -2.15516989 -1.17942806 38 10.71557311 -2.15516989 39 -2.99548027 10.71557311 40 0.15502761 -2.99548027 41 8.71256582 0.15502761 42 -16.17126207 8.71256582 43 -3.75716143 -16.17126207 44 4.57819009 -3.75716143 45 14.07518280 4.57819009 46 5.42061191 14.07518280 47 -7.35618564 5.42061191 48 1.23686396 -7.35618564 49 2.60155241 1.23686396 50 -1.21153248 2.60155241 51 6.08342872 -1.21153248 52 -2.13778219 6.08342872 53 4.77534267 -2.13778219 54 -15.23071188 4.77534267 55 -10.18633849 -15.23071188 56 8.19944097 -10.18633849 57 9.87099988 8.19944097 58 -4.97251763 9.87099988 59 -9.26650305 -4.97251763 60 NA -9.26650305 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -4.27572476 -5.76564716 [2,] 11.26165826 -4.27572476 [3,] 1.59599403 11.26165826 [4,] -3.58584232 1.59599403 [5,] 10.37880616 -3.58584232 [6,] -13.86158415 10.37880616 [7,] -4.47572476 -13.86158415 [8,] 12.76771281 -4.47572476 [9,] 8.75560371 12.76771281 [10,] 2.09400249 8.75560371 [11,] -0.12822417 2.09400249 [12,] -7.87060603 -0.12822417 [13,] -6.76857452 -7.87060603 [14,] 1.77689456 -6.76857452 [15,] 0.03244123 1.77689456 [16,] -4.15142662 0.03244123 [17,] 11.82533096 -4.15142662 [18,] -21.23830177 11.82533096 [19,] -6.84837936 -21.23830177 [20,] 10.48900366 -6.84837936 [21,] 3.14658184 10.48900366 [22,] 5.86275395 3.14658184 [23,] -1.08974546 5.86275395 [24,] -5.09677580 -1.08974546 [25,] -3.73615036 -5.09677580 [26,] 10.97900600 -3.73615036 [27,] -4.81083647 10.97900600 [28,] 3.11650893 -4.81083647 [29,] 8.55182048 3.11650893 [30,] -21.31278804 8.55182048 [31,] -6.21278804 -21.31278804 [32,] 8.28518045 -6.21278804 [33,] 9.61045438 8.28518045 [34,] 6.03873559 9.61045438 [35,] -5.14407654 6.03873559 [36,] -1.17942806 -5.14407654 [37,] -2.15516989 -1.17942806 [38,] 10.71557311 -2.15516989 [39,] -2.99548027 10.71557311 [40,] 0.15502761 -2.99548027 [41,] 8.71256582 0.15502761 [42,] -16.17126207 8.71256582 [43,] -3.75716143 -16.17126207 [44,] 4.57819009 -3.75716143 [45,] 14.07518280 4.57819009 [46,] 5.42061191 14.07518280 [47,] -7.35618564 5.42061191 [48,] 1.23686396 -7.35618564 [49,] 2.60155241 1.23686396 [50,] -1.21153248 2.60155241 [51,] 6.08342872 -1.21153248 [52,] -2.13778219 6.08342872 [53,] 4.77534267 -2.13778219 [54,] -15.23071188 4.77534267 [55,] -10.18633849 -15.23071188 [56,] 8.19944097 -10.18633849 [57,] 9.87099988 8.19944097 [58,] -4.97251763 9.87099988 [59,] -9.26650305 -4.97251763 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -4.27572476 -5.76564716 2 11.26165826 -4.27572476 3 1.59599403 11.26165826 4 -3.58584232 1.59599403 5 10.37880616 -3.58584232 6 -13.86158415 10.37880616 7 -4.47572476 -13.86158415 8 12.76771281 -4.47572476 9 8.75560371 12.76771281 10 2.09400249 8.75560371 11 -0.12822417 2.09400249 12 -7.87060603 -0.12822417 13 -6.76857452 -7.87060603 14 1.77689456 -6.76857452 15 0.03244123 1.77689456 16 -4.15142662 0.03244123 17 11.82533096 -4.15142662 18 -21.23830177 11.82533096 19 -6.84837936 -21.23830177 20 10.48900366 -6.84837936 21 3.14658184 10.48900366 22 5.86275395 3.14658184 23 -1.08974546 5.86275395 24 -5.09677580 -1.08974546 25 -3.73615036 -5.09677580 26 10.97900600 -3.73615036 27 -4.81083647 10.97900600 28 3.11650893 -4.81083647 29 8.55182048 3.11650893 30 -21.31278804 8.55182048 31 -6.21278804 -21.31278804 32 8.28518045 -6.21278804 33 9.61045438 8.28518045 34 6.03873559 9.61045438 35 -5.14407654 6.03873559 36 -1.17942806 -5.14407654 37 -2.15516989 -1.17942806 38 10.71557311 -2.15516989 39 -2.99548027 10.71557311 40 0.15502761 -2.99548027 41 8.71256582 0.15502761 42 -16.17126207 8.71256582 43 -3.75716143 -16.17126207 44 4.57819009 -3.75716143 45 14.07518280 4.57819009 46 5.42061191 14.07518280 47 -7.35618564 5.42061191 48 1.23686396 -7.35618564 49 2.60155241 1.23686396 50 -1.21153248 2.60155241 51 6.08342872 -1.21153248 52 -2.13778219 6.08342872 53 4.77534267 -2.13778219 54 -15.23071188 4.77534267 55 -10.18633849 -15.23071188 56 8.19944097 -10.18633849 57 9.87099988 8.19944097 58 -4.97251763 9.87099988 59 -9.26650305 -4.97251763 > 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/7unkw1260783623.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/808nr1260783623.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/9n3g41260783623.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/1073ui1260783623.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/110sdl1260783623.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/12wnr01260783623.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/13p4hn1260783623.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/14hhdc1260783623.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/15wzl31260783623.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/16ov911260783623.tab") + } > > try(system("convert tmp/15h5z1260783623.ps tmp/15h5z1260783623.png",intern=TRUE)) character(0) > try(system("convert tmp/2wkgb1260783623.ps tmp/2wkgb1260783623.png",intern=TRUE)) character(0) > try(system("convert tmp/3ow8n1260783623.ps tmp/3ow8n1260783623.png",intern=TRUE)) character(0) > try(system("convert tmp/45sk01260783623.ps tmp/45sk01260783623.png",intern=TRUE)) character(0) > try(system("convert tmp/57eni1260783623.ps tmp/57eni1260783623.png",intern=TRUE)) character(0) > try(system("convert tmp/6p8il1260783623.ps tmp/6p8il1260783623.png",intern=TRUE)) character(0) > try(system("convert tmp/7unkw1260783623.ps tmp/7unkw1260783623.png",intern=TRUE)) character(0) > try(system("convert tmp/808nr1260783623.ps tmp/808nr1260783623.png",intern=TRUE)) character(0) > try(system("convert tmp/9n3g41260783623.ps tmp/9n3g41260783623.png",intern=TRUE)) character(0) > try(system("convert tmp/1073ui1260783623.ps tmp/1073ui1260783623.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.475 1.557 3.028