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(63047 + ,13 + ,6 + ,10345 + ,66751 + ,26 + ,7 + ,17607 + ,7176 + ,0 + ,0 + ,1423 + ,78306 + ,37 + ,12 + ,20050 + ,144655 + ,47 + ,15 + ,21212 + ,269638 + ,84 + ,16 + ,93979 + ,69266 + ,21 + ,12 + ,15524 + ,83529 + ,36 + ,15 + ,16182 + ,73226 + ,35 + ,15 + ,19238 + ,178519 + ,40 + ,13 + ,28909 + ,67250 + ,35 + ,6 + ,22357 + ,102982 + ,46 + ,16 + ,25560 + ,50001 + ,20 + ,7 + ,9954 + ,91093 + ,24 + ,12 + ,18490 + ,80112 + ,19 + ,9 + ,17777 + ,72961 + ,15 + ,10 + ,25268 + ,77159 + ,52 + ,16 + ,37525 + ,15629 + ,0 + ,5 + ,6023 + ,71693 + ,38 + ,20 + ,25042 + ,19920 + ,12 + ,7 + ,35713 + ,39403 + ,10 + ,13 + ,7039 + ,104383 + ,53 + ,13 + ,40841 + ,56088 + ,4 + ,11 + ,9214 + ,62006 + ,24 + ,9 + ,17446 + ,81665 + ,39 + ,10 + ,10295 + ,69451 + ,19 + ,7 + ,13206 + ,88794 + ,23 + ,13 + ,26093 + ,90642 + ,39 + ,15 + ,20744 + ,207069 + ,38 + ,13 + ,68013 + ,99340 + ,20 + ,7 + ,12840 + ,56695 + ,20 + ,14 + ,12672 + ,108143 + ,41 + ,11 + ,10872 + ,64204 + ,29 + ,3 + ,21325 + ,29101 + ,0 + ,8 + ,24542 + ,113060 + ,31 + ,12 + ,16401 + ,0 + ,0 + ,0 + ,0 + ,65773 + ,8 + ,12 + ,12821 + ,67047 + ,35 + ,8 + ,14662 + ,41953 + ,3 + ,20 + ,22190 + ,113787 + ,47 + ,18 + ,37929 + ,86584 + ,42 + ,9 + ,18009 + ,59588 + ,11 + ,14 + ,11076 + ,40064 + ,10 + ,7 + ,24981 + ,74471 + ,26 + ,13 + ,30691 + ,60437 + ,27 + ,11 + ,29164 + ,55118 + ,1 + ,11 + ,13985 + ,40295 + ,15 + ,14 + ,7588 + ,103397 + ,32 + ,9 + ,20023 + ,78982 + ,13 + ,12 + ,25524 + ,67317 + ,25 + ,12 + ,14717 + ,39887 + ,10 + ,17 + ,6832 + ,59682 + ,24 + ,10 + ,9624 + ,132740 + ,26 + ,11 + ,24300 + ,104816 + ,29 + ,12 + ,21790 + ,101395 + ,40 + ,17 + ,16493 + ,72824 + ,22 + ,6 + ,9269 + ,76018 + ,27 + ,8 + ,20105 + ,33891 + ,8 + ,12 + ,11216 + ,63694 + ,27 + ,13 + ,15569 + ,33239 + ,0 + ,14 + ,21799 + ,35093 + ,0 + ,17 + ,3772 + ,35252 + ,17 + ,8 + ,6057 + ,36977 + ,7 + ,9 + ,20828 + ,42406 + ,18 + ,9 + ,9976 + ,56353 + ,7 + ,9 + ,14055 + ,58817 + ,24 + ,15 + ,17455 + ,81051 + ,19 + ,16 + ,39553 + ,70872 + ,39 + ,13 + ,14818 + ,42372 + ,17 + ,12 + ,17065 + ,19144 + ,0 + ,10 + ,1536 + ,114177 + ,39 + ,9 + ,11938 + ,59414 + ,21 + ,3 + ,24589 + ,51379 + ,29 + ,12 + ,21332 + ,40756 + ,27 + ,8 + ,13229 + ,53398 + ,23 + ,17 + ,11331 + ,17799 + ,0 + ,9 + ,853 + ,71154 + ,31 + ,8 + ,19821 + ,58305 + ,19 + ,9 + ,34666 + ,27454 + ,12 + ,12 + ,15051 + ,34323 + ,23 + ,5 + ,27969 + ,44761 + ,33 + ,14 + ,17897 + ,113862 + ,21 + ,14 + ,6031 + ,35027 + ,17 + ,10 + ,7153 + ,62396 + ,27 + ,12 + ,13365 + ,29613 + ,14 + ,10 + ,11197 + ,65559 + ,12 + ,12 + ,25291 + ,120064 + ,22 + ,17 + ,28994 + ,36149 + ,15 + ,13 + ,10461 + ,40181 + ,14 + ,10 + ,16415 + ,53398 + ,22 + ,11 + ,8495 + ,56435 + ,25 + ,7 + ,18318 + ,86791 + ,45 + ,10 + ,25143 + ,71738 + ,10 + ,11 + ,20471 + ,48503 + ,16 + ,5 + ,14561 + ,25214 + ,12 + ,6 + ,16902 + ,119424 + ,20 + ,14 + ,12994 + ,79201 + ,38 + ,13 + ,29697 + ,19349 + ,13 + ,1 + ,3895 + ,78760 + ,12 + ,13 + ,9807 + ,54133 + ,11 + ,9 + ,10711 + ,21623 + ,8 + ,1 + ,2325 + ,25497 + ,22 + ,6 + ,19000 + ,69535 + ,14 + ,12 + ,22418 + ,30709 + ,7 + ,9 + ,7872 + ,37043 + ,14 + ,9 + ,5650 + ,24716 + ,2 + ,12 + ,3979 + ,60734 + ,35 + ,12 + ,14956 + ,27246 + ,5 + ,2 + ,3738 + ,0 + ,0 + ,0 + ,0 + ,38814 + ,34 + ,8 + ,10586 + ,27646 + ,12 + ,7 + ,18122 + ,65373 + ,34 + ,11 + ,17899 + ,43021 + ,30 + ,14 + ,10913 + ,43116 + ,21 + ,4 + ,18060 + ,3058 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,96347 + ,28 + ,13 + ,15452 + ,55195 + ,18 + ,17 + ,33996 + ,73321 + ,13 + ,13 + ,8877 + ,45266 + ,14 + ,12 + ,18708 + ,43410 + ,7 + ,1 + ,2781 + ,83842 + ,41 + ,12 + ,20854 + ,39296 + ,21 + ,6 + ,8179 + ,38490 + ,28 + ,11 + ,7139 + ,39841 + ,1 + ,8 + ,13798 + ,19764 + ,10 + ,2 + ,5619 + ,66463 + ,31 + ,12 + ,13050 + ,64589 + ,7 + ,12 + ,11297 + ,63339 + ,26 + ,14 + ,16170 + ,11796 + ,1 + ,2 + ,0 + ,7627 + ,0 + ,0 + ,0 + ,68998 + ,12 + ,9 + ,20539 + ,6836 + ,0 + ,1 + ,0 + ,35414 + ,18 + ,3 + ,10056 + ,5118 + ,5 + ,0 + ,0 + ,20898 + ,4 + ,2 + ,2418 + ,0 + ,0 + ,0 + ,0 + ,42690 + ,6 + ,12 + ,11806 + ,14507 + ,0 + ,14 + ,15924 + ,7131 + ,0 + ,0 + ,0 + ,4194 + ,0 + ,0 + ,0 + ,21416 + ,15 + ,4 + ,7084 + ,39000 + ,1 + ,7 + ,14831 + ,42419 + ,12 + ,10 + ,6585) + ,dim=c(4 + ,144) + ,dimnames=list(c('y' + ,'X1' + ,'X2' + ,'X3') + ,1:144)) > y <- array(NA,dim=c(4,144),dimnames=list(c('y','X1','X2','X3'),1:144)) > 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 > 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 y X1 X2 X3 1 63047 13 6 10345 2 66751 26 7 17607 3 7176 0 0 1423 4 78306 37 12 20050 5 144655 47 15 21212 6 269638 84 16 93979 7 69266 21 12 15524 8 83529 36 15 16182 9 73226 35 15 19238 10 178519 40 13 28909 11 67250 35 6 22357 12 102982 46 16 25560 13 50001 20 7 9954 14 91093 24 12 18490 15 80112 19 9 17777 16 72961 15 10 25268 17 77159 52 16 37525 18 15629 0 5 6023 19 71693 38 20 25042 20 19920 12 7 35713 21 39403 10 13 7039 22 104383 53 13 40841 23 56088 4 11 9214 24 62006 24 9 17446 25 81665 39 10 10295 26 69451 19 7 13206 27 88794 23 13 26093 28 90642 39 15 20744 29 207069 38 13 68013 30 99340 20 7 12840 31 56695 20 14 12672 32 108143 41 11 10872 33 64204 29 3 21325 34 29101 0 8 24542 35 113060 31 12 16401 36 0 0 0 0 37 65773 8 12 12821 38 67047 35 8 14662 39 41953 3 20 22190 40 113787 47 18 37929 41 86584 42 9 18009 42 59588 11 14 11076 43 40064 10 7 24981 44 74471 26 13 30691 45 60437 27 11 29164 46 55118 1 11 13985 47 40295 15 14 7588 48 103397 32 9 20023 49 78982 13 12 25524 50 67317 25 12 14717 51 39887 10 17 6832 52 59682 24 10 9624 53 132740 26 11 24300 54 104816 29 12 21790 55 101395 40 17 16493 56 72824 22 6 9269 57 76018 27 8 20105 58 33891 8 12 11216 59 63694 27 13 15569 60 33239 0 14 21799 61 35093 0 17 3772 62 35252 17 8 6057 63 36977 7 9 20828 64 42406 18 9 9976 65 56353 7 9 14055 66 58817 24 15 17455 67 81051 19 16 39553 68 70872 39 13 14818 69 42372 17 12 17065 70 19144 0 10 1536 71 114177 39 9 11938 72 59414 21 3 24589 73 51379 29 12 21332 74 40756 27 8 13229 75 53398 23 17 11331 76 17799 0 9 853 77 71154 31 8 19821 78 58305 19 9 34666 79 27454 12 12 15051 80 34323 23 5 27969 81 44761 33 14 17897 82 113862 21 14 6031 83 35027 17 10 7153 84 62396 27 12 13365 85 29613 14 10 11197 86 65559 12 12 25291 87 120064 22 17 28994 88 36149 15 13 10461 89 40181 14 10 16415 90 53398 22 11 8495 91 56435 25 7 18318 92 86791 45 10 25143 93 71738 10 11 20471 94 48503 16 5 14561 95 25214 12 6 16902 96 119424 20 14 12994 97 79201 38 13 29697 98 19349 13 1 3895 99 78760 12 13 9807 100 54133 11 9 10711 101 21623 8 1 2325 102 25497 22 6 19000 103 69535 14 12 22418 104 30709 7 9 7872 105 37043 14 9 5650 106 24716 2 12 3979 107 60734 35 12 14956 108 27246 5 2 3738 109 0 0 0 0 110 38814 34 8 10586 111 27646 12 7 18122 112 65373 34 11 17899 113 43021 30 14 10913 114 43116 21 4 18060 115 3058 0 0 0 116 0 0 0 0 117 96347 28 13 15452 118 55195 18 17 33996 119 73321 13 13 8877 120 45266 14 12 18708 121 43410 7 1 2781 122 83842 41 12 20854 123 39296 21 6 8179 124 38490 28 11 7139 125 39841 1 8 13798 126 19764 10 2 5619 127 66463 31 12 13050 128 64589 7 12 11297 129 63339 26 14 16170 130 11796 1 2 0 131 7627 0 0 0 132 68998 12 9 20539 133 6836 0 1 0 134 35414 18 3 10056 135 5118 5 0 0 136 20898 4 2 2418 137 0 0 0 0 138 42690 6 12 11806 139 14507 0 14 15924 140 7131 0 0 0 141 4194 0 0 0 142 21416 15 4 7084 143 39000 1 7 14831 144 42419 12 10 6585 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) X1 X2 X3 3928.173 1215.067 1316.065 1.149 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -54142 -13467 -2799 8383 75650 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 3928.1727 4156.5571 0.945 0.3463 X1 1215.0666 164.6612 7.379 1.29e-11 *** X2 1316.0649 438.7492 3.000 0.0032 ** X3 1.1494 0.1978 5.811 4.00e-08 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 21530 on 140 degrees of freedom Multiple R-squared: 0.6962, Adjusted R-squared: 0.6897 F-statistic: 107 on 3 and 140 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.6227732 0.7544536748 3.772268e-01 [2,] 0.5313867 0.9372266460 4.686133e-01 [3,] 0.5127741 0.9744518548 4.872259e-01 [4,] 0.9670791 0.0658418341 3.292092e-02 [5,] 0.9667556 0.0664888575 3.324443e-02 [6,] 0.9589241 0.0821517680 4.107588e-02 [7,] 0.9343056 0.1313888044 6.569440e-02 [8,] 0.9069699 0.1860601636 9.303008e-02 [9,] 0.8731308 0.2537383483 1.268692e-01 [10,] 0.8412605 0.3174789841 1.587395e-01 [11,] 0.9862286 0.0275427991 1.377140e-02 [12,] 0.9803013 0.0393974957 1.969875e-02 [13,] 0.9861135 0.0277729243 1.388646e-02 [14,] 0.9972681 0.0054638236 2.731912e-03 [15,] 0.9957770 0.0084460340 4.223017e-03 [16,] 0.9972950 0.0054100644 2.705032e-03 [17,] 0.9975205 0.0049589111 2.479456e-03 [18,] 0.9960602 0.0078796886 3.939844e-03 [19,] 0.9938430 0.0123139795 6.156990e-03 [20,] 0.9920531 0.0158938325 7.946916e-03 [21,] 0.9889847 0.0220306142 1.101531e-02 [22,] 0.9839952 0.0320096433 1.600482e-02 [23,] 0.9983953 0.0032093083 1.604654e-03 [24,] 0.9995779 0.0008441513 4.220756e-04 [25,] 0.9993182 0.0013636023 6.818012e-04 [26,] 0.9994293 0.0011414190 5.707095e-04 [27,] 0.9992311 0.0015378976 7.689488e-04 [28,] 0.9990581 0.0018837338 9.418669e-04 [29,] 0.9995427 0.0009146473 4.573236e-04 [30,] 0.9993180 0.0013640344 6.820172e-04 [31,] 0.9992518 0.0014963365 7.481683e-04 [32,] 0.9989199 0.0021602856 1.080143e-03 [33,] 0.9987149 0.0025701227 1.285061e-03 [34,] 0.9983468 0.0033063754 1.653188e-03 [35,] 0.9976148 0.0047703548 2.385177e-03 [36,] 0.9967432 0.0065136723 3.256836e-03 [37,] 0.9960909 0.0078181648 3.909082e-03 [38,] 0.9950194 0.0099611306 4.980565e-03 [39,] 0.9952875 0.0094250172 4.712509e-03 [40,] 0.9947860 0.0104279960 5.213998e-03 [41,] 0.9930750 0.0138499966 6.924998e-03 [42,] 0.9942088 0.0115824576 5.791229e-03 [43,] 0.9931699 0.0136601056 6.830053e-03 [44,] 0.9904034 0.0191931396 9.596570e-03 [45,] 0.9874753 0.0250494761 1.252474e-02 [46,] 0.9828613 0.0342774644 1.713873e-02 [47,] 0.9980727 0.0038545226 1.927261e-03 [48,] 0.9986019 0.0027962360 1.398118e-03 [49,] 0.9980981 0.0038038806 1.901940e-03 [50,] 0.9983115 0.0033770828 1.688541e-03 [51,] 0.9978733 0.0042534264 2.126713e-03 [52,] 0.9971669 0.0056661003 2.833050e-03 [53,] 0.9961028 0.0077944682 3.897234e-03 [54,] 0.9952548 0.0094904889 4.745244e-03 [55,] 0.9938780 0.0122439006 6.121950e-03 [56,] 0.9919535 0.0160930303 8.046515e-03 [57,] 0.9897885 0.0204229568 1.021148e-02 [58,] 0.9865893 0.0268213794 1.341069e-02 [59,] 0.9845789 0.0308421809 1.542109e-02 [60,] 0.9814799 0.0370401855 1.852009e-02 [61,] 0.9764331 0.0471338540 2.356693e-02 [62,] 0.9720958 0.0558083892 2.790419e-02 [63,] 0.9692450 0.0615100736 3.075504e-02 [64,] 0.9616016 0.0767967172 3.839836e-02 [65,] 0.9856817 0.0286365453 1.431827e-02 [66,] 0.9843893 0.0312213575 1.561068e-02 [67,] 0.9859835 0.0280329501 1.401648e-02 [68,] 0.9854882 0.0290236234 1.451181e-02 [69,] 0.9842871 0.0314257853 1.571289e-02 [70,] 0.9805201 0.0389597096 1.947985e-02 [71,] 0.9766948 0.0466103072 2.330515e-02 [72,] 0.9731668 0.0536664402 2.683322e-02 [73,] 0.9779291 0.0441417704 2.207089e-02 [74,] 0.9820858 0.0358283013 1.791415e-02 [75,] 0.9903763 0.0192473512 9.623676e-03 [76,] 0.9992157 0.0015686257 7.843128e-04 [77,] 0.9989713 0.0020574472 1.028724e-03 [78,] 0.9984553 0.0030894745 1.544737e-03 [79,] 0.9983755 0.0032489172 1.624459e-03 [80,] 0.9975909 0.0048182540 2.409127e-03 [81,] 0.9992492 0.0015015969 7.507985e-04 [82,] 0.9992369 0.0015261286 7.630643e-04 [83,] 0.9989676 0.0020648818 1.032441e-03 [84,] 0.9984148 0.0031703091 1.585155e-03 [85,] 0.9977117 0.0045766823 2.288341e-03 [86,] 0.9971768 0.0056464318 2.823216e-03 [87,] 0.9972835 0.0054329539 2.716477e-03 [88,] 0.9964556 0.0070888105 3.544405e-03 [89,] 0.9956795 0.0086409586 4.320479e-03 [90,] 0.9999277 0.0001445241 7.226204e-05 [91,] 0.9998913 0.0002174632 1.087316e-04 [92,] 0.9998139 0.0003721245 1.860622e-04 [93,] 0.9999306 0.0001388369 6.941845e-05 [94,] 0.9999148 0.0001704405 8.522024e-05 [95,] 0.9998548 0.0002904609 1.452304e-04 [96,] 0.9999135 0.0001729144 8.645720e-05 [97,] 0.9998907 0.0002186954 1.093477e-04 [98,] 0.9998068 0.0003864937 1.932468e-04 [99,] 0.9996591 0.0006817726 3.408863e-04 [100,] 0.9994783 0.0010433723 5.216862e-04 [101,] 0.9992104 0.0015791064 7.895532e-04 [102,] 0.9988596 0.0022807599 1.140380e-03 [103,] 0.9982299 0.0035402175 1.770109e-03 [104,] 0.9984067 0.0031865792 1.593290e-03 [105,] 0.9980930 0.0038140214 1.907011e-03 [106,] 0.9969702 0.0060596982 3.029849e-03 [107,] 0.9982962 0.0034076913 1.703846e-03 [108,] 0.9971337 0.0057326404 2.866320e-03 [109,] 0.9953224 0.0093551751 4.677588e-03 [110,] 0.9929640 0.0140720166 7.036008e-03 [111,] 0.9970480 0.0059039000 2.951950e-03 [112,] 0.9981657 0.0036686251 1.834313e-03 [113,] 0.9995481 0.0009037968 4.518984e-04 [114,] 0.9993973 0.0012054554 6.027277e-04 [115,] 0.9998512 0.0002976572 1.488286e-04 [116,] 0.9996702 0.0006595587 3.297793e-04 [117,] 0.9992858 0.0014283274 7.141637e-04 [118,] 0.9990450 0.0019100524 9.550262e-04 [119,] 0.9981133 0.0037733146 1.886657e-03 [120,] 0.9963595 0.0072810132 3.640507e-03 [121,] 0.9926662 0.0146676238 7.333812e-03 [122,] 0.9984152 0.0031696878 1.584844e-03 [123,] 0.9963140 0.0073719571 3.685979e-03 [124,] 0.9925411 0.0149177242 7.458862e-03 [125,] 0.9843469 0.0313062164 1.565311e-02 [126,] 0.9868677 0.0262646340 1.313232e-02 [127,] 0.9704530 0.0590939822 2.954699e-02 [128,] 0.9379055 0.1241890407 6.209452e-02 [129,] 0.8863672 0.2272656954 1.136328e-01 [130,] 0.8038964 0.3922072098 1.961036e-01 [131,] 0.6657293 0.6685413208 3.342707e-01 > postscript(file="/var/wessaorg/rcomp/tmp/140jf1322157014.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/2q0vs1322157014.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/3uvy61322157014.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/4z2st1322157014.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/5ogpf1322157014.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 = 144 Frequency = 1 1 2 3 4 5 6 23535.7359 1780.6565 1612.1909 -9418.4546 39496.0486 34565.0708 7 8 9 10 11 12 6184.9241 -2482.5942 -15083.1803 75650.4955 -12799.6627 -7275.6639 13 14 15 16 17 18 1117.6309 20957.5199 20819.5903 8602.4248 -54141.9730 -1802.5038 19 20 21 22 23 24 -33512.9866 -48850.9588 -1875.5089 -27996.3490 22232.0144 -2981.2822 25 26 27 28 29 30 5355.2148 18044.7568 9818.4185 -4258.4859 61683.3857 47139.3809 31 32 33 34 35 36 -4524.9697 27423.7965 -3420.8580 -13564.9608 36820.2091 -3928.1727 37 38 39 40 41 42 21594.6951 -6789.9420 -17447.4846 -14535.1386 -921.6099 11138.1176 43 44 45 46 47 48 -13941.1613 -13434.8526 -24296.6124 19423.2920 -9005.9431 25727.1080 49 50 51 52 53 54 14127.1746 303.2462 -6417.8369 2369.4808 54812.2733 24812.0734 55 56 57 58 59 60 7533.5372 23613.9209 5645.2531 -8442.4725 -8045.2650 -14170.4686 61 62 63 64 65 66 4456.0800 -6822.9121 -11241.5156 -6704.6531 15919.5621 -14077.0166 67 68 69 70 71 72 -12483.8143 -14584.8441 -17620.0783 289.6562 37294.7691 -2242.0588 73 74 75 76 77 78 -28098.4884 -21713.2781 -13873.9811 1045.7806 -3752.5759 -20400.1038 79 80 81 82 83 84 -24147.7965 -36280.3895 -38260.5988 59060.3168 -10939.8154 -5493.8601 85 86 87 88 89 90 -17356.9034 2187.0580 33704.7340 -15138.1856 -12786.6201 -1502.7463 91 92 93 94 95 96 -8137.5204 -13875.8960 17652.5005 1816.6113 -20618.9986 57833.9144 97 98 99 100 101 102 -22143.1207 -6168.1271 31869.7404 12682.9836 3985.8085 -34898.1656 103 104 105 106 107 108 7035.2321 -2617.5229 -2234.9598 -2008.6603 -18705.1336 10313.8014 109 110 111 112 113 114 -3928.1727 -29122.8057 -20905.3661 -14917.7695 -28327.7918 -12351.5065 115 116 117 118 119 120 -870.1727 -3928.1727 23527.1515 -32053.4396 26284.6421 -12969.3890 121 122 123 124 125 126 26463.7359 -9666.8615 -7446.1356 -22142.5214 8309.4299 -5405.6064 127 128 129 130 131 132 -5925.0568 23377.4904 -9192.0696 4020.6308 3698.8273 15036.3359 133 134 135 136 137 138 1591.7624 -5892.2178 -4885.5059 6698.1133 -3928.1727 2108.4981 139 140 141 142 143 144 -26149.5775 3202.8273 265.8273 -14144.9820 7597.1355 3180.3931 > postscript(file="/var/wessaorg/rcomp/tmp/6c0at1322157014.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 = 144 Frequency = 1 lag(myerror, k = 1) myerror 0 23535.7359 NA 1 1780.6565 23535.7359 2 1612.1909 1780.6565 3 -9418.4546 1612.1909 4 39496.0486 -9418.4546 5 34565.0708 39496.0486 6 6184.9241 34565.0708 7 -2482.5942 6184.9241 8 -15083.1803 -2482.5942 9 75650.4955 -15083.1803 10 -12799.6627 75650.4955 11 -7275.6639 -12799.6627 12 1117.6309 -7275.6639 13 20957.5199 1117.6309 14 20819.5903 20957.5199 15 8602.4248 20819.5903 16 -54141.9730 8602.4248 17 -1802.5038 -54141.9730 18 -33512.9866 -1802.5038 19 -48850.9588 -33512.9866 20 -1875.5089 -48850.9588 21 -27996.3490 -1875.5089 22 22232.0144 -27996.3490 23 -2981.2822 22232.0144 24 5355.2148 -2981.2822 25 18044.7568 5355.2148 26 9818.4185 18044.7568 27 -4258.4859 9818.4185 28 61683.3857 -4258.4859 29 47139.3809 61683.3857 30 -4524.9697 47139.3809 31 27423.7965 -4524.9697 32 -3420.8580 27423.7965 33 -13564.9608 -3420.8580 34 36820.2091 -13564.9608 35 -3928.1727 36820.2091 36 21594.6951 -3928.1727 37 -6789.9420 21594.6951 38 -17447.4846 -6789.9420 39 -14535.1386 -17447.4846 40 -921.6099 -14535.1386 41 11138.1176 -921.6099 42 -13941.1613 11138.1176 43 -13434.8526 -13941.1613 44 -24296.6124 -13434.8526 45 19423.2920 -24296.6124 46 -9005.9431 19423.2920 47 25727.1080 -9005.9431 48 14127.1746 25727.1080 49 303.2462 14127.1746 50 -6417.8369 303.2462 51 2369.4808 -6417.8369 52 54812.2733 2369.4808 53 24812.0734 54812.2733 54 7533.5372 24812.0734 55 23613.9209 7533.5372 56 5645.2531 23613.9209 57 -8442.4725 5645.2531 58 -8045.2650 -8442.4725 59 -14170.4686 -8045.2650 60 4456.0800 -14170.4686 61 -6822.9121 4456.0800 62 -11241.5156 -6822.9121 63 -6704.6531 -11241.5156 64 15919.5621 -6704.6531 65 -14077.0166 15919.5621 66 -12483.8143 -14077.0166 67 -14584.8441 -12483.8143 68 -17620.0783 -14584.8441 69 289.6562 -17620.0783 70 37294.7691 289.6562 71 -2242.0588 37294.7691 72 -28098.4884 -2242.0588 73 -21713.2781 -28098.4884 74 -13873.9811 -21713.2781 75 1045.7806 -13873.9811 76 -3752.5759 1045.7806 77 -20400.1038 -3752.5759 78 -24147.7965 -20400.1038 79 -36280.3895 -24147.7965 80 -38260.5988 -36280.3895 81 59060.3168 -38260.5988 82 -10939.8154 59060.3168 83 -5493.8601 -10939.8154 84 -17356.9034 -5493.8601 85 2187.0580 -17356.9034 86 33704.7340 2187.0580 87 -15138.1856 33704.7340 88 -12786.6201 -15138.1856 89 -1502.7463 -12786.6201 90 -8137.5204 -1502.7463 91 -13875.8960 -8137.5204 92 17652.5005 -13875.8960 93 1816.6113 17652.5005 94 -20618.9986 1816.6113 95 57833.9144 -20618.9986 96 -22143.1207 57833.9144 97 -6168.1271 -22143.1207 98 31869.7404 -6168.1271 99 12682.9836 31869.7404 100 3985.8085 12682.9836 101 -34898.1656 3985.8085 102 7035.2321 -34898.1656 103 -2617.5229 7035.2321 104 -2234.9598 -2617.5229 105 -2008.6603 -2234.9598 106 -18705.1336 -2008.6603 107 10313.8014 -18705.1336 108 -3928.1727 10313.8014 109 -29122.8057 -3928.1727 110 -20905.3661 -29122.8057 111 -14917.7695 -20905.3661 112 -28327.7918 -14917.7695 113 -12351.5065 -28327.7918 114 -870.1727 -12351.5065 115 -3928.1727 -870.1727 116 23527.1515 -3928.1727 117 -32053.4396 23527.1515 118 26284.6421 -32053.4396 119 -12969.3890 26284.6421 120 26463.7359 -12969.3890 121 -9666.8615 26463.7359 122 -7446.1356 -9666.8615 123 -22142.5214 -7446.1356 124 8309.4299 -22142.5214 125 -5405.6064 8309.4299 126 -5925.0568 -5405.6064 127 23377.4904 -5925.0568 128 -9192.0696 23377.4904 129 4020.6308 -9192.0696 130 3698.8273 4020.6308 131 15036.3359 3698.8273 132 1591.7624 15036.3359 133 -5892.2178 1591.7624 134 -4885.5059 -5892.2178 135 6698.1133 -4885.5059 136 -3928.1727 6698.1133 137 2108.4981 -3928.1727 138 -26149.5775 2108.4981 139 3202.8273 -26149.5775 140 265.8273 3202.8273 141 -14144.9820 265.8273 142 7597.1355 -14144.9820 143 3180.3931 7597.1355 144 NA 3180.3931 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 1780.6565 23535.7359 [2,] 1612.1909 1780.6565 [3,] -9418.4546 1612.1909 [4,] 39496.0486 -9418.4546 [5,] 34565.0708 39496.0486 [6,] 6184.9241 34565.0708 [7,] -2482.5942 6184.9241 [8,] -15083.1803 -2482.5942 [9,] 75650.4955 -15083.1803 [10,] -12799.6627 75650.4955 [11,] -7275.6639 -12799.6627 [12,] 1117.6309 -7275.6639 [13,] 20957.5199 1117.6309 [14,] 20819.5903 20957.5199 [15,] 8602.4248 20819.5903 [16,] -54141.9730 8602.4248 [17,] -1802.5038 -54141.9730 [18,] -33512.9866 -1802.5038 [19,] -48850.9588 -33512.9866 [20,] -1875.5089 -48850.9588 [21,] -27996.3490 -1875.5089 [22,] 22232.0144 -27996.3490 [23,] -2981.2822 22232.0144 [24,] 5355.2148 -2981.2822 [25,] 18044.7568 5355.2148 [26,] 9818.4185 18044.7568 [27,] -4258.4859 9818.4185 [28,] 61683.3857 -4258.4859 [29,] 47139.3809 61683.3857 [30,] -4524.9697 47139.3809 [31,] 27423.7965 -4524.9697 [32,] -3420.8580 27423.7965 [33,] -13564.9608 -3420.8580 [34,] 36820.2091 -13564.9608 [35,] -3928.1727 36820.2091 [36,] 21594.6951 -3928.1727 [37,] -6789.9420 21594.6951 [38,] -17447.4846 -6789.9420 [39,] -14535.1386 -17447.4846 [40,] -921.6099 -14535.1386 [41,] 11138.1176 -921.6099 [42,] -13941.1613 11138.1176 [43,] -13434.8526 -13941.1613 [44,] -24296.6124 -13434.8526 [45,] 19423.2920 -24296.6124 [46,] -9005.9431 19423.2920 [47,] 25727.1080 -9005.9431 [48,] 14127.1746 25727.1080 [49,] 303.2462 14127.1746 [50,] -6417.8369 303.2462 [51,] 2369.4808 -6417.8369 [52,] 54812.2733 2369.4808 [53,] 24812.0734 54812.2733 [54,] 7533.5372 24812.0734 [55,] 23613.9209 7533.5372 [56,] 5645.2531 23613.9209 [57,] -8442.4725 5645.2531 [58,] -8045.2650 -8442.4725 [59,] -14170.4686 -8045.2650 [60,] 4456.0800 -14170.4686 [61,] -6822.9121 4456.0800 [62,] -11241.5156 -6822.9121 [63,] -6704.6531 -11241.5156 [64,] 15919.5621 -6704.6531 [65,] -14077.0166 15919.5621 [66,] -12483.8143 -14077.0166 [67,] -14584.8441 -12483.8143 [68,] -17620.0783 -14584.8441 [69,] 289.6562 -17620.0783 [70,] 37294.7691 289.6562 [71,] -2242.0588 37294.7691 [72,] -28098.4884 -2242.0588 [73,] -21713.2781 -28098.4884 [74,] -13873.9811 -21713.2781 [75,] 1045.7806 -13873.9811 [76,] -3752.5759 1045.7806 [77,] -20400.1038 -3752.5759 [78,] -24147.7965 -20400.1038 [79,] -36280.3895 -24147.7965 [80,] -38260.5988 -36280.3895 [81,] 59060.3168 -38260.5988 [82,] -10939.8154 59060.3168 [83,] -5493.8601 -10939.8154 [84,] -17356.9034 -5493.8601 [85,] 2187.0580 -17356.9034 [86,] 33704.7340 2187.0580 [87,] -15138.1856 33704.7340 [88,] -12786.6201 -15138.1856 [89,] -1502.7463 -12786.6201 [90,] -8137.5204 -1502.7463 [91,] -13875.8960 -8137.5204 [92,] 17652.5005 -13875.8960 [93,] 1816.6113 17652.5005 [94,] -20618.9986 1816.6113 [95,] 57833.9144 -20618.9986 [96,] -22143.1207 57833.9144 [97,] -6168.1271 -22143.1207 [98,] 31869.7404 -6168.1271 [99,] 12682.9836 31869.7404 [100,] 3985.8085 12682.9836 [101,] -34898.1656 3985.8085 [102,] 7035.2321 -34898.1656 [103,] -2617.5229 7035.2321 [104,] -2234.9598 -2617.5229 [105,] -2008.6603 -2234.9598 [106,] -18705.1336 -2008.6603 [107,] 10313.8014 -18705.1336 [108,] -3928.1727 10313.8014 [109,] -29122.8057 -3928.1727 [110,] -20905.3661 -29122.8057 [111,] -14917.7695 -20905.3661 [112,] -28327.7918 -14917.7695 [113,] -12351.5065 -28327.7918 [114,] -870.1727 -12351.5065 [115,] -3928.1727 -870.1727 [116,] 23527.1515 -3928.1727 [117,] -32053.4396 23527.1515 [118,] 26284.6421 -32053.4396 [119,] -12969.3890 26284.6421 [120,] 26463.7359 -12969.3890 [121,] -9666.8615 26463.7359 [122,] -7446.1356 -9666.8615 [123,] -22142.5214 -7446.1356 [124,] 8309.4299 -22142.5214 [125,] -5405.6064 8309.4299 [126,] -5925.0568 -5405.6064 [127,] 23377.4904 -5925.0568 [128,] -9192.0696 23377.4904 [129,] 4020.6308 -9192.0696 [130,] 3698.8273 4020.6308 [131,] 15036.3359 3698.8273 [132,] 1591.7624 15036.3359 [133,] -5892.2178 1591.7624 [134,] -4885.5059 -5892.2178 [135,] 6698.1133 -4885.5059 [136,] -3928.1727 6698.1133 [137,] 2108.4981 -3928.1727 [138,] -26149.5775 2108.4981 [139,] 3202.8273 -26149.5775 [140,] 265.8273 3202.8273 [141,] -14144.9820 265.8273 [142,] 7597.1355 -14144.9820 [143,] 3180.3931 7597.1355 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 1780.6565 23535.7359 2 1612.1909 1780.6565 3 -9418.4546 1612.1909 4 39496.0486 -9418.4546 5 34565.0708 39496.0486 6 6184.9241 34565.0708 7 -2482.5942 6184.9241 8 -15083.1803 -2482.5942 9 75650.4955 -15083.1803 10 -12799.6627 75650.4955 11 -7275.6639 -12799.6627 12 1117.6309 -7275.6639 13 20957.5199 1117.6309 14 20819.5903 20957.5199 15 8602.4248 20819.5903 16 -54141.9730 8602.4248 17 -1802.5038 -54141.9730 18 -33512.9866 -1802.5038 19 -48850.9588 -33512.9866 20 -1875.5089 -48850.9588 21 -27996.3490 -1875.5089 22 22232.0144 -27996.3490 23 -2981.2822 22232.0144 24 5355.2148 -2981.2822 25 18044.7568 5355.2148 26 9818.4185 18044.7568 27 -4258.4859 9818.4185 28 61683.3857 -4258.4859 29 47139.3809 61683.3857 30 -4524.9697 47139.3809 31 27423.7965 -4524.9697 32 -3420.8580 27423.7965 33 -13564.9608 -3420.8580 34 36820.2091 -13564.9608 35 -3928.1727 36820.2091 36 21594.6951 -3928.1727 37 -6789.9420 21594.6951 38 -17447.4846 -6789.9420 39 -14535.1386 -17447.4846 40 -921.6099 -14535.1386 41 11138.1176 -921.6099 42 -13941.1613 11138.1176 43 -13434.8526 -13941.1613 44 -24296.6124 -13434.8526 45 19423.2920 -24296.6124 46 -9005.9431 19423.2920 47 25727.1080 -9005.9431 48 14127.1746 25727.1080 49 303.2462 14127.1746 50 -6417.8369 303.2462 51 2369.4808 -6417.8369 52 54812.2733 2369.4808 53 24812.0734 54812.2733 54 7533.5372 24812.0734 55 23613.9209 7533.5372 56 5645.2531 23613.9209 57 -8442.4725 5645.2531 58 -8045.2650 -8442.4725 59 -14170.4686 -8045.2650 60 4456.0800 -14170.4686 61 -6822.9121 4456.0800 62 -11241.5156 -6822.9121 63 -6704.6531 -11241.5156 64 15919.5621 -6704.6531 65 -14077.0166 15919.5621 66 -12483.8143 -14077.0166 67 -14584.8441 -12483.8143 68 -17620.0783 -14584.8441 69 289.6562 -17620.0783 70 37294.7691 289.6562 71 -2242.0588 37294.7691 72 -28098.4884 -2242.0588 73 -21713.2781 -28098.4884 74 -13873.9811 -21713.2781 75 1045.7806 -13873.9811 76 -3752.5759 1045.7806 77 -20400.1038 -3752.5759 78 -24147.7965 -20400.1038 79 -36280.3895 -24147.7965 80 -38260.5988 -36280.3895 81 59060.3168 -38260.5988 82 -10939.8154 59060.3168 83 -5493.8601 -10939.8154 84 -17356.9034 -5493.8601 85 2187.0580 -17356.9034 86 33704.7340 2187.0580 87 -15138.1856 33704.7340 88 -12786.6201 -15138.1856 89 -1502.7463 -12786.6201 90 -8137.5204 -1502.7463 91 -13875.8960 -8137.5204 92 17652.5005 -13875.8960 93 1816.6113 17652.5005 94 -20618.9986 1816.6113 95 57833.9144 -20618.9986 96 -22143.1207 57833.9144 97 -6168.1271 -22143.1207 98 31869.7404 -6168.1271 99 12682.9836 31869.7404 100 3985.8085 12682.9836 101 -34898.1656 3985.8085 102 7035.2321 -34898.1656 103 -2617.5229 7035.2321 104 -2234.9598 -2617.5229 105 -2008.6603 -2234.9598 106 -18705.1336 -2008.6603 107 10313.8014 -18705.1336 108 -3928.1727 10313.8014 109 -29122.8057 -3928.1727 110 -20905.3661 -29122.8057 111 -14917.7695 -20905.3661 112 -28327.7918 -14917.7695 113 -12351.5065 -28327.7918 114 -870.1727 -12351.5065 115 -3928.1727 -870.1727 116 23527.1515 -3928.1727 117 -32053.4396 23527.1515 118 26284.6421 -32053.4396 119 -12969.3890 26284.6421 120 26463.7359 -12969.3890 121 -9666.8615 26463.7359 122 -7446.1356 -9666.8615 123 -22142.5214 -7446.1356 124 8309.4299 -22142.5214 125 -5405.6064 8309.4299 126 -5925.0568 -5405.6064 127 23377.4904 -5925.0568 128 -9192.0696 23377.4904 129 4020.6308 -9192.0696 130 3698.8273 4020.6308 131 15036.3359 3698.8273 132 1591.7624 15036.3359 133 -5892.2178 1591.7624 134 -4885.5059 -5892.2178 135 6698.1133 -4885.5059 136 -3928.1727 6698.1133 137 2108.4981 -3928.1727 138 -26149.5775 2108.4981 139 3202.8273 -26149.5775 140 265.8273 3202.8273 141 -14144.9820 265.8273 142 7597.1355 -14144.9820 143 3180.3931 7597.1355 > 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/7x8pq1322157014.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/8zpv31322157014.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/9qejg1322157014.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/10ee991322157014.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/11a7f91322157014.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/12a83y1322157014.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/13ote01322157014.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/14totq1322157014.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/15xjgw1322157014.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/169bz01322157014.tab") + } > > try(system("convert tmp/140jf1322157014.ps tmp/140jf1322157014.png",intern=TRUE)) character(0) > try(system("convert tmp/2q0vs1322157014.ps tmp/2q0vs1322157014.png",intern=TRUE)) character(0) > try(system("convert tmp/3uvy61322157014.ps tmp/3uvy61322157014.png",intern=TRUE)) character(0) > try(system("convert tmp/4z2st1322157014.ps tmp/4z2st1322157014.png",intern=TRUE)) character(0) > try(system("convert tmp/5ogpf1322157014.ps tmp/5ogpf1322157014.png",intern=TRUE)) character(0) > try(system("convert tmp/6c0at1322157014.ps tmp/6c0at1322157014.png",intern=TRUE)) character(0) > try(system("convert tmp/7x8pq1322157014.ps tmp/7x8pq1322157014.png",intern=TRUE)) character(0) > try(system("convert tmp/8zpv31322157014.ps tmp/8zpv31322157014.png",intern=TRUE)) character(0) > try(system("convert tmp/9qejg1322157014.ps tmp/9qejg1322157014.png",intern=TRUE)) character(0) > try(system("convert tmp/10ee991322157014.ps tmp/10ee991322157014.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 4.951 0.520 5.575