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 = '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 t 1 22274 72772 26073 1 2 14819 45104 18103 2 3 15136 44525 15100 3 4 13704 41169 14738 4 5 19638 31118 22259 5 6 7551 28435 10277 6 7 8019 22162 6225 7 8 6509 20202 7663 8 9 6634 17773 6618 9 10 11166 17094 9945 10 11 7508 15153 7590 11 12 4275 11218 4293 12 13 4944 10796 4656 13 14 5441 9594 5145 14 15 1689 9309 2001 15 16 1522 8556 1779 16 17 1416 8041 1609 17 18 1594 7639 2191 18 19 1909 6884 1617 19 20 2599 6642 2554 20 21 1262 6321 2198 21 22 1199 6216 1578 22 23 4404 5865 3446 23 24 1166 5799 1380 24 25 1122 5695 1249 25 26 886 5644 1223 26 27 778 5446 834 27 28 4436 5395 3754 28 29 1890 5363 2283 29 30 3107 5338 3028 30 31 1038 5160 1100 31 32 300 5091 457 32 33 988 5057 1201 33 34 2008 5039 2192 34 35 1522 4880 1508 35 36 1336 4735 1393 36 37 976 4693 952 37 38 798 4653 1032 38 39 869 4586 1279 39 40 1260 4398 1370 40 41 578 3974 649 41 42 2359 3858 1900 42 43 736 3826 666 43 44 1690 3819 1313 44 45 1201 3556 1353 45 46 813 3372 1500 46 47 778 3193 877 47 48 687 3126 874 48 49 1270 3104 1133 49 50 671 2967 754 50 51 1559 2848 695 51 52 489 2748 609 52 53 773 2649 696 53 54 629 2625 756 54 55 637 2572 670 55 56 277 2548 301 56 57 776 2477 630 57 58 1651 2442 798 58 59 377 2392 436 59 60 222 2372 388 60 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) weekdag zaterdag t 635.26615 -0.02633 0.92362 -10.09469 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -1767.1 -328.8 -100.7 173.3 2288.3 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 635.26615 306.87770 2.070 0.0431 * weekdag -0.02633 0.02265 -1.162 0.2500 zaterdag 0.92362 0.05428 17.016 <2e-16 *** t -10.09469 7.20559 -1.401 0.1667 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 687.8 on 56 degrees of freedom Multiple R-squared: 0.9807, Adjusted R-squared: 0.9797 F-statistic: 950.3 on 3 and 56 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,] 1.0000000 1.690806e-10 8.454032e-11 [2,] 1.0000000 1.687662e-11 8.438312e-12 [3,] 1.0000000 9.036938e-11 4.518469e-11 [4,] 1.0000000 1.270255e-11 6.351276e-12 [5,] 1.0000000 2.252983e-11 1.126492e-11 [6,] 1.0000000 4.365388e-11 2.182694e-11 [7,] 1.0000000 1.638313e-10 8.191563e-11 [8,] 1.0000000 6.544370e-10 3.272185e-10 [9,] 1.0000000 9.303220e-10 4.651610e-10 [10,] 1.0000000 2.303911e-09 1.151955e-09 [11,] 1.0000000 5.548780e-09 2.774390e-09 [12,] 1.0000000 1.361984e-08 6.809918e-09 [13,] 1.0000000 1.064039e-08 5.320196e-09 [14,] 1.0000000 2.762573e-08 1.381287e-08 [15,] 1.0000000 7.752814e-09 3.876407e-09 [16,] 1.0000000 2.298187e-08 1.149093e-08 [17,] 1.0000000 1.965113e-09 9.825566e-10 [18,] 1.0000000 6.933069e-09 3.466534e-09 [19,] 1.0000000 2.247963e-08 1.123981e-08 [20,] 1.0000000 6.910870e-08 3.455435e-08 [21,] 0.9999999 1.756686e-07 8.783429e-08 [22,] 1.0000000 7.605812e-08 3.802906e-08 [23,] 0.9999999 1.719283e-07 8.596415e-08 [24,] 0.9999998 4.647409e-07 2.323705e-07 [25,] 0.9999993 1.332406e-06 6.662032e-07 [26,] 0.9999981 3.801494e-06 1.900747e-06 [27,] 0.9999947 1.067242e-05 5.336209e-06 [28,] 0.9999866 2.677765e-05 1.338882e-05 [29,] 0.9999674 6.527533e-05 3.263766e-05 [30,] 0.9999191 1.617226e-04 8.086129e-05 [31,] 0.9998310 3.379121e-04 1.689561e-04 [32,] 0.9995989 8.022150e-04 4.011075e-04 [33,] 0.9993438 1.312441e-03 6.562204e-04 [34,] 0.9987361 2.527726e-03 1.263863e-03 [35,] 0.9972690 5.462058e-03 2.731029e-03 [36,] 0.9966499 6.700160e-03 3.350080e-03 [37,] 0.9929960 1.400795e-02 7.003977e-03 [38,] 0.9939902 1.201958e-02 6.009790e-03 [39,] 0.9898846 2.023075e-02 1.011538e-02 [40,] 0.9931961 1.360787e-02 6.803937e-03 [41,] 0.9847180 3.056407e-02 1.528204e-02 [42,] 0.9708917 5.821660e-02 2.910830e-02 [43,] 0.9558321 8.833578e-02 4.416789e-02 [44,] 0.9830823 3.383544e-02 1.691772e-02 [45,] 0.9796183 4.076332e-02 2.038166e-02 [46,] 0.9431462 1.137076e-01 5.685378e-02 [47,] 0.8621887 2.756226e-01 1.378113e-01 > postscript(file="/var/wessaorg/rcomp/tmp/1nwtb1322140810.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/2gjjg1322140810.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/32syo1322140810.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/4m20q1322140810.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/5egrj1322140810.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 -516.837139 -1328.905014 1756.569452 580.663005 -686.371900 -1767.128315 7 8 9 10 11 12 2288.319518 -591.346678 444.981808 1896.326420 372.440678 91.108036 13 14 15 16 17 18 423.820021 447.621829 -397.933782 -369.619660 -322.068010 -682.101681 19 20 21 22 23 24 153.273063 -18.432550 -1024.980815 -508.007675 972.529495 -348.920091 25 26 27 28 29 30 -264.569464 -467.803362 -211.634141 758.155521 -419.951243 118.390433 31 32 33 34 35 36 -164.466864 -300.302785 -290.274427 -175.958312 -24.295280 -97.801901 37 38 39 40 41 42 -41.497702 -284.345442 -433.148070 -121.051870 -138.191431 494.404233 43 44 45 46 47 48 20.400178 386.730217 -136.043565 -654.564628 -108.768772 -188.667085 49 50 51 52 53 54 164.631557 -77.829499 871.625794 -111.481051 99.652645 -90.301531 55 56 57 58 59 60 5.828954 -3.893419 199.462034 928.467606 -2.404567 -103.502775 > postscript(file="/var/wessaorg/rcomp/tmp/6hdt21322140810.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 -516.837139 NA 1 -1328.905014 -516.837139 2 1756.569452 -1328.905014 3 580.663005 1756.569452 4 -686.371900 580.663005 5 -1767.128315 -686.371900 6 2288.319518 -1767.128315 7 -591.346678 2288.319518 8 444.981808 -591.346678 9 1896.326420 444.981808 10 372.440678 1896.326420 11 91.108036 372.440678 12 423.820021 91.108036 13 447.621829 423.820021 14 -397.933782 447.621829 15 -369.619660 -397.933782 16 -322.068010 -369.619660 17 -682.101681 -322.068010 18 153.273063 -682.101681 19 -18.432550 153.273063 20 -1024.980815 -18.432550 21 -508.007675 -1024.980815 22 972.529495 -508.007675 23 -348.920091 972.529495 24 -264.569464 -348.920091 25 -467.803362 -264.569464 26 -211.634141 -467.803362 27 758.155521 -211.634141 28 -419.951243 758.155521 29 118.390433 -419.951243 30 -164.466864 118.390433 31 -300.302785 -164.466864 32 -290.274427 -300.302785 33 -175.958312 -290.274427 34 -24.295280 -175.958312 35 -97.801901 -24.295280 36 -41.497702 -97.801901 37 -284.345442 -41.497702 38 -433.148070 -284.345442 39 -121.051870 -433.148070 40 -138.191431 -121.051870 41 494.404233 -138.191431 42 20.400178 494.404233 43 386.730217 20.400178 44 -136.043565 386.730217 45 -654.564628 -136.043565 46 -108.768772 -654.564628 47 -188.667085 -108.768772 48 164.631557 -188.667085 49 -77.829499 164.631557 50 871.625794 -77.829499 51 -111.481051 871.625794 52 99.652645 -111.481051 53 -90.301531 99.652645 54 5.828954 -90.301531 55 -3.893419 5.828954 56 199.462034 -3.893419 57 928.467606 199.462034 58 -2.404567 928.467606 59 -103.502775 -2.404567 60 NA -103.502775 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -1328.905014 -516.837139 [2,] 1756.569452 -1328.905014 [3,] 580.663005 1756.569452 [4,] -686.371900 580.663005 [5,] -1767.128315 -686.371900 [6,] 2288.319518 -1767.128315 [7,] -591.346678 2288.319518 [8,] 444.981808 -591.346678 [9,] 1896.326420 444.981808 [10,] 372.440678 1896.326420 [11,] 91.108036 372.440678 [12,] 423.820021 91.108036 [13,] 447.621829 423.820021 [14,] -397.933782 447.621829 [15,] -369.619660 -397.933782 [16,] -322.068010 -369.619660 [17,] -682.101681 -322.068010 [18,] 153.273063 -682.101681 [19,] -18.432550 153.273063 [20,] -1024.980815 -18.432550 [21,] -508.007675 -1024.980815 [22,] 972.529495 -508.007675 [23,] -348.920091 972.529495 [24,] -264.569464 -348.920091 [25,] -467.803362 -264.569464 [26,] -211.634141 -467.803362 [27,] 758.155521 -211.634141 [28,] -419.951243 758.155521 [29,] 118.390433 -419.951243 [30,] -164.466864 118.390433 [31,] -300.302785 -164.466864 [32,] -290.274427 -300.302785 [33,] -175.958312 -290.274427 [34,] -24.295280 -175.958312 [35,] -97.801901 -24.295280 [36,] -41.497702 -97.801901 [37,] -284.345442 -41.497702 [38,] -433.148070 -284.345442 [39,] -121.051870 -433.148070 [40,] -138.191431 -121.051870 [41,] 494.404233 -138.191431 [42,] 20.400178 494.404233 [43,] 386.730217 20.400178 [44,] -136.043565 386.730217 [45,] -654.564628 -136.043565 [46,] -108.768772 -654.564628 [47,] -188.667085 -108.768772 [48,] 164.631557 -188.667085 [49,] -77.829499 164.631557 [50,] 871.625794 -77.829499 [51,] -111.481051 871.625794 [52,] 99.652645 -111.481051 [53,] -90.301531 99.652645 [54,] 5.828954 -90.301531 [55,] -3.893419 5.828954 [56,] 199.462034 -3.893419 [57,] 928.467606 199.462034 [58,] -2.404567 928.467606 [59,] -103.502775 -2.404567 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -1328.905014 -516.837139 2 1756.569452 -1328.905014 3 580.663005 1756.569452 4 -686.371900 580.663005 5 -1767.128315 -686.371900 6 2288.319518 -1767.128315 7 -591.346678 2288.319518 8 444.981808 -591.346678 9 1896.326420 444.981808 10 372.440678 1896.326420 11 91.108036 372.440678 12 423.820021 91.108036 13 447.621829 423.820021 14 -397.933782 447.621829 15 -369.619660 -397.933782 16 -322.068010 -369.619660 17 -682.101681 -322.068010 18 153.273063 -682.101681 19 -18.432550 153.273063 20 -1024.980815 -18.432550 21 -508.007675 -1024.980815 22 972.529495 -508.007675 23 -348.920091 972.529495 24 -264.569464 -348.920091 25 -467.803362 -264.569464 26 -211.634141 -467.803362 27 758.155521 -211.634141 28 -419.951243 758.155521 29 118.390433 -419.951243 30 -164.466864 118.390433 31 -300.302785 -164.466864 32 -290.274427 -300.302785 33 -175.958312 -290.274427 34 -24.295280 -175.958312 35 -97.801901 -24.295280 36 -41.497702 -97.801901 37 -284.345442 -41.497702 38 -433.148070 -284.345442 39 -121.051870 -433.148070 40 -138.191431 -121.051870 41 494.404233 -138.191431 42 20.400178 494.404233 43 386.730217 20.400178 44 -136.043565 386.730217 45 -654.564628 -136.043565 46 -108.768772 -654.564628 47 -188.667085 -108.768772 48 164.631557 -188.667085 49 -77.829499 164.631557 50 871.625794 -77.829499 51 -111.481051 871.625794 52 99.652645 -111.481051 53 -90.301531 99.652645 54 5.828954 -90.301531 55 -3.893419 5.828954 56 199.462034 -3.893419 57 928.467606 199.462034 58 -2.404567 928.467606 59 -103.502775 -2.404567 > 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/73x1u1322140810.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/8rrhf1322140810.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/9oaq41322140810.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/10ualx1322140810.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/113klp1322140810.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/12mmf01322140810.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/1327kk1322140810.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/14kemo1322140810.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/15boi31322140810.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/16g0j41322140810.tab") + } > > try(system("convert tmp/1nwtb1322140810.ps tmp/1nwtb1322140810.png",intern=TRUE)) character(0) > try(system("convert tmp/2gjjg1322140810.ps tmp/2gjjg1322140810.png",intern=TRUE)) character(0) > try(system("convert tmp/32syo1322140810.ps tmp/32syo1322140810.png",intern=TRUE)) character(0) > try(system("convert tmp/4m20q1322140810.ps tmp/4m20q1322140810.png",intern=TRUE)) character(0) > try(system("convert tmp/5egrj1322140810.ps tmp/5egrj1322140810.png",intern=TRUE)) character(0) > try(system("convert tmp/6hdt21322140810.ps tmp/6hdt21322140810.png",intern=TRUE)) character(0) > try(system("convert tmp/73x1u1322140810.ps tmp/73x1u1322140810.png",intern=TRUE)) character(0) > try(system("convert tmp/8rrhf1322140810.ps tmp/8rrhf1322140810.png",intern=TRUE)) character(0) > try(system("convert tmp/9oaq41322140810.ps tmp/9oaq41322140810.png",intern=TRUE)) character(0) > try(system("convert tmp/10ualx1322140810.ps tmp/10ualx1322140810.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 3.474 0.563 4.054