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(41 + ,38 + ,39 + ,32 + ,30 + ,35 + ,31 + ,33 + ,34 + ,37 + ,35 + ,29 + ,39 + ,31 + ,34 + ,36 + ,36 + ,35 + ,37 + ,38 + ,38 + ,31 + ,36 + ,34 + ,38 + ,35 + ,39 + ,38 + ,33 + ,37 + ,32 + ,33 + ,36 + ,32 + ,38 + ,38 + ,39 + ,38 + ,32 + ,32 + ,32 + ,33 + ,31 + ,31 + ,39 + ,38 + ,37 + ,39 + ,39 + ,32 + ,41 + ,32 + ,36 + ,35 + ,33 + ,37 + ,33 + ,33 + ,34 + ,33 + ,31 + ,28 + ,27 + ,32 + ,37 + ,31 + ,34 + ,37 + ,34 + ,30 + ,32 + ,33 + ,29 + ,31 + ,36 + ,33 + ,29 + ,31 + ,35 + ,33 + ,37 + ,32 + ,34 + ,33 + ,38 + ,32 + ,35 + ,33 + ,38 + ,28 + ,37 + ,35 + ,38 + ,39 + ,33 + ,34 + ,36 + ,38 + ,38 + ,32 + ,32 + ,38 + ,32 + ,30 + ,32 + ,33 + ,34 + ,38 + ,32 + ,32 + ,37 + ,32 + ,39 + ,34 + ,29 + ,34 + ,37 + ,36 + ,35 + ,34 + ,30 + ,28 + ,38 + ,34 + ,34 + ,35 + ,31 + ,35 + ,34 + ,31 + ,35 + ,37 + ,36 + ,35 + ,30 + ,27 + ,39 + ,40 + ,35 + ,37 + ,38 + ,36 + ,31 + ,38 + ,34 + ,39 + ,38 + ,41 + ,34 + ,27 + ,39 + ,30 + ,37 + ,37 + ,34 + ,31 + ,28 + ,31 + ,37 + ,27 + ,33 + ,36 + ,37 + ,38 + ,35 + ,37 + ,37 + ,33 + ,32 + ,34 + ,33 + ,31 + ,38 + ,39 + ,33 + ,34 + ,29 + ,32 + ,33 + ,33 + ,31 + ,36 + ,36 + ,32 + ,35 + ,41 + ,32 + ,28 + ,29 + ,30 + ,39 + ,36 + ,37 + ,35 + ,35 + ,31 + ,37 + ,34 + ,32 + ,36 + ,38 + ,36 + ,37 + ,35 + ,36 + ,37 + ,32 + ,28 + ,33 + ,39 + ,40 + ,32 + ,38 + ,35 + ,41 + ,39 + ,36 + ,35 + ,43 + ,42 + ,30 + ,34 + ,31 + ,33 + ,32 + ,41 + ,32 + ,33 + ,37 + ,34 + ,37 + ,32 + ,33 + ,40 + ,34 + ,40 + ,33 + ,35 + ,38 + ,36 + ,33 + ,37 + ,31 + ,27 + ,38 + ,39 + ,37 + ,38 + ,33 + ,31 + ,31 + ,33 + ,39 + ,32 + ,44 + ,39 + ,33 + ,36 + ,35 + ,33 + ,32 + ,33 + ,28 + ,32 + ,40 + ,37 + ,27 + ,30 + ,37 + ,38 + ,32 + ,29 + ,28 + ,22 + ,34 + ,35 + ,30 + ,35 + ,35 + ,34 + ,31 + ,35 + ,32 + ,34 + ,30 + ,34 + ,30 + ,35 + ,31 + ,23 + ,40 + ,31 + ,32 + ,27 + ,36 + ,36 + ,32 + ,31 + ,35 + ,32 + ,38 + ,39 + ,42 + ,37 + ,34 + ,38 + ,35 + ,39 + ,35 + ,34 + ,33 + ,31 + ,36 + ,32 + ,32 + ,37 + ,33 + ,36 + ,34 + ,32 + ,32 + ,35 + ,34 + ,36) + ,dim=c(2 + ,162) + ,dimnames=list(c('Connected' + ,'Separate') + ,1:162)) > y <- array(NA,dim=c(2,162),dimnames=list(c('Connected','Separate'),1:162)) > 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 = '2' > #'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 Separate Connected 1 38 41 2 32 39 3 35 30 4 33 31 5 37 34 6 29 35 7 31 39 8 36 34 9 35 36 10 38 37 11 31 38 12 34 36 13 35 38 14 38 39 15 37 33 16 33 32 17 32 36 18 38 38 19 38 39 20 32 32 21 33 32 22 31 31 23 38 39 24 39 37 25 32 39 26 32 41 27 35 36 28 37 33 29 33 33 30 33 34 31 28 31 32 32 27 33 31 37 34 37 34 35 30 34 36 33 32 37 31 29 38 33 36 39 31 29 40 33 35 41 32 37 42 33 34 43 32 38 44 33 35 45 28 38 46 35 37 47 39 38 48 34 33 49 38 36 50 32 38 51 38 32 52 30 32 53 33 32 54 38 34 55 32 32 56 32 37 57 34 39 58 34 29 59 36 37 60 34 35 61 28 30 62 34 38 63 35 34 64 35 31 65 31 34 66 37 35 67 35 36 68 27 30 69 40 39 70 37 35 71 36 38 72 38 31 73 39 34 74 41 38 75 27 34 76 30 39 77 37 37 78 31 34 79 31 28 80 27 37 81 36 33 82 38 37 83 37 35 84 33 37 85 34 32 86 31 33 87 39 38 88 34 33 89 32 29 90 33 33 91 36 31 92 32 36 93 41 35 94 28 32 95 30 29 96 36 39 97 35 37 98 31 35 99 34 37 100 36 32 101 36 38 102 35 37 103 37 36 104 28 32 105 39 33 106 32 40 107 35 38 108 39 41 109 35 36 110 42 43 111 34 30 112 33 31 113 41 32 114 33 32 115 34 37 116 32 37 117 40 33 118 40 34 119 35 33 120 36 38 121 37 33 122 27 31 123 39 38 124 38 37 125 31 33 126 33 31 127 32 39 128 39 44 129 36 33 130 33 35 131 33 32 132 32 28 133 37 40 134 30 27 135 38 37 136 29 32 137 22 28 138 35 34 139 35 30 140 34 35 141 35 31 142 34 32 143 34 30 144 35 30 145 23 31 146 31 40 147 27 32 148 36 36 149 31 32 150 32 35 151 39 38 152 37 42 153 38 34 154 39 35 155 34 35 156 31 33 157 32 36 158 37 32 159 36 33 160 32 34 161 35 32 162 36 34 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) Connected 20.6767 0.3875 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -9.689 -2.198 0.149 2.537 7.924 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 20.67674 2.69117 7.683 1.47e-12 *** Connected 0.38748 0.07736 5.009 1.44e-06 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 3.313 on 160 degrees of freedom Multiple R-squared: 0.1355, Adjusted R-squared: 0.1301 F-statistic: 25.09 on 1 and 160 DF, p-value: 1.436e-06 > 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.46682134 0.93364268 0.53317866 [2,] 0.70261529 0.59476942 0.29738471 [3,] 0.67175598 0.65648805 0.32824402 [4,] 0.60264198 0.79471604 0.39735802 [5,] 0.49662271 0.99324541 0.50337729 [6,] 0.52453403 0.95093195 0.47546597 [7,] 0.52365030 0.95269940 0.47634970 [8,] 0.42573252 0.85146504 0.57426748 [9,] 0.34183028 0.68366056 0.65816972 [10,] 0.36050685 0.72101370 0.63949315 [11,] 0.33647173 0.67294345 0.66352827 [12,] 0.27579621 0.55159242 0.72420379 [13,] 0.24948131 0.49896262 0.75051869 [14,] 0.25719626 0.51439252 0.74280374 [15,] 0.24820497 0.49640994 0.75179503 [16,] 0.21214589 0.42429177 0.78785411 [17,] 0.16509145 0.33018290 0.83490855 [18,] 0.14581228 0.29162456 0.85418772 [19,] 0.13304109 0.26608218 0.86695891 [20,] 0.15792727 0.31585453 0.84207273 [21,] 0.17299410 0.34598819 0.82700590 [22,] 0.19568251 0.39136502 0.80431749 [23,] 0.15461905 0.30923811 0.84538095 [24,] 0.15273468 0.30546935 0.84726532 [25,] 0.12175509 0.24351018 0.87824491 [26,] 0.09663242 0.19326485 0.90336758 [27,] 0.15312982 0.30625964 0.84687018 [28,] 0.12059272 0.24118544 0.87940728 [29,] 0.13220717 0.26441435 0.86779283 [30,] 0.13232201 0.26464401 0.86767799 [31,] 0.14732819 0.29465637 0.85267181 [32,] 0.11687148 0.23374296 0.88312852 [33,] 0.09530980 0.19061960 0.90469020 [34,] 0.07714925 0.15429850 0.92285075 [35,] 0.06115956 0.12231912 0.93884044 [36,] 0.04744257 0.09488514 0.95255743 [37,] 0.04337919 0.08675838 0.95662081 [38,] 0.03260071 0.06520142 0.96739929 [39,] 0.03104845 0.06209690 0.96895155 [40,] 0.02336876 0.04673752 0.97663124 [41,] 0.06671959 0.13343917 0.93328041 [42,] 0.05245209 0.10490418 0.94754791 [43,] 0.06678203 0.13356406 0.93321797 [44,] 0.05237733 0.10475465 0.94762267 [45,] 0.05905927 0.11811853 0.94094073 [46,] 0.05665562 0.11331123 0.94334438 [47,] 0.07963004 0.15926007 0.92036996 [48,] 0.07911459 0.15822918 0.92088541 [49,] 0.06234702 0.12469404 0.93765298 [50,] 0.07597996 0.15195991 0.92402004 [51,] 0.06182432 0.12364863 0.93817568 [52,] 0.05724996 0.11449993 0.94275004 [53,] 0.04674617 0.09349234 0.95325383 [54,] 0.03908689 0.07817378 0.96091311 [55,] 0.03185529 0.06371058 0.96814471 [56,] 0.02420805 0.04841610 0.97579195 [57,] 0.03238958 0.06477917 0.96761042 [58,] 0.02554314 0.05108628 0.97445686 [59,] 0.02024717 0.04049434 0.97975283 [60,] 0.01745611 0.03491222 0.98254389 [61,] 0.01620365 0.03240731 0.98379635 [62,] 0.01571636 0.03143272 0.98428364 [63,] 0.01184981 0.02369962 0.98815019 [64,] 0.02088808 0.04177615 0.97911192 [65,] 0.02811306 0.05622611 0.97188694 [66,] 0.02684434 0.05368867 0.97315566 [67,] 0.02093955 0.04187911 0.97906045 [68,] 0.03265241 0.06530481 0.96734759 [69,] 0.04784185 0.09568369 0.95215815 [70,] 0.07690567 0.15381134 0.92309433 [71,] 0.14746814 0.29493627 0.85253186 [72,] 0.20489506 0.40979012 0.79510494 [73,] 0.18625310 0.37250620 0.81374690 [74,] 0.17860404 0.35720808 0.82139596 [75,] 0.15173991 0.30347983 0.84826009 [76,] 0.31517182 0.63034363 0.68482818 [77,] 0.29857042 0.59714084 0.70142958 [78,] 0.29255715 0.58511430 0.70744285 [79,] 0.28072667 0.56145335 0.71927333 [80,] 0.25822748 0.51645495 0.74177252 [81,] 0.22541154 0.45082308 0.77458846 [82,] 0.21114535 0.42229070 0.78885465 [83,] 0.21726239 0.43452479 0.78273761 [84,] 0.18615246 0.37230491 0.81384754 [85,] 0.15751749 0.31503498 0.84248251 [86,] 0.13232924 0.26465849 0.86767076 [87,] 0.13157886 0.26315772 0.86842114 [88,] 0.12349723 0.24699445 0.87650277 [89,] 0.20880385 0.41760769 0.79119615 [90,] 0.25538771 0.51077543 0.74461229 [91,] 0.23153266 0.46306531 0.76846734 [92,] 0.19915605 0.39831210 0.80084395 [93,] 0.16923578 0.33847156 0.83076422 [94,] 0.16930304 0.33860609 0.83069696 [95,] 0.14561598 0.29123197 0.85438402 [96,] 0.13860048 0.27720097 0.86139952 [97,] 0.11562161 0.23124322 0.88437839 [98,] 0.09505537 0.19011074 0.90494463 [99,] 0.08461219 0.16922438 0.91538781 [100,] 0.11119939 0.22239878 0.88880061 [101,] 0.15079255 0.30158510 0.84920745 [102,] 0.17605269 0.35210539 0.82394731 [103,] 0.14966949 0.29933899 0.85033051 [104,] 0.13371553 0.26743105 0.86628447 [105,] 0.11008550 0.22017100 0.88991450 [106,] 0.12200647 0.24401294 0.87799353 [107,] 0.10492730 0.20985461 0.89507270 [108,] 0.08480918 0.16961836 0.91519082 [109,] 0.20149430 0.40298860 0.79850570 [110,] 0.16886496 0.33772991 0.83113504 [111,] 0.14378675 0.28757351 0.85621325 [112,] 0.14282992 0.28565984 0.85717008 [113,] 0.23213626 0.46427251 0.76786374 [114,] 0.32971337 0.65942673 0.67028663 [115,] 0.29588394 0.59176789 0.70411606 [116,] 0.25381332 0.50762663 0.74618668 [117,] 0.26274765 0.52549529 0.73725235 [118,] 0.32971527 0.65943054 0.67028473 [119,] 0.32904393 0.65808787 0.67095607 [120,] 0.31660119 0.63320239 0.68339881 [121,] 0.29049350 0.58098699 0.70950650 [122,] 0.24784374 0.49568748 0.75215626 [123,] 0.26747644 0.53495288 0.73252356 [124,] 0.22654185 0.45308369 0.77345815 [125,] 0.21135701 0.42271402 0.78864299 [126,] 0.17776275 0.35552550 0.82223725 [127,] 0.14360289 0.28720578 0.85639711 [128,] 0.11861915 0.23723831 0.88138085 [129,] 0.09281052 0.18562103 0.90718948 [130,] 0.07188275 0.14376550 0.92811725 [131,] 0.06427963 0.12855926 0.93572037 [132,] 0.06557843 0.13115686 0.93442157 [133,] 0.28477937 0.56955874 0.71522063 [134,] 0.23794944 0.47589888 0.76205056 [135,] 0.21335514 0.42671028 0.78664486 [136,] 0.16882568 0.33765136 0.83117432 [137,] 0.14550936 0.29101871 0.85449064 [138,] 0.11286903 0.22573807 0.88713097 [139,] 0.09136688 0.18273376 0.90863312 [140,] 0.08765308 0.17530616 0.91234692 [141,] 0.41684276 0.83368552 0.58315724 [142,] 0.54907339 0.90185321 0.45092661 [143,] 0.78601232 0.42797537 0.21398768 [144,] 0.71853777 0.56292447 0.28146223 [145,] 0.72088392 0.55823217 0.27911608 [146,] 0.73418859 0.53162281 0.26581141 [147,] 0.73008024 0.53983951 0.26991976 [148,] 0.66471304 0.67057392 0.33528696 [149,] 0.67331897 0.65336206 0.32668103 [150,] 0.88055670 0.23888660 0.11944330 [151,] 0.80713049 0.38573902 0.19286951 [152,] 0.91372503 0.17254994 0.08627497 [153,] 0.80797292 0.38405416 0.19202708 > postscript(file="/var/wessaorg/rcomp/tmp/1gpjt1322157935.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/29x8r1322157935.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/3tjxf1322157935.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/4ojj21322157935.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/5nvgy1322157935.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 = 162 Frequency = 1 1 2 3 4 5 6 1.43663185 -3.78841047 2.69889907 0.31142023 3.14898372 -5.23849512 7 8 9 10 11 12 -4.78841047 2.14898372 0.37402604 2.98654721 -4.40093163 -0.62597396 13 14 15 16 17 18 -0.40093163 2.21158953 3.53646256 -0.07605860 -2.62597396 2.59906837 19 20 21 22 23 24 2.21158953 -1.07605860 -0.07605860 -1.68857977 2.21158953 3.98654721 25 26 27 28 29 30 -3.78841047 -4.56336815 0.37402604 3.53646256 -0.46353744 -0.85101628 31 32 33 34 35 36 -4.68857977 0.86133559 -4.01345279 3.14898372 -3.85101628 -0.07605860 37 38 39 40 41 42 -0.91362209 -1.62597396 -0.91362209 -1.23849512 -3.01345279 -0.85101628 43 44 45 46 47 48 -3.40093163 -1.23849512 -7.40093163 -0.01345279 3.59906837 0.53646256 49 50 51 52 53 54 3.37402604 -3.40093163 4.92394140 -3.07605860 -0.07605860 4.14898372 55 56 57 58 59 60 -1.07605860 -3.01345279 -1.78841047 2.08637791 0.98654721 -0.23849512 61 62 63 64 65 66 -4.30110093 -1.40093163 1.14898372 2.31142023 -2.85101628 2.76150488 67 68 69 70 71 72 0.37402604 -5.30110093 4.21158953 2.76150488 0.59906837 5.31142023 73 74 75 76 77 78 5.14898372 5.59906837 -6.85101628 -5.78841047 1.98654721 -2.85101628 79 80 81 82 83 84 -0.52614325 -8.01345279 2.53646256 2.98654721 2.76150488 -2.01345279 85 86 87 88 89 90 0.92394140 -2.46353744 3.59906837 0.53646256 0.08637791 -0.46353744 91 92 93 94 95 96 3.31142023 -2.62597396 6.76150488 -5.07605860 -1.91362209 0.21158953 97 98 99 100 101 102 -0.01345279 -3.23849512 -1.01345279 2.92394140 0.59906837 -0.01345279 103 104 105 106 107 108 2.37402604 -5.07605860 5.53646256 -4.17588931 -0.40093163 2.43663185 109 110 111 112 113 114 0.37402604 4.66167418 1.69889907 0.31142023 7.92394140 -0.07605860 115 116 117 118 119 120 -1.01345279 -3.01345279 6.53646256 6.14898372 1.53646256 0.59906837 121 122 123 124 125 126 3.53646256 -5.68857977 3.59906837 2.98654721 -2.46353744 0.31142023 127 128 129 130 131 132 -3.78841047 1.27419534 2.53646256 -1.23849512 -0.07605860 0.47385675 133 134 135 136 137 138 0.82411069 -1.13866441 2.98654721 -4.07605860 -9.52614325 1.14898372 139 140 141 142 143 144 2.69889907 -0.23849512 2.31142023 0.92394140 1.69889907 2.69889907 145 146 147 148 149 150 -9.68857977 -5.17588931 -6.07605860 1.37402604 -2.07605860 -2.23849512 151 152 153 154 155 156 3.59906837 0.04915302 4.14898372 4.76150488 -0.23849512 -2.46353744 157 158 159 160 161 162 -2.62597396 3.92394140 2.53646256 -1.85101628 1.92394140 2.14898372 > postscript(file="/var/wessaorg/rcomp/tmp/6nnar1322157935.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 = 162 Frequency = 1 lag(myerror, k = 1) myerror 0 1.43663185 NA 1 -3.78841047 1.43663185 2 2.69889907 -3.78841047 3 0.31142023 2.69889907 4 3.14898372 0.31142023 5 -5.23849512 3.14898372 6 -4.78841047 -5.23849512 7 2.14898372 -4.78841047 8 0.37402604 2.14898372 9 2.98654721 0.37402604 10 -4.40093163 2.98654721 11 -0.62597396 -4.40093163 12 -0.40093163 -0.62597396 13 2.21158953 -0.40093163 14 3.53646256 2.21158953 15 -0.07605860 3.53646256 16 -2.62597396 -0.07605860 17 2.59906837 -2.62597396 18 2.21158953 2.59906837 19 -1.07605860 2.21158953 20 -0.07605860 -1.07605860 21 -1.68857977 -0.07605860 22 2.21158953 -1.68857977 23 3.98654721 2.21158953 24 -3.78841047 3.98654721 25 -4.56336815 -3.78841047 26 0.37402604 -4.56336815 27 3.53646256 0.37402604 28 -0.46353744 3.53646256 29 -0.85101628 -0.46353744 30 -4.68857977 -0.85101628 31 0.86133559 -4.68857977 32 -4.01345279 0.86133559 33 3.14898372 -4.01345279 34 -3.85101628 3.14898372 35 -0.07605860 -3.85101628 36 -0.91362209 -0.07605860 37 -1.62597396 -0.91362209 38 -0.91362209 -1.62597396 39 -1.23849512 -0.91362209 40 -3.01345279 -1.23849512 41 -0.85101628 -3.01345279 42 -3.40093163 -0.85101628 43 -1.23849512 -3.40093163 44 -7.40093163 -1.23849512 45 -0.01345279 -7.40093163 46 3.59906837 -0.01345279 47 0.53646256 3.59906837 48 3.37402604 0.53646256 49 -3.40093163 3.37402604 50 4.92394140 -3.40093163 51 -3.07605860 4.92394140 52 -0.07605860 -3.07605860 53 4.14898372 -0.07605860 54 -1.07605860 4.14898372 55 -3.01345279 -1.07605860 56 -1.78841047 -3.01345279 57 2.08637791 -1.78841047 58 0.98654721 2.08637791 59 -0.23849512 0.98654721 60 -4.30110093 -0.23849512 61 -1.40093163 -4.30110093 62 1.14898372 -1.40093163 63 2.31142023 1.14898372 64 -2.85101628 2.31142023 65 2.76150488 -2.85101628 66 0.37402604 2.76150488 67 -5.30110093 0.37402604 68 4.21158953 -5.30110093 69 2.76150488 4.21158953 70 0.59906837 2.76150488 71 5.31142023 0.59906837 72 5.14898372 5.31142023 73 5.59906837 5.14898372 74 -6.85101628 5.59906837 75 -5.78841047 -6.85101628 76 1.98654721 -5.78841047 77 -2.85101628 1.98654721 78 -0.52614325 -2.85101628 79 -8.01345279 -0.52614325 80 2.53646256 -8.01345279 81 2.98654721 2.53646256 82 2.76150488 2.98654721 83 -2.01345279 2.76150488 84 0.92394140 -2.01345279 85 -2.46353744 0.92394140 86 3.59906837 -2.46353744 87 0.53646256 3.59906837 88 0.08637791 0.53646256 89 -0.46353744 0.08637791 90 3.31142023 -0.46353744 91 -2.62597396 3.31142023 92 6.76150488 -2.62597396 93 -5.07605860 6.76150488 94 -1.91362209 -5.07605860 95 0.21158953 -1.91362209 96 -0.01345279 0.21158953 97 -3.23849512 -0.01345279 98 -1.01345279 -3.23849512 99 2.92394140 -1.01345279 100 0.59906837 2.92394140 101 -0.01345279 0.59906837 102 2.37402604 -0.01345279 103 -5.07605860 2.37402604 104 5.53646256 -5.07605860 105 -4.17588931 5.53646256 106 -0.40093163 -4.17588931 107 2.43663185 -0.40093163 108 0.37402604 2.43663185 109 4.66167418 0.37402604 110 1.69889907 4.66167418 111 0.31142023 1.69889907 112 7.92394140 0.31142023 113 -0.07605860 7.92394140 114 -1.01345279 -0.07605860 115 -3.01345279 -1.01345279 116 6.53646256 -3.01345279 117 6.14898372 6.53646256 118 1.53646256 6.14898372 119 0.59906837 1.53646256 120 3.53646256 0.59906837 121 -5.68857977 3.53646256 122 3.59906837 -5.68857977 123 2.98654721 3.59906837 124 -2.46353744 2.98654721 125 0.31142023 -2.46353744 126 -3.78841047 0.31142023 127 1.27419534 -3.78841047 128 2.53646256 1.27419534 129 -1.23849512 2.53646256 130 -0.07605860 -1.23849512 131 0.47385675 -0.07605860 132 0.82411069 0.47385675 133 -1.13866441 0.82411069 134 2.98654721 -1.13866441 135 -4.07605860 2.98654721 136 -9.52614325 -4.07605860 137 1.14898372 -9.52614325 138 2.69889907 1.14898372 139 -0.23849512 2.69889907 140 2.31142023 -0.23849512 141 0.92394140 2.31142023 142 1.69889907 0.92394140 143 2.69889907 1.69889907 144 -9.68857977 2.69889907 145 -5.17588931 -9.68857977 146 -6.07605860 -5.17588931 147 1.37402604 -6.07605860 148 -2.07605860 1.37402604 149 -2.23849512 -2.07605860 150 3.59906837 -2.23849512 151 0.04915302 3.59906837 152 4.14898372 0.04915302 153 4.76150488 4.14898372 154 -0.23849512 4.76150488 155 -2.46353744 -0.23849512 156 -2.62597396 -2.46353744 157 3.92394140 -2.62597396 158 2.53646256 3.92394140 159 -1.85101628 2.53646256 160 1.92394140 -1.85101628 161 2.14898372 1.92394140 162 NA 2.14898372 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -3.78841047 1.43663185 [2,] 2.69889907 -3.78841047 [3,] 0.31142023 2.69889907 [4,] 3.14898372 0.31142023 [5,] -5.23849512 3.14898372 [6,] -4.78841047 -5.23849512 [7,] 2.14898372 -4.78841047 [8,] 0.37402604 2.14898372 [9,] 2.98654721 0.37402604 [10,] -4.40093163 2.98654721 [11,] -0.62597396 -4.40093163 [12,] -0.40093163 -0.62597396 [13,] 2.21158953 -0.40093163 [14,] 3.53646256 2.21158953 [15,] -0.07605860 3.53646256 [16,] -2.62597396 -0.07605860 [17,] 2.59906837 -2.62597396 [18,] 2.21158953 2.59906837 [19,] -1.07605860 2.21158953 [20,] -0.07605860 -1.07605860 [21,] -1.68857977 -0.07605860 [22,] 2.21158953 -1.68857977 [23,] 3.98654721 2.21158953 [24,] -3.78841047 3.98654721 [25,] -4.56336815 -3.78841047 [26,] 0.37402604 -4.56336815 [27,] 3.53646256 0.37402604 [28,] -0.46353744 3.53646256 [29,] -0.85101628 -0.46353744 [30,] -4.68857977 -0.85101628 [31,] 0.86133559 -4.68857977 [32,] -4.01345279 0.86133559 [33,] 3.14898372 -4.01345279 [34,] -3.85101628 3.14898372 [35,] -0.07605860 -3.85101628 [36,] -0.91362209 -0.07605860 [37,] -1.62597396 -0.91362209 [38,] -0.91362209 -1.62597396 [39,] -1.23849512 -0.91362209 [40,] -3.01345279 -1.23849512 [41,] -0.85101628 -3.01345279 [42,] -3.40093163 -0.85101628 [43,] -1.23849512 -3.40093163 [44,] -7.40093163 -1.23849512 [45,] -0.01345279 -7.40093163 [46,] 3.59906837 -0.01345279 [47,] 0.53646256 3.59906837 [48,] 3.37402604 0.53646256 [49,] -3.40093163 3.37402604 [50,] 4.92394140 -3.40093163 [51,] -3.07605860 4.92394140 [52,] -0.07605860 -3.07605860 [53,] 4.14898372 -0.07605860 [54,] -1.07605860 4.14898372 [55,] -3.01345279 -1.07605860 [56,] -1.78841047 -3.01345279 [57,] 2.08637791 -1.78841047 [58,] 0.98654721 2.08637791 [59,] -0.23849512 0.98654721 [60,] -4.30110093 -0.23849512 [61,] -1.40093163 -4.30110093 [62,] 1.14898372 -1.40093163 [63,] 2.31142023 1.14898372 [64,] -2.85101628 2.31142023 [65,] 2.76150488 -2.85101628 [66,] 0.37402604 2.76150488 [67,] -5.30110093 0.37402604 [68,] 4.21158953 -5.30110093 [69,] 2.76150488 4.21158953 [70,] 0.59906837 2.76150488 [71,] 5.31142023 0.59906837 [72,] 5.14898372 5.31142023 [73,] 5.59906837 5.14898372 [74,] -6.85101628 5.59906837 [75,] -5.78841047 -6.85101628 [76,] 1.98654721 -5.78841047 [77,] -2.85101628 1.98654721 [78,] -0.52614325 -2.85101628 [79,] -8.01345279 -0.52614325 [80,] 2.53646256 -8.01345279 [81,] 2.98654721 2.53646256 [82,] 2.76150488 2.98654721 [83,] -2.01345279 2.76150488 [84,] 0.92394140 -2.01345279 [85,] -2.46353744 0.92394140 [86,] 3.59906837 -2.46353744 [87,] 0.53646256 3.59906837 [88,] 0.08637791 0.53646256 [89,] -0.46353744 0.08637791 [90,] 3.31142023 -0.46353744 [91,] -2.62597396 3.31142023 [92,] 6.76150488 -2.62597396 [93,] -5.07605860 6.76150488 [94,] -1.91362209 -5.07605860 [95,] 0.21158953 -1.91362209 [96,] -0.01345279 0.21158953 [97,] -3.23849512 -0.01345279 [98,] -1.01345279 -3.23849512 [99,] 2.92394140 -1.01345279 [100,] 0.59906837 2.92394140 [101,] -0.01345279 0.59906837 [102,] 2.37402604 -0.01345279 [103,] -5.07605860 2.37402604 [104,] 5.53646256 -5.07605860 [105,] -4.17588931 5.53646256 [106,] -0.40093163 -4.17588931 [107,] 2.43663185 -0.40093163 [108,] 0.37402604 2.43663185 [109,] 4.66167418 0.37402604 [110,] 1.69889907 4.66167418 [111,] 0.31142023 1.69889907 [112,] 7.92394140 0.31142023 [113,] -0.07605860 7.92394140 [114,] -1.01345279 -0.07605860 [115,] -3.01345279 -1.01345279 [116,] 6.53646256 -3.01345279 [117,] 6.14898372 6.53646256 [118,] 1.53646256 6.14898372 [119,] 0.59906837 1.53646256 [120,] 3.53646256 0.59906837 [121,] -5.68857977 3.53646256 [122,] 3.59906837 -5.68857977 [123,] 2.98654721 3.59906837 [124,] -2.46353744 2.98654721 [125,] 0.31142023 -2.46353744 [126,] -3.78841047 0.31142023 [127,] 1.27419534 -3.78841047 [128,] 2.53646256 1.27419534 [129,] -1.23849512 2.53646256 [130,] -0.07605860 -1.23849512 [131,] 0.47385675 -0.07605860 [132,] 0.82411069 0.47385675 [133,] -1.13866441 0.82411069 [134,] 2.98654721 -1.13866441 [135,] -4.07605860 2.98654721 [136,] -9.52614325 -4.07605860 [137,] 1.14898372 -9.52614325 [138,] 2.69889907 1.14898372 [139,] -0.23849512 2.69889907 [140,] 2.31142023 -0.23849512 [141,] 0.92394140 2.31142023 [142,] 1.69889907 0.92394140 [143,] 2.69889907 1.69889907 [144,] -9.68857977 2.69889907 [145,] -5.17588931 -9.68857977 [146,] -6.07605860 -5.17588931 [147,] 1.37402604 -6.07605860 [148,] -2.07605860 1.37402604 [149,] -2.23849512 -2.07605860 [150,] 3.59906837 -2.23849512 [151,] 0.04915302 3.59906837 [152,] 4.14898372 0.04915302 [153,] 4.76150488 4.14898372 [154,] -0.23849512 4.76150488 [155,] -2.46353744 -0.23849512 [156,] -2.62597396 -2.46353744 [157,] 3.92394140 -2.62597396 [158,] 2.53646256 3.92394140 [159,] -1.85101628 2.53646256 [160,] 1.92394140 -1.85101628 [161,] 2.14898372 1.92394140 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -3.78841047 1.43663185 2 2.69889907 -3.78841047 3 0.31142023 2.69889907 4 3.14898372 0.31142023 5 -5.23849512 3.14898372 6 -4.78841047 -5.23849512 7 2.14898372 -4.78841047 8 0.37402604 2.14898372 9 2.98654721 0.37402604 10 -4.40093163 2.98654721 11 -0.62597396 -4.40093163 12 -0.40093163 -0.62597396 13 2.21158953 -0.40093163 14 3.53646256 2.21158953 15 -0.07605860 3.53646256 16 -2.62597396 -0.07605860 17 2.59906837 -2.62597396 18 2.21158953 2.59906837 19 -1.07605860 2.21158953 20 -0.07605860 -1.07605860 21 -1.68857977 -0.07605860 22 2.21158953 -1.68857977 23 3.98654721 2.21158953 24 -3.78841047 3.98654721 25 -4.56336815 -3.78841047 26 0.37402604 -4.56336815 27 3.53646256 0.37402604 28 -0.46353744 3.53646256 29 -0.85101628 -0.46353744 30 -4.68857977 -0.85101628 31 0.86133559 -4.68857977 32 -4.01345279 0.86133559 33 3.14898372 -4.01345279 34 -3.85101628 3.14898372 35 -0.07605860 -3.85101628 36 -0.91362209 -0.07605860 37 -1.62597396 -0.91362209 38 -0.91362209 -1.62597396 39 -1.23849512 -0.91362209 40 -3.01345279 -1.23849512 41 -0.85101628 -3.01345279 42 -3.40093163 -0.85101628 43 -1.23849512 -3.40093163 44 -7.40093163 -1.23849512 45 -0.01345279 -7.40093163 46 3.59906837 -0.01345279 47 0.53646256 3.59906837 48 3.37402604 0.53646256 49 -3.40093163 3.37402604 50 4.92394140 -3.40093163 51 -3.07605860 4.92394140 52 -0.07605860 -3.07605860 53 4.14898372 -0.07605860 54 -1.07605860 4.14898372 55 -3.01345279 -1.07605860 56 -1.78841047 -3.01345279 57 2.08637791 -1.78841047 58 0.98654721 2.08637791 59 -0.23849512 0.98654721 60 -4.30110093 -0.23849512 61 -1.40093163 -4.30110093 62 1.14898372 -1.40093163 63 2.31142023 1.14898372 64 -2.85101628 2.31142023 65 2.76150488 -2.85101628 66 0.37402604 2.76150488 67 -5.30110093 0.37402604 68 4.21158953 -5.30110093 69 2.76150488 4.21158953 70 0.59906837 2.76150488 71 5.31142023 0.59906837 72 5.14898372 5.31142023 73 5.59906837 5.14898372 74 -6.85101628 5.59906837 75 -5.78841047 -6.85101628 76 1.98654721 -5.78841047 77 -2.85101628 1.98654721 78 -0.52614325 -2.85101628 79 -8.01345279 -0.52614325 80 2.53646256 -8.01345279 81 2.98654721 2.53646256 82 2.76150488 2.98654721 83 -2.01345279 2.76150488 84 0.92394140 -2.01345279 85 -2.46353744 0.92394140 86 3.59906837 -2.46353744 87 0.53646256 3.59906837 88 0.08637791 0.53646256 89 -0.46353744 0.08637791 90 3.31142023 -0.46353744 91 -2.62597396 3.31142023 92 6.76150488 -2.62597396 93 -5.07605860 6.76150488 94 -1.91362209 -5.07605860 95 0.21158953 -1.91362209 96 -0.01345279 0.21158953 97 -3.23849512 -0.01345279 98 -1.01345279 -3.23849512 99 2.92394140 -1.01345279 100 0.59906837 2.92394140 101 -0.01345279 0.59906837 102 2.37402604 -0.01345279 103 -5.07605860 2.37402604 104 5.53646256 -5.07605860 105 -4.17588931 5.53646256 106 -0.40093163 -4.17588931 107 2.43663185 -0.40093163 108 0.37402604 2.43663185 109 4.66167418 0.37402604 110 1.69889907 4.66167418 111 0.31142023 1.69889907 112 7.92394140 0.31142023 113 -0.07605860 7.92394140 114 -1.01345279 -0.07605860 115 -3.01345279 -1.01345279 116 6.53646256 -3.01345279 117 6.14898372 6.53646256 118 1.53646256 6.14898372 119 0.59906837 1.53646256 120 3.53646256 0.59906837 121 -5.68857977 3.53646256 122 3.59906837 -5.68857977 123 2.98654721 3.59906837 124 -2.46353744 2.98654721 125 0.31142023 -2.46353744 126 -3.78841047 0.31142023 127 1.27419534 -3.78841047 128 2.53646256 1.27419534 129 -1.23849512 2.53646256 130 -0.07605860 -1.23849512 131 0.47385675 -0.07605860 132 0.82411069 0.47385675 133 -1.13866441 0.82411069 134 2.98654721 -1.13866441 135 -4.07605860 2.98654721 136 -9.52614325 -4.07605860 137 1.14898372 -9.52614325 138 2.69889907 1.14898372 139 -0.23849512 2.69889907 140 2.31142023 -0.23849512 141 0.92394140 2.31142023 142 1.69889907 0.92394140 143 2.69889907 1.69889907 144 -9.68857977 2.69889907 145 -5.17588931 -9.68857977 146 -6.07605860 -5.17588931 147 1.37402604 -6.07605860 148 -2.07605860 1.37402604 149 -2.23849512 -2.07605860 150 3.59906837 -2.23849512 151 0.04915302 3.59906837 152 4.14898372 0.04915302 153 4.76150488 4.14898372 154 -0.23849512 4.76150488 155 -2.46353744 -0.23849512 156 -2.62597396 -2.46353744 157 3.92394140 -2.62597396 158 2.53646256 3.92394140 159 -1.85101628 2.53646256 160 1.92394140 -1.85101628 161 2.14898372 1.92394140 > 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/7qudb1322157935.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/8b9zr1322157935.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/9zik81322157935.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/10gs091322157935.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/11bxp01322157935.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/12g8331322157935.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/134j2s1322157936.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/147cjx1322157936.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/156w9i1322157936.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/1669951322157936.tab") + } > > try(system("convert tmp/1gpjt1322157935.ps tmp/1gpjt1322157935.png",intern=TRUE)) character(0) > try(system("convert tmp/29x8r1322157935.ps tmp/29x8r1322157935.png",intern=TRUE)) character(0) > try(system("convert tmp/3tjxf1322157935.ps tmp/3tjxf1322157935.png",intern=TRUE)) character(0) > try(system("convert tmp/4ojj21322157935.ps tmp/4ojj21322157935.png",intern=TRUE)) character(0) > try(system("convert tmp/5nvgy1322157935.ps tmp/5nvgy1322157935.png",intern=TRUE)) character(0) > try(system("convert tmp/6nnar1322157935.ps tmp/6nnar1322157935.png",intern=TRUE)) character(0) > try(system("convert tmp/7qudb1322157935.ps tmp/7qudb1322157935.png",intern=TRUE)) character(0) > try(system("convert tmp/8b9zr1322157935.ps tmp/8b9zr1322157935.png",intern=TRUE)) character(0) > try(system("convert tmp/9zik81322157935.ps tmp/9zik81322157935.png",intern=TRUE)) character(0) > try(system("convert tmp/10gs091322157935.ps tmp/10gs091322157935.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 4.647 0.498 5.168