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(2350.44,0,2440.25,0,2408.64,0,2472.81,0,2407.6,0,2454.62,0,2448.05,0,2497.84,0,2645.64,0,2756.76,0,2849.27,0,2921.44,0,2981.85,0,3080.58,0,3106.22,0,3119.31,0,3061.26,0,3097.31,0,3161.69,0,3257.16,0,3277.01,0,3295.32,0,3363.99,0,3494.17,0,3667.03,0,3813.06,0,3917.96,0,3895.51,0,3801.06,0,3570.12,0,3701.61,0,3862.27,0,3970.1,0,4138.52,0,4199.75,0,4290.89,0,4443.91,0,4502.64,1,4356.98,1,4591.27,1,4696.96,1,4621.4,1,4562.84,1,4202.52,1,4296.49,1,4435.23,1,4105.18,1,4116.68,1,3844.49,1,3720.98,1,3674.4,1,3857.62,1,3801.06,1,3504.37,1,3032.6,1,3047.03,1,2962.34,1,2197.82,1,2014.45,1),dim=c(2,59),dimnames=list(c('Bel20','Dummy'),1:59)) > y <- array(NA,dim=c(2,59),dimnames=list(c('Bel20','Dummy'),1:59)) > 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 Bel20 Dummy 1 2350.44 0 2 2440.25 0 3 2408.64 0 4 2472.81 0 5 2407.60 0 6 2454.62 0 7 2448.05 0 8 2497.84 0 9 2645.64 0 10 2756.76 0 11 2849.27 0 12 2921.44 0 13 2981.85 0 14 3080.58 0 15 3106.22 0 16 3119.31 0 17 3061.26 0 18 3097.31 0 19 3161.69 0 20 3257.16 0 21 3277.01 0 22 3295.32 0 23 3363.99 0 24 3494.17 0 25 3667.03 0 26 3813.06 0 27 3917.96 0 28 3895.51 0 29 3801.06 0 30 3570.12 0 31 3701.61 0 32 3862.27 0 33 3970.10 0 34 4138.52 0 35 4199.75 0 36 4290.89 0 37 4443.91 0 38 4502.64 1 39 4356.98 1 40 4591.27 1 41 4696.96 1 42 4621.40 1 43 4562.84 1 44 4202.52 1 45 4296.49 1 46 4435.23 1 47 4105.18 1 48 4116.68 1 49 3844.49 1 50 3720.98 1 51 3674.40 1 52 3857.62 1 53 3801.06 1 54 3504.37 1 55 3032.60 1 56 3047.03 1 57 2962.34 1 58 2197.82 1 59 2014.45 1 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) Dummy 3249.2 575.6 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -1810.3 -446.2 19.7 557.8 1194.7 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 3249.2 110.5 29.403 < 2e-16 *** Dummy 575.6 181.0 3.181 0.00238 ** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 672.2 on 57 degrees of freedom Multiple R-squared: 0.1507, Adjusted R-squared: 0.1358 F-statistic: 10.12 on 1 and 57 DF, p-value: 0.002378 > 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,] 7.420199e-04 1.484040e-03 0.9992580 [2,] 6.934504e-05 1.386901e-04 0.9999307 [3,] 5.743603e-06 1.148721e-05 0.9999943 [4,] 1.226756e-06 2.453511e-06 0.9999988 [5,] 9.146255e-06 1.829251e-05 0.9999909 [6,] 4.539175e-05 9.078350e-05 0.9999546 [7,] 1.440285e-04 2.880571e-04 0.9998560 [8,] 3.263668e-04 6.527336e-04 0.9996736 [9,] 5.988129e-04 1.197626e-03 0.9994012 [10,] 1.216600e-03 2.433199e-03 0.9987834 [11,] 1.838660e-03 3.677319e-03 0.9981613 [12,] 2.286044e-03 4.572088e-03 0.9977140 [13,] 2.105876e-03 4.211751e-03 0.9978941 [14,] 2.017432e-03 4.034864e-03 0.9979826 [15,] 2.145377e-03 4.290755e-03 0.9978546 [16,] 2.693032e-03 5.386065e-03 0.9973070 [17,] 3.196481e-03 6.392963e-03 0.9968035 [18,] 3.653705e-03 7.307410e-03 0.9963463 [19,] 4.485615e-03 8.971230e-03 0.9955144 [20,] 6.567219e-03 1.313444e-02 0.9934328 [21,] 1.192387e-02 2.384774e-02 0.9880761 [22,] 2.302043e-02 4.604086e-02 0.9769796 [23,] 4.116616e-02 8.233231e-02 0.9588338 [24,] 5.675757e-02 1.135151e-01 0.9432424 [25,] 6.237400e-02 1.247480e-01 0.9376260 [26,] 5.673899e-02 1.134780e-01 0.9432610 [27,] 5.484658e-02 1.096932e-01 0.9451534 [28,] 5.764686e-02 1.152937e-01 0.9423531 [29,] 6.305553e-02 1.261111e-01 0.9369445 [30,] 7.456309e-02 1.491262e-01 0.9254369 [31,] 8.561718e-02 1.712344e-01 0.9143828 [32,] 9.792204e-02 1.958441e-01 0.9020780 [33,] 1.160354e-01 2.320708e-01 0.8839646 [34,] 9.840360e-02 1.968072e-01 0.9015964 [35,] 7.849144e-02 1.569829e-01 0.9215086 [36,] 7.371024e-02 1.474205e-01 0.9262898 [37,] 8.101128e-02 1.620226e-01 0.9189887 [38,] 8.943675e-02 1.788735e-01 0.9105632 [39,] 1.021191e-01 2.042382e-01 0.8978809 [40,] 9.294917e-02 1.858983e-01 0.9070508 [41,] 9.487401e-02 1.897480e-01 0.9051260 [42,] 1.260702e-01 2.521403e-01 0.8739298 [43,] 1.314831e-01 2.629662e-01 0.8685169 [44,] 1.523001e-01 3.046002e-01 0.8476999 [45,] 1.489751e-01 2.979502e-01 0.8510249 [46,] 1.381999e-01 2.763998e-01 0.8618001 [47,] 1.280332e-01 2.560664e-01 0.8719668 [48,] 1.668655e-01 3.337309e-01 0.8331345 [49,] 2.669448e-01 5.338895e-01 0.7330552 [50,] 3.550454e-01 7.100907e-01 0.6449546 > postscript(file="/var/www/html/rcomp/tmp/1wrm51261397883.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/2d5go1261397883.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/3lxsv1261397883.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/4oudy1261397883.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/5t3jx1261397883.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 = 59 Frequency = 1 1 2 3 4 5 6 -898.776757 -808.966757 -840.576757 -776.406757 -841.616757 -794.596757 7 8 9 10 11 12 -801.166757 -751.376757 -603.576757 -492.456757 -399.946757 -327.776757 13 14 15 16 17 18 -267.366757 -168.636757 -142.996757 -129.906757 -187.956757 -151.906757 19 20 21 22 23 24 -87.526757 7.943243 27.793243 46.103243 114.773243 244.953243 25 26 27 28 29 30 417.813243 563.843243 668.743243 646.293243 551.843243 320.903243 31 32 33 34 35 36 452.393243 613.053243 720.883243 889.303243 950.533243 1041.673243 37 38 39 40 41 42 1194.693243 677.851364 532.191364 766.481364 872.171364 796.611364 43 44 45 46 47 48 738.051364 377.731364 471.701364 610.441364 280.391364 291.891364 49 50 51 52 53 54 19.701364 -103.808636 -150.388636 32.831364 -23.728636 -320.418636 55 56 57 58 59 -792.188636 -777.758636 -862.448636 -1626.968636 -1810.338636 > postscript(file="/var/www/html/rcomp/tmp/64n4t1261397883.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 = 59 Frequency = 1 lag(myerror, k = 1) myerror 0 -898.776757 NA 1 -808.966757 -898.776757 2 -840.576757 -808.966757 3 -776.406757 -840.576757 4 -841.616757 -776.406757 5 -794.596757 -841.616757 6 -801.166757 -794.596757 7 -751.376757 -801.166757 8 -603.576757 -751.376757 9 -492.456757 -603.576757 10 -399.946757 -492.456757 11 -327.776757 -399.946757 12 -267.366757 -327.776757 13 -168.636757 -267.366757 14 -142.996757 -168.636757 15 -129.906757 -142.996757 16 -187.956757 -129.906757 17 -151.906757 -187.956757 18 -87.526757 -151.906757 19 7.943243 -87.526757 20 27.793243 7.943243 21 46.103243 27.793243 22 114.773243 46.103243 23 244.953243 114.773243 24 417.813243 244.953243 25 563.843243 417.813243 26 668.743243 563.843243 27 646.293243 668.743243 28 551.843243 646.293243 29 320.903243 551.843243 30 452.393243 320.903243 31 613.053243 452.393243 32 720.883243 613.053243 33 889.303243 720.883243 34 950.533243 889.303243 35 1041.673243 950.533243 36 1194.693243 1041.673243 37 677.851364 1194.693243 38 532.191364 677.851364 39 766.481364 532.191364 40 872.171364 766.481364 41 796.611364 872.171364 42 738.051364 796.611364 43 377.731364 738.051364 44 471.701364 377.731364 45 610.441364 471.701364 46 280.391364 610.441364 47 291.891364 280.391364 48 19.701364 291.891364 49 -103.808636 19.701364 50 -150.388636 -103.808636 51 32.831364 -150.388636 52 -23.728636 32.831364 53 -320.418636 -23.728636 54 -792.188636 -320.418636 55 -777.758636 -792.188636 56 -862.448636 -777.758636 57 -1626.968636 -862.448636 58 -1810.338636 -1626.968636 59 NA -1810.338636 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -808.966757 -898.776757 [2,] -840.576757 -808.966757 [3,] -776.406757 -840.576757 [4,] -841.616757 -776.406757 [5,] -794.596757 -841.616757 [6,] -801.166757 -794.596757 [7,] -751.376757 -801.166757 [8,] -603.576757 -751.376757 [9,] -492.456757 -603.576757 [10,] -399.946757 -492.456757 [11,] -327.776757 -399.946757 [12,] -267.366757 -327.776757 [13,] -168.636757 -267.366757 [14,] -142.996757 -168.636757 [15,] -129.906757 -142.996757 [16,] -187.956757 -129.906757 [17,] -151.906757 -187.956757 [18,] -87.526757 -151.906757 [19,] 7.943243 -87.526757 [20,] 27.793243 7.943243 [21,] 46.103243 27.793243 [22,] 114.773243 46.103243 [23,] 244.953243 114.773243 [24,] 417.813243 244.953243 [25,] 563.843243 417.813243 [26,] 668.743243 563.843243 [27,] 646.293243 668.743243 [28,] 551.843243 646.293243 [29,] 320.903243 551.843243 [30,] 452.393243 320.903243 [31,] 613.053243 452.393243 [32,] 720.883243 613.053243 [33,] 889.303243 720.883243 [34,] 950.533243 889.303243 [35,] 1041.673243 950.533243 [36,] 1194.693243 1041.673243 [37,] 677.851364 1194.693243 [38,] 532.191364 677.851364 [39,] 766.481364 532.191364 [40,] 872.171364 766.481364 [41,] 796.611364 872.171364 [42,] 738.051364 796.611364 [43,] 377.731364 738.051364 [44,] 471.701364 377.731364 [45,] 610.441364 471.701364 [46,] 280.391364 610.441364 [47,] 291.891364 280.391364 [48,] 19.701364 291.891364 [49,] -103.808636 19.701364 [50,] -150.388636 -103.808636 [51,] 32.831364 -150.388636 [52,] -23.728636 32.831364 [53,] -320.418636 -23.728636 [54,] -792.188636 -320.418636 [55,] -777.758636 -792.188636 [56,] -862.448636 -777.758636 [57,] -1626.968636 -862.448636 [58,] -1810.338636 -1626.968636 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -808.966757 -898.776757 2 -840.576757 -808.966757 3 -776.406757 -840.576757 4 -841.616757 -776.406757 5 -794.596757 -841.616757 6 -801.166757 -794.596757 7 -751.376757 -801.166757 8 -603.576757 -751.376757 9 -492.456757 -603.576757 10 -399.946757 -492.456757 11 -327.776757 -399.946757 12 -267.366757 -327.776757 13 -168.636757 -267.366757 14 -142.996757 -168.636757 15 -129.906757 -142.996757 16 -187.956757 -129.906757 17 -151.906757 -187.956757 18 -87.526757 -151.906757 19 7.943243 -87.526757 20 27.793243 7.943243 21 46.103243 27.793243 22 114.773243 46.103243 23 244.953243 114.773243 24 417.813243 244.953243 25 563.843243 417.813243 26 668.743243 563.843243 27 646.293243 668.743243 28 551.843243 646.293243 29 320.903243 551.843243 30 452.393243 320.903243 31 613.053243 452.393243 32 720.883243 613.053243 33 889.303243 720.883243 34 950.533243 889.303243 35 1041.673243 950.533243 36 1194.693243 1041.673243 37 677.851364 1194.693243 38 532.191364 677.851364 39 766.481364 532.191364 40 872.171364 766.481364 41 796.611364 872.171364 42 738.051364 796.611364 43 377.731364 738.051364 44 471.701364 377.731364 45 610.441364 471.701364 46 280.391364 610.441364 47 291.891364 280.391364 48 19.701364 291.891364 49 -103.808636 19.701364 50 -150.388636 -103.808636 51 32.831364 -150.388636 52 -23.728636 32.831364 53 -320.418636 -23.728636 54 -792.188636 -320.418636 55 -777.758636 -792.188636 56 -862.448636 -777.758636 57 -1626.968636 -862.448636 58 -1810.338636 -1626.968636 > 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/75ngl1261397883.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/8yoqf1261397883.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/9c4q91261397883.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/10sgts1261397883.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/11l72f1261397883.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/121bi51261397883.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/13i2m41261397883.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/140l4e1261397883.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/15tucx1261397883.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/1657ev1261397883.tab") + } > > try(system("convert tmp/1wrm51261397883.ps tmp/1wrm51261397883.png",intern=TRUE)) character(0) > try(system("convert tmp/2d5go1261397883.ps tmp/2d5go1261397883.png",intern=TRUE)) character(0) > try(system("convert tmp/3lxsv1261397883.ps tmp/3lxsv1261397883.png",intern=TRUE)) character(0) > try(system("convert tmp/4oudy1261397883.ps tmp/4oudy1261397883.png",intern=TRUE)) character(0) > try(system("convert tmp/5t3jx1261397883.ps tmp/5t3jx1261397883.png",intern=TRUE)) character(0) > try(system("convert tmp/64n4t1261397883.ps tmp/64n4t1261397883.png",intern=TRUE)) character(0) > try(system("convert tmp/75ngl1261397883.ps tmp/75ngl1261397883.png",intern=TRUE)) character(0) > try(system("convert tmp/8yoqf1261397883.ps tmp/8yoqf1261397883.png",intern=TRUE)) character(0) > try(system("convert tmp/9c4q91261397883.ps tmp/9c4q91261397883.png",intern=TRUE)) character(0) > try(system("convert tmp/10sgts1261397883.ps tmp/10sgts1261397883.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.443 1.571 3.304