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(63031 + ,13 + ,5 + ,10345 + ,66751 + ,26 + ,7 + ,17607 + ,7176 + ,0 + ,0 + ,1423 + ,78306 + ,37 + ,12 + ,20050 + ,137944 + ,47 + ,15 + ,21212 + ,261308 + ,80 + ,16 + ,93979 + ,69266 + ,21 + ,12 + ,15524 + ,83529 + ,36 + ,15 + ,16182 + ,73226 + ,35 + ,15 + ,19238 + ,178519 + ,40 + ,13 + ,28909 + ,66476 + ,35 + ,6 + ,22357 + ,98606 + ,46 + ,16 + ,25560 + ,50001 + ,20 + ,7 + ,9954 + ,91093 + ,24 + ,12 + ,18490 + ,73884 + ,19 + ,9 + ,17777 + ,72961 + ,15 + ,10 + ,25268 + ,69388 + ,48 + ,16 + ,37525 + ,15629 + ,0 + ,5 + ,6023 + ,71693 + ,38 + ,20 + ,25042 + ,19920 + ,12 + ,7 + ,35713 + ,39403 + ,10 + ,13 + ,7039 + ,99933 + ,51 + ,13 + ,40841 + ,56088 + ,4 + ,11 + ,9214 + ,62006 + ,24 + ,9 + ,17446 + ,81665 + ,39 + ,10 + ,10295 + ,65223 + ,19 + ,7 + ,13206 + ,88794 + ,23 + ,13 + ,26093 + ,90642 + ,39 + ,15 + ,20744 + ,203699 + ,37 + ,13 + ,68013 + ,99340 + ,20 + ,7 + ,12840 + ,56695 + ,20 + ,14 + ,12672 + ,108143 + ,41 + ,11 + ,10872 + ,58313 + ,26 + ,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 + ,109835 + ,47 + ,18 + ,37929 + ,86584 + ,42 + ,9 + ,18009 + ,59588 + ,11 + ,14 + ,11076 + ,40064 + ,10 + ,7 + ,24981 + ,70227 + ,26 + ,13 + ,30691 + ,60437 + ,27 + ,11 + ,29164 + ,47000 + ,0 + ,11 + ,13985 + ,40295 + ,15 + ,14 + ,7588 + ,103397 + ,32 + ,9 + ,20023 + ,78982 + ,13 + ,12 + ,25524 + ,60206 + ,24 + ,11 + ,14717 + ,39887 + ,10 + ,17 + ,6832 + ,49791 + ,14 + ,10 + ,9624 + ,129283 + ,24 + ,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 + ,28266 + ,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 + ,76053 + ,18 + ,16 + ,39553 + ,70872 + ,39 + ,13 + ,14818 + ,42372 + ,17 + ,12 + ,17065 + ,19144 + ,0 + ,10 + ,1536 + ,114177 + ,39 + ,9 + ,11938 + ,53544 + ,20 + ,3 + ,24589 + ,51379 + ,29 + ,12 + ,21332 + ,40756 + ,27 + ,8 + ,13229 + ,46956 + ,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 + ,110811 + ,21 + ,17 + ,28994 + ,27883 + ,14 + ,11 + ,10461 + ,40181 + ,14 + ,10 + ,16415 + ,53398 + ,22 + ,11 + ,8495 + ,56435 + ,25 + ,7 + ,18318 + ,77283 + ,36 + ,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 + ,54865 + ,35 + ,10 + ,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 + ,48626 + ,16 + ,17 + ,33996 + ,73073 + ,12 + ,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 + ,59975 + ,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 + ,33365 + ,17 + ,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 + ,30591 + ,0 + ,7 + ,14831 + ,42419 + ,12 + ,10 + ,6585) + ,dim=c(4 + ,144) + ,dimnames=list(c('tijd' + ,'blogs' + ,'Pr' + ,'karakters') + ,1:144)) > y <- array(NA,dim=c(4,144),dimnames=list(c('tijd','blogs','Pr','karakters'),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 tijd blogs Pr karakters 1 63031 13 5 10345 2 66751 26 7 17607 3 7176 0 0 1423 4 78306 37 12 20050 5 137944 47 15 21212 6 261308 80 16 93979 7 69266 21 12 15524 8 83529 36 15 16182 9 73226 35 15 19238 10 178519 40 13 28909 11 66476 35 6 22357 12 98606 46 16 25560 13 50001 20 7 9954 14 91093 24 12 18490 15 73884 19 9 17777 16 72961 15 10 25268 17 69388 48 16 37525 18 15629 0 5 6023 19 71693 38 20 25042 20 19920 12 7 35713 21 39403 10 13 7039 22 99933 51 13 40841 23 56088 4 11 9214 24 62006 24 9 17446 25 81665 39 10 10295 26 65223 19 7 13206 27 88794 23 13 26093 28 90642 39 15 20744 29 203699 37 13 68013 30 99340 20 7 12840 31 56695 20 14 12672 32 108143 41 11 10872 33 58313 26 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 109835 47 18 37929 41 86584 42 9 18009 42 59588 11 14 11076 43 40064 10 7 24981 44 70227 26 13 30691 45 60437 27 11 29164 46 47000 0 11 13985 47 40295 15 14 7588 48 103397 32 9 20023 49 78982 13 12 25524 50 60206 24 11 14717 51 39887 10 17 6832 52 49791 14 10 9624 53 129283 24 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 28266 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 76053 18 16 39553 68 70872 39 13 14818 69 42372 17 12 17065 70 19144 0 10 1536 71 114177 39 9 11938 72 53544 20 3 24589 73 51379 29 12 21332 74 40756 27 8 13229 75 46956 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 110811 21 17 28994 88 27883 14 11 10461 89 40181 14 10 16415 90 53398 22 11 8495 91 56435 25 7 18318 92 77283 36 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 54865 35 10 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 48626 16 17 33996 119 73073 12 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 59975 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 33365 17 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 30591 0 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) blogs Pr karakters 4097.466 1227.945 1280.586 1.099 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -55375 -12758 -3192 9300 76889 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 4097.4657 4145.6026 0.988 0.32467 blogs 1227.9449 166.2266 7.387 1.23e-11 *** Pr 1280.5860 440.2353 2.909 0.00422 ** karakters 1.0989 0.1957 5.615 1.02e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 21500 on 140 degrees of freedom Multiple R-squared: 0.6847, Adjusted R-squared: 0.678 F-statistic: 101.3 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.5504273 0.8991453602 4.495727e-01 [2,] 0.4304936 0.8609872683 5.695064e-01 [3,] 0.3980569 0.7961138587 6.019431e-01 [4,] 0.9604216 0.0791567733 3.957839e-02 [5,] 0.9624037 0.0751925277 3.759626e-02 [6,] 0.9567661 0.0864678624 4.323393e-02 [7,] 0.9312424 0.1375152044 6.875760e-02 [8,] 0.9039767 0.1920466744 9.602334e-02 [9,] 0.8644422 0.2711155629 1.355578e-01 [10,] 0.8279743 0.3440513037 1.720257e-01 [11,] 0.9870330 0.0259340592 1.296703e-02 [12,] 0.9807578 0.0384844935 1.924225e-02 [13,] 0.9835964 0.0328072312 1.640362e-02 [14,] 0.9959435 0.0081129497 4.056475e-03 [15,] 0.9940623 0.0118754976 5.937749e-03 [16,] 0.9962562 0.0074876047 3.743802e-03 [17,] 0.9968164 0.0063672234 3.183612e-03 [18,] 0.9949737 0.0100525261 5.026263e-03 [19,] 0.9922320 0.0155359090 7.767955e-03 [20,] 0.9892873 0.0214253404 1.071267e-02 [21,] 0.9857024 0.0285952822 1.429764e-02 [22,] 0.9793484 0.0413031007 2.065155e-02 [23,] 0.9980616 0.0038768013 1.938401e-03 [24,] 0.9995029 0.0009941218 4.970609e-04 [25,] 0.9991955 0.0016090818 8.045409e-04 [26,] 0.9993310 0.0013380403 6.690202e-04 [27,] 0.9991381 0.0017238801 8.619401e-04 [28,] 0.9988960 0.0022079481 1.103974e-03 [29,] 0.9994884 0.0010232532 5.116266e-04 [30,] 0.9992431 0.0015138133 7.569067e-04 [31,] 0.9992048 0.0015903517 7.951759e-04 [32,] 0.9988519 0.0022961509 1.148075e-03 [33,] 0.9985624 0.0028752218 1.437611e-03 [34,] 0.9982463 0.0035073461 1.753673e-03 [35,] 0.9974731 0.0050538412 2.526921e-03 [36,] 0.9966036 0.0067927146 3.396357e-03 [37,] 0.9958391 0.0083217695 4.160885e-03 [38,] 0.9949990 0.0100019064 5.000953e-03 [39,] 0.9950649 0.0098702614 4.935131e-03 [40,] 0.9937273 0.0125454147 6.272707e-03 [41,] 0.9916527 0.0166946073 8.347304e-03 [42,] 0.9932147 0.0135705415 6.785271e-03 [43,] 0.9922979 0.0154041108 7.702055e-03 [44,] 0.9893558 0.0212884932 1.064425e-02 [45,] 0.9861078 0.0277843967 1.389220e-02 [46,] 0.9811739 0.0376522079 1.882610e-02 [47,] 0.9978535 0.0042929816 2.146491e-03 [48,] 0.9985186 0.0029627252 1.481363e-03 [49,] 0.9980108 0.0039783591 1.989180e-03 [50,] 0.9982515 0.0034970488 1.748524e-03 [51,] 0.9978373 0.0043254667 2.162733e-03 [52,] 0.9970861 0.0058277986 2.913899e-03 [53,] 0.9959643 0.0080713630 4.035681e-03 [54,] 0.9955267 0.0089465527 4.473276e-03 [55,] 0.9942682 0.0114636198 5.731810e-03 [56,] 0.9924356 0.0151288119 7.564406e-03 [57,] 0.9902269 0.0195461240 9.773062e-03 [58,] 0.9870944 0.0258112489 1.290562e-02 [59,] 0.9854217 0.0291566185 1.457831e-02 [60,] 0.9821828 0.0356343704 1.781719e-02 [61,] 0.9775324 0.0449351868 2.246759e-02 [62,] 0.9731566 0.0536867390 2.684337e-02 [63,] 0.9698628 0.0602743468 3.013717e-02 [64,] 0.9623761 0.0752478255 3.762391e-02 [65,] 0.9865537 0.0268926628 1.344633e-02 [66,] 0.9848918 0.0302164931 1.510825e-02 [67,] 0.9859845 0.0280309130 1.401546e-02 [68,] 0.9853155 0.0293690320 1.468452e-02 [69,] 0.9867237 0.0265525205 1.327626e-02 [70,] 0.9835574 0.0328851624 1.644258e-02 [71,] 0.9805071 0.0389858833 1.949294e-02 [72,] 0.9771849 0.0456301873 2.281509e-02 [73,] 0.9809300 0.0381400179 1.907001e-02 [74,] 0.9839194 0.0321611968 1.608060e-02 [75,] 0.9911075 0.0177850321 8.892516e-03 [76,] 0.9992905 0.0014190444 7.095222e-04 [77,] 0.9990678 0.0018644751 9.322376e-04 [78,] 0.9985912 0.0028176426 1.408821e-03 [79,] 0.9984964 0.0030071422 1.503571e-03 [80,] 0.9978039 0.0043921392 2.196070e-03 [81,] 0.9988467 0.0023066321 1.153316e-03 [82,] 0.9989582 0.0020835180 1.041759e-03 [83,] 0.9985752 0.0028496345 1.424817e-03 [84,] 0.9978376 0.0043248857 2.162443e-03 [85,] 0.9969377 0.0061245329 3.062266e-03 [86,] 0.9959935 0.0080129719 4.006486e-03 [87,] 0.9963390 0.0073219842 3.660992e-03 [88,] 0.9953389 0.0093222649 4.661132e-03 [89,] 0.9942161 0.0115677104 5.783855e-03 [90,] 0.9998951 0.0002097814 1.048907e-04 [91,] 0.9998440 0.0003120424 1.560212e-04 [92,] 0.9997371 0.0005258048 2.629024e-04 [93,] 0.9999020 0.0001960733 9.803666e-05 [94,] 0.9998832 0.0002335263 1.167632e-04 [95,] 0.9998032 0.0003935691 1.967846e-04 [96,] 0.9998672 0.0002656501 1.328250e-04 [97,] 0.9998472 0.0003055775 1.527888e-04 [98,] 0.9997326 0.0005348380 2.674190e-04 [99,] 0.9995348 0.0009304594 4.652297e-04 [100,] 0.9992999 0.0014001615 7.000808e-04 [101,] 0.9989985 0.0020029060 1.001453e-03 [102,] 0.9985710 0.0028579443 1.428972e-03 [103,] 0.9978037 0.0043926013 2.196301e-03 [104,] 0.9979961 0.0040078641 2.003932e-03 [105,] 0.9974514 0.0050972033 2.548602e-03 [106,] 0.9959676 0.0080648905 4.032445e-03 [107,] 0.9976275 0.0047449113 2.372456e-03 [108,] 0.9960792 0.0078416020 3.920801e-03 [109,] 0.9937076 0.0125847370 6.292368e-03 [110,] 0.9906595 0.0186810748 9.340537e-03 [111,] 0.9962041 0.0075918942 3.795947e-03 [112,] 0.9979483 0.0041033140 2.051657e-03 [113,] 0.9995391 0.0009217856 4.608928e-04 [114,] 0.9993258 0.0013483214 6.741607e-04 [115,] 0.9998386 0.0003227078 1.613539e-04 [116,] 0.9996547 0.0006905904 3.452952e-04 [117,] 0.9992517 0.0014966793 7.483396e-04 [118,] 0.9989375 0.0021249119 1.062456e-03 [119,] 0.9979994 0.0040012073 2.000604e-03 [120,] 0.9960492 0.0079016766 3.950838e-03 [121,] 0.9928658 0.0142683901 7.134195e-03 [122,] 0.9985573 0.0028853387 1.442669e-03 [123,] 0.9966514 0.0066972796 3.348640e-03 [124,] 0.9931489 0.0137022252 6.851113e-03 [125,] 0.9856798 0.0286403993 1.432020e-02 [126,] 0.9935733 0.0128534557 6.426728e-03 [127,] 0.9839768 0.0320463546 1.602318e-02 [128,] 0.9624576 0.0750847164 3.754236e-02 [129,] 0.9263085 0.1473829541 7.369148e-02 [130,] 0.8650180 0.2699640233 1.349820e-01 [131,] 0.7479214 0.5041572587 2.520786e-01 > postscript(file="/var/wessaorg/rcomp/tmp/16fla1322147097.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/2547l1322147097.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/3ttaf1322147097.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/4p5mr1322147097.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/5kvsh1322147097.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 25199.57059 2415.16318 1514.85056 -8624.68575 33615.22725 35215.40740 7 8 9 10 11 12 6955.89183 -1765.09202 -14198.27619 76889.05549 -12850.35983 -10553.27549 13 14 15 16 17 18 1442.44035 21839.82591 15395.79846 9872.40013 -55375.07565 -1489.85478 19 20 21 22 23 24 -32195.84870 -47120.64405 -1356.43753 -28315.98610 22867.37405 -2258.20189 25 26 27 28 29 30 5559.01693 14318.87879 11133.52013 -3348.94524 62782.90365 47610.11821 31 32 33 34 35 36 -3814.37450 27666.49653 -4986.07005 -12209.47924 37506.73909 -4097.46565 37 38 39 40 41 42 22396.40529 -6384.77162 -15823.81706 -16705.24388 -401.87033 11883.91674 43 44 45 46 47 48 -12727.74347 -16169.89220 -22948.69945 13448.47238 -8488.02439 26477.46595 49 50 51 52 53 54 15506.80869 -3620.57340 -5767.31658 5120.97688 54926.01077 25796.84957 55 56 57 58 59 60 8286.20971 23842.85856 6428.66949 -7721.91763 -7313.81234 -17713.81059 61 62 63 64 65 66 5080.65676 -6621.03712 -10128.49768 -6282.01687 16690.10968 -13140.60758 67 68 69 70 71 72 -14100.22582 -14045.90390 -16719.67840 552.81905 37546.16900 -5974.09358 73 74 75 76 77 78 -27136.87062 -21277.54013 -19605.39018 1238.92930 -3035.03260 -18741.91936 79 80 81 82 83 84 -23284.84145 -35154.26126 -37453.22352 59422.23791 -10611.56428 -4909.32961 85 86 87 88 89 90 -16785.53654 3567.78893 27296.26085 -18987.35846 -11951.41004 -1135.55046 91 92 93 94 95 96 -7454.18440 -11455.08437 18779.79022 2354.92439 -19875.32321 58560.79122 97 98 99 100 101 102 -20838.95975 -6272.41125 32503.01654 13232.93211 3866.52999 -34177.18917 103 104 105 106 107 108 8244.93607 -2159.61284 -1979.55072 -1576.76798 -21451.00967 10340.08351 109 110 111 112 113 114 -4097.46565 -28910.85617 -20064.52354 -14229.60818 -27834.92116 -11736.13995 115 116 117 118 119 120 -1039.46565 -4097.46565 24239.80989 -34245.53357 27837.96026 -11947.27767 121 122 123 124 125 126 26380.39279 -8883.95211 -7259.43455 -21921.15987 9108.77307 -5348.60450 127 128 129 130 131 132 -11895.96691 24115.01925 -8381.87084 3909.41750 3529.53435 16070.34966 133 134 135 136 137 138 1457.94836 -6499.46521 -5119.19006 6670.52916 -4097.46565 2884.64224 139 140 141 142 143 144 -25016.98330 3033.53435 96.53435 -14007.33697 1232.17719 3544.31501 > postscript(file="/var/wessaorg/rcomp/tmp/6afr41322147097.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 25199.57059 NA 1 2415.16318 25199.57059 2 1514.85056 2415.16318 3 -8624.68575 1514.85056 4 33615.22725 -8624.68575 5 35215.40740 33615.22725 6 6955.89183 35215.40740 7 -1765.09202 6955.89183 8 -14198.27619 -1765.09202 9 76889.05549 -14198.27619 10 -12850.35983 76889.05549 11 -10553.27549 -12850.35983 12 1442.44035 -10553.27549 13 21839.82591 1442.44035 14 15395.79846 21839.82591 15 9872.40013 15395.79846 16 -55375.07565 9872.40013 17 -1489.85478 -55375.07565 18 -32195.84870 -1489.85478 19 -47120.64405 -32195.84870 20 -1356.43753 -47120.64405 21 -28315.98610 -1356.43753 22 22867.37405 -28315.98610 23 -2258.20189 22867.37405 24 5559.01693 -2258.20189 25 14318.87879 5559.01693 26 11133.52013 14318.87879 27 -3348.94524 11133.52013 28 62782.90365 -3348.94524 29 47610.11821 62782.90365 30 -3814.37450 47610.11821 31 27666.49653 -3814.37450 32 -4986.07005 27666.49653 33 -12209.47924 -4986.07005 34 37506.73909 -12209.47924 35 -4097.46565 37506.73909 36 22396.40529 -4097.46565 37 -6384.77162 22396.40529 38 -15823.81706 -6384.77162 39 -16705.24388 -15823.81706 40 -401.87033 -16705.24388 41 11883.91674 -401.87033 42 -12727.74347 11883.91674 43 -16169.89220 -12727.74347 44 -22948.69945 -16169.89220 45 13448.47238 -22948.69945 46 -8488.02439 13448.47238 47 26477.46595 -8488.02439 48 15506.80869 26477.46595 49 -3620.57340 15506.80869 50 -5767.31658 -3620.57340 51 5120.97688 -5767.31658 52 54926.01077 5120.97688 53 25796.84957 54926.01077 54 8286.20971 25796.84957 55 23842.85856 8286.20971 56 6428.66949 23842.85856 57 -7721.91763 6428.66949 58 -7313.81234 -7721.91763 59 -17713.81059 -7313.81234 60 5080.65676 -17713.81059 61 -6621.03712 5080.65676 62 -10128.49768 -6621.03712 63 -6282.01687 -10128.49768 64 16690.10968 -6282.01687 65 -13140.60758 16690.10968 66 -14100.22582 -13140.60758 67 -14045.90390 -14100.22582 68 -16719.67840 -14045.90390 69 552.81905 -16719.67840 70 37546.16900 552.81905 71 -5974.09358 37546.16900 72 -27136.87062 -5974.09358 73 -21277.54013 -27136.87062 74 -19605.39018 -21277.54013 75 1238.92930 -19605.39018 76 -3035.03260 1238.92930 77 -18741.91936 -3035.03260 78 -23284.84145 -18741.91936 79 -35154.26126 -23284.84145 80 -37453.22352 -35154.26126 81 59422.23791 -37453.22352 82 -10611.56428 59422.23791 83 -4909.32961 -10611.56428 84 -16785.53654 -4909.32961 85 3567.78893 -16785.53654 86 27296.26085 3567.78893 87 -18987.35846 27296.26085 88 -11951.41004 -18987.35846 89 -1135.55046 -11951.41004 90 -7454.18440 -1135.55046 91 -11455.08437 -7454.18440 92 18779.79022 -11455.08437 93 2354.92439 18779.79022 94 -19875.32321 2354.92439 95 58560.79122 -19875.32321 96 -20838.95975 58560.79122 97 -6272.41125 -20838.95975 98 32503.01654 -6272.41125 99 13232.93211 32503.01654 100 3866.52999 13232.93211 101 -34177.18917 3866.52999 102 8244.93607 -34177.18917 103 -2159.61284 8244.93607 104 -1979.55072 -2159.61284 105 -1576.76798 -1979.55072 106 -21451.00967 -1576.76798 107 10340.08351 -21451.00967 108 -4097.46565 10340.08351 109 -28910.85617 -4097.46565 110 -20064.52354 -28910.85617 111 -14229.60818 -20064.52354 112 -27834.92116 -14229.60818 113 -11736.13995 -27834.92116 114 -1039.46565 -11736.13995 115 -4097.46565 -1039.46565 116 24239.80989 -4097.46565 117 -34245.53357 24239.80989 118 27837.96026 -34245.53357 119 -11947.27767 27837.96026 120 26380.39279 -11947.27767 121 -8883.95211 26380.39279 122 -7259.43455 -8883.95211 123 -21921.15987 -7259.43455 124 9108.77307 -21921.15987 125 -5348.60450 9108.77307 126 -11895.96691 -5348.60450 127 24115.01925 -11895.96691 128 -8381.87084 24115.01925 129 3909.41750 -8381.87084 130 3529.53435 3909.41750 131 16070.34966 3529.53435 132 1457.94836 16070.34966 133 -6499.46521 1457.94836 134 -5119.19006 -6499.46521 135 6670.52916 -5119.19006 136 -4097.46565 6670.52916 137 2884.64224 -4097.46565 138 -25016.98330 2884.64224 139 3033.53435 -25016.98330 140 96.53435 3033.53435 141 -14007.33697 96.53435 142 1232.17719 -14007.33697 143 3544.31501 1232.17719 144 NA 3544.31501 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 2415.16318 25199.57059 [2,] 1514.85056 2415.16318 [3,] -8624.68575 1514.85056 [4,] 33615.22725 -8624.68575 [5,] 35215.40740 33615.22725 [6,] 6955.89183 35215.40740 [7,] -1765.09202 6955.89183 [8,] -14198.27619 -1765.09202 [9,] 76889.05549 -14198.27619 [10,] -12850.35983 76889.05549 [11,] -10553.27549 -12850.35983 [12,] 1442.44035 -10553.27549 [13,] 21839.82591 1442.44035 [14,] 15395.79846 21839.82591 [15,] 9872.40013 15395.79846 [16,] -55375.07565 9872.40013 [17,] -1489.85478 -55375.07565 [18,] -32195.84870 -1489.85478 [19,] -47120.64405 -32195.84870 [20,] -1356.43753 -47120.64405 [21,] -28315.98610 -1356.43753 [22,] 22867.37405 -28315.98610 [23,] -2258.20189 22867.37405 [24,] 5559.01693 -2258.20189 [25,] 14318.87879 5559.01693 [26,] 11133.52013 14318.87879 [27,] -3348.94524 11133.52013 [28,] 62782.90365 -3348.94524 [29,] 47610.11821 62782.90365 [30,] -3814.37450 47610.11821 [31,] 27666.49653 -3814.37450 [32,] -4986.07005 27666.49653 [33,] -12209.47924 -4986.07005 [34,] 37506.73909 -12209.47924 [35,] -4097.46565 37506.73909 [36,] 22396.40529 -4097.46565 [37,] -6384.77162 22396.40529 [38,] -15823.81706 -6384.77162 [39,] -16705.24388 -15823.81706 [40,] -401.87033 -16705.24388 [41,] 11883.91674 -401.87033 [42,] -12727.74347 11883.91674 [43,] -16169.89220 -12727.74347 [44,] -22948.69945 -16169.89220 [45,] 13448.47238 -22948.69945 [46,] -8488.02439 13448.47238 [47,] 26477.46595 -8488.02439 [48,] 15506.80869 26477.46595 [49,] -3620.57340 15506.80869 [50,] -5767.31658 -3620.57340 [51,] 5120.97688 -5767.31658 [52,] 54926.01077 5120.97688 [53,] 25796.84957 54926.01077 [54,] 8286.20971 25796.84957 [55,] 23842.85856 8286.20971 [56,] 6428.66949 23842.85856 [57,] -7721.91763 6428.66949 [58,] -7313.81234 -7721.91763 [59,] -17713.81059 -7313.81234 [60,] 5080.65676 -17713.81059 [61,] -6621.03712 5080.65676 [62,] -10128.49768 -6621.03712 [63,] -6282.01687 -10128.49768 [64,] 16690.10968 -6282.01687 [65,] -13140.60758 16690.10968 [66,] -14100.22582 -13140.60758 [67,] -14045.90390 -14100.22582 [68,] -16719.67840 -14045.90390 [69,] 552.81905 -16719.67840 [70,] 37546.16900 552.81905 [71,] -5974.09358 37546.16900 [72,] -27136.87062 -5974.09358 [73,] -21277.54013 -27136.87062 [74,] -19605.39018 -21277.54013 [75,] 1238.92930 -19605.39018 [76,] -3035.03260 1238.92930 [77,] -18741.91936 -3035.03260 [78,] -23284.84145 -18741.91936 [79,] -35154.26126 -23284.84145 [80,] -37453.22352 -35154.26126 [81,] 59422.23791 -37453.22352 [82,] -10611.56428 59422.23791 [83,] -4909.32961 -10611.56428 [84,] -16785.53654 -4909.32961 [85,] 3567.78893 -16785.53654 [86,] 27296.26085 3567.78893 [87,] -18987.35846 27296.26085 [88,] -11951.41004 -18987.35846 [89,] -1135.55046 -11951.41004 [90,] -7454.18440 -1135.55046 [91,] -11455.08437 -7454.18440 [92,] 18779.79022 -11455.08437 [93,] 2354.92439 18779.79022 [94,] -19875.32321 2354.92439 [95,] 58560.79122 -19875.32321 [96,] -20838.95975 58560.79122 [97,] -6272.41125 -20838.95975 [98,] 32503.01654 -6272.41125 [99,] 13232.93211 32503.01654 [100,] 3866.52999 13232.93211 [101,] -34177.18917 3866.52999 [102,] 8244.93607 -34177.18917 [103,] -2159.61284 8244.93607 [104,] -1979.55072 -2159.61284 [105,] -1576.76798 -1979.55072 [106,] -21451.00967 -1576.76798 [107,] 10340.08351 -21451.00967 [108,] -4097.46565 10340.08351 [109,] -28910.85617 -4097.46565 [110,] -20064.52354 -28910.85617 [111,] -14229.60818 -20064.52354 [112,] -27834.92116 -14229.60818 [113,] -11736.13995 -27834.92116 [114,] -1039.46565 -11736.13995 [115,] -4097.46565 -1039.46565 [116,] 24239.80989 -4097.46565 [117,] -34245.53357 24239.80989 [118,] 27837.96026 -34245.53357 [119,] -11947.27767 27837.96026 [120,] 26380.39279 -11947.27767 [121,] -8883.95211 26380.39279 [122,] -7259.43455 -8883.95211 [123,] -21921.15987 -7259.43455 [124,] 9108.77307 -21921.15987 [125,] -5348.60450 9108.77307 [126,] -11895.96691 -5348.60450 [127,] 24115.01925 -11895.96691 [128,] -8381.87084 24115.01925 [129,] 3909.41750 -8381.87084 [130,] 3529.53435 3909.41750 [131,] 16070.34966 3529.53435 [132,] 1457.94836 16070.34966 [133,] -6499.46521 1457.94836 [134,] -5119.19006 -6499.46521 [135,] 6670.52916 -5119.19006 [136,] -4097.46565 6670.52916 [137,] 2884.64224 -4097.46565 [138,] -25016.98330 2884.64224 [139,] 3033.53435 -25016.98330 [140,] 96.53435 3033.53435 [141,] -14007.33697 96.53435 [142,] 1232.17719 -14007.33697 [143,] 3544.31501 1232.17719 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 2415.16318 25199.57059 2 1514.85056 2415.16318 3 -8624.68575 1514.85056 4 33615.22725 -8624.68575 5 35215.40740 33615.22725 6 6955.89183 35215.40740 7 -1765.09202 6955.89183 8 -14198.27619 -1765.09202 9 76889.05549 -14198.27619 10 -12850.35983 76889.05549 11 -10553.27549 -12850.35983 12 1442.44035 -10553.27549 13 21839.82591 1442.44035 14 15395.79846 21839.82591 15 9872.40013 15395.79846 16 -55375.07565 9872.40013 17 -1489.85478 -55375.07565 18 -32195.84870 -1489.85478 19 -47120.64405 -32195.84870 20 -1356.43753 -47120.64405 21 -28315.98610 -1356.43753 22 22867.37405 -28315.98610 23 -2258.20189 22867.37405 24 5559.01693 -2258.20189 25 14318.87879 5559.01693 26 11133.52013 14318.87879 27 -3348.94524 11133.52013 28 62782.90365 -3348.94524 29 47610.11821 62782.90365 30 -3814.37450 47610.11821 31 27666.49653 -3814.37450 32 -4986.07005 27666.49653 33 -12209.47924 -4986.07005 34 37506.73909 -12209.47924 35 -4097.46565 37506.73909 36 22396.40529 -4097.46565 37 -6384.77162 22396.40529 38 -15823.81706 -6384.77162 39 -16705.24388 -15823.81706 40 -401.87033 -16705.24388 41 11883.91674 -401.87033 42 -12727.74347 11883.91674 43 -16169.89220 -12727.74347 44 -22948.69945 -16169.89220 45 13448.47238 -22948.69945 46 -8488.02439 13448.47238 47 26477.46595 -8488.02439 48 15506.80869 26477.46595 49 -3620.57340 15506.80869 50 -5767.31658 -3620.57340 51 5120.97688 -5767.31658 52 54926.01077 5120.97688 53 25796.84957 54926.01077 54 8286.20971 25796.84957 55 23842.85856 8286.20971 56 6428.66949 23842.85856 57 -7721.91763 6428.66949 58 -7313.81234 -7721.91763 59 -17713.81059 -7313.81234 60 5080.65676 -17713.81059 61 -6621.03712 5080.65676 62 -10128.49768 -6621.03712 63 -6282.01687 -10128.49768 64 16690.10968 -6282.01687 65 -13140.60758 16690.10968 66 -14100.22582 -13140.60758 67 -14045.90390 -14100.22582 68 -16719.67840 -14045.90390 69 552.81905 -16719.67840 70 37546.16900 552.81905 71 -5974.09358 37546.16900 72 -27136.87062 -5974.09358 73 -21277.54013 -27136.87062 74 -19605.39018 -21277.54013 75 1238.92930 -19605.39018 76 -3035.03260 1238.92930 77 -18741.91936 -3035.03260 78 -23284.84145 -18741.91936 79 -35154.26126 -23284.84145 80 -37453.22352 -35154.26126 81 59422.23791 -37453.22352 82 -10611.56428 59422.23791 83 -4909.32961 -10611.56428 84 -16785.53654 -4909.32961 85 3567.78893 -16785.53654 86 27296.26085 3567.78893 87 -18987.35846 27296.26085 88 -11951.41004 -18987.35846 89 -1135.55046 -11951.41004 90 -7454.18440 -1135.55046 91 -11455.08437 -7454.18440 92 18779.79022 -11455.08437 93 2354.92439 18779.79022 94 -19875.32321 2354.92439 95 58560.79122 -19875.32321 96 -20838.95975 58560.79122 97 -6272.41125 -20838.95975 98 32503.01654 -6272.41125 99 13232.93211 32503.01654 100 3866.52999 13232.93211 101 -34177.18917 3866.52999 102 8244.93607 -34177.18917 103 -2159.61284 8244.93607 104 -1979.55072 -2159.61284 105 -1576.76798 -1979.55072 106 -21451.00967 -1576.76798 107 10340.08351 -21451.00967 108 -4097.46565 10340.08351 109 -28910.85617 -4097.46565 110 -20064.52354 -28910.85617 111 -14229.60818 -20064.52354 112 -27834.92116 -14229.60818 113 -11736.13995 -27834.92116 114 -1039.46565 -11736.13995 115 -4097.46565 -1039.46565 116 24239.80989 -4097.46565 117 -34245.53357 24239.80989 118 27837.96026 -34245.53357 119 -11947.27767 27837.96026 120 26380.39279 -11947.27767 121 -8883.95211 26380.39279 122 -7259.43455 -8883.95211 123 -21921.15987 -7259.43455 124 9108.77307 -21921.15987 125 -5348.60450 9108.77307 126 -11895.96691 -5348.60450 127 24115.01925 -11895.96691 128 -8381.87084 24115.01925 129 3909.41750 -8381.87084 130 3529.53435 3909.41750 131 16070.34966 3529.53435 132 1457.94836 16070.34966 133 -6499.46521 1457.94836 134 -5119.19006 -6499.46521 135 6670.52916 -5119.19006 136 -4097.46565 6670.52916 137 2884.64224 -4097.46565 138 -25016.98330 2884.64224 139 3033.53435 -25016.98330 140 96.53435 3033.53435 141 -14007.33697 96.53435 142 1232.17719 -14007.33697 143 3544.31501 1232.17719 > 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/74cog1322147097.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/8j64q1322147097.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/9mq0r1322147097.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/10u8do1322147097.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/112n3r1322147097.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/12tpie1322147097.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/13lbvv1322147097.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/14qmzu1322147097.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/15zobj1322147097.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/16vg9h1322147097.tab") + } > > try(system("convert tmp/16fla1322147097.ps tmp/16fla1322147097.png",intern=TRUE)) character(0) > try(system("convert tmp/2547l1322147097.ps tmp/2547l1322147097.png",intern=TRUE)) character(0) > try(system("convert tmp/3ttaf1322147097.ps tmp/3ttaf1322147097.png",intern=TRUE)) character(0) > try(system("convert tmp/4p5mr1322147097.ps tmp/4p5mr1322147097.png",intern=TRUE)) character(0) > try(system("convert tmp/5kvsh1322147097.ps tmp/5kvsh1322147097.png",intern=TRUE)) character(0) > try(system("convert tmp/6afr41322147097.ps tmp/6afr41322147097.png",intern=TRUE)) character(0) > try(system("convert tmp/74cog1322147097.ps tmp/74cog1322147097.png",intern=TRUE)) character(0) > try(system("convert tmp/8j64q1322147097.ps tmp/8j64q1322147097.png",intern=TRUE)) character(0) > try(system("convert tmp/9mq0r1322147097.ps tmp/9mq0r1322147097.png",intern=TRUE)) character(0) > try(system("convert tmp/10u8do1322147097.ps tmp/10u8do1322147097.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 4.769 0.526 5.327