R version 2.13.0 (2011-04-13) Copyright (C) 2011 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(15 + ,23 + ,14 + ,8 + ,6 + ,19 + ,12 + ,16 + ,39 + ,23 + ,22 + ,13 + ,55 + ,40 + ,17 + ,94 + ,69 + ,50 + ,35 + ,98 + ,74 + ,18 + ,182 + ,127 + ,117 + ,77 + ,188 + ,137 + ,19 + ,347 + ,258 + ,188 + ,148 + ,310 + ,257 + ,20 + ,498 + ,430 + ,298 + ,248 + ,404 + ,336 + ,21 + ,646 + ,590 + ,404 + ,349 + ,491 + ,455 + ,22 + ,802 + ,731 + ,535 + ,465 + ,642 + ,578 + ,23 + ,786 + ,783 + ,642 + ,593 + ,753 + ,675 + ,24 + ,875 + ,830 + ,811 + ,703 + ,879 + ,818 + ,25 + ,985 + ,909 + ,1015 + ,912 + ,1034 + ,951 + ,26 + ,1022 + ,1011 + ,1269 + ,1150 + ,1243 + ,1149 + ,27 + ,1064 + ,1034 + ,1442 + ,1368 + ,1355 + ,1299 + ,28 + ,1120 + ,1126 + ,1555 + ,1506 + ,1437 + ,1411 + ,29 + ,1270 + ,1213 + ,1610 + ,1599 + ,1412 + ,1433 + ,30 + ,1285 + ,1297 + ,1537 + ,1560 + ,1339 + ,1388 + ,31 + ,1271 + ,1261 + ,1386 + ,1486 + ,1211 + ,1299 + ,32 + ,1289 + ,1237 + ,1159 + ,1274 + ,1089 + ,1142 + ,33 + ,1197 + ,1280 + ,992 + ,1061 + ,940 + ,1012 + ,34 + ,1086 + ,1133 + ,803 + ,923 + ,806 + ,858 + ,35 + ,998 + ,1085 + ,664 + ,725 + ,687 + ,760 + ,36 + ,842 + ,874 + ,509 + ,581 + ,528 + ,605 + ,37 + ,742 + ,817 + ,381 + ,443 + ,456 + ,479 + ,38 + ,623 + ,669 + ,271 + ,322 + ,346 + ,414 + ,39 + ,514 + ,570 + ,199 + ,236 + ,242 + ,281 + ,40 + ,423 + ,460 + ,137 + ,165 + ,168 + ,199 + ,41 + ,264 + ,357 + ,87 + ,109 + ,123 + ,150 + ,42 + ,158 + ,213 + ,49 + ,66 + ,67 + ,89 + ,43 + ,105 + ,107 + ,27 + ,35 + ,35 + ,47 + ,44 + ,59 + ,93 + ,10 + ,17 + ,17 + ,28 + ,45 + ,46 + ,45 + ,6 + ,6 + ,12 + ,14 + ,46 + ,16 + ,25 + ,4 + ,5 + ,8 + ,7 + ,47 + ,22 + ,18 + ,1 + ,2 + ,4 + ,6 + ,48 + ,3 + ,14 + ,1 + ,1 + ,2 + ,4 + ,49 + ,5 + ,3 + ,0 + ,1 + ,1 + ,1) + ,dim=c(7 + ,35) + ,dimnames=list(c('Jaar' + ,'VerstrB' + ,'ExactB' + ,'VerstrV' + ,'ExactV' + ,'VerstrW' + ,'ExactW ') + ,1:35)) > y <- array(NA,dim=c(7,35),dimnames=list(c('Jaar','VerstrB','ExactB','VerstrV','ExactV','VerstrW','ExactW '),1:35)) > 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 > 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 Jaar VerstrB ExactB VerstrV ExactV VerstrW ExactW\r t 1 15 23 14 8 6 19 12 1 2 16 39 23 22 13 55 40 2 3 17 94 69 50 35 98 74 3 4 18 182 127 117 77 188 137 4 5 19 347 258 188 148 310 257 5 6 20 498 430 298 248 404 336 6 7 21 646 590 404 349 491 455 7 8 22 802 731 535 465 642 578 8 9 23 786 783 642 593 753 675 9 10 24 875 830 811 703 879 818 10 11 25 985 909 1015 912 1034 951 11 12 26 1022 1011 1269 1150 1243 1149 12 13 27 1064 1034 1442 1368 1355 1299 13 14 28 1120 1126 1555 1506 1437 1411 14 15 29 1270 1213 1610 1599 1412 1433 15 16 30 1285 1297 1537 1560 1339 1388 16 17 31 1271 1261 1386 1486 1211 1299 17 18 32 1289 1237 1159 1274 1089 1142 18 19 33 1197 1280 992 1061 940 1012 19 20 34 1086 1133 803 923 806 858 20 21 35 998 1085 664 725 687 760 21 22 36 842 874 509 581 528 605 22 23 37 742 817 381 443 456 479 23 24 38 623 669 271 322 346 414 24 25 39 514 570 199 236 242 281 25 26 40 423 460 137 165 168 199 26 27 41 264 357 87 109 123 150 27 28 42 158 213 49 66 67 89 28 29 43 105 107 27 35 35 47 29 30 44 59 93 10 17 17 28 30 31 45 46 45 6 6 12 14 31 32 46 16 25 4 5 8 7 32 33 47 22 18 1 2 4 6 33 34 48 3 14 1 1 2 4 34 35 49 5 3 0 1 1 1 35 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) VerstrB ExactB VerstrV ExactV VerstrW 1.400e+01 -1.028e-17 1.508e-17 6.505e-18 5.033e-18 -1.048e-17 `ExactW\r` t -6.736e-18 1.000e+00 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -7.289e-15 -9.199e-16 -1.578e-16 9.937e-16 5.517e-15 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 1.400e+01 1.417e-15 9.880e+15 <2e-16 *** VerstrB -1.028e-17 1.253e-17 -8.210e-01 0.419 ExactB 1.508e-17 1.214e-17 1.243e+00 0.225 VerstrV 6.505e-18 2.589e-17 2.510e-01 0.804 ExactV 5.033e-18 1.798e-17 2.800e-01 0.782 VerstrW -1.048e-17 2.275e-17 -4.610e-01 0.649 `ExactW\r` -6.736e-18 3.301e-17 -2.040e-01 0.840 t 1.000e+00 5.255e-17 1.903e+16 <2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.173e-15 on 27 degrees of freedom Multiple R-squared: 1, Adjusted R-squared: 1 F-statistic: 1.08e+32 on 7 and 27 DF, p-value: < 2.2e-16 > 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,] 2.641679e-01 5.283359e-01 7.358321e-01 [2,] 4.601568e-05 9.203135e-05 9.999540e-01 [3,] 3.655003e-01 7.310006e-01 6.344997e-01 [4,] 8.477891e-01 3.044218e-01 1.522109e-01 [5,] 7.420559e-01 5.158882e-01 2.579441e-01 [6,] 8.760923e-09 1.752185e-08 1.000000e+00 [7,] 2.359915e-04 4.719830e-04 9.997640e-01 [8,] 1.553190e-02 3.106379e-02 9.844681e-01 [9,] 1.000000e+00 3.620274e-08 1.810137e-08 [10,] 3.845355e-01 7.690711e-01 6.154645e-01 [11,] 9.877450e-01 2.451006e-02 1.225503e-02 [12,] 9.785260e-01 4.294794e-02 2.147397e-02 [13,] 9.994297e-01 1.140687e-03 5.703436e-04 [14,] 7.514903e-01 4.970195e-01 2.485097e-01 > postscript(file="/var/wessaorg/rcomp/tmp/1ehml1322061482.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/wessaorg/rcomp/tmp/284881322061482.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/wessaorg/rcomp/tmp/3fsqp1322061482.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/wessaorg/rcomp/tmp/4vu531322061482.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/wessaorg/rcomp/tmp/536cf1322061482.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 = 35 Frequency = 1 1 2 3 4 5 5.516637e-15 1.009045e-15 -7.289095e-15 -1.437423e-15 2.100041e-15 6 7 8 9 10 -4.840497e-16 -1.751985e-15 1.547292e-15 1.621361e-16 2.098041e-15 11 12 13 14 15 -3.740634e-16 -9.073195e-16 -2.037592e-16 4.294174e-16 -7.175394e-16 16 17 18 19 20 6.143558e-17 -3.058288e-16 -5.973073e-16 1.235603e-15 9.680954e-16 21 22 23 24 25 -1.577980e-16 9.783516e-16 3.124230e-17 -1.073351e-15 -1.277340e-15 26 27 28 29 30 -1.071147e-15 -4.734615e-16 -1.189811e-15 -9.325653e-16 1.704872e-15 31 32 33 34 35 1.590045e-15 1.885672e-15 5.659039e-16 -2.167553e-15 5.275685e-16 > postscript(file="/var/wessaorg/rcomp/tmp/6lpio1322061482.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 = 35 Frequency = 1 lag(myerror, k = 1) myerror 0 5.516637e-15 NA 1 1.009045e-15 5.516637e-15 2 -7.289095e-15 1.009045e-15 3 -1.437423e-15 -7.289095e-15 4 2.100041e-15 -1.437423e-15 5 -4.840497e-16 2.100041e-15 6 -1.751985e-15 -4.840497e-16 7 1.547292e-15 -1.751985e-15 8 1.621361e-16 1.547292e-15 9 2.098041e-15 1.621361e-16 10 -3.740634e-16 2.098041e-15 11 -9.073195e-16 -3.740634e-16 12 -2.037592e-16 -9.073195e-16 13 4.294174e-16 -2.037592e-16 14 -7.175394e-16 4.294174e-16 15 6.143558e-17 -7.175394e-16 16 -3.058288e-16 6.143558e-17 17 -5.973073e-16 -3.058288e-16 18 1.235603e-15 -5.973073e-16 19 9.680954e-16 1.235603e-15 20 -1.577980e-16 9.680954e-16 21 9.783516e-16 -1.577980e-16 22 3.124230e-17 9.783516e-16 23 -1.073351e-15 3.124230e-17 24 -1.277340e-15 -1.073351e-15 25 -1.071147e-15 -1.277340e-15 26 -4.734615e-16 -1.071147e-15 27 -1.189811e-15 -4.734615e-16 28 -9.325653e-16 -1.189811e-15 29 1.704872e-15 -9.325653e-16 30 1.590045e-15 1.704872e-15 31 1.885672e-15 1.590045e-15 32 5.659039e-16 1.885672e-15 33 -2.167553e-15 5.659039e-16 34 5.275685e-16 -2.167553e-15 35 NA 5.275685e-16 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 1.009045e-15 5.516637e-15 [2,] -7.289095e-15 1.009045e-15 [3,] -1.437423e-15 -7.289095e-15 [4,] 2.100041e-15 -1.437423e-15 [5,] -4.840497e-16 2.100041e-15 [6,] -1.751985e-15 -4.840497e-16 [7,] 1.547292e-15 -1.751985e-15 [8,] 1.621361e-16 1.547292e-15 [9,] 2.098041e-15 1.621361e-16 [10,] -3.740634e-16 2.098041e-15 [11,] -9.073195e-16 -3.740634e-16 [12,] -2.037592e-16 -9.073195e-16 [13,] 4.294174e-16 -2.037592e-16 [14,] -7.175394e-16 4.294174e-16 [15,] 6.143558e-17 -7.175394e-16 [16,] -3.058288e-16 6.143558e-17 [17,] -5.973073e-16 -3.058288e-16 [18,] 1.235603e-15 -5.973073e-16 [19,] 9.680954e-16 1.235603e-15 [20,] -1.577980e-16 9.680954e-16 [21,] 9.783516e-16 -1.577980e-16 [22,] 3.124230e-17 9.783516e-16 [23,] -1.073351e-15 3.124230e-17 [24,] -1.277340e-15 -1.073351e-15 [25,] -1.071147e-15 -1.277340e-15 [26,] -4.734615e-16 -1.071147e-15 [27,] -1.189811e-15 -4.734615e-16 [28,] -9.325653e-16 -1.189811e-15 [29,] 1.704872e-15 -9.325653e-16 [30,] 1.590045e-15 1.704872e-15 [31,] 1.885672e-15 1.590045e-15 [32,] 5.659039e-16 1.885672e-15 [33,] -2.167553e-15 5.659039e-16 [34,] 5.275685e-16 -2.167553e-15 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 1.009045e-15 5.516637e-15 2 -7.289095e-15 1.009045e-15 3 -1.437423e-15 -7.289095e-15 4 2.100041e-15 -1.437423e-15 5 -4.840497e-16 2.100041e-15 6 -1.751985e-15 -4.840497e-16 7 1.547292e-15 -1.751985e-15 8 1.621361e-16 1.547292e-15 9 2.098041e-15 1.621361e-16 10 -3.740634e-16 2.098041e-15 11 -9.073195e-16 -3.740634e-16 12 -2.037592e-16 -9.073195e-16 13 4.294174e-16 -2.037592e-16 14 -7.175394e-16 4.294174e-16 15 6.143558e-17 -7.175394e-16 16 -3.058288e-16 6.143558e-17 17 -5.973073e-16 -3.058288e-16 18 1.235603e-15 -5.973073e-16 19 9.680954e-16 1.235603e-15 20 -1.577980e-16 9.680954e-16 21 9.783516e-16 -1.577980e-16 22 3.124230e-17 9.783516e-16 23 -1.073351e-15 3.124230e-17 24 -1.277340e-15 -1.073351e-15 25 -1.071147e-15 -1.277340e-15 26 -4.734615e-16 -1.071147e-15 27 -1.189811e-15 -4.734615e-16 28 -9.325653e-16 -1.189811e-15 29 1.704872e-15 -9.325653e-16 30 1.590045e-15 1.704872e-15 31 1.885672e-15 1.590045e-15 32 5.659039e-16 1.885672e-15 33 -2.167553e-15 5.659039e-16 34 5.275685e-16 -2.167553e-15 > 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/wessaorg/rcomp/tmp/7deql1322061482.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/wessaorg/rcomp/tmp/8en3t1322061482.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/wessaorg/rcomp/tmp/95ped1322061482.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/wessaorg/rcomp/tmp/10unl91322061482.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/wessaorg/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/wessaorg/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/wessaorg/rcomp/tmp/11fcza1322061482.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/wessaorg/rcomp/tmp/1265d91322061482.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/wessaorg/rcomp/tmp/13bppx1322061482.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/wessaorg/rcomp/tmp/14f8ls1322061482.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/wessaorg/rcomp/tmp/15nce21322061482.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/wessaorg/rcomp/tmp/16zhv41322061482.tab") + } > > try(system("convert tmp/1ehml1322061482.ps tmp/1ehml1322061482.png",intern=TRUE)) character(0) > try(system("convert tmp/284881322061482.ps tmp/284881322061482.png",intern=TRUE)) character(0) > try(system("convert tmp/3fsqp1322061482.ps tmp/3fsqp1322061482.png",intern=TRUE)) character(0) > try(system("convert tmp/4vu531322061482.ps tmp/4vu531322061482.png",intern=TRUE)) character(0) > try(system("convert tmp/536cf1322061482.ps tmp/536cf1322061482.png",intern=TRUE)) character(0) > try(system("convert tmp/6lpio1322061482.ps tmp/6lpio1322061482.png",intern=TRUE)) character(0) > try(system("convert tmp/7deql1322061482.ps tmp/7deql1322061482.png",intern=TRUE)) character(0) > try(system("convert tmp/8en3t1322061482.ps tmp/8en3t1322061482.png",intern=TRUE)) character(0) > try(system("convert tmp/95ped1322061482.ps tmp/95ped1322061482.png",intern=TRUE)) character(0) > try(system("convert tmp/10unl91322061482.ps tmp/10unl91322061482.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 3.075 0.589 3.704