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(611,0,594,0,595,0,591,0,589,0,584,0,573,0,567,0,569,0,621,0,629,0,628,0,612,0,595,0,597,0,593,0,590,0,580,0,574,0,573,0,573,0,620,0,626,0,620,0,588,0,566,0,557,0,561,0,549,0,532,0,526,0,511,0,499,0,555,0,565,0,542,0,527,0,510,0,514,0,517,0,508,0,493,0,490,0,469,0,478,0,528,0,534,0,518,1,506,1,502,1,516,1,528,1,533,1,536,1,537,1,524,1,536,1,587,1,597,1,581,1),dim=c(2,60),dimnames=list(c('Y','X'),1:60)) > y <- array(NA,dim=c(2,60),dimnames=list(c('Y','X'),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 Y X 1 611 0 2 594 0 3 595 0 4 591 0 5 589 0 6 584 0 7 573 0 8 567 0 9 569 0 10 621 0 11 629 0 12 628 0 13 612 0 14 595 0 15 597 0 16 593 0 17 590 0 18 580 0 19 574 0 20 573 0 21 573 0 22 620 0 23 626 0 24 620 0 25 588 0 26 566 0 27 557 0 28 561 0 29 549 0 30 532 0 31 526 0 32 511 0 33 499 0 34 555 0 35 565 0 36 542 0 37 527 0 38 510 0 39 514 0 40 517 0 41 508 0 42 493 0 43 490 0 44 469 0 45 478 0 46 528 0 47 534 0 48 518 1 49 506 1 50 502 1 51 516 1 52 528 1 53 533 1 54 536 1 55 537 1 56 524 1 57 536 1 58 587 1 59 597 1 60 581 1 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) X 562.19 -23.65 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -93.1915 -30.7782 0.8085 31.0585 66.8085 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 562.191 5.975 94.092 <2e-16 *** X -23.653 12.836 -1.843 0.0705 . --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 40.96 on 58 degrees of freedom Multiple R-squared: 0.05531, Adjusted R-squared: 0.03902 F-statistic: 3.396 on 1 and 58 DF, p-value: 0.07049 > 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.0191196987 0.038239397 0.98088030 [2,] 0.0071491394 0.014298279 0.99285086 [3,] 0.0067253592 0.013450718 0.99327464 [4,] 0.0067045929 0.013409186 0.99329541 [5,] 0.0040871491 0.008174298 0.99591285 [6,] 0.0092898619 0.018579724 0.99071014 [7,] 0.0211205696 0.042241139 0.97887943 [8,] 0.0314089671 0.062817934 0.96859103 [9,] 0.0235536961 0.047107392 0.97644630 [10,] 0.0138147727 0.027629545 0.98618523 [11,] 0.0081720306 0.016344061 0.99182797 [12,] 0.0047927468 0.009585494 0.99520725 [13,] 0.0028492445 0.005698489 0.99715076 [14,] 0.0019582529 0.003916506 0.99804175 [15,] 0.0015703436 0.003140687 0.99842966 [16,] 0.0012586674 0.002517335 0.99874133 [17,] 0.0009827965 0.001965593 0.99901720 [18,] 0.0022439492 0.004487898 0.99775605 [19,] 0.0089081617 0.017816323 0.99109184 [20,] 0.0290453157 0.058090631 0.97095468 [21,] 0.0382508045 0.076501609 0.96174920 [22,] 0.0550599785 0.110119957 0.94494002 [23,] 0.0864118040 0.172823608 0.91358820 [24,] 0.1216002431 0.243200486 0.87839976 [25,] 0.1818880568 0.363776114 0.81811194 [26,] 0.2964768612 0.592953722 0.70352314 [27,] 0.4179834286 0.835966857 0.58201657 [28,] 0.5791940383 0.841611923 0.42080596 [29,] 0.7386463120 0.522707376 0.26135369 [30,] 0.7563995467 0.487200907 0.24360045 [31,] 0.8192934695 0.361413061 0.18070653 [32,] 0.8394505761 0.321098848 0.16054942 [33,] 0.8504047728 0.299190454 0.14959523 [34,] 0.8644671488 0.271065702 0.13553285 [35,] 0.8658964968 0.268207006 0.13410350 [36,] 0.8615796290 0.276840742 0.13842037 [37,] 0.8558460600 0.288307880 0.14415394 [38,] 0.8596792004 0.280641599 0.14032080 [39,] 0.8600980449 0.279803910 0.13990196 [40,] 0.9103013996 0.179397201 0.08969860 [41,] 0.9429963290 0.114007342 0.05700367 [42,] 0.9130933942 0.173813212 0.08690661 [43,] 0.8686776021 0.262644796 0.13132240 [44,] 0.8236387892 0.352722422 0.17636121 [45,] 0.8086072904 0.382785419 0.19139271 [46,] 0.8265152797 0.346969441 0.17348472 [47,] 0.8068617618 0.386276476 0.19313824 [48,] 0.7499864820 0.500027036 0.25001352 [49,] 0.6700334773 0.659933045 0.32996652 [50,] 0.5707625230 0.858474954 0.42923748 [51,] 0.4640697446 0.928139489 0.53593026 > postscript(file="/var/www/html/rcomp/tmp/1nkl21258656375.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/26vz11258656375.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/3hacy1258656375.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/4b7am1258656375.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/5b9bv1258656375.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 7 48.808511 31.808511 32.808511 28.808511 26.808511 21.808511 10.808511 8 9 10 11 12 13 14 4.808511 6.808511 58.808511 66.808511 65.808511 49.808511 32.808511 15 16 17 18 19 20 21 34.808511 30.808511 27.808511 17.808511 11.808511 10.808511 10.808511 22 23 24 25 26 27 28 57.808511 63.808511 57.808511 25.808511 3.808511 -5.191489 -1.191489 29 30 31 32 33 34 35 -13.191489 -30.191489 -36.191489 -51.191489 -63.191489 -7.191489 2.808511 36 37 38 39 40 41 42 -20.191489 -35.191489 -52.191489 -48.191489 -45.191489 -54.191489 -69.191489 43 44 45 46 47 48 49 -72.191489 -93.191489 -84.191489 -34.191489 -28.191489 -20.538462 -32.538462 50 51 52 53 54 55 56 -36.538462 -22.538462 -10.538462 -5.538462 -2.538462 -1.538462 -14.538462 57 58 59 60 -2.538462 48.461538 58.461538 42.461538 > postscript(file="/var/www/html/rcomp/tmp/6wuv01258656375.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 48.808511 NA 1 31.808511 48.808511 2 32.808511 31.808511 3 28.808511 32.808511 4 26.808511 28.808511 5 21.808511 26.808511 6 10.808511 21.808511 7 4.808511 10.808511 8 6.808511 4.808511 9 58.808511 6.808511 10 66.808511 58.808511 11 65.808511 66.808511 12 49.808511 65.808511 13 32.808511 49.808511 14 34.808511 32.808511 15 30.808511 34.808511 16 27.808511 30.808511 17 17.808511 27.808511 18 11.808511 17.808511 19 10.808511 11.808511 20 10.808511 10.808511 21 57.808511 10.808511 22 63.808511 57.808511 23 57.808511 63.808511 24 25.808511 57.808511 25 3.808511 25.808511 26 -5.191489 3.808511 27 -1.191489 -5.191489 28 -13.191489 -1.191489 29 -30.191489 -13.191489 30 -36.191489 -30.191489 31 -51.191489 -36.191489 32 -63.191489 -51.191489 33 -7.191489 -63.191489 34 2.808511 -7.191489 35 -20.191489 2.808511 36 -35.191489 -20.191489 37 -52.191489 -35.191489 38 -48.191489 -52.191489 39 -45.191489 -48.191489 40 -54.191489 -45.191489 41 -69.191489 -54.191489 42 -72.191489 -69.191489 43 -93.191489 -72.191489 44 -84.191489 -93.191489 45 -34.191489 -84.191489 46 -28.191489 -34.191489 47 -20.538462 -28.191489 48 -32.538462 -20.538462 49 -36.538462 -32.538462 50 -22.538462 -36.538462 51 -10.538462 -22.538462 52 -5.538462 -10.538462 53 -2.538462 -5.538462 54 -1.538462 -2.538462 55 -14.538462 -1.538462 56 -2.538462 -14.538462 57 48.461538 -2.538462 58 58.461538 48.461538 59 42.461538 58.461538 60 NA 42.461538 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 31.808511 48.808511 [2,] 32.808511 31.808511 [3,] 28.808511 32.808511 [4,] 26.808511 28.808511 [5,] 21.808511 26.808511 [6,] 10.808511 21.808511 [7,] 4.808511 10.808511 [8,] 6.808511 4.808511 [9,] 58.808511 6.808511 [10,] 66.808511 58.808511 [11,] 65.808511 66.808511 [12,] 49.808511 65.808511 [13,] 32.808511 49.808511 [14,] 34.808511 32.808511 [15,] 30.808511 34.808511 [16,] 27.808511 30.808511 [17,] 17.808511 27.808511 [18,] 11.808511 17.808511 [19,] 10.808511 11.808511 [20,] 10.808511 10.808511 [21,] 57.808511 10.808511 [22,] 63.808511 57.808511 [23,] 57.808511 63.808511 [24,] 25.808511 57.808511 [25,] 3.808511 25.808511 [26,] -5.191489 3.808511 [27,] -1.191489 -5.191489 [28,] -13.191489 -1.191489 [29,] -30.191489 -13.191489 [30,] -36.191489 -30.191489 [31,] -51.191489 -36.191489 [32,] -63.191489 -51.191489 [33,] -7.191489 -63.191489 [34,] 2.808511 -7.191489 [35,] -20.191489 2.808511 [36,] -35.191489 -20.191489 [37,] -52.191489 -35.191489 [38,] -48.191489 -52.191489 [39,] -45.191489 -48.191489 [40,] -54.191489 -45.191489 [41,] -69.191489 -54.191489 [42,] -72.191489 -69.191489 [43,] -93.191489 -72.191489 [44,] -84.191489 -93.191489 [45,] -34.191489 -84.191489 [46,] -28.191489 -34.191489 [47,] -20.538462 -28.191489 [48,] -32.538462 -20.538462 [49,] -36.538462 -32.538462 [50,] -22.538462 -36.538462 [51,] -10.538462 -22.538462 [52,] -5.538462 -10.538462 [53,] -2.538462 -5.538462 [54,] -1.538462 -2.538462 [55,] -14.538462 -1.538462 [56,] -2.538462 -14.538462 [57,] 48.461538 -2.538462 [58,] 58.461538 48.461538 [59,] 42.461538 58.461538 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 31.808511 48.808511 2 32.808511 31.808511 3 28.808511 32.808511 4 26.808511 28.808511 5 21.808511 26.808511 6 10.808511 21.808511 7 4.808511 10.808511 8 6.808511 4.808511 9 58.808511 6.808511 10 66.808511 58.808511 11 65.808511 66.808511 12 49.808511 65.808511 13 32.808511 49.808511 14 34.808511 32.808511 15 30.808511 34.808511 16 27.808511 30.808511 17 17.808511 27.808511 18 11.808511 17.808511 19 10.808511 11.808511 20 10.808511 10.808511 21 57.808511 10.808511 22 63.808511 57.808511 23 57.808511 63.808511 24 25.808511 57.808511 25 3.808511 25.808511 26 -5.191489 3.808511 27 -1.191489 -5.191489 28 -13.191489 -1.191489 29 -30.191489 -13.191489 30 -36.191489 -30.191489 31 -51.191489 -36.191489 32 -63.191489 -51.191489 33 -7.191489 -63.191489 34 2.808511 -7.191489 35 -20.191489 2.808511 36 -35.191489 -20.191489 37 -52.191489 -35.191489 38 -48.191489 -52.191489 39 -45.191489 -48.191489 40 -54.191489 -45.191489 41 -69.191489 -54.191489 42 -72.191489 -69.191489 43 -93.191489 -72.191489 44 -84.191489 -93.191489 45 -34.191489 -84.191489 46 -28.191489 -34.191489 47 -20.538462 -28.191489 48 -32.538462 -20.538462 49 -36.538462 -32.538462 50 -22.538462 -36.538462 51 -10.538462 -22.538462 52 -5.538462 -10.538462 53 -2.538462 -5.538462 54 -1.538462 -2.538462 55 -14.538462 -1.538462 56 -2.538462 -14.538462 57 48.461538 -2.538462 58 58.461538 48.461538 59 42.461538 58.461538 > 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/7j86z1258656375.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/81nax1258656375.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/9ckag1258656375.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/10r6rc1258656375.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/11y7871258656375.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/12gsn81258656375.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/135dxh1258656375.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/14rxnn1258656375.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/15tnoe1258656375.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/16e3hg1258656375.tab") + } > system("convert tmp/1nkl21258656375.ps tmp/1nkl21258656375.png") > system("convert tmp/26vz11258656375.ps tmp/26vz11258656375.png") > system("convert tmp/3hacy1258656375.ps tmp/3hacy1258656375.png") > system("convert tmp/4b7am1258656375.ps tmp/4b7am1258656375.png") > system("convert tmp/5b9bv1258656375.ps tmp/5b9bv1258656375.png") > system("convert tmp/6wuv01258656375.ps tmp/6wuv01258656375.png") > system("convert tmp/7j86z1258656375.ps tmp/7j86z1258656375.png") > system("convert tmp/81nax1258656375.ps tmp/81nax1258656375.png") > system("convert tmp/9ckag1258656375.ps tmp/9ckag1258656375.png") > system("convert tmp/10r6rc1258656375.ps tmp/10r6rc1258656375.png") > > > proc.time() user system elapsed 2.421 1.523 3.296