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(29.837,0,29.571,0,30.167,0,30.524,0,30.996,0,31.033,0,31.198,0,30.937,0,31.649,0,33.115,0,34.106,0,33.926,0,33.382,0,32.851,0,32.948,0,36.112,0,36.113,0,35.210,0,35.193,0,34.383,0,35.349,0,37.058,0,38.076,0,36.630,0,36.045,0,35.638,0,35.114,0,35.465,0,35.254,0,35.299,0,35.916,0,36.683,0,37.288,0,38.536,0,38.977,0,36.407,0,34.955,0,34.951,0,32.680,0,34.791,0,34.178,0,35.213,0,34.871,0,35.299,0,35.443,0,37.108,0,36.419,0,34.471,0,33.868,0,34.385,0,33.643,1,34.627,1,32.919,1,35.500,1,36.110,1,37.086,1,37.711,1,40.427,1,39.884,1,38.512,1,38.767,1),dim=c(2,61),dimnames=list(c('saldo_zichtrek','crisis'),1:61)) > y <- array(NA,dim=c(2,61),dimnames=list(c('saldo_zichtrek','crisis'),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 saldo_zichtrek crisis 1 29.837 0 2 29.571 0 3 30.167 0 4 30.524 0 5 30.996 0 6 31.033 0 7 31.198 0 8 30.937 0 9 31.649 0 10 33.115 0 11 34.106 0 12 33.926 0 13 33.382 0 14 32.851 0 15 32.948 0 16 36.112 0 17 36.113 0 18 35.210 0 19 35.193 0 20 34.383 0 21 35.349 0 22 37.058 0 23 38.076 0 24 36.630 0 25 36.045 0 26 35.638 0 27 35.114 0 28 35.465 0 29 35.254 0 30 35.299 0 31 35.916 0 32 36.683 0 33 37.288 0 34 38.536 0 35 38.977 0 36 36.407 0 37 34.955 0 38 34.951 0 39 32.680 0 40 34.791 0 41 34.178 0 42 35.213 0 43 34.871 0 44 35.299 0 45 35.443 0 46 37.108 0 47 36.419 0 48 34.471 0 49 33.868 0 50 34.385 0 51 33.643 1 52 34.627 1 53 32.919 1 54 35.500 1 55 36.110 1 56 37.086 1 57 37.711 1 58 40.427 1 59 39.884 1 60 38.512 1 61 38.767 1 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) crisis 34.512 2.323 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -4.9414 -1.3974 0.4426 1.5996 4.4646 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 34.5124 0.3274 105.419 < 2e-16 *** crisis 2.3227 0.7709 3.013 0.00381 ** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.315 on 59 degrees of freedom Multiple R-squared: 0.1333, Adjusted R-squared: 0.1186 F-statistic: 9.077 on 1 and 59 DF, p-value: 0.003809 > 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.044451418 0.08890284 0.95554858 [2,] 0.026213453 0.05242691 0.97378655 [3,] 0.017698916 0.03539783 0.98230108 [4,] 0.009157742 0.01831548 0.99084226 [5,] 0.011330020 0.02266004 0.98866998 [6,] 0.078768910 0.15753782 0.92123109 [7,] 0.287849469 0.57569894 0.71215053 [8,] 0.415816595 0.83163319 0.58418340 [9,] 0.444830891 0.88966178 0.55516911 [10,] 0.437354127 0.87470825 0.56264587 [11,] 0.436457974 0.87291595 0.56354203 [12,] 0.734640439 0.53071912 0.26535956 [13,] 0.860160446 0.27967911 0.13983955 [14,] 0.879216608 0.24156678 0.12078339 [15,] 0.886703953 0.22659209 0.11329605 [16,] 0.873435534 0.25312893 0.12656447 [17,] 0.874882625 0.25023475 0.12511737 [18,] 0.926159606 0.14768079 0.07384039 [19,] 0.973201456 0.05359709 0.02679854 [20,] 0.975935224 0.04812955 0.02406478 [21,] 0.972201235 0.05559753 0.02779877 [22,] 0.964193537 0.07161293 0.03580646 [23,] 0.951124146 0.09775171 0.04887585 [24,] 0.935847397 0.12830521 0.06415260 [25,] 0.915035568 0.16992886 0.08496443 [26,] 0.889227010 0.22154598 0.11077299 [27,] 0.864911054 0.27017789 0.13508895 [28,] 0.854817443 0.29036511 0.14518256 [29,] 0.863731718 0.27253656 0.13626828 [30,] 0.921760050 0.15647990 0.07823995 [31,] 0.971203169 0.05759366 0.02879683 [32,] 0.964808797 0.07038241 0.03519120 [33,] 0.946507393 0.10698521 0.05349261 [34,] 0.921094353 0.15781129 0.07890565 [35,] 0.920090649 0.15981870 0.07990935 [36,] 0.885531542 0.22893692 0.11446846 [37,] 0.847495517 0.30500897 0.15250448 [38,] 0.793827855 0.41234429 0.20617215 [39,] 0.729444767 0.54111047 0.27055523 [40,] 0.655338533 0.68932293 0.34466147 [41,] 0.574501101 0.85099780 0.42549890 [42,] 0.564425653 0.87114869 0.43557435 [43,] 0.531164530 0.93767094 0.46883547 [44,] 0.436770354 0.87354071 0.56322965 [45,] 0.345530143 0.69106029 0.65446986 [46,] 0.257647147 0.51529429 0.74235285 [47,] 0.300845667 0.60169133 0.69915433 [48,] 0.301886593 0.60377319 0.69811341 [49,] 0.650793003 0.69841399 0.34920700 [50,] 0.729664735 0.54067053 0.27033527 [51,] 0.803036901 0.39392620 0.19696310 [52,] 0.809690198 0.38061960 0.19030980 > postscript(file="/var/www/html/rcomp/tmp/1k5zb1258735685.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/2m2hg1258735685.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/31wr31258735685.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/4hci91258735685.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/5mdan1258735685.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 7 -4.6753600 -4.9413600 -4.3453600 -3.9883600 -3.5163600 -3.4793600 -3.3143600 8 9 10 11 12 13 14 -3.5753600 -2.8633600 -1.3973600 -0.4063600 -0.5863600 -1.1303600 -1.6613600 15 16 17 18 19 20 21 -1.5643600 1.5996400 1.6006400 0.6976400 0.6806400 -0.1293600 0.8366400 22 23 24 25 26 27 28 2.5456400 3.5636400 2.1176400 1.5326400 1.1256400 0.6016400 0.9526400 29 30 31 32 33 34 35 0.7416400 0.7866400 1.4036400 2.1706400 2.7756400 4.0236400 4.4646400 36 37 38 39 40 41 42 1.8946400 0.4426400 0.4386400 -1.8323600 0.2786400 -0.3343600 0.7006400 43 44 45 46 47 48 49 0.3586400 0.7866400 0.9306400 2.5956400 1.9066400 -0.0413600 -0.6443600 50 51 52 53 54 55 56 -0.1273600 -3.1920909 -2.2080909 -3.9160909 -1.3350909 -0.7250909 0.2509091 57 58 59 60 61 0.8759091 3.5919091 3.0489091 1.6769091 1.9319091 > postscript(file="/var/www/html/rcomp/tmp/6yv8u1258735685.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 -4.6753600 NA 1 -4.9413600 -4.6753600 2 -4.3453600 -4.9413600 3 -3.9883600 -4.3453600 4 -3.5163600 -3.9883600 5 -3.4793600 -3.5163600 6 -3.3143600 -3.4793600 7 -3.5753600 -3.3143600 8 -2.8633600 -3.5753600 9 -1.3973600 -2.8633600 10 -0.4063600 -1.3973600 11 -0.5863600 -0.4063600 12 -1.1303600 -0.5863600 13 -1.6613600 -1.1303600 14 -1.5643600 -1.6613600 15 1.5996400 -1.5643600 16 1.6006400 1.5996400 17 0.6976400 1.6006400 18 0.6806400 0.6976400 19 -0.1293600 0.6806400 20 0.8366400 -0.1293600 21 2.5456400 0.8366400 22 3.5636400 2.5456400 23 2.1176400 3.5636400 24 1.5326400 2.1176400 25 1.1256400 1.5326400 26 0.6016400 1.1256400 27 0.9526400 0.6016400 28 0.7416400 0.9526400 29 0.7866400 0.7416400 30 1.4036400 0.7866400 31 2.1706400 1.4036400 32 2.7756400 2.1706400 33 4.0236400 2.7756400 34 4.4646400 4.0236400 35 1.8946400 4.4646400 36 0.4426400 1.8946400 37 0.4386400 0.4426400 38 -1.8323600 0.4386400 39 0.2786400 -1.8323600 40 -0.3343600 0.2786400 41 0.7006400 -0.3343600 42 0.3586400 0.7006400 43 0.7866400 0.3586400 44 0.9306400 0.7866400 45 2.5956400 0.9306400 46 1.9066400 2.5956400 47 -0.0413600 1.9066400 48 -0.6443600 -0.0413600 49 -0.1273600 -0.6443600 50 -3.1920909 -0.1273600 51 -2.2080909 -3.1920909 52 -3.9160909 -2.2080909 53 -1.3350909 -3.9160909 54 -0.7250909 -1.3350909 55 0.2509091 -0.7250909 56 0.8759091 0.2509091 57 3.5919091 0.8759091 58 3.0489091 3.5919091 59 1.6769091 3.0489091 60 1.9319091 1.6769091 61 NA 1.9319091 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -4.9413600 -4.6753600 [2,] -4.3453600 -4.9413600 [3,] -3.9883600 -4.3453600 [4,] -3.5163600 -3.9883600 [5,] -3.4793600 -3.5163600 [6,] -3.3143600 -3.4793600 [7,] -3.5753600 -3.3143600 [8,] -2.8633600 -3.5753600 [9,] -1.3973600 -2.8633600 [10,] -0.4063600 -1.3973600 [11,] -0.5863600 -0.4063600 [12,] -1.1303600 -0.5863600 [13,] -1.6613600 -1.1303600 [14,] -1.5643600 -1.6613600 [15,] 1.5996400 -1.5643600 [16,] 1.6006400 1.5996400 [17,] 0.6976400 1.6006400 [18,] 0.6806400 0.6976400 [19,] -0.1293600 0.6806400 [20,] 0.8366400 -0.1293600 [21,] 2.5456400 0.8366400 [22,] 3.5636400 2.5456400 [23,] 2.1176400 3.5636400 [24,] 1.5326400 2.1176400 [25,] 1.1256400 1.5326400 [26,] 0.6016400 1.1256400 [27,] 0.9526400 0.6016400 [28,] 0.7416400 0.9526400 [29,] 0.7866400 0.7416400 [30,] 1.4036400 0.7866400 [31,] 2.1706400 1.4036400 [32,] 2.7756400 2.1706400 [33,] 4.0236400 2.7756400 [34,] 4.4646400 4.0236400 [35,] 1.8946400 4.4646400 [36,] 0.4426400 1.8946400 [37,] 0.4386400 0.4426400 [38,] -1.8323600 0.4386400 [39,] 0.2786400 -1.8323600 [40,] -0.3343600 0.2786400 [41,] 0.7006400 -0.3343600 [42,] 0.3586400 0.7006400 [43,] 0.7866400 0.3586400 [44,] 0.9306400 0.7866400 [45,] 2.5956400 0.9306400 [46,] 1.9066400 2.5956400 [47,] -0.0413600 1.9066400 [48,] -0.6443600 -0.0413600 [49,] -0.1273600 -0.6443600 [50,] -3.1920909 -0.1273600 [51,] -2.2080909 -3.1920909 [52,] -3.9160909 -2.2080909 [53,] -1.3350909 -3.9160909 [54,] -0.7250909 -1.3350909 [55,] 0.2509091 -0.7250909 [56,] 0.8759091 0.2509091 [57,] 3.5919091 0.8759091 [58,] 3.0489091 3.5919091 [59,] 1.6769091 3.0489091 [60,] 1.9319091 1.6769091 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -4.9413600 -4.6753600 2 -4.3453600 -4.9413600 3 -3.9883600 -4.3453600 4 -3.5163600 -3.9883600 5 -3.4793600 -3.5163600 6 -3.3143600 -3.4793600 7 -3.5753600 -3.3143600 8 -2.8633600 -3.5753600 9 -1.3973600 -2.8633600 10 -0.4063600 -1.3973600 11 -0.5863600 -0.4063600 12 -1.1303600 -0.5863600 13 -1.6613600 -1.1303600 14 -1.5643600 -1.6613600 15 1.5996400 -1.5643600 16 1.6006400 1.5996400 17 0.6976400 1.6006400 18 0.6806400 0.6976400 19 -0.1293600 0.6806400 20 0.8366400 -0.1293600 21 2.5456400 0.8366400 22 3.5636400 2.5456400 23 2.1176400 3.5636400 24 1.5326400 2.1176400 25 1.1256400 1.5326400 26 0.6016400 1.1256400 27 0.9526400 0.6016400 28 0.7416400 0.9526400 29 0.7866400 0.7416400 30 1.4036400 0.7866400 31 2.1706400 1.4036400 32 2.7756400 2.1706400 33 4.0236400 2.7756400 34 4.4646400 4.0236400 35 1.8946400 4.4646400 36 0.4426400 1.8946400 37 0.4386400 0.4426400 38 -1.8323600 0.4386400 39 0.2786400 -1.8323600 40 -0.3343600 0.2786400 41 0.7006400 -0.3343600 42 0.3586400 0.7006400 43 0.7866400 0.3586400 44 0.9306400 0.7866400 45 2.5956400 0.9306400 46 1.9066400 2.5956400 47 -0.0413600 1.9066400 48 -0.6443600 -0.0413600 49 -0.1273600 -0.6443600 50 -3.1920909 -0.1273600 51 -2.2080909 -3.1920909 52 -3.9160909 -2.2080909 53 -1.3350909 -3.9160909 54 -0.7250909 -1.3350909 55 0.2509091 -0.7250909 56 0.8759091 0.2509091 57 3.5919091 0.8759091 58 3.0489091 3.5919091 59 1.6769091 3.0489091 60 1.9319091 1.6769091 > 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/7zs8p1258735685.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/88l571258735685.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/9zj0n1258735685.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/10888h1258735685.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/11ca9m1258735685.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/12yrzy1258735685.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/13gf651258735685.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/14he0o1258735685.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/15nujf1258735685.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/16jej91258735685.tab") + } > > system("convert tmp/1k5zb1258735685.ps tmp/1k5zb1258735685.png") > system("convert tmp/2m2hg1258735685.ps tmp/2m2hg1258735685.png") > system("convert tmp/31wr31258735685.ps tmp/31wr31258735685.png") > system("convert tmp/4hci91258735685.ps tmp/4hci91258735685.png") > system("convert tmp/5mdan1258735685.ps tmp/5mdan1258735685.png") > system("convert tmp/6yv8u1258735685.ps tmp/6yv8u1258735685.png") > system("convert tmp/7zs8p1258735685.ps tmp/7zs8p1258735685.png") > system("convert tmp/88l571258735685.ps tmp/88l571258735685.png") > system("convert tmp/9zj0n1258735685.ps tmp/9zj0n1258735685.png") > system("convert tmp/10888h1258735685.ps tmp/10888h1258735685.png") > > > proc.time() user system elapsed 2.490 1.587 2.886