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(72772,26073,22274,45104,18103,14819,44525,15100,15136,41169,14738,13704,31118,22259,19638,28435,10277,7551,22162,6225,8019,20202,7663,6509,17773,6618,6634,17094,9945,11166,15153,7590,7508,11218,4293,4275,10796,4656,4944,9594,5145,5441,9309,2001,1689,8556,1779,1522,8041,1609,1416,7639,2191,1594,6884,1617,1909,6642,2554,2599,6321,2198,1262,6216,1578,1199,5865,3446,4404,5799,1380,1166,5695,1249,1122,5644,1223,886,5446,834,778,5395,3754,4436,5363,2283,1890,5338,3028,3107,5160,1100,1038,5091,457,300,5057,1201,988,5039,2192,2008,4880,1508,1522,4735,1393,1336,4693,952,976,4653,1032,798,4586,1279,869,4398,1370,1260,3974,649,578,3858,1900,2359,3826,666,736,3819,1313,1690,3556,1353,1201,3372,1500,813,3193,877,778,3126,874,687,3104,1133,1270,2967,754,671,2848,695,1559,2748,609,489,2649,696,773,2625,756,629,2572,670,637,2548,301,277,2477,630,776,2442,798,1651,2392,436,377,2372,388,222),dim=c(3,60),dimnames=list(c('weekdag','zaterdag','zondag'),1:60)) > y <- array(NA,dim=c(3,60),dimnames=list(c('weekdag','zaterdag','zondag'),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 = '3' > #'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 zondag weekdag zaterdag 1 22274 72772 26073 2 14819 45104 18103 3 15136 44525 15100 4 13704 41169 14738 5 19638 31118 22259 6 7551 28435 10277 7 8019 22162 6225 8 6509 20202 7663 9 6634 17773 6618 10 11166 17094 9945 11 7508 15153 7590 12 4275 11218 4293 13 4944 10796 4656 14 5441 9594 5145 15 1689 9309 2001 16 1522 8556 1779 17 1416 8041 1609 18 1594 7639 2191 19 1909 6884 1617 20 2599 6642 2554 21 1262 6321 2198 22 1199 6216 1578 23 4404 5865 3446 24 1166 5799 1380 25 1122 5695 1249 26 886 5644 1223 27 778 5446 834 28 4436 5395 3754 29 1890 5363 2283 30 3107 5338 3028 31 1038 5160 1100 32 300 5091 457 33 988 5057 1201 34 2008 5039 2192 35 1522 4880 1508 36 1336 4735 1393 37 976 4693 952 38 798 4653 1032 39 869 4586 1279 40 1260 4398 1370 41 578 3974 649 42 2359 3858 1900 43 736 3826 666 44 1690 3819 1313 45 1201 3556 1353 46 813 3372 1500 47 778 3193 877 48 687 3126 874 49 1270 3104 1133 50 671 2967 754 51 1559 2848 695 52 489 2748 609 53 773 2649 696 54 629 2625 756 55 637 2572 670 56 277 2548 301 57 776 2477 630 58 1651 2442 798 59 377 2392 436 60 222 2372 388 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) weekdag zaterdag 235.69559 -0.02089 0.93376 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -1686.9 -272.5 -166.1 275.6 2433.7 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 235.69559 114.20941 2.064 0.0436 * weekdag -0.02089 0.02250 -0.929 0.3570 zaterdag 0.93376 0.05425 17.213 <2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 693.6 on 57 degrees of freedom Multiple R-squared: 0.9801, Adjusted R-squared: 0.9794 F-statistic: 1401 on 2 and 57 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,] 0.9999937 1.265520e-05 6.327599e-06 [2,] 1.0000000 3.266071e-10 1.633035e-10 [3,] 1.0000000 3.980734e-11 1.990367e-11 [4,] 1.0000000 1.824411e-10 9.122055e-11 [5,] 1.0000000 7.563065e-12 3.781532e-12 [6,] 1.0000000 2.623499e-11 1.311749e-11 [7,] 1.0000000 6.768895e-11 3.384447e-11 [8,] 1.0000000 2.092318e-10 1.046159e-10 [9,] 1.0000000 7.832930e-10 3.916465e-10 [10,] 1.0000000 8.080168e-10 4.040084e-10 [11,] 1.0000000 1.239273e-09 6.196367e-10 [12,] 1.0000000 2.171036e-09 1.085518e-09 [13,] 1.0000000 2.608688e-09 1.304344e-09 [14,] 1.0000000 2.587123e-09 1.293562e-09 [15,] 1.0000000 7.811758e-09 3.905879e-09 [16,] 1.0000000 8.495625e-10 4.247813e-10 [17,] 1.0000000 2.031760e-09 1.015880e-09 [18,] 1.0000000 5.223796e-10 2.611898e-10 [19,] 1.0000000 1.614399e-09 8.071994e-10 [20,] 1.0000000 4.939895e-09 2.469947e-09 [21,] 1.0000000 1.309776e-08 6.548878e-09 [22,] 1.0000000 3.381821e-08 1.690911e-08 [23,] 1.0000000 2.566581e-08 1.283290e-08 [24,] 1.0000000 5.040835e-08 2.520418e-08 [25,] 0.9999999 1.545237e-07 7.726183e-08 [26,] 0.9999998 4.424683e-07 2.212341e-07 [27,] 0.9999994 1.216543e-06 6.082715e-07 [28,] 0.9999983 3.320478e-06 1.660239e-06 [29,] 0.9999957 8.616822e-06 4.308411e-06 [30,] 0.9999889 2.225198e-05 1.112599e-05 [31,] 0.9999714 5.728890e-05 2.864445e-05 [32,] 0.9999379 1.242958e-04 6.214791e-05 [33,] 0.9998527 2.945819e-04 1.472910e-04 [34,] 0.9997447 5.105349e-04 2.552675e-04 [35,] 0.9994200 1.160014e-03 5.800069e-04 [36,] 0.9987046 2.590842e-03 1.295421e-03 [37,] 0.9983948 3.210488e-03 1.605244e-03 [38,] 0.9965020 6.995973e-03 3.497987e-03 [39,] 0.9968980 6.203986e-03 3.101993e-03 [40,] 0.9935751 1.284979e-02 6.424897e-03 [41,] 0.9973237 5.352692e-03 2.676346e-03 [42,] 0.9936843 1.263144e-02 6.315721e-03 [43,] 0.9877696 2.446078e-02 1.223039e-02 [44,] 0.9782684 4.346323e-02 2.173161e-02 [45,] 0.9658540 6.829206e-02 3.414603e-02 [46,] 0.9929938 1.401247e-02 7.006235e-03 [47,] 0.9797782 4.044366e-02 2.022183e-02 [48,] 0.9446923 1.106153e-01 5.530767e-02 [49,] 0.9070204 1.859592e-01 9.297961e-02 > postscript(file="/var/wessaorg/rcomp/tmp/1gv7i1322130290.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/27hdy1322130290.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/3tekw1322130290.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/416dq1322130290.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/50a001322130290.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 = 60 Frequency = 1 1 2 3 4 5 6 -787.248457 -1378.236826 1730.760054 566.663073 -732.182613 -1686.876062 7 8 9 10 11 12 2433.670192 -460.034874 589.997788 2001.176818 501.636993 265.040914 13 14 15 16 17 18 586.267253 601.542095 -220.657464 -196.094825 -154.115203 -527.965385 19 20 21 22 23 24 307.240524 117.247003 -894.039800 -380.299742 1073.094681 -237.127122 25 26 27 28 29 30 -160.976948 -373.764659 -122.667297 807.675156 -365.426057 155.397141 31 32 33 34 35 36 -117.024254 -256.055438 -263.486519 -169.223100 -19.850389 -101.497091 37 38 39 40 41 42 -50.584544 -304.121447 -465.161133 -163.061730 -180.676601 429.760487 43 44 45 46 47 48 -41.642882 308.065313 -223.780338 -752.888165 -209.892957 -299.491550 49 50 51 52 53 54 41.203814 -206.761944 733.843788 -257.941858 -57.247847 -257.775162 55 56 57 58 59 60 -170.578798 -186.521198 3.786863 721.183165 -215.838825 -326.436011 > postscript(file="/var/wessaorg/rcomp/tmp/6rtmx1322130290.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 = 60 Frequency = 1 lag(myerror, k = 1) myerror 0 -787.248457 NA 1 -1378.236826 -787.248457 2 1730.760054 -1378.236826 3 566.663073 1730.760054 4 -732.182613 566.663073 5 -1686.876062 -732.182613 6 2433.670192 -1686.876062 7 -460.034874 2433.670192 8 589.997788 -460.034874 9 2001.176818 589.997788 10 501.636993 2001.176818 11 265.040914 501.636993 12 586.267253 265.040914 13 601.542095 586.267253 14 -220.657464 601.542095 15 -196.094825 -220.657464 16 -154.115203 -196.094825 17 -527.965385 -154.115203 18 307.240524 -527.965385 19 117.247003 307.240524 20 -894.039800 117.247003 21 -380.299742 -894.039800 22 1073.094681 -380.299742 23 -237.127122 1073.094681 24 -160.976948 -237.127122 25 -373.764659 -160.976948 26 -122.667297 -373.764659 27 807.675156 -122.667297 28 -365.426057 807.675156 29 155.397141 -365.426057 30 -117.024254 155.397141 31 -256.055438 -117.024254 32 -263.486519 -256.055438 33 -169.223100 -263.486519 34 -19.850389 -169.223100 35 -101.497091 -19.850389 36 -50.584544 -101.497091 37 -304.121447 -50.584544 38 -465.161133 -304.121447 39 -163.061730 -465.161133 40 -180.676601 -163.061730 41 429.760487 -180.676601 42 -41.642882 429.760487 43 308.065313 -41.642882 44 -223.780338 308.065313 45 -752.888165 -223.780338 46 -209.892957 -752.888165 47 -299.491550 -209.892957 48 41.203814 -299.491550 49 -206.761944 41.203814 50 733.843788 -206.761944 51 -257.941858 733.843788 52 -57.247847 -257.941858 53 -257.775162 -57.247847 54 -170.578798 -257.775162 55 -186.521198 -170.578798 56 3.786863 -186.521198 57 721.183165 3.786863 58 -215.838825 721.183165 59 -326.436011 -215.838825 60 NA -326.436011 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -1378.236826 -787.248457 [2,] 1730.760054 -1378.236826 [3,] 566.663073 1730.760054 [4,] -732.182613 566.663073 [5,] -1686.876062 -732.182613 [6,] 2433.670192 -1686.876062 [7,] -460.034874 2433.670192 [8,] 589.997788 -460.034874 [9,] 2001.176818 589.997788 [10,] 501.636993 2001.176818 [11,] 265.040914 501.636993 [12,] 586.267253 265.040914 [13,] 601.542095 586.267253 [14,] -220.657464 601.542095 [15,] -196.094825 -220.657464 [16,] -154.115203 -196.094825 [17,] -527.965385 -154.115203 [18,] 307.240524 -527.965385 [19,] 117.247003 307.240524 [20,] -894.039800 117.247003 [21,] -380.299742 -894.039800 [22,] 1073.094681 -380.299742 [23,] -237.127122 1073.094681 [24,] -160.976948 -237.127122 [25,] -373.764659 -160.976948 [26,] -122.667297 -373.764659 [27,] 807.675156 -122.667297 [28,] -365.426057 807.675156 [29,] 155.397141 -365.426057 [30,] -117.024254 155.397141 [31,] -256.055438 -117.024254 [32,] -263.486519 -256.055438 [33,] -169.223100 -263.486519 [34,] -19.850389 -169.223100 [35,] -101.497091 -19.850389 [36,] -50.584544 -101.497091 [37,] -304.121447 -50.584544 [38,] -465.161133 -304.121447 [39,] -163.061730 -465.161133 [40,] -180.676601 -163.061730 [41,] 429.760487 -180.676601 [42,] -41.642882 429.760487 [43,] 308.065313 -41.642882 [44,] -223.780338 308.065313 [45,] -752.888165 -223.780338 [46,] -209.892957 -752.888165 [47,] -299.491550 -209.892957 [48,] 41.203814 -299.491550 [49,] -206.761944 41.203814 [50,] 733.843788 -206.761944 [51,] -257.941858 733.843788 [52,] -57.247847 -257.941858 [53,] -257.775162 -57.247847 [54,] -170.578798 -257.775162 [55,] -186.521198 -170.578798 [56,] 3.786863 -186.521198 [57,] 721.183165 3.786863 [58,] -215.838825 721.183165 [59,] -326.436011 -215.838825 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -1378.236826 -787.248457 2 1730.760054 -1378.236826 3 566.663073 1730.760054 4 -732.182613 566.663073 5 -1686.876062 -732.182613 6 2433.670192 -1686.876062 7 -460.034874 2433.670192 8 589.997788 -460.034874 9 2001.176818 589.997788 10 501.636993 2001.176818 11 265.040914 501.636993 12 586.267253 265.040914 13 601.542095 586.267253 14 -220.657464 601.542095 15 -196.094825 -220.657464 16 -154.115203 -196.094825 17 -527.965385 -154.115203 18 307.240524 -527.965385 19 117.247003 307.240524 20 -894.039800 117.247003 21 -380.299742 -894.039800 22 1073.094681 -380.299742 23 -237.127122 1073.094681 24 -160.976948 -237.127122 25 -373.764659 -160.976948 26 -122.667297 -373.764659 27 807.675156 -122.667297 28 -365.426057 807.675156 29 155.397141 -365.426057 30 -117.024254 155.397141 31 -256.055438 -117.024254 32 -263.486519 -256.055438 33 -169.223100 -263.486519 34 -19.850389 -169.223100 35 -101.497091 -19.850389 36 -50.584544 -101.497091 37 -304.121447 -50.584544 38 -465.161133 -304.121447 39 -163.061730 -465.161133 40 -180.676601 -163.061730 41 429.760487 -180.676601 42 -41.642882 429.760487 43 308.065313 -41.642882 44 -223.780338 308.065313 45 -752.888165 -223.780338 46 -209.892957 -752.888165 47 -299.491550 -209.892957 48 41.203814 -299.491550 49 -206.761944 41.203814 50 733.843788 -206.761944 51 -257.941858 733.843788 52 -57.247847 -257.941858 53 -257.775162 -57.247847 54 -170.578798 -257.775162 55 -186.521198 -170.578798 56 3.786863 -186.521198 57 721.183165 3.786863 58 -215.838825 721.183165 59 -326.436011 -215.838825 > 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/77pbz1322130290.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/8hmvy1322130290.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/9i2gp1322130290.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/10ktoe1322130290.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/1178b91322130290.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/12fo0g1322130290.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/13z1gq1322130290.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/14u3o21322130290.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/15s02a1322130290.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/16mx841322130290.tab") + } > > try(system("convert tmp/1gv7i1322130290.ps tmp/1gv7i1322130290.png",intern=TRUE)) character(0) > try(system("convert tmp/27hdy1322130290.ps tmp/27hdy1322130290.png",intern=TRUE)) character(0) > try(system("convert tmp/3tekw1322130290.ps tmp/3tekw1322130290.png",intern=TRUE)) character(0) > try(system("convert tmp/416dq1322130290.ps tmp/416dq1322130290.png",intern=TRUE)) character(0) > try(system("convert tmp/50a001322130290.ps tmp/50a001322130290.png",intern=TRUE)) character(0) > try(system("convert tmp/6rtmx1322130290.ps tmp/6rtmx1322130290.png",intern=TRUE)) character(0) > try(system("convert tmp/77pbz1322130290.ps tmp/77pbz1322130290.png",intern=TRUE)) character(0) > try(system("convert tmp/8hmvy1322130290.ps tmp/8hmvy1322130290.png",intern=TRUE)) character(0) > try(system("convert tmp/9i2gp1322130290.ps tmp/9i2gp1322130290.png",intern=TRUE)) character(0) > try(system("convert tmp/10ktoe1322130290.ps tmp/10ktoe1322130290.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 3.164 0.450 3.634