R version 2.15.2 (2012-10-26) -- "Trick or Treat" Copyright (C) 2012 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i686-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(31/01/2001 + ,98.8 + ,101.5 + ,28/02/2001 + ,100.5 + ,100.7 + ,31/03/2001 + ,110.4 + ,110.6 + ,30/04/2001 + ,96.4 + ,96.8 + ,31/05/2001 + ,101.9 + ,100.0 + ,30/06/2001 + ,106.2 + ,104.8 + ,31/07/2001 + ,81.0 + ,86.8 + ,31/08/2001 + ,94.7 + ,92.0 + ,30/09/2001 + ,101.0 + ,100.2 + ,31/10/2001 + ,109.4 + ,106.6 + ,30/11/2001 + ,102.3 + ,102.1 + ,31/12/2001 + ,90.7 + ,93.7 + ,31/01/2002 + ,96.2 + ,97.6 + ,28/02/2002 + ,96.1 + ,96.9 + ,31/03/2002 + ,106.0 + ,105.6 + ,30/04/2002 + ,103.1 + ,102.8 + ,31/05/2002 + ,102.0 + ,101.7 + ,30/06/2002 + ,104.7 + ,104.2 + ,31/07/2002 + ,86.0 + ,92.7 + ,31/08/2002 + ,92.1 + ,91.9 + ,30/09/2002 + ,106.9 + ,106.5 + ,31/10/2002 + ,112.6 + ,112.3 + ,30/11/2002 + ,101.7 + ,102.8 + ,31/12/2002 + ,92.0 + ,96.5 + ,31/01/2003 + ,97.4 + ,101.0 + ,28/02/2003 + ,97.0 + ,98.9 + ,31/03/2003 + ,105.4 + ,105.1 + ,30/04/2003 + ,102.7 + ,103.0 + ,31/05/2003 + ,98.1 + ,99.0 + ,30/06/2003 + ,104.5 + ,104.3 + ,31/07/2003 + ,87.4 + ,94.6 + ,31/08/2003 + ,89.9 + ,90.4 + ,30/09/2003 + ,109.8 + ,108.9 + ,31/10/2003 + ,111.7 + ,111.4 + ,30/11/2003 + ,98.6 + ,100.8 + ,31/12/2003 + ,96.9 + ,102.5 + ,31/01/2004 + ,95.1 + ,98.2 + ,29/02/2004 + ,97.0 + ,98.7 + ,31/03/2004 + ,112.7 + ,113.3 + ,30/04/2004 + ,102.9 + ,104.6 + ,31/05/2004 + ,97.4 + ,99.3 + ,30/06/2004 + ,111.4 + ,111.8 + ,31/07/2004 + ,87.4 + ,97.3 + ,31/08/2004 + ,96.8 + ,97.7 + ,30/09/2004 + ,114.1 + ,115.6 + ,31/10/2004 + ,110.3 + ,111.9 + ,30/11/2004 + ,103.9 + ,107.0 + ,31/12/2004 + ,101.6 + ,107.1 + ,31/01/2005 + ,94.6 + ,100.6 + ,28/02/2005 + ,95.9 + ,99.2 + ,31/03/2005 + ,104.7 + ,108.4 + ,30/04/2005 + ,102.8 + ,103.0 + ,31/05/2005 + ,98.1 + ,99.8 + ,30/06/2005 + ,113.9 + ,115.0 + ,31/07/2005 + ,80.9 + ,90.8 + ,31/08/2005 + ,95.7 + ,95.9 + ,30/09/2005 + ,113.2 + ,114.4 + ,31/10/2005 + ,105.9 + ,108.2 + ,30/11/2005 + ,108.8 + ,112.6 + ,31/12/2005 + ,102.3 + ,109.1 + ,31/01/2006 + ,99.0 + ,105.0 + ,28/02/2006 + ,100.7 + ,105.0 + ,31/03/2006 + ,115.5 + ,118.5 + ,30/04/2006 + ,100.7 + ,103.7 + ,31/05/2006 + ,109.9 + ,112.5 + ,30/06/2006 + ,114.6 + ,116.6 + ,31/07/2006 + ,85.4 + ,96.6 + ,31/08/2006 + ,100.5 + ,101.9 + ,30/09/2006 + ,114.8 + ,116.5 + ,31/10/2006 + ,116.5 + ,119.3 + ,30/11/2006 + ,112.9 + ,115.4 + ,31/12/2006 + ,102.0 + ,108.5 + ,31/01/2007 + ,106.0 + ,111.5 + ,28/02/2007 + ,105.3 + ,108.8 + ,31/03/2007 + ,118.8 + ,121.8 + ,30/04/2007 + ,106.1 + ,109.6 + ,31/05/2007 + ,109.3 + ,112.2 + ,30/06/2007 + ,117.2 + ,119.6 + ,31/07/2007 + ,92.5 + ,104.1 + ,31/08/2007 + ,104.2 + ,105.3 + ,30/09/2007 + ,112.5 + ,115.0 + ,31/10/2007 + ,122.4 + ,124.1 + ,30/11/2007 + ,113.3 + ,116.8 + ,31/12/2007 + ,100.0 + ,107.5 + ,31/01/2008 + ,110.7 + ,115.6 + ,29/02/2008 + ,112.8 + ,116.2 + ,31/03/2008 + ,109.8 + ,116.3 + ,30/04/2008 + ,117.3 + ,119.0 + ,31/05/2008 + ,109.1 + ,111.9 + ,30/06/2008 + ,115.9 + ,118.6 + ,31/07/2008 + ,96.0 + ,106.9 + ,31/08/2008 + ,99.8 + ,103.2 + ,30/09/2008 + ,116.8 + ,118.6 + ,31/10/2008 + ,115.7 + ,118.7 + ,30/11/2008 + ,99.4 + ,102.8 + ,31/12/2008 + ,94.3 + ,100.6 + ,31/01/2009 + ,91.0 + ,94.9 + ,28/02/2009 + ,93.2 + ,94.5 + ,31/03/2009 + ,103.1 + ,102.9 + ,30/04/2009 + ,94.1 + ,95.3 + ,31/05/2009 + ,91.8 + ,92.5 + ,30/06/2009 + ,102.7 + ,102.7 + ,31/07/2009 + ,82.6 + ,91.5 + ,31/08/2009 + ,89.1 + ,89.5 + ,30/09/2009 + ,104.5 + ,104.2 + ,31/10/2009 + ,105.1 + ,105.2 + ,30/11/2009 + ,95.1 + ,99.0 + ,31/12/2009 + ,88.7 + ,95.5 + ,31/01/2010 + ,86.3 + ,90.5 + ,28/02/2010 + ,91.8 + ,96.1 + ,31/03/2010 + ,111.5 + ,113.0 + ,30/04/2010 + ,99.7 + ,101.9 + ,31/05/2010 + ,97.5 + ,101.4 + ,30/06/2010 + ,111.7 + ,113.6 + ,31/07/2010 + ,86.2 + ,96.6 + ,31/08/2010 + ,95.4 + ,97.8 + ,30/09/2010 + ,113.0 + ,114.9 + ,31/10/2010 + ,111.0 + ,112.5 + ,30/11/2010 + ,104.5 + ,108.4 + ,31/12/2010 + ,97.3 + ,107.0 + ,31/01/2011 + ,97.1 + ,103.5 + ,28/02/2011 + ,104.1 + ,107.5 + ,31/03/2011 + ,119.3 + ,122.3) + ,dim=c(3 + ,123) + ,dimnames=list(c('Periode' + ,'TotaleIndustrie' + ,'TotaleIndustrieZonderBouwnijverheid') + ,1:123)) > y <- array(NA,dim=c(3,123),dimnames=list(c('Periode','TotaleIndustrie','TotaleIndustrieZonderBouwnijverheid'),1:123)) > 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' > 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 Attaching package: 'zoo' The following object(s) are masked from 'package:base': as.Date, 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 TotaleIndustrieZonderBouwnijverheid Periode TotaleIndustrie 1 101.5 0.015492254 98.8 2 100.7 0.006996502 100.5 3 110.6 0.005164085 110.4 4 96.8 0.003748126 96.4 5 100.0 0.003098451 101.9 6 104.8 0.002498751 106.2 7 86.8 0.002213179 81.0 8 92.0 0.001936532 94.7 9 100.2 0.001665834 101.0 10 106.6 0.001549225 109.4 11 102.1 0.001362955 102.3 12 93.7 0.001291021 90.7 13 97.6 0.015484515 96.2 14 96.9 0.006993007 96.1 15 105.6 0.005161505 106.0 16 102.8 0.003746254 103.1 17 101.7 0.003096903 102.0 18 104.2 0.002497502 104.7 19 92.7 0.002212074 86.0 20 91.9 0.001935564 92.1 21 106.5 0.001665002 106.9 22 112.3 0.001548452 112.6 23 102.8 0.001362274 101.7 24 96.5 0.001290376 92.0 25 101.0 0.015476785 97.4 26 98.9 0.006989516 97.0 27 105.1 0.005158928 105.4 28 103.0 0.003744383 102.7 29 99.0 0.003095357 98.1 30 104.3 0.002496256 104.5 31 94.6 0.002210969 87.4 32 90.4 0.001934598 89.9 33 108.9 0.001664170 109.8 34 111.4 0.001547678 111.7 35 100.8 0.001361594 98.6 36 102.5 0.001289732 96.9 37 98.2 0.015469062 95.1 38 98.7 0.007235529 97.0 39 113.3 0.005156354 112.7 40 104.6 0.003742515 102.9 41 99.3 0.003093812 97.4 42 111.8 0.002495010 111.4 43 97.3 0.002209866 87.4 44 97.7 0.001933633 96.8 45 115.6 0.001663340 114.1 46 111.9 0.001546906 110.3 47 107.0 0.001360915 103.9 48 107.1 0.001289088 101.6 49 100.6 0.015461347 94.6 50 99.2 0.006982544 95.9 51 108.4 0.005153782 104.7 52 103.0 0.003740648 102.8 53 99.8 0.003092269 98.1 54 115.0 0.002493766 113.9 55 90.8 0.002208764 80.9 56 95.9 0.001932668 95.7 57 114.4 0.001662510 113.2 58 108.2 0.001546135 105.9 59 112.6 0.001360236 108.8 60 109.1 0.001288446 102.3 61 105.0 0.015453639 99.0 62 105.0 0.006979063 100.7 63 118.5 0.005151213 115.5 64 103.7 0.003738784 100.7 65 112.5 0.003090728 109.9 66 116.6 0.002492522 114.6 67 96.6 0.002207663 85.4 68 101.9 0.001931705 100.5 69 116.5 0.001661682 114.8 70 119.3 0.001545364 116.5 71 115.4 0.001359558 112.9 72 108.5 0.001287803 102.0 73 111.5 0.015445939 106.0 74 108.8 0.006975585 105.3 75 121.8 0.005148646 118.8 76 109.6 0.003736921 106.1 77 112.2 0.003089188 109.3 78 119.6 0.002491281 117.2 79 104.1 0.002206563 92.5 80 105.3 0.001930742 104.2 81 115.0 0.001660854 112.5 82 124.1 0.001544594 122.4 83 116.8 0.001358880 113.3 84 107.5 0.001287162 100.0 85 115.6 0.015438247 110.7 86 116.2 0.007221116 112.8 87 116.3 0.005146082 109.8 88 119.0 0.003735060 117.3 89 111.9 0.003087649 109.1 90 118.6 0.002490040 115.9 91 106.9 0.002205464 96.0 92 103.2 0.001929781 99.8 93 118.6 0.001660027 116.8 94 118.7 0.001543825 115.7 95 102.8 0.001358204 99.4 96 100.6 0.001286521 94.3 97 94.9 0.015430562 91.0 98 94.5 0.006968641 93.2 99 102.9 0.005143521 103.1 100 95.3 0.003733201 94.1 101 92.5 0.003086112 91.8 102 102.7 0.002488800 102.7 103 91.5 0.002204366 82.6 104 89.5 0.001928820 89.1 105 104.2 0.001659200 104.5 106 105.2 0.001543056 105.1 107 99.0 0.001357527 95.1 108 95.5 0.001285880 88.7 109 90.5 0.015422886 86.3 110 96.1 0.006965174 91.8 111 113.0 0.005140962 111.5 112 101.9 0.003731343 99.7 113 101.4 0.003084577 97.5 114 113.6 0.002487562 111.7 115 96.6 0.002203269 86.2 116 97.8 0.001927861 95.4 117 114.9 0.001658375 113.0 118 112.5 0.001542289 111.0 119 108.4 0.001356852 104.5 120 107.0 0.001285240 97.3 121 103.5 0.015415216 97.1 122 107.5 0.006961711 104.1 123 122.3 0.005138405 119.3 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) Periode TotaleIndustrie 16.1563 33.3837 0.8679 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -6.4081 -2.4045 0.0245 1.8009 7.5922 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 16.15630 2.82465 5.720 7.97e-08 *** Periode 33.38373 62.17153 0.537 0.592 TotaleIndustrie 0.86787 0.02705 32.079 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.699 on 120 degrees of freedom Multiple R-squared: 0.897, Adjusted R-squared: 0.8953 F-statistic: 522.5 on 2 and 120 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.049649110 0.099298220 0.9503509 [2,] 0.144165061 0.288330122 0.8558349 [3,] 0.335993747 0.671987494 0.6640063 [4,] 0.228000625 0.456001251 0.7719994 [5,] 0.151614826 0.303229652 0.8483852 [6,] 0.105912443 0.211824886 0.8940876 [7,] 0.081756656 0.163513313 0.9182433 [8,] 0.065163265 0.130326529 0.9348367 [9,] 0.041147240 0.082294480 0.9588528 [10,] 0.026551965 0.053103930 0.9734480 [11,] 0.016027541 0.032055081 0.9839725 [12,] 0.009441096 0.018882192 0.9905589 [13,] 0.005787382 0.011574765 0.9942126 [14,] 0.018056432 0.036112863 0.9819436 [15,] 0.023265138 0.046530276 0.9767349 [16,] 0.018690948 0.037381897 0.9813091 [17,] 0.023143187 0.046286373 0.9768568 [18,] 0.017994022 0.035988044 0.9820060 [19,] 0.020840514 0.041681029 0.9791595 [20,] 0.016270138 0.032540276 0.9837299 [21,] 0.010849625 0.021699250 0.9891504 [22,] 0.007577026 0.015154052 0.9924230 [23,] 0.005212336 0.010424671 0.9947877 [24,] 0.003547074 0.007094148 0.9964529 [25,] 0.002486092 0.004972184 0.9975139 [26,] 0.007012228 0.014024456 0.9929878 [27,] 0.011289856 0.022579711 0.9887101 [28,] 0.009357013 0.018714026 0.9906430 [29,] 0.009137743 0.018275486 0.9908623 [30,] 0.007359049 0.014718098 0.9926410 [31,] 0.020599025 0.041198049 0.9794010 [32,] 0.014877975 0.029755949 0.9851220 [33,] 0.011439619 0.022879238 0.9885604 [34,] 0.012363798 0.024727595 0.9876362 [35,] 0.010122678 0.020245355 0.9898773 [36,] 0.007681728 0.015363456 0.9923183 [37,] 0.007123396 0.014246792 0.9928766 [38,] 0.055941953 0.111883906 0.9440580 [39,] 0.053087687 0.106175375 0.9469123 [40,] 0.068841613 0.137683225 0.9311584 [41,] 0.069081677 0.138163353 0.9309183 [42,] 0.068513815 0.137027631 0.9314862 [43,] 0.107270857 0.214541715 0.8927291 [44,] 0.113702147 0.227404293 0.8862979 [45,] 0.093874305 0.187748610 0.9061257 [46,] 0.096916233 0.193832466 0.9030838 [47,] 0.093687836 0.187375672 0.9063122 [48,] 0.082603769 0.165207539 0.9173962 [49,] 0.077645918 0.155291835 0.9223541 [50,] 0.119642939 0.239285879 0.8803571 [51,] 0.149896533 0.299793066 0.8501035 [52,] 0.142473589 0.284947177 0.8575264 [53,] 0.127470494 0.254940987 0.8725295 [54,] 0.145766495 0.291532989 0.8542335 [55,] 0.235980453 0.471960906 0.7640195 [56,] 0.249214716 0.498429432 0.7507853 [57,] 0.227819627 0.455639253 0.7721804 [58,] 0.241276599 0.482553197 0.7587234 [59,] 0.209342609 0.418685218 0.7906574 [60,] 0.189738693 0.379477386 0.8102613 [61,] 0.172969417 0.345938834 0.8270306 [62,] 0.360489021 0.720978042 0.6395110 [63,] 0.340169747 0.680339493 0.6598303 [64,] 0.312983730 0.625967459 0.6870163 [65,] 0.309882463 0.619764925 0.6901175 [66,] 0.283360899 0.566721797 0.7166391 [67,] 0.328612101 0.657224202 0.6713879 [68,] 0.338636816 0.677273632 0.6613632 [69,] 0.299700891 0.599401782 0.7002991 [70,] 0.291864639 0.583729278 0.7081354 [71,] 0.257095206 0.514190413 0.7429048 [72,] 0.223167296 0.446334593 0.7768327 [73,] 0.198139465 0.396278930 0.8018605 [74,] 0.511848670 0.976302659 0.4881513 [75,] 0.484422096 0.968844192 0.5155779 [76,] 0.438176557 0.876353114 0.5618234 [77,] 0.399048385 0.798096770 0.6009516 [78,] 0.370928819 0.741857638 0.6290712 [79,] 0.444321480 0.888642960 0.5556785 [80,] 0.441337355 0.882674710 0.5586626 [81,] 0.405522386 0.811044773 0.5944776 [82,] 0.499650006 0.999300012 0.5003500 [83,] 0.445113632 0.890227264 0.5548864 [84,] 0.391373914 0.782747829 0.6086261 [85,] 0.352950818 0.705901635 0.6470492 [86,] 0.688429347 0.623141307 0.3115707 [87,] 0.631823689 0.736352622 0.3681763 [88,] 0.577819774 0.844360453 0.4221802 [89,] 0.551881116 0.896237767 0.4481189 [90,] 0.488328965 0.976657931 0.5116710 [91,] 0.471930290 0.943860580 0.5280697 [92,] 0.410019313 0.820038627 0.5899807 [93,] 0.415144530 0.830289060 0.5848555 [94,] 0.425478823 0.850957645 0.5745212 [95,] 0.435982364 0.871964729 0.5640176 [96,] 0.516443314 0.967113373 0.4835567 [97,] 0.538670025 0.922659950 0.4613300 [98,] 0.539257044 0.921485912 0.4607430 [99,] 0.726539779 0.546920441 0.2734602 [100,] 0.781270659 0.437458683 0.2187293 [101,] 0.822538711 0.354922579 0.1774613 [102,] 0.784865031 0.430269937 0.2151350 [103,] 0.719407530 0.561184940 0.2805925 [104,] 0.705229367 0.589541266 0.2947706 [105,] 0.681813222 0.636373555 0.3181868 [106,] 0.596130299 0.807739401 0.4038697 [107,] 0.613962279 0.772075443 0.3860377 [108,] 0.563414541 0.873170918 0.4365855 [109,] 0.450687957 0.901375915 0.5493120 [110,] 0.438332805 0.876665609 0.5616672 [111,] 0.618846542 0.762306915 0.3811535 [112,] 0.463955430 0.927910859 0.5360446 > postscript(file="/var/wessaorg/rcomp/tmp/1fhwk1353321014.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/2vclg1353321014.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/37nyv1353321014.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/4nd031353321014.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/5ubri1353321014.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 = 123 Frequency = 1 1 2 3 4 5 6 -0.91890600 -2.91066275 -1.54138925 -3.14395846 -4.69554734 -3.60736221 7 8 9 10 11 12 0.27246067 -6.40810402 -3.66663947 -4.55284312 -2.88475746 -1.21507995 13 14 15 16 17 18 -2.56218923 -2.89192412 -2.72268117 -2.95861577 -3.08228253 -2.90551760 19 20 21 22 23 24 1.83315443 -4.25161329 -2.48703660 -1.62999690 -1.66401355 0.45671236 25 26 27 28 29 30 -0.20337350 -1.67288933 -2.70187397 -2.41140588 -2.39754327 -2.63190225 31 32 33 34 35 36 2.51817522 -3.84227005 -2.60382787 -1.74888933 -0.97359810 2.20417759 37 38 39 40 41 42 -1.00701784 -1.88110217 -0.83722901 -0.98491723 -1.48998366 -1.12015420 43 44 45 46 47 48 5.21821205 -2.53053136 0.36436475 -0.03384747 0.62672085 2.72521652 49 50 51 52 53 54 1.82717404 -0.41800108 1.20580587 -2.49806806 -1.59744019 -0.08978423 55 56 57 58 59 60 4.35939493 -3.37584367 -0.05452579 0.08480026 1.97418723 4.11772994 61 62 63 64 65 66 2.40880938 1.21634570 1.93291045 0.02451832 0.86176146 0.90274923 67 68 69 70 71 72 6.25402286 -1.54158093 0.65691207 1.98541853 1.21594849 3.77811197 73 74 75 76 77 78 2.83398604 1.02426610 2.36902966 1.23808991 1.08253404 1.64633226 79 80 81 82 83 84 7.59219232 -1.35266272 1.15303756 1.66501932 2.26882366 4.51387065 85 86 87 88 89 90 2.85526028 1.90705468 4.67993291 0.91802340 0.95615913 1.77460289 91 92 93 94 95 96 7.35468881 0.36599135 1.02123007 2.07976481 0.33222018 2.56074323 97 98 99 100 101 102 -0.74747121 -2.77429167 -2.90526176 -2.64736236 -3.42966229 -2.66948984 103 104 105 106 107 108 3.58416507 -4.04778226 -2.70395822 -2.22080207 0.26407785 2.32082893 109 110 111 112 113 114 -1.06823237 0.04084015 -0.09527281 -0.90736467 0.52353778 0.41973385 115 116 117 118 119 120 5.55987462 -1.21532259 0.61918600 -0.04120135 1.50613529 6.35718008 121 122 123 2.55904247 0.76617165 2.43543723 > postscript(file="/var/wessaorg/rcomp/tmp/6k5x71353321014.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 = 123 Frequency = 1 lag(myerror, k = 1) myerror 0 -0.91890600 NA 1 -2.91066275 -0.91890600 2 -1.54138925 -2.91066275 3 -3.14395846 -1.54138925 4 -4.69554734 -3.14395846 5 -3.60736221 -4.69554734 6 0.27246067 -3.60736221 7 -6.40810402 0.27246067 8 -3.66663947 -6.40810402 9 -4.55284312 -3.66663947 10 -2.88475746 -4.55284312 11 -1.21507995 -2.88475746 12 -2.56218923 -1.21507995 13 -2.89192412 -2.56218923 14 -2.72268117 -2.89192412 15 -2.95861577 -2.72268117 16 -3.08228253 -2.95861577 17 -2.90551760 -3.08228253 18 1.83315443 -2.90551760 19 -4.25161329 1.83315443 20 -2.48703660 -4.25161329 21 -1.62999690 -2.48703660 22 -1.66401355 -1.62999690 23 0.45671236 -1.66401355 24 -0.20337350 0.45671236 25 -1.67288933 -0.20337350 26 -2.70187397 -1.67288933 27 -2.41140588 -2.70187397 28 -2.39754327 -2.41140588 29 -2.63190225 -2.39754327 30 2.51817522 -2.63190225 31 -3.84227005 2.51817522 32 -2.60382787 -3.84227005 33 -1.74888933 -2.60382787 34 -0.97359810 -1.74888933 35 2.20417759 -0.97359810 36 -1.00701784 2.20417759 37 -1.88110217 -1.00701784 38 -0.83722901 -1.88110217 39 -0.98491723 -0.83722901 40 -1.48998366 -0.98491723 41 -1.12015420 -1.48998366 42 5.21821205 -1.12015420 43 -2.53053136 5.21821205 44 0.36436475 -2.53053136 45 -0.03384747 0.36436475 46 0.62672085 -0.03384747 47 2.72521652 0.62672085 48 1.82717404 2.72521652 49 -0.41800108 1.82717404 50 1.20580587 -0.41800108 51 -2.49806806 1.20580587 52 -1.59744019 -2.49806806 53 -0.08978423 -1.59744019 54 4.35939493 -0.08978423 55 -3.37584367 4.35939493 56 -0.05452579 -3.37584367 57 0.08480026 -0.05452579 58 1.97418723 0.08480026 59 4.11772994 1.97418723 60 2.40880938 4.11772994 61 1.21634570 2.40880938 62 1.93291045 1.21634570 63 0.02451832 1.93291045 64 0.86176146 0.02451832 65 0.90274923 0.86176146 66 6.25402286 0.90274923 67 -1.54158093 6.25402286 68 0.65691207 -1.54158093 69 1.98541853 0.65691207 70 1.21594849 1.98541853 71 3.77811197 1.21594849 72 2.83398604 3.77811197 73 1.02426610 2.83398604 74 2.36902966 1.02426610 75 1.23808991 2.36902966 76 1.08253404 1.23808991 77 1.64633226 1.08253404 78 7.59219232 1.64633226 79 -1.35266272 7.59219232 80 1.15303756 -1.35266272 81 1.66501932 1.15303756 82 2.26882366 1.66501932 83 4.51387065 2.26882366 84 2.85526028 4.51387065 85 1.90705468 2.85526028 86 4.67993291 1.90705468 87 0.91802340 4.67993291 88 0.95615913 0.91802340 89 1.77460289 0.95615913 90 7.35468881 1.77460289 91 0.36599135 7.35468881 92 1.02123007 0.36599135 93 2.07976481 1.02123007 94 0.33222018 2.07976481 95 2.56074323 0.33222018 96 -0.74747121 2.56074323 97 -2.77429167 -0.74747121 98 -2.90526176 -2.77429167 99 -2.64736236 -2.90526176 100 -3.42966229 -2.64736236 101 -2.66948984 -3.42966229 102 3.58416507 -2.66948984 103 -4.04778226 3.58416507 104 -2.70395822 -4.04778226 105 -2.22080207 -2.70395822 106 0.26407785 -2.22080207 107 2.32082893 0.26407785 108 -1.06823237 2.32082893 109 0.04084015 -1.06823237 110 -0.09527281 0.04084015 111 -0.90736467 -0.09527281 112 0.52353778 -0.90736467 113 0.41973385 0.52353778 114 5.55987462 0.41973385 115 -1.21532259 5.55987462 116 0.61918600 -1.21532259 117 -0.04120135 0.61918600 118 1.50613529 -0.04120135 119 6.35718008 1.50613529 120 2.55904247 6.35718008 121 0.76617165 2.55904247 122 2.43543723 0.76617165 123 NA 2.43543723 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -2.91066275 -0.91890600 [2,] -1.54138925 -2.91066275 [3,] -3.14395846 -1.54138925 [4,] -4.69554734 -3.14395846 [5,] -3.60736221 -4.69554734 [6,] 0.27246067 -3.60736221 [7,] -6.40810402 0.27246067 [8,] -3.66663947 -6.40810402 [9,] -4.55284312 -3.66663947 [10,] -2.88475746 -4.55284312 [11,] -1.21507995 -2.88475746 [12,] -2.56218923 -1.21507995 [13,] -2.89192412 -2.56218923 [14,] -2.72268117 -2.89192412 [15,] -2.95861577 -2.72268117 [16,] -3.08228253 -2.95861577 [17,] -2.90551760 -3.08228253 [18,] 1.83315443 -2.90551760 [19,] -4.25161329 1.83315443 [20,] -2.48703660 -4.25161329 [21,] -1.62999690 -2.48703660 [22,] -1.66401355 -1.62999690 [23,] 0.45671236 -1.66401355 [24,] -0.20337350 0.45671236 [25,] -1.67288933 -0.20337350 [26,] -2.70187397 -1.67288933 [27,] -2.41140588 -2.70187397 [28,] -2.39754327 -2.41140588 [29,] -2.63190225 -2.39754327 [30,] 2.51817522 -2.63190225 [31,] -3.84227005 2.51817522 [32,] -2.60382787 -3.84227005 [33,] -1.74888933 -2.60382787 [34,] -0.97359810 -1.74888933 [35,] 2.20417759 -0.97359810 [36,] -1.00701784 2.20417759 [37,] -1.88110217 -1.00701784 [38,] -0.83722901 -1.88110217 [39,] -0.98491723 -0.83722901 [40,] -1.48998366 -0.98491723 [41,] -1.12015420 -1.48998366 [42,] 5.21821205 -1.12015420 [43,] -2.53053136 5.21821205 [44,] 0.36436475 -2.53053136 [45,] -0.03384747 0.36436475 [46,] 0.62672085 -0.03384747 [47,] 2.72521652 0.62672085 [48,] 1.82717404 2.72521652 [49,] -0.41800108 1.82717404 [50,] 1.20580587 -0.41800108 [51,] -2.49806806 1.20580587 [52,] -1.59744019 -2.49806806 [53,] -0.08978423 -1.59744019 [54,] 4.35939493 -0.08978423 [55,] -3.37584367 4.35939493 [56,] -0.05452579 -3.37584367 [57,] 0.08480026 -0.05452579 [58,] 1.97418723 0.08480026 [59,] 4.11772994 1.97418723 [60,] 2.40880938 4.11772994 [61,] 1.21634570 2.40880938 [62,] 1.93291045 1.21634570 [63,] 0.02451832 1.93291045 [64,] 0.86176146 0.02451832 [65,] 0.90274923 0.86176146 [66,] 6.25402286 0.90274923 [67,] -1.54158093 6.25402286 [68,] 0.65691207 -1.54158093 [69,] 1.98541853 0.65691207 [70,] 1.21594849 1.98541853 [71,] 3.77811197 1.21594849 [72,] 2.83398604 3.77811197 [73,] 1.02426610 2.83398604 [74,] 2.36902966 1.02426610 [75,] 1.23808991 2.36902966 [76,] 1.08253404 1.23808991 [77,] 1.64633226 1.08253404 [78,] 7.59219232 1.64633226 [79,] -1.35266272 7.59219232 [80,] 1.15303756 -1.35266272 [81,] 1.66501932 1.15303756 [82,] 2.26882366 1.66501932 [83,] 4.51387065 2.26882366 [84,] 2.85526028 4.51387065 [85,] 1.90705468 2.85526028 [86,] 4.67993291 1.90705468 [87,] 0.91802340 4.67993291 [88,] 0.95615913 0.91802340 [89,] 1.77460289 0.95615913 [90,] 7.35468881 1.77460289 [91,] 0.36599135 7.35468881 [92,] 1.02123007 0.36599135 [93,] 2.07976481 1.02123007 [94,] 0.33222018 2.07976481 [95,] 2.56074323 0.33222018 [96,] -0.74747121 2.56074323 [97,] -2.77429167 -0.74747121 [98,] -2.90526176 -2.77429167 [99,] -2.64736236 -2.90526176 [100,] -3.42966229 -2.64736236 [101,] -2.66948984 -3.42966229 [102,] 3.58416507 -2.66948984 [103,] -4.04778226 3.58416507 [104,] -2.70395822 -4.04778226 [105,] -2.22080207 -2.70395822 [106,] 0.26407785 -2.22080207 [107,] 2.32082893 0.26407785 [108,] -1.06823237 2.32082893 [109,] 0.04084015 -1.06823237 [110,] -0.09527281 0.04084015 [111,] -0.90736467 -0.09527281 [112,] 0.52353778 -0.90736467 [113,] 0.41973385 0.52353778 [114,] 5.55987462 0.41973385 [115,] -1.21532259 5.55987462 [116,] 0.61918600 -1.21532259 [117,] -0.04120135 0.61918600 [118,] 1.50613529 -0.04120135 [119,] 6.35718008 1.50613529 [120,] 2.55904247 6.35718008 [121,] 0.76617165 2.55904247 [122,] 2.43543723 0.76617165 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -2.91066275 -0.91890600 2 -1.54138925 -2.91066275 3 -3.14395846 -1.54138925 4 -4.69554734 -3.14395846 5 -3.60736221 -4.69554734 6 0.27246067 -3.60736221 7 -6.40810402 0.27246067 8 -3.66663947 -6.40810402 9 -4.55284312 -3.66663947 10 -2.88475746 -4.55284312 11 -1.21507995 -2.88475746 12 -2.56218923 -1.21507995 13 -2.89192412 -2.56218923 14 -2.72268117 -2.89192412 15 -2.95861577 -2.72268117 16 -3.08228253 -2.95861577 17 -2.90551760 -3.08228253 18 1.83315443 -2.90551760 19 -4.25161329 1.83315443 20 -2.48703660 -4.25161329 21 -1.62999690 -2.48703660 22 -1.66401355 -1.62999690 23 0.45671236 -1.66401355 24 -0.20337350 0.45671236 25 -1.67288933 -0.20337350 26 -2.70187397 -1.67288933 27 -2.41140588 -2.70187397 28 -2.39754327 -2.41140588 29 -2.63190225 -2.39754327 30 2.51817522 -2.63190225 31 -3.84227005 2.51817522 32 -2.60382787 -3.84227005 33 -1.74888933 -2.60382787 34 -0.97359810 -1.74888933 35 2.20417759 -0.97359810 36 -1.00701784 2.20417759 37 -1.88110217 -1.00701784 38 -0.83722901 -1.88110217 39 -0.98491723 -0.83722901 40 -1.48998366 -0.98491723 41 -1.12015420 -1.48998366 42 5.21821205 -1.12015420 43 -2.53053136 5.21821205 44 0.36436475 -2.53053136 45 -0.03384747 0.36436475 46 0.62672085 -0.03384747 47 2.72521652 0.62672085 48 1.82717404 2.72521652 49 -0.41800108 1.82717404 50 1.20580587 -0.41800108 51 -2.49806806 1.20580587 52 -1.59744019 -2.49806806 53 -0.08978423 -1.59744019 54 4.35939493 -0.08978423 55 -3.37584367 4.35939493 56 -0.05452579 -3.37584367 57 0.08480026 -0.05452579 58 1.97418723 0.08480026 59 4.11772994 1.97418723 60 2.40880938 4.11772994 61 1.21634570 2.40880938 62 1.93291045 1.21634570 63 0.02451832 1.93291045 64 0.86176146 0.02451832 65 0.90274923 0.86176146 66 6.25402286 0.90274923 67 -1.54158093 6.25402286 68 0.65691207 -1.54158093 69 1.98541853 0.65691207 70 1.21594849 1.98541853 71 3.77811197 1.21594849 72 2.83398604 3.77811197 73 1.02426610 2.83398604 74 2.36902966 1.02426610 75 1.23808991 2.36902966 76 1.08253404 1.23808991 77 1.64633226 1.08253404 78 7.59219232 1.64633226 79 -1.35266272 7.59219232 80 1.15303756 -1.35266272 81 1.66501932 1.15303756 82 2.26882366 1.66501932 83 4.51387065 2.26882366 84 2.85526028 4.51387065 85 1.90705468 2.85526028 86 4.67993291 1.90705468 87 0.91802340 4.67993291 88 0.95615913 0.91802340 89 1.77460289 0.95615913 90 7.35468881 1.77460289 91 0.36599135 7.35468881 92 1.02123007 0.36599135 93 2.07976481 1.02123007 94 0.33222018 2.07976481 95 2.56074323 0.33222018 96 -0.74747121 2.56074323 97 -2.77429167 -0.74747121 98 -2.90526176 -2.77429167 99 -2.64736236 -2.90526176 100 -3.42966229 -2.64736236 101 -2.66948984 -3.42966229 102 3.58416507 -2.66948984 103 -4.04778226 3.58416507 104 -2.70395822 -4.04778226 105 -2.22080207 -2.70395822 106 0.26407785 -2.22080207 107 2.32082893 0.26407785 108 -1.06823237 2.32082893 109 0.04084015 -1.06823237 110 -0.09527281 0.04084015 111 -0.90736467 -0.09527281 112 0.52353778 -0.90736467 113 0.41973385 0.52353778 114 5.55987462 0.41973385 115 -1.21532259 5.55987462 116 0.61918600 -1.21532259 117 -0.04120135 0.61918600 118 1.50613529 -0.04120135 119 6.35718008 1.50613529 120 2.55904247 6.35718008 121 0.76617165 2.55904247 122 2.43543723 0.76617165 > 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/7qhp71353321014.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/88ofx1353321014.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/9xk1e1353321014.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/107sg21353321014.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/11qalt1353321014.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/12f5ie1353321014.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/135shc1353321014.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/14phl61353321015.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/15owx81353321015.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/16rhtj1353321015.tab") + } > > try(system("convert tmp/1fhwk1353321014.ps tmp/1fhwk1353321014.png",intern=TRUE)) character(0) > try(system("convert tmp/2vclg1353321014.ps tmp/2vclg1353321014.png",intern=TRUE)) character(0) > try(system("convert tmp/37nyv1353321014.ps tmp/37nyv1353321014.png",intern=TRUE)) character(0) > try(system("convert tmp/4nd031353321014.ps tmp/4nd031353321014.png",intern=TRUE)) character(0) > try(system("convert tmp/5ubri1353321014.ps tmp/5ubri1353321014.png",intern=TRUE)) character(0) > try(system("convert tmp/6k5x71353321014.ps tmp/6k5x71353321014.png",intern=TRUE)) character(0) > try(system("convert tmp/7qhp71353321014.ps tmp/7qhp71353321014.png",intern=TRUE)) character(0) > try(system("convert tmp/88ofx1353321014.ps tmp/88ofx1353321014.png",intern=TRUE)) character(0) > try(system("convert tmp/9xk1e1353321014.ps tmp/9xk1e1353321014.png",intern=TRUE)) character(0) > try(system("convert tmp/107sg21353321014.ps tmp/107sg21353321014.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 10.102 1.631 11.763