R version 2.12.0 (2010-10-15) Copyright (C) 2010 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i486-pc-linux-gnu (32-bit) 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(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,0,506,0,502,1,516,1,528,1,533,1,536,1,537,1,524,1,536,1,587,1,597,1,581,1,564,1,558,1,575,1,580,1,575,1,563,1,552,1,537,1,545,1,601,1,604,1,586,1,564,1,549,1),dim=c(2,61),dimnames=list(c('werkloosheid','X'),1:61)) > y <- array(NA,dim=c(2,61),dimnames=list(c('werkloosheid','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]) + } + } > par20 = '' > par19 = '' > par18 = '' > par17 = '' > par16 = '' > par15 = '' > par14 = '' > par13 = '' > par12 = '' > par11 = '' > par10 = '' > par9 = '' > par8 = '' > par7 = '' > par6 = '' > par5 = '' > par4 = '' > par3 = 'No Linear Trend' > par2 = 'Do not include Seasonal Dummies' > par1 = '1' > ylab = '' > xlab = '' > main = '' > #'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 > 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 werkloosheid X 1 595 0 2 597 0 3 593 0 4 590 0 5 580 0 6 574 0 7 573 0 8 573 0 9 620 0 10 626 0 11 620 0 12 588 0 13 566 0 14 557 0 15 561 0 16 549 0 17 532 0 18 526 0 19 511 0 20 499 0 21 555 0 22 565 0 23 542 0 24 527 0 25 510 0 26 514 0 27 517 0 28 508 0 29 493 0 30 490 0 31 469 0 32 478 0 33 528 0 34 534 0 35 518 0 36 506 0 37 502 1 38 516 1 39 528 1 40 533 1 41 536 1 42 537 1 43 524 1 44 536 1 45 587 1 46 597 1 47 581 1 48 564 1 49 558 1 50 575 1 51 580 1 52 575 1 53 563 1 54 552 1 55 537 1 56 545 1 57 601 1 58 604 1 59 586 1 60 564 1 61 549 1 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) X 546.78 10.42 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -77.78 -28.78 0.80 26.22 79.22 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 546.778 6.126 89.261 <2e-16 *** X 10.422 9.568 1.089 0.280 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 36.75 on 59 degrees of freedom Multiple R-squared: 0.01971, Adjusted R-squared: 0.003097 F-statistic: 1.186 on 1 and 59 DF, p-value: 0.2805 > 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.013657228 0.027314456 0.986342772 [2,] 0.012678501 0.025357003 0.987321499 [3,] 0.007840337 0.015680674 0.992159663 [4,] 0.004025432 0.008050864 0.995974568 [5,] 0.025882566 0.051765131 0.974117434 [6,] 0.086895067 0.173790135 0.913104933 [7,] 0.149300716 0.298601433 0.850699284 [8,] 0.131622059 0.263244118 0.868377941 [9,] 0.163733657 0.327467313 0.836266343 [10,] 0.231453875 0.462907750 0.768546125 [11,] 0.271657700 0.543315400 0.728342300 [12,] 0.362985130 0.725970259 0.637014870 [13,] 0.541628787 0.916742426 0.458371213 [14,] 0.687949077 0.624101847 0.312050923 [15,] 0.836007108 0.327985784 0.163992892 [16,] 0.931847656 0.136304688 0.068152344 [17,] 0.929506080 0.140987840 0.070493920 [18,] 0.942008366 0.115983269 0.057991634 [19,] 0.943825551 0.112348899 0.056174449 [20,] 0.947584657 0.104830687 0.052415343 [21,] 0.958521637 0.082956727 0.041478363 [22,] 0.961601028 0.076797944 0.038398972 [23,] 0.961179763 0.077640475 0.038820237 [24,] 0.962645671 0.074708658 0.037354329 [25,] 0.970571584 0.058856833 0.029428416 [26,] 0.976342638 0.047314725 0.023657362 [27,] 0.990710618 0.018578764 0.009289382 [28,] 0.995199162 0.009601675 0.004800838 [29,] 0.992248582 0.015502835 0.007751418 [30,] 0.988522884 0.022954232 0.011477116 [31,] 0.983101152 0.033797697 0.016898848 [32,] 0.976701874 0.046596252 0.023298126 [33,] 0.987061568 0.025876863 0.012938432 [34,] 0.990304183 0.019391635 0.009695817 [35,] 0.990301510 0.019396980 0.009698490 [36,] 0.989397683 0.021204634 0.010602317 [37,] 0.988003984 0.023992032 0.011996016 [38,] 0.986761594 0.026476813 0.013238406 [39,] 0.992822507 0.014354985 0.007177493 [40,] 0.994413629 0.011172742 0.005586371 [41,] 0.992958664 0.014082672 0.007041336 [42,] 0.994072478 0.011855044 0.005927522 [43,] 0.990297475 0.019405049 0.009702525 [44,] 0.981214008 0.037571984 0.018785992 [45,] 0.966935431 0.066129137 0.033064569 [46,] 0.942219174 0.115561651 0.057780826 [47,] 0.908493189 0.183013622 0.091506811 [48,] 0.851412803 0.297174394 0.148587197 [49,] 0.762342006 0.475315987 0.237657994 [50,] 0.667295807 0.665408386 0.332704193 [51,] 0.665775048 0.668449904 0.334224952 [52,] 0.649153372 0.701693255 0.350846628 > postscript(file="/var/www/rcomp/tmp/10dqz1293210140.ps",horizontal=F,onefile=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/rcomp/tmp/2b5721293210140.ps",horizontal=F,onefile=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/rcomp/tmp/3b5721293210140.ps",horizontal=F,onefile=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/rcomp/tmp/4b5721293210140.ps",horizontal=F,onefile=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/rcomp/tmp/54w7o1293210140.ps",horizontal=F,onefile=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 48.222222 50.222222 46.222222 43.222222 33.222222 27.222222 26.222222 8 9 10 11 12 13 14 26.222222 73.222222 79.222222 73.222222 41.222222 19.222222 10.222222 15 16 17 18 19 20 21 14.222222 2.222222 -14.777778 -20.777778 -35.777778 -47.777778 8.222222 22 23 24 25 26 27 28 18.222222 -4.777778 -19.777778 -36.777778 -32.777778 -29.777778 -38.777778 29 30 31 32 33 34 35 -53.777778 -56.777778 -77.777778 -68.777778 -18.777778 -12.777778 -28.777778 36 37 38 39 40 41 42 -40.777778 -55.200000 -41.200000 -29.200000 -24.200000 -21.200000 -20.200000 43 44 45 46 47 48 49 -33.200000 -21.200000 29.800000 39.800000 23.800000 6.800000 0.800000 50 51 52 53 54 55 56 17.800000 22.800000 17.800000 5.800000 -5.200000 -20.200000 -12.200000 57 58 59 60 61 43.800000 46.800000 28.800000 6.800000 -8.200000 > postscript(file="/var/www/rcomp/tmp/64w7o1293210140.ps",horizontal=F,onefile=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 48.222222 NA 1 50.222222 48.222222 2 46.222222 50.222222 3 43.222222 46.222222 4 33.222222 43.222222 5 27.222222 33.222222 6 26.222222 27.222222 7 26.222222 26.222222 8 73.222222 26.222222 9 79.222222 73.222222 10 73.222222 79.222222 11 41.222222 73.222222 12 19.222222 41.222222 13 10.222222 19.222222 14 14.222222 10.222222 15 2.222222 14.222222 16 -14.777778 2.222222 17 -20.777778 -14.777778 18 -35.777778 -20.777778 19 -47.777778 -35.777778 20 8.222222 -47.777778 21 18.222222 8.222222 22 -4.777778 18.222222 23 -19.777778 -4.777778 24 -36.777778 -19.777778 25 -32.777778 -36.777778 26 -29.777778 -32.777778 27 -38.777778 -29.777778 28 -53.777778 -38.777778 29 -56.777778 -53.777778 30 -77.777778 -56.777778 31 -68.777778 -77.777778 32 -18.777778 -68.777778 33 -12.777778 -18.777778 34 -28.777778 -12.777778 35 -40.777778 -28.777778 36 -55.200000 -40.777778 37 -41.200000 -55.200000 38 -29.200000 -41.200000 39 -24.200000 -29.200000 40 -21.200000 -24.200000 41 -20.200000 -21.200000 42 -33.200000 -20.200000 43 -21.200000 -33.200000 44 29.800000 -21.200000 45 39.800000 29.800000 46 23.800000 39.800000 47 6.800000 23.800000 48 0.800000 6.800000 49 17.800000 0.800000 50 22.800000 17.800000 51 17.800000 22.800000 52 5.800000 17.800000 53 -5.200000 5.800000 54 -20.200000 -5.200000 55 -12.200000 -20.200000 56 43.800000 -12.200000 57 46.800000 43.800000 58 28.800000 46.800000 59 6.800000 28.800000 60 -8.200000 6.800000 61 NA -8.200000 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 50.222222 48.222222 [2,] 46.222222 50.222222 [3,] 43.222222 46.222222 [4,] 33.222222 43.222222 [5,] 27.222222 33.222222 [6,] 26.222222 27.222222 [7,] 26.222222 26.222222 [8,] 73.222222 26.222222 [9,] 79.222222 73.222222 [10,] 73.222222 79.222222 [11,] 41.222222 73.222222 [12,] 19.222222 41.222222 [13,] 10.222222 19.222222 [14,] 14.222222 10.222222 [15,] 2.222222 14.222222 [16,] -14.777778 2.222222 [17,] -20.777778 -14.777778 [18,] -35.777778 -20.777778 [19,] -47.777778 -35.777778 [20,] 8.222222 -47.777778 [21,] 18.222222 8.222222 [22,] -4.777778 18.222222 [23,] -19.777778 -4.777778 [24,] -36.777778 -19.777778 [25,] -32.777778 -36.777778 [26,] -29.777778 -32.777778 [27,] -38.777778 -29.777778 [28,] -53.777778 -38.777778 [29,] -56.777778 -53.777778 [30,] -77.777778 -56.777778 [31,] -68.777778 -77.777778 [32,] -18.777778 -68.777778 [33,] -12.777778 -18.777778 [34,] -28.777778 -12.777778 [35,] -40.777778 -28.777778 [36,] -55.200000 -40.777778 [37,] -41.200000 -55.200000 [38,] -29.200000 -41.200000 [39,] -24.200000 -29.200000 [40,] -21.200000 -24.200000 [41,] -20.200000 -21.200000 [42,] -33.200000 -20.200000 [43,] -21.200000 -33.200000 [44,] 29.800000 -21.200000 [45,] 39.800000 29.800000 [46,] 23.800000 39.800000 [47,] 6.800000 23.800000 [48,] 0.800000 6.800000 [49,] 17.800000 0.800000 [50,] 22.800000 17.800000 [51,] 17.800000 22.800000 [52,] 5.800000 17.800000 [53,] -5.200000 5.800000 [54,] -20.200000 -5.200000 [55,] -12.200000 -20.200000 [56,] 43.800000 -12.200000 [57,] 46.800000 43.800000 [58,] 28.800000 46.800000 [59,] 6.800000 28.800000 [60,] -8.200000 6.800000 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 50.222222 48.222222 2 46.222222 50.222222 3 43.222222 46.222222 4 33.222222 43.222222 5 27.222222 33.222222 6 26.222222 27.222222 7 26.222222 26.222222 8 73.222222 26.222222 9 79.222222 73.222222 10 73.222222 79.222222 11 41.222222 73.222222 12 19.222222 41.222222 13 10.222222 19.222222 14 14.222222 10.222222 15 2.222222 14.222222 16 -14.777778 2.222222 17 -20.777778 -14.777778 18 -35.777778 -20.777778 19 -47.777778 -35.777778 20 8.222222 -47.777778 21 18.222222 8.222222 22 -4.777778 18.222222 23 -19.777778 -4.777778 24 -36.777778 -19.777778 25 -32.777778 -36.777778 26 -29.777778 -32.777778 27 -38.777778 -29.777778 28 -53.777778 -38.777778 29 -56.777778 -53.777778 30 -77.777778 -56.777778 31 -68.777778 -77.777778 32 -18.777778 -68.777778 33 -12.777778 -18.777778 34 -28.777778 -12.777778 35 -40.777778 -28.777778 36 -55.200000 -40.777778 37 -41.200000 -55.200000 38 -29.200000 -41.200000 39 -24.200000 -29.200000 40 -21.200000 -24.200000 41 -20.200000 -21.200000 42 -33.200000 -20.200000 43 -21.200000 -33.200000 44 29.800000 -21.200000 45 39.800000 29.800000 46 23.800000 39.800000 47 6.800000 23.800000 48 0.800000 6.800000 49 17.800000 0.800000 50 22.800000 17.800000 51 17.800000 22.800000 52 5.800000 17.800000 53 -5.200000 5.800000 54 -20.200000 -5.200000 55 -12.200000 -20.200000 56 43.800000 -12.200000 57 46.800000 43.800000 58 28.800000 46.800000 59 6.800000 28.800000 60 -8.200000 6.800000 > 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/rcomp/tmp/7f5or1293210140.ps",horizontal=F,onefile=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/rcomp/tmp/8pe5b1293210140.ps",horizontal=F,onefile=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/rcomp/tmp/9pe5b1293210140.ps",horizontal=F,onefile=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/rcomp/tmp/10pe5b1293210140.ps",horizontal=F,onefile=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/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/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/rcomp/tmp/11ax3h1293210140.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/rcomp/tmp/12efk51293210140.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/rcomp/tmp/13kghh1293210140.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/rcomp/tmp/14dqyk1293210140.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/rcomp/tmp/15hqxq1293210140.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/rcomp/tmp/16krdv1293210140.tab") + } > > try(system("convert tmp/10dqz1293210140.ps tmp/10dqz1293210140.png",intern=TRUE)) character(0) > try(system("convert tmp/2b5721293210140.ps tmp/2b5721293210140.png",intern=TRUE)) character(0) > try(system("convert tmp/3b5721293210140.ps tmp/3b5721293210140.png",intern=TRUE)) character(0) > try(system("convert tmp/4b5721293210140.ps tmp/4b5721293210140.png",intern=TRUE)) character(0) > try(system("convert tmp/54w7o1293210140.ps tmp/54w7o1293210140.png",intern=TRUE)) character(0) > try(system("convert tmp/64w7o1293210140.ps tmp/64w7o1293210140.png",intern=TRUE)) character(0) > try(system("convert tmp/7f5or1293210140.ps tmp/7f5or1293210140.png",intern=TRUE)) character(0) > try(system("convert tmp/8pe5b1293210140.ps tmp/8pe5b1293210140.png",intern=TRUE)) character(0) > try(system("convert tmp/9pe5b1293210140.ps tmp/9pe5b1293210140.png",intern=TRUE)) character(0) > try(system("convert tmp/10pe5b1293210140.ps tmp/10pe5b1293210140.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 3.110 0.810 3.866