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(449,0,452,0,462,0,455,0,461,0,461,0,463,0,462,0,456,0,455,0,456,0,472,0,472,0,471,0,465,0,459,0,465,0,468,0,467,0,463,0,460,0,462,0,461,0,476,0,476,0,471,0,453,0,443,0,442,0,444,0,438,0,427,0,424,0,416,0,406,0,431,0,434,0,418,0,412,0,404,0,409,0,412,1,406,1,398,1,397,1,385,1,390,1,413,1,413,1,401,1,397,1,397,1,409,1,419,1,424,1,428,1,430,1,424,1,433,1,456,1,459,1),dim=c(2,61),dimnames=list(c('Y','X'),1:61)) > y <- array(NA,dim=c(2,61),dimnames=list(c('Y','X'),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 = '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 Y X t 1 449 0 1 2 452 0 2 3 462 0 3 4 455 0 4 5 461 0 5 6 461 0 6 7 463 0 7 8 462 0 8 9 456 0 9 10 455 0 10 11 456 0 11 12 472 0 12 13 472 0 13 14 471 0 14 15 465 0 15 16 459 0 16 17 465 0 17 18 468 0 18 19 467 0 19 20 463 0 20 21 460 0 21 22 462 0 22 23 461 0 23 24 476 0 24 25 476 0 25 26 471 0 26 27 453 0 27 28 443 0 28 29 442 0 29 30 444 0 30 31 438 0 31 32 427 0 32 33 424 0 33 34 416 0 34 35 406 0 35 36 431 0 36 37 434 0 37 38 418 0 38 39 412 0 39 40 404 0 40 41 409 0 41 42 412 1 42 43 406 1 43 44 398 1 44 45 397 1 45 46 385 1 46 47 390 1 47 48 413 1 48 49 413 1 49 50 401 1 50 51 397 1 51 52 397 1 52 53 409 1 53 54 419 1 54 55 424 1 55 56 428 1 56 57 430 1 57 58 424 1 58 59 433 1 59 60 456 1 60 61 459 1 61 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) X t 466.9690 -10.2662 -0.8185 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -34.052 -14.778 -1.877 12.857 52.226 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 466.9690 5.7434 81.305 < 2e-16 *** X -10.2662 8.8147 -1.165 0.24892 t -0.8185 0.2350 -3.483 0.00095 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 18.81 on 58 degrees of freedom Multiple R-squared: 0.5055, Adjusted R-squared: 0.4885 F-statistic: 29.65 on 2 and 58 DF, p-value: 1.351e-09 > 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,] 1.538219e-02 3.076437e-02 0.98461781 [2,] 2.915593e-03 5.831187e-03 0.99708441 [3,] 6.831248e-04 1.366250e-03 0.99931688 [4,] 7.429050e-04 1.485810e-03 0.99925710 [5,] 4.214171e-04 8.428341e-04 0.99957858 [6,] 1.372491e-04 2.744982e-04 0.99986275 [7,] 1.809500e-04 3.618999e-04 0.99981905 [8,] 8.712769e-05 1.742554e-04 0.99991287 [9,] 2.638925e-05 5.277849e-05 0.99997361 [10,] 8.620573e-06 1.724115e-05 0.99999138 [11,] 7.571220e-06 1.514244e-05 0.99999243 [12,] 2.250610e-06 4.501220e-06 0.99999775 [13,] 6.178876e-07 1.235775e-06 0.99999938 [14,] 1.783672e-07 3.567345e-07 0.99999982 [15,] 8.113272e-08 1.622654e-07 0.99999992 [16,] 5.951530e-08 1.190306e-07 0.99999994 [17,] 2.784148e-08 5.568296e-08 0.99999997 [18,] 1.513245e-08 3.026490e-08 0.99999998 [19,] 3.161774e-08 6.323548e-08 0.99999997 [20,] 8.290224e-08 1.658045e-07 0.99999992 [21,] 2.041325e-07 4.082649e-07 0.99999980 [22,] 5.549060e-06 1.109812e-05 0.99999445 [23,] 2.993935e-04 5.987870e-04 0.99970061 [24,] 2.977435e-03 5.954871e-03 0.99702256 [25,] 1.442534e-02 2.885068e-02 0.98557466 [26,] 6.146444e-02 1.229289e-01 0.93853556 [27,] 1.926559e-01 3.853118e-01 0.80734409 [28,] 3.487307e-01 6.974614e-01 0.65126932 [29,] 4.970111e-01 9.940222e-01 0.50298891 [30,] 6.462856e-01 7.074288e-01 0.35371438 [31,] 6.876491e-01 6.247019e-01 0.31235093 [32,] 7.926384e-01 4.147231e-01 0.20736155 [33,] 8.051971e-01 3.896059e-01 0.19480293 [34,] 8.006470e-01 3.987061e-01 0.19935303 [35,] 7.955931e-01 4.088137e-01 0.20440685 [36,] 7.557914e-01 4.884171e-01 0.24420856 [37,] 8.581830e-01 2.836341e-01 0.14181703 [38,] 9.135217e-01 1.729566e-01 0.08647831 [39,] 9.178307e-01 1.643386e-01 0.08216930 [40,] 9.136977e-01 1.726046e-01 0.08630230 [41,] 8.779112e-01 2.441775e-01 0.12208876 [42,] 8.217221e-01 3.565557e-01 0.17827785 [43,] 9.049903e-01 1.900194e-01 0.09500969 [44,] 9.796008e-01 4.079844e-02 0.02039922 [45,] 9.750464e-01 4.990727e-02 0.02495363 [46,] 9.481651e-01 1.036697e-01 0.05183485 [47,] 9.159445e-01 1.681110e-01 0.08405551 [48,] 8.474861e-01 3.050277e-01 0.15251385 [49,] 7.704508e-01 4.590984e-01 0.22954918 [50,] 6.914554e-01 6.170892e-01 0.30854462 > postscript(file="/var/www/html/rcomp/tmp/1wzcx1258659474.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/2jghz1258659474.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/3sqez1258659474.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/47hdp1258659474.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/5i7w31258659474.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 -17.150511 -13.332010 -2.513509 -8.695008 -1.876507 -1.058005 1.760496 8 9 10 11 12 13 14 1.578997 -3.602502 -3.784001 -1.965500 14.853002 15.671503 15.490004 15 16 17 18 19 20 21 10.308505 5.127006 11.945508 15.764009 15.582510 12.401011 10.219512 22 23 24 25 26 27 28 13.038013 12.856515 28.675016 29.493517 25.312018 8.130519 -1.050980 29 30 31 32 33 34 35 -1.232478 1.586023 -3.595476 -13.776975 -15.958474 -23.139973 -32.321471 36 37 38 39 40 41 42 -6.502970 -2.684469 -17.865968 -23.047467 -30.228966 -24.410464 -10.325761 43 44 45 46 47 48 49 -15.507260 -22.688759 -22.870258 -34.051756 -28.233255 -4.414754 -3.596253 50 51 52 53 54 55 56 -14.777752 -17.959251 -17.140749 -4.322248 6.496253 12.314754 17.133255 57 58 59 60 61 19.951756 14.770258 24.588759 48.407260 52.225761 > postscript(file="/var/www/html/rcomp/tmp/6u31a1258659474.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 -17.150511 NA 1 -13.332010 -17.150511 2 -2.513509 -13.332010 3 -8.695008 -2.513509 4 -1.876507 -8.695008 5 -1.058005 -1.876507 6 1.760496 -1.058005 7 1.578997 1.760496 8 -3.602502 1.578997 9 -3.784001 -3.602502 10 -1.965500 -3.784001 11 14.853002 -1.965500 12 15.671503 14.853002 13 15.490004 15.671503 14 10.308505 15.490004 15 5.127006 10.308505 16 11.945508 5.127006 17 15.764009 11.945508 18 15.582510 15.764009 19 12.401011 15.582510 20 10.219512 12.401011 21 13.038013 10.219512 22 12.856515 13.038013 23 28.675016 12.856515 24 29.493517 28.675016 25 25.312018 29.493517 26 8.130519 25.312018 27 -1.050980 8.130519 28 -1.232478 -1.050980 29 1.586023 -1.232478 30 -3.595476 1.586023 31 -13.776975 -3.595476 32 -15.958474 -13.776975 33 -23.139973 -15.958474 34 -32.321471 -23.139973 35 -6.502970 -32.321471 36 -2.684469 -6.502970 37 -17.865968 -2.684469 38 -23.047467 -17.865968 39 -30.228966 -23.047467 40 -24.410464 -30.228966 41 -10.325761 -24.410464 42 -15.507260 -10.325761 43 -22.688759 -15.507260 44 -22.870258 -22.688759 45 -34.051756 -22.870258 46 -28.233255 -34.051756 47 -4.414754 -28.233255 48 -3.596253 -4.414754 49 -14.777752 -3.596253 50 -17.959251 -14.777752 51 -17.140749 -17.959251 52 -4.322248 -17.140749 53 6.496253 -4.322248 54 12.314754 6.496253 55 17.133255 12.314754 56 19.951756 17.133255 57 14.770258 19.951756 58 24.588759 14.770258 59 48.407260 24.588759 60 52.225761 48.407260 61 NA 52.225761 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -13.332010 -17.150511 [2,] -2.513509 -13.332010 [3,] -8.695008 -2.513509 [4,] -1.876507 -8.695008 [5,] -1.058005 -1.876507 [6,] 1.760496 -1.058005 [7,] 1.578997 1.760496 [8,] -3.602502 1.578997 [9,] -3.784001 -3.602502 [10,] -1.965500 -3.784001 [11,] 14.853002 -1.965500 [12,] 15.671503 14.853002 [13,] 15.490004 15.671503 [14,] 10.308505 15.490004 [15,] 5.127006 10.308505 [16,] 11.945508 5.127006 [17,] 15.764009 11.945508 [18,] 15.582510 15.764009 [19,] 12.401011 15.582510 [20,] 10.219512 12.401011 [21,] 13.038013 10.219512 [22,] 12.856515 13.038013 [23,] 28.675016 12.856515 [24,] 29.493517 28.675016 [25,] 25.312018 29.493517 [26,] 8.130519 25.312018 [27,] -1.050980 8.130519 [28,] -1.232478 -1.050980 [29,] 1.586023 -1.232478 [30,] -3.595476 1.586023 [31,] -13.776975 -3.595476 [32,] -15.958474 -13.776975 [33,] -23.139973 -15.958474 [34,] -32.321471 -23.139973 [35,] -6.502970 -32.321471 [36,] -2.684469 -6.502970 [37,] -17.865968 -2.684469 [38,] -23.047467 -17.865968 [39,] -30.228966 -23.047467 [40,] -24.410464 -30.228966 [41,] -10.325761 -24.410464 [42,] -15.507260 -10.325761 [43,] -22.688759 -15.507260 [44,] -22.870258 -22.688759 [45,] -34.051756 -22.870258 [46,] -28.233255 -34.051756 [47,] -4.414754 -28.233255 [48,] -3.596253 -4.414754 [49,] -14.777752 -3.596253 [50,] -17.959251 -14.777752 [51,] -17.140749 -17.959251 [52,] -4.322248 -17.140749 [53,] 6.496253 -4.322248 [54,] 12.314754 6.496253 [55,] 17.133255 12.314754 [56,] 19.951756 17.133255 [57,] 14.770258 19.951756 [58,] 24.588759 14.770258 [59,] 48.407260 24.588759 [60,] 52.225761 48.407260 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -13.332010 -17.150511 2 -2.513509 -13.332010 3 -8.695008 -2.513509 4 -1.876507 -8.695008 5 -1.058005 -1.876507 6 1.760496 -1.058005 7 1.578997 1.760496 8 -3.602502 1.578997 9 -3.784001 -3.602502 10 -1.965500 -3.784001 11 14.853002 -1.965500 12 15.671503 14.853002 13 15.490004 15.671503 14 10.308505 15.490004 15 5.127006 10.308505 16 11.945508 5.127006 17 15.764009 11.945508 18 15.582510 15.764009 19 12.401011 15.582510 20 10.219512 12.401011 21 13.038013 10.219512 22 12.856515 13.038013 23 28.675016 12.856515 24 29.493517 28.675016 25 25.312018 29.493517 26 8.130519 25.312018 27 -1.050980 8.130519 28 -1.232478 -1.050980 29 1.586023 -1.232478 30 -3.595476 1.586023 31 -13.776975 -3.595476 32 -15.958474 -13.776975 33 -23.139973 -15.958474 34 -32.321471 -23.139973 35 -6.502970 -32.321471 36 -2.684469 -6.502970 37 -17.865968 -2.684469 38 -23.047467 -17.865968 39 -30.228966 -23.047467 40 -24.410464 -30.228966 41 -10.325761 -24.410464 42 -15.507260 -10.325761 43 -22.688759 -15.507260 44 -22.870258 -22.688759 45 -34.051756 -22.870258 46 -28.233255 -34.051756 47 -4.414754 -28.233255 48 -3.596253 -4.414754 49 -14.777752 -3.596253 50 -17.959251 -14.777752 51 -17.140749 -17.959251 52 -4.322248 -17.140749 53 6.496253 -4.322248 54 12.314754 6.496253 55 17.133255 12.314754 56 19.951756 17.133255 57 14.770258 19.951756 58 24.588759 14.770258 59 48.407260 24.588759 60 52.225761 48.407260 > 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/7xzoy1258659474.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/892bb1258659474.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/9y3x11258659474.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/101bzk1258659474.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/119djm1258659474.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/12ubac1258659474.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/13bcd61258659474.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/14ebpe1258659474.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/15mzgk1258659474.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/160tpx1258659474.tab") + } > > system("convert tmp/1wzcx1258659474.ps tmp/1wzcx1258659474.png") > system("convert tmp/2jghz1258659474.ps tmp/2jghz1258659474.png") > system("convert tmp/3sqez1258659474.ps tmp/3sqez1258659474.png") > system("convert tmp/47hdp1258659474.ps tmp/47hdp1258659474.png") > system("convert tmp/5i7w31258659474.ps tmp/5i7w31258659474.png") > system("convert tmp/6u31a1258659474.ps tmp/6u31a1258659474.png") > system("convert tmp/7xzoy1258659474.ps tmp/7xzoy1258659474.png") > system("convert tmp/892bb1258659474.ps tmp/892bb1258659474.png") > system("convert tmp/9y3x11258659474.ps tmp/9y3x11258659474.png") > system("convert tmp/101bzk1258659474.ps tmp/101bzk1258659474.png") > > > proc.time() user system elapsed 2.486 1.552 5.263