R version 2.7.0 (2008-04-22) Copyright (C) 2008 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(147768,0,137507,0,136919,0,136151,0,133001,0,125554,0,119647,0,114158,0,116193,0,152803,0,161761,0,160942,0,149470,0,139208,0,134588,0,130322,0,126611,0,122401,0,117352,0,112135,0,112879,0,148729,0,157230,0,157221,0,146681,0,136524,0,132111,0,125326,0,122716,0,116615,0,113719,0,110737,0,112093,0,143565,0,149946,0,149147,0,134339,0,122683,0,115614,0,116566,0,111272,0,104609,0,101802,0,94542,0,93051,0,124129,0,130374,0,123946,0,114971,0,105531,0,104919,0,104782,0,101281,0,94545,0,93248,0,84031,0,87486,0,115867,0,120327,1,117008,1,108811,1),dim=c(2,61),dimnames=list(c('jonger_dan_25','economische_crisis'),1:61)) > y <- array(NA,dim=c(2,61),dimnames=list(c('jonger_dan_25','economische_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 jonger_dan_25 economische_crisis 1 147768 0 2 137507 0 3 136919 0 4 136151 0 5 133001 0 6 125554 0 7 119647 0 8 114158 0 9 116193 0 10 152803 0 11 161761 0 12 160942 0 13 149470 0 14 139208 0 15 134588 0 16 130322 0 17 126611 0 18 122401 0 19 117352 0 20 112135 0 21 112879 0 22 148729 0 23 157230 0 24 157221 0 25 146681 0 26 136524 0 27 132111 0 28 125326 0 29 122716 0 30 116615 0 31 113719 0 32 110737 0 33 112093 0 34 143565 0 35 149946 0 36 149147 0 37 134339 0 38 122683 0 39 115614 0 40 116566 0 41 111272 0 42 104609 0 43 101802 0 44 94542 0 45 93051 0 46 124129 0 47 130374 0 48 123946 0 49 114971 0 50 105531 0 51 104919 0 52 104782 0 53 101281 0 54 94545 0 55 93248 0 56 84031 0 57 87486 0 58 115867 0 59 120327 1 60 117008 1 61 108811 1 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) economische_crisis 123954 -8572 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -39923 -11819 -1238 12570 37807 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 123954 2518 49.221 <2e-16 *** economische_crisis -8572 11356 -0.755 0.453 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 19180 on 59 degrees of freedom Multiple R-squared: 0.009565, Adjusted R-squared: -0.007222 F-statistic: 0.5698 on 1 and 59 DF, p-value: 0.4534 > 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.04603021 0.09206042 0.95396979 [2,] 0.04636659 0.09273318 0.95363341 [3,] 0.06249683 0.12499365 0.93750317 [4,] 0.09134750 0.18269500 0.90865250 [5,] 0.08092529 0.16185058 0.91907471 [6,] 0.13457631 0.26915262 0.86542369 [7,] 0.29044880 0.58089759 0.70955120 [8,] 0.42112027 0.84224054 0.57887973 [9,] 0.40149488 0.80298975 0.59850512 [10,] 0.32915040 0.65830081 0.67084960 [11,] 0.26057795 0.52115590 0.73942205 [12,] 0.20544750 0.41089501 0.79455250 [13,] 0.16575927 0.33151853 0.83424073 [14,] 0.14247655 0.28495310 0.85752345 [15,] 0.13793646 0.27587291 0.86206354 [16,] 0.15398035 0.30796070 0.84601965 [17,] 0.15674203 0.31348406 0.84325797 [18,] 0.17409371 0.34818741 0.82590629 [19,] 0.27975057 0.55950114 0.72024943 [20,] 0.42629290 0.85258580 0.57370710 [21,] 0.47105559 0.94211118 0.52894441 [22,] 0.44884156 0.89768312 0.55115844 [23,] 0.41443611 0.82887222 0.58556389 [24,] 0.37467633 0.74935266 0.62532367 [25,] 0.33850045 0.67700090 0.66149955 [26,] 0.31869606 0.63739212 0.68130394 [27,] 0.30727186 0.61454372 0.69272814 [28,] 0.30537651 0.61075302 0.69462349 [29,] 0.28902308 0.57804616 0.71097692 [30,] 0.35402105 0.70804210 0.64597895 [31,] 0.55685818 0.88628364 0.44314182 [32,] 0.80503320 0.38993360 0.19496680 [33,] 0.87139477 0.25721045 0.12860523 [34,] 0.87626424 0.24747152 0.12373576 [35,] 0.86592531 0.26814937 0.13407469 [36,] 0.85676100 0.28647801 0.14323900 [37,] 0.84021442 0.31957116 0.15978558 [38,] 0.82799519 0.34400963 0.17200481 [39,] 0.81842830 0.36314341 0.18157170 [40,] 0.84229560 0.31540880 0.15770440 [41,] 0.86708048 0.26583903 0.13291952 [42,] 0.87542662 0.24914676 0.12457338 [43,] 0.94371066 0.11257867 0.05628934 [44,] 0.97473459 0.05053082 0.02526541 [45,] 0.98006020 0.03987961 0.01993980 [46,] 0.97072480 0.05855040 0.02927520 [47,] 0.95702245 0.08595511 0.04297755 [48,] 0.93904228 0.12191545 0.06095772 [49,] 0.90396512 0.19206976 0.09603488 [50,] 0.84078452 0.31843097 0.15921548 [51,] 0.74511872 0.50976257 0.25488128 [52,] 0.73834318 0.52331363 0.26165682 > postscript(file="/var/www/html/rcomp/tmp/1nxe71227723443.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/2erhz1227723443.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/36whk1227723443.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/48zfv1227723443.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/5te9c1227723443.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 23814.24138 13553.24138 12965.24138 12197.24138 9047.24138 1600.24138 7 8 9 10 11 12 -4306.75862 -9795.75862 -7760.75862 28849.24138 37807.24138 36988.24138 13 14 15 16 17 18 25516.24138 15254.24138 10634.24138 6368.24138 2657.24138 -1552.75862 19 20 21 22 23 24 -6601.75862 -11818.75862 -11074.75862 24775.24138 33276.24138 33267.24138 25 26 27 28 29 30 22727.24138 12570.24138 8157.24138 1372.24138 -1237.75862 -7338.75862 31 32 33 34 35 36 -10234.75862 -13216.75862 -11860.75862 19611.24138 25992.24138 25193.24138 37 38 39 40 41 42 10385.24138 -1270.75862 -8339.75862 -7387.75862 -12681.75862 -19344.75862 43 44 45 46 47 48 -22151.75862 -29411.75862 -30902.75862 175.24138 6420.24138 -7.75862 49 50 51 52 53 54 -8982.75862 -18422.75862 -19034.75862 -19171.75862 -22672.75862 -29408.75862 55 56 57 58 59 60 -30705.75862 -39922.75862 -36467.75862 -8086.75862 4945.00000 1626.00000 61 -6571.00000 > postscript(file="/var/www/html/rcomp/tmp/6bwry1227723443.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 23814.24138 NA 1 13553.24138 23814.24138 2 12965.24138 13553.24138 3 12197.24138 12965.24138 4 9047.24138 12197.24138 5 1600.24138 9047.24138 6 -4306.75862 1600.24138 7 -9795.75862 -4306.75862 8 -7760.75862 -9795.75862 9 28849.24138 -7760.75862 10 37807.24138 28849.24138 11 36988.24138 37807.24138 12 25516.24138 36988.24138 13 15254.24138 25516.24138 14 10634.24138 15254.24138 15 6368.24138 10634.24138 16 2657.24138 6368.24138 17 -1552.75862 2657.24138 18 -6601.75862 -1552.75862 19 -11818.75862 -6601.75862 20 -11074.75862 -11818.75862 21 24775.24138 -11074.75862 22 33276.24138 24775.24138 23 33267.24138 33276.24138 24 22727.24138 33267.24138 25 12570.24138 22727.24138 26 8157.24138 12570.24138 27 1372.24138 8157.24138 28 -1237.75862 1372.24138 29 -7338.75862 -1237.75862 30 -10234.75862 -7338.75862 31 -13216.75862 -10234.75862 32 -11860.75862 -13216.75862 33 19611.24138 -11860.75862 34 25992.24138 19611.24138 35 25193.24138 25992.24138 36 10385.24138 25193.24138 37 -1270.75862 10385.24138 38 -8339.75862 -1270.75862 39 -7387.75862 -8339.75862 40 -12681.75862 -7387.75862 41 -19344.75862 -12681.75862 42 -22151.75862 -19344.75862 43 -29411.75862 -22151.75862 44 -30902.75862 -29411.75862 45 175.24138 -30902.75862 46 6420.24138 175.24138 47 -7.75862 6420.24138 48 -8982.75862 -7.75862 49 -18422.75862 -8982.75862 50 -19034.75862 -18422.75862 51 -19171.75862 -19034.75862 52 -22672.75862 -19171.75862 53 -29408.75862 -22672.75862 54 -30705.75862 -29408.75862 55 -39922.75862 -30705.75862 56 -36467.75862 -39922.75862 57 -8086.75862 -36467.75862 58 4945.00000 -8086.75862 59 1626.00000 4945.00000 60 -6571.00000 1626.00000 61 NA -6571.00000 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 13553.24138 23814.24138 [2,] 12965.24138 13553.24138 [3,] 12197.24138 12965.24138 [4,] 9047.24138 12197.24138 [5,] 1600.24138 9047.24138 [6,] -4306.75862 1600.24138 [7,] -9795.75862 -4306.75862 [8,] -7760.75862 -9795.75862 [9,] 28849.24138 -7760.75862 [10,] 37807.24138 28849.24138 [11,] 36988.24138 37807.24138 [12,] 25516.24138 36988.24138 [13,] 15254.24138 25516.24138 [14,] 10634.24138 15254.24138 [15,] 6368.24138 10634.24138 [16,] 2657.24138 6368.24138 [17,] -1552.75862 2657.24138 [18,] -6601.75862 -1552.75862 [19,] -11818.75862 -6601.75862 [20,] -11074.75862 -11818.75862 [21,] 24775.24138 -11074.75862 [22,] 33276.24138 24775.24138 [23,] 33267.24138 33276.24138 [24,] 22727.24138 33267.24138 [25,] 12570.24138 22727.24138 [26,] 8157.24138 12570.24138 [27,] 1372.24138 8157.24138 [28,] -1237.75862 1372.24138 [29,] -7338.75862 -1237.75862 [30,] -10234.75862 -7338.75862 [31,] -13216.75862 -10234.75862 [32,] -11860.75862 -13216.75862 [33,] 19611.24138 -11860.75862 [34,] 25992.24138 19611.24138 [35,] 25193.24138 25992.24138 [36,] 10385.24138 25193.24138 [37,] -1270.75862 10385.24138 [38,] -8339.75862 -1270.75862 [39,] -7387.75862 -8339.75862 [40,] -12681.75862 -7387.75862 [41,] -19344.75862 -12681.75862 [42,] -22151.75862 -19344.75862 [43,] -29411.75862 -22151.75862 [44,] -30902.75862 -29411.75862 [45,] 175.24138 -30902.75862 [46,] 6420.24138 175.24138 [47,] -7.75862 6420.24138 [48,] -8982.75862 -7.75862 [49,] -18422.75862 -8982.75862 [50,] -19034.75862 -18422.75862 [51,] -19171.75862 -19034.75862 [52,] -22672.75862 -19171.75862 [53,] -29408.75862 -22672.75862 [54,] -30705.75862 -29408.75862 [55,] -39922.75862 -30705.75862 [56,] -36467.75862 -39922.75862 [57,] -8086.75862 -36467.75862 [58,] 4945.00000 -8086.75862 [59,] 1626.00000 4945.00000 [60,] -6571.00000 1626.00000 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 13553.24138 23814.24138 2 12965.24138 13553.24138 3 12197.24138 12965.24138 4 9047.24138 12197.24138 5 1600.24138 9047.24138 6 -4306.75862 1600.24138 7 -9795.75862 -4306.75862 8 -7760.75862 -9795.75862 9 28849.24138 -7760.75862 10 37807.24138 28849.24138 11 36988.24138 37807.24138 12 25516.24138 36988.24138 13 15254.24138 25516.24138 14 10634.24138 15254.24138 15 6368.24138 10634.24138 16 2657.24138 6368.24138 17 -1552.75862 2657.24138 18 -6601.75862 -1552.75862 19 -11818.75862 -6601.75862 20 -11074.75862 -11818.75862 21 24775.24138 -11074.75862 22 33276.24138 24775.24138 23 33267.24138 33276.24138 24 22727.24138 33267.24138 25 12570.24138 22727.24138 26 8157.24138 12570.24138 27 1372.24138 8157.24138 28 -1237.75862 1372.24138 29 -7338.75862 -1237.75862 30 -10234.75862 -7338.75862 31 -13216.75862 -10234.75862 32 -11860.75862 -13216.75862 33 19611.24138 -11860.75862 34 25992.24138 19611.24138 35 25193.24138 25992.24138 36 10385.24138 25193.24138 37 -1270.75862 10385.24138 38 -8339.75862 -1270.75862 39 -7387.75862 -8339.75862 40 -12681.75862 -7387.75862 41 -19344.75862 -12681.75862 42 -22151.75862 -19344.75862 43 -29411.75862 -22151.75862 44 -30902.75862 -29411.75862 45 175.24138 -30902.75862 46 6420.24138 175.24138 47 -7.75862 6420.24138 48 -8982.75862 -7.75862 49 -18422.75862 -8982.75862 50 -19034.75862 -18422.75862 51 -19171.75862 -19034.75862 52 -22672.75862 -19171.75862 53 -29408.75862 -22672.75862 54 -30705.75862 -29408.75862 55 -39922.75862 -30705.75862 56 -36467.75862 -39922.75862 57 -8086.75862 -36467.75862 58 4945.00000 -8086.75862 59 1626.00000 4945.00000 60 -6571.00000 1626.00000 > 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/77of11227723443.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/86zb91227723443.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/9gedp1227723443.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/1092kw1227723443.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/11ovoe1227723443.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/12sxhr1227723443.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/136ltw1227723443.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/141ftj1227723443.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/157hlt1227723444.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/16r27h1227723444.tab") + } > > system("convert tmp/1nxe71227723443.ps tmp/1nxe71227723443.png") > system("convert tmp/2erhz1227723443.ps tmp/2erhz1227723443.png") > system("convert tmp/36whk1227723443.ps tmp/36whk1227723443.png") > system("convert tmp/48zfv1227723443.ps tmp/48zfv1227723443.png") > system("convert tmp/5te9c1227723443.ps tmp/5te9c1227723443.png") > system("convert tmp/6bwry1227723443.ps tmp/6bwry1227723443.png") > system("convert tmp/77of11227723443.ps tmp/77of11227723443.png") > system("convert tmp/86zb91227723443.ps tmp/86zb91227723443.png") > system("convert tmp/9gedp1227723443.ps tmp/9gedp1227723443.png") > system("convert tmp/1092kw1227723443.ps tmp/1092kw1227723443.png") > > > proc.time() user system elapsed 5.065 2.724 5.449