R version 2.9.0 (2009-04-17) Copyright (C) 2009 The R Foundation for Statistical Computing ISBN 3-900051-07-0 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(15 + ,2.1 + ,14.4 + ,2.1 + ,13.5 + ,2.6 + ,12.8 + ,2.6 + ,12.3 + ,2.7 + ,12.2 + ,2.5 + ,14.5 + ,2.4 + ,17.2 + ,1.9 + ,18 + ,2.2 + ,18.1 + ,1.9 + ,18 + ,2 + ,18.3 + ,2.2 + ,18.7 + ,2.5 + ,18.6 + ,2.5 + ,18.3 + ,2.7 + ,17.9 + ,2.6 + ,17.4 + ,2.3 + ,17.4 + ,2 + ,20.1 + ,2.3 + ,23.2 + ,2.9 + ,24.2 + ,2.5 + ,24.2 + ,2.5 + ,23.9 + ,2.3 + ,23.8 + ,2.5 + ,23.8 + ,2.3 + ,23.3 + ,2.4 + ,22.4 + ,2.2 + ,21.5 + ,2.4 + ,20.5 + ,2.6 + ,19.9 + ,2.8 + ,22 + ,2.8 + ,24.9 + ,2.5 + ,25.7 + ,2.5 + ,25.3 + ,2.2 + ,24.4 + ,2.1 + ,23.8 + ,1.9 + ,23.5 + ,1.9 + ,23 + ,1.7 + ,22.2 + ,1.7 + ,21.4 + ,1.6 + ,20.3 + ,1.4 + ,19.5 + ,1.1 + ,21.7 + ,0.8 + ,24.7 + ,0.9 + ,25.3 + ,1 + ,24.9 + ,1 + ,24.1 + ,1.1 + ,23.4 + ,1.3 + ,23.1 + ,1.4 + ,22.4 + ,1.4 + ,21.3 + ,1.6 + ,20.3 + ,2 + ,19.3 + ,2.1 + ,18.7 + ,1.9 + ,21 + ,1.5 + ,24 + ,1.2 + ,24.8 + ,1.5 + ,24.2 + ,2.2 + ,23.3 + ,2.1 + ,22.7 + ,2.1 + ,22.3 + ,2.1 + ,21.8 + ,1.9 + ,21.2 + ,1.3 + ,20.5 + ,1.1 + ,19.7 + ,1.4 + ,19.2 + ,1.6 + ,21.2 + ,1.9 + ,23.9 + ,1.7 + ,24.8 + ,1.6 + ,24.2 + ,1.2 + ,23 + ,1.3 + ,22.2 + ,0.9 + ,21.8 + ,0.5 + ,21.2 + ,0.8 + ,20.5 + ,1 + ,19.7 + ,1.3 + ,19 + ,1.3 + ,18.4 + ,1.2 + ,20.7 + ,1.2 + ,24.5 + ,1 + ,26 + ,0.8 + ,25.2 + ,0.7 + ,24.1 + ,0.6 + ,23.7 + ,0.7 + ,23.5 + ,1 + ,23.1 + ,1 + ,22.7 + ,1.3 + ,22.5 + ,1.1 + ,21.7 + ,0.8 + ,20.5 + ,0.7 + ,21.9 + ,0.7 + ,22.9 + ,0.9 + ,21.5 + ,1.3 + ,19 + ,1.4 + ,17 + ,1.6 + ,16.1 + ,2.1 + ,15.9 + ,0.3 + ,15.7 + ,2.1 + ,15.1 + ,2.5 + ,14.8 + ,2.3 + ,14.3 + ,2.4 + ,14.5 + ,3 + ,18.9 + ,1.7 + ,21.6 + ,3.5 + ,20.4 + ,4 + ,17.9 + ,3.7 + ,15.7 + ,3.7 + ,14.5 + ,3 + ,14 + ,2.7 + ,13.9 + ,2.5 + ,14.4 + ,2.2 + ,15.8 + ,2.9 + ,15.6 + ,3.1 + ,14.7 + ,3 + ,16.7 + ,2.8 + ,17.9 + ,2.5 + ,18.7 + ,1.9 + ,20.1 + ,1.9 + ,19.5 + ,1.8 + ,19.4 + ,2 + ,18.6 + ,2.6 + ,17.8 + ,2.5 + ,17.1 + ,2.5 + ,16.5 + ,1.6 + ,15.5 + ,1.4 + ,14.9 + ,0.8 + ,18.6 + ,1.1 + ,19.1 + ,1.3 + ,18.8 + ,1.2 + ,18.2 + ,1.3 + ,18 + ,1.1 + ,19 + ,1.3 + ,20.7 + ,1.2 + ,21.2 + ,1.6 + ,20.7 + ,1.7 + ,19.6 + ,1.5 + ,18.6 + ,0.9 + ,18.7 + ,1.5 + ,23.8 + ,1.4 + ,24.9 + ,1.6 + ,24.8 + ,1.7 + ,23.8 + ,1.4 + ,22.3 + ,1.8 + ,21.7 + ,1.7 + ,20.7 + ,1.4 + ,19.7 + ,1.2 + ,18.4 + ,1 + ,17.4 + ,1.7 + ,17 + ,2.4 + ,18 + ,2 + ,23.8 + ,2.1 + ,25.5 + ,2 + ,25.6 + ,1.8 + ,23.7 + ,2.7 + ,22 + ,2.3 + ,21.3 + ,1.9 + ,20.7 + ,2 + ,20.4 + ,2.3 + ,20.3 + ,2.8 + ,20.4 + ,2.4 + ,19.8 + ,2.3 + ,19.5 + ,2.7 + ,23.1 + ,2.7 + ,23.5 + ,2.9 + ,23.5 + ,3 + ,22.9 + ,2.2 + ,21.9 + ,2.3 + ,21.5 + ,2.8 + ,20.5 + ,2.8 + ,20.2 + ,2.8 + ,19.4 + ,2.2 + ,19.2 + ,2.6 + ,18.8 + ,2.8 + ,18.8 + ,2.5 + ,22.6 + ,2.4 + ,23.3 + ,2.3 + ,23 + ,1.9 + ,21.4 + ,1.7 + ,19.9 + ,2 + ,18.8 + ,2.1 + ,18.6 + ,1.7 + ,18.4 + ,1.8 + ,18.6 + ,1.8 + ,19.9 + ,1.8 + ,19.2 + ,1.3 + ,18.4 + ,1.3 + ,21.1 + ,1.3 + ,20.5 + ,1.2 + ,19.1 + ,1.4 + ,18.1 + ,2.2 + ,17 + ,2.9 + ,17.1 + ,3.1 + ,17.4 + ,3.5 + ,16.8 + ,3.6 + ,15.3 + ,4.4 + ,14.3 + ,4.1 + ,13.4 + ,5.1 + ,15.3 + ,5.8 + ,22.1 + ,5.9 + ,23.7 + ,5.4 + ,22.2 + ,5.5 + ,19.5 + ,4.8 + ,16.6 + ,3.2 + ,17.3 + ,2.7 + ,19.8 + ,2.1 + ,21.2 + ,1.9 + ,21.5 + ,0.6 + ,20.6 + ,0.7 + ,19.1 + ,-0.2 + ,19.6 + ,-1 + ,23.5 + ,-1.7 + ,24 + ,-0.7 + ,23.2 + ,-1 + ,21.2 + ,-0.9) + ,dim=c(2 + ,214) + ,dimnames=list(c('Y(Werkloosheid)' + ,'X(inflatie)') + ,1:214)) > y <- array(NA,dim=c(2,214),dimnames=list(c('Y(Werkloosheid)','X(inflatie)'),1:214)) > 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 Attaching package: 'zoo' The following object(s) are masked from package:base : as.Date.numeric > n25 <- 25 #minimum number of obs. for Goldfeld-Quandt test > par1 <- as.numeric(par1) > x <- t(y) > k <- length(x[1,]) > n <- length(x[,1]) > x1 <- cbind(x[,par1], x[,1:k!=par1]) > mycolnames <- c(colnames(x)[par1], colnames(x)[1:k!=par1]) > colnames(x1) <- mycolnames #colnames(x)[par1] > x <- x1 > if (par3 == 'First Differences'){ + x2 <- array(0, dim=c(n-1,k), dimnames=list(1:(n-1), paste('(1-B)',colnames(x),sep=''))) + for (i in 1:n-1) { + for (j in 1:k) { + x2[i,j] <- x[i+1,j] - x[i,j] + } + } + x <- x2 + } > if (par2 == 'Include Monthly Dummies'){ + x2 <- array(0, dim=c(n,11), dimnames=list(1:n, paste('M', seq(1:11), sep =''))) + for (i in 1:11){ + x2[seq(i,n,12),i] <- 1 + } + x <- cbind(x, x2) + } > if (par2 == 'Include Quarterly Dummies'){ + x2 <- array(0, dim=c(n,3), dimnames=list(1:n, paste('Q', seq(1:3), sep =''))) + for (i in 1:3){ + x2[seq(i,n,4),i] <- 1 + } + x <- cbind(x, x2) + } > k <- length(x[1,]) > if (par3 == 'Linear Trend'){ + x <- cbind(x, c(1:n)) + colnames(x)[k+1] <- 't' + } > x Y(Werkloosheid) X(inflatie) 1 15.0 2.1 2 14.4 2.1 3 13.5 2.6 4 12.8 2.6 5 12.3 2.7 6 12.2 2.5 7 14.5 2.4 8 17.2 1.9 9 18.0 2.2 10 18.1 1.9 11 18.0 2.0 12 18.3 2.2 13 18.7 2.5 14 18.6 2.5 15 18.3 2.7 16 17.9 2.6 17 17.4 2.3 18 17.4 2.0 19 20.1 2.3 20 23.2 2.9 21 24.2 2.5 22 24.2 2.5 23 23.9 2.3 24 23.8 2.5 25 23.8 2.3 26 23.3 2.4 27 22.4 2.2 28 21.5 2.4 29 20.5 2.6 30 19.9 2.8 31 22.0 2.8 32 24.9 2.5 33 25.7 2.5 34 25.3 2.2 35 24.4 2.1 36 23.8 1.9 37 23.5 1.9 38 23.0 1.7 39 22.2 1.7 40 21.4 1.6 41 20.3 1.4 42 19.5 1.1 43 21.7 0.8 44 24.7 0.9 45 25.3 1.0 46 24.9 1.0 47 24.1 1.1 48 23.4 1.3 49 23.1 1.4 50 22.4 1.4 51 21.3 1.6 52 20.3 2.0 53 19.3 2.1 54 18.7 1.9 55 21.0 1.5 56 24.0 1.2 57 24.8 1.5 58 24.2 2.2 59 23.3 2.1 60 22.7 2.1 61 22.3 2.1 62 21.8 1.9 63 21.2 1.3 64 20.5 1.1 65 19.7 1.4 66 19.2 1.6 67 21.2 1.9 68 23.9 1.7 69 24.8 1.6 70 24.2 1.2 71 23.0 1.3 72 22.2 0.9 73 21.8 0.5 74 21.2 0.8 75 20.5 1.0 76 19.7 1.3 77 19.0 1.3 78 18.4 1.2 79 20.7 1.2 80 24.5 1.0 81 26.0 0.8 82 25.2 0.7 83 24.1 0.6 84 23.7 0.7 85 23.5 1.0 86 23.1 1.0 87 22.7 1.3 88 22.5 1.1 89 21.7 0.8 90 20.5 0.7 91 21.9 0.7 92 22.9 0.9 93 21.5 1.3 94 19.0 1.4 95 17.0 1.6 96 16.1 2.1 97 15.9 0.3 98 15.7 2.1 99 15.1 2.5 100 14.8 2.3 101 14.3 2.4 102 14.5 3.0 103 18.9 1.7 104 21.6 3.5 105 20.4 4.0 106 17.9 3.7 107 15.7 3.7 108 14.5 3.0 109 14.0 2.7 110 13.9 2.5 111 14.4 2.2 112 15.8 2.9 113 15.6 3.1 114 14.7 3.0 115 16.7 2.8 116 17.9 2.5 117 18.7 1.9 118 20.1 1.9 119 19.5 1.8 120 19.4 2.0 121 18.6 2.6 122 17.8 2.5 123 17.1 2.5 124 16.5 1.6 125 15.5 1.4 126 14.9 0.8 127 18.6 1.1 128 19.1 1.3 129 18.8 1.2 130 18.2 1.3 131 18.0 1.1 132 19.0 1.3 133 20.7 1.2 134 21.2 1.6 135 20.7 1.7 136 19.6 1.5 137 18.6 0.9 138 18.7 1.5 139 23.8 1.4 140 24.9 1.6 141 24.8 1.7 142 23.8 1.4 143 22.3 1.8 144 21.7 1.7 145 20.7 1.4 146 19.7 1.2 147 18.4 1.0 148 17.4 1.7 149 17.0 2.4 150 18.0 2.0 151 23.8 2.1 152 25.5 2.0 153 25.6 1.8 154 23.7 2.7 155 22.0 2.3 156 21.3 1.9 157 20.7 2.0 158 20.4 2.3 159 20.3 2.8 160 20.4 2.4 161 19.8 2.3 162 19.5 2.7 163 23.1 2.7 164 23.5 2.9 165 23.5 3.0 166 22.9 2.2 167 21.9 2.3 168 21.5 2.8 169 20.5 2.8 170 20.2 2.8 171 19.4 2.2 172 19.2 2.6 173 18.8 2.8 174 18.8 2.5 175 22.6 2.4 176 23.3 2.3 177 23.0 1.9 178 21.4 1.7 179 19.9 2.0 180 18.8 2.1 181 18.6 1.7 182 18.4 1.8 183 18.6 1.8 184 19.9 1.8 185 19.2 1.3 186 18.4 1.3 187 21.1 1.3 188 20.5 1.2 189 19.1 1.4 190 18.1 2.2 191 17.0 2.9 192 17.1 3.1 193 17.4 3.5 194 16.8 3.6 195 15.3 4.4 196 14.3 4.1 197 13.4 5.1 198 15.3 5.8 199 22.1 5.9 200 23.7 5.4 201 22.2 5.5 202 19.5 4.8 203 16.6 3.2 204 17.3 2.7 205 19.8 2.1 206 21.2 1.9 207 21.5 0.6 208 20.6 0.7 209 19.1 -0.2 210 19.6 -1.0 211 23.5 -1.7 212 24.0 -0.7 213 23.2 -1.0 214 21.2 -0.9 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) `X(inflatie)` 21.915 -0.898 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -7.46986 -1.92906 -0.07906 2.43518 6.63436 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 21.9149 0.4351 50.370 < 2e-16 *** `X(inflatie)` -0.8980 0.1954 -4.596 7.38e-06 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 3.012 on 212 degrees of freedom Multiple R-squared: 0.09062, Adjusted R-squared: 0.08633 F-statistic: 21.13 on 1 and 212 DF, p-value: 7.383e-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.004947771 0.0098955425 0.9950522288 [2,] 0.004708292 0.0094165849 0.9952917075 [3,] 0.002616036 0.0052320714 0.9973839643 [4,] 0.002071143 0.0041422861 0.9979288570 [5,] 0.020801009 0.0416020185 0.9791989908 [6,] 0.010873236 0.0217464711 0.9891267644 [7,] 0.006532166 0.0130643319 0.9934678340 [8,] 0.012476210 0.0249524202 0.9875237899 [9,] 0.088760726 0.1775214519 0.9112392741 [10,] 0.165263106 0.3305262128 0.8347368936 [11,] 0.248628455 0.4972569101 0.7513715450 [12,] 0.249105894 0.4982117888 0.7508941056 [13,] 0.201452947 0.4029058949 0.7985470526 [14,] 0.153216169 0.3064323379 0.8467838310 [15,] 0.197603124 0.3952062479 0.8023968760 [16,] 0.579495800 0.8410083993 0.4205041997 [17,] 0.828507623 0.3429847539 0.1714923769 [18,] 0.931352539 0.1372949220 0.0686474610 [19,] 0.969700606 0.0605987884 0.0302993942 [20,] 0.984285622 0.0314287560 0.0157143780 [21,] 0.991807199 0.0163856030 0.0081928015 [22,] 0.994386526 0.0112269488 0.0056134744 [23,] 0.994940963 0.0101180731 0.0050590366 [24,] 0.994100856 0.0117982881 0.0058991440 [25,] 0.991941317 0.0161173665 0.0080586832 [26,] 0.988547958 0.0229040832 0.0114520416 [27,] 0.986808643 0.0263827141 0.0131913570 [28,] 0.993237233 0.0135255330 0.0067627665 [29,] 0.997422594 0.0051548122 0.0025774061 [30,] 0.999006200 0.0019875994 0.0009937997 [31,] 0.999420311 0.0011593787 0.0005796894 [32,] 0.999546101 0.0009077975 0.0004538988 [33,] 0.999568661 0.0008626779 0.0004313390 [34,] 0.999489571 0.0010208578 0.0005104289 [35,] 0.999294211 0.0014115775 0.0007057887 [36,] 0.998955424 0.0020891517 0.0010445759 [37,] 0.998489552 0.0030208955 0.0015104477 [38,] 0.997999223 0.0040015537 0.0020007768 [39,] 0.997133977 0.0057320454 0.0028660227 [40,] 0.997124248 0.0057515040 0.0028757520 [41,] 0.997369805 0.0052603904 0.0026301952 [42,] 0.997257154 0.0054856915 0.0027428458 [43,] 0.996755982 0.0064880359 0.0032440180 [44,] 0.995958656 0.0080826889 0.0040413444 [45,] 0.994909221 0.0101815584 0.0050907792 [46,] 0.993288934 0.0134221313 0.0067110657 [47,] 0.991000181 0.0179996382 0.0089998191 [48,] 0.987980388 0.0240392233 0.0120196116 [49,] 0.984531650 0.0309367007 0.0154683503 [50,] 0.981733222 0.0365335565 0.0182667783 [51,] 0.976548846 0.0469023083 0.0234511541 [52,] 0.973807001 0.0523859972 0.0261929986 [53,] 0.975715761 0.0485684772 0.0242842386 [54,] 0.980007246 0.0399855083 0.0199927542 [55,] 0.979763141 0.0404737185 0.0202368593 [56,] 0.977656444 0.0446871113 0.0223435557 [57,] 0.974230426 0.0515391480 0.0257695740 [58,] 0.968485422 0.0630291568 0.0315145784 [59,] 0.961492819 0.0770143618 0.0385071809 [60,] 0.955639474 0.0887210524 0.0443605262 [61,] 0.949419024 0.1011619517 0.0505809758 [62,] 0.942863745 0.1142725094 0.0571362547 [63,] 0.930886943 0.1382261141 0.0691130571 [64,] 0.931224588 0.1375508242 0.0687754121 [65,] 0.938865571 0.1222688589 0.0611344294 [66,] 0.936360896 0.1272782087 0.0636391043 [67,] 0.927573541 0.1448529188 0.0724264594 [68,] 0.915507004 0.1689859916 0.0844929958 [69,] 0.904828329 0.1903433427 0.0951716714 [70,] 0.891808663 0.2163826739 0.1081913370 [71,] 0.878426953 0.2431460947 0.1215730473 [72,] 0.865347544 0.2693049114 0.1346524557 [73,] 0.857775737 0.2844485253 0.1422242626 [74,] 0.858902425 0.2821951508 0.1410975754 [75,] 0.837965928 0.3240681442 0.1620340721 [76,] 0.839412528 0.3211749444 0.1605874722 [77,] 0.864451211 0.2710975786 0.1355487893 [78,] 0.871865735 0.2562685305 0.1281342652 [79,] 0.864810803 0.2703783930 0.1351891965 [80,] 0.855131268 0.2897374648 0.1448687324 [81,] 0.846216979 0.3075660421 0.1537830210 [82,] 0.833426164 0.3331476718 0.1665738359 [83,] 0.818941117 0.3621177654 0.1810588827 [84,] 0.801010939 0.3979781212 0.1989890606 [85,] 0.779706429 0.4405871429 0.2202935715 [86,] 0.763882162 0.4722356762 0.2361178381 [87,] 0.740620857 0.5187582867 0.2593791433 [88,] 0.722884032 0.5542319360 0.2771159680 [89,] 0.695231485 0.6095370304 0.3047685152 [90,] 0.679072348 0.6418553046 0.3209276523 [91,] 0.700539326 0.5989213488 0.2994606744 [92,] 0.727243694 0.5455126115 0.2727563058 [93,] 0.829815661 0.3403686784 0.1701843392 [94,] 0.855867047 0.2882659056 0.1441329528 [95,] 0.881249256 0.2375014889 0.1187507444 [96,] 0.911634129 0.1767317412 0.0883658706 [97,] 0.940714299 0.1185714014 0.0592857007 [98,] 0.952933957 0.0941320863 0.0470660431 [99,] 0.945275861 0.1094482776 0.0547241388 [100,] 0.948785034 0.1024299326 0.0512149663 [101,] 0.946826746 0.1063465076 0.0531732538 [102,] 0.935801426 0.1283971488 0.0641985744 [103,] 0.932904563 0.1341908737 0.0670954368 [104,] 0.947842981 0.1043140373 0.0521570186 [105,] 0.967224276 0.0655514482 0.0327757241 [106,] 0.982158862 0.0356822752 0.0178411376 [107,] 0.990358400 0.0192832004 0.0096416002 [108,] 0.991114244 0.0177715112 0.0088857556 [109,] 0.991926534 0.0161469320 0.0080734660 [110,] 0.994401236 0.0111975275 0.0055987638 [111,] 0.994124444 0.0117511119 0.0058755560 [112,] 0.992951192 0.0140976166 0.0070488083 [113,] 0.991358080 0.0172838393 0.0086419196 [114,] 0.988726416 0.0225471676 0.0112735838 [115,] 0.985670975 0.0286580499 0.0143290250 [116,] 0.981839308 0.0363213846 0.0181606923 [117,] 0.977537920 0.0449241594 0.0224620797 [118,] 0.974168471 0.0516630570 0.0258315285 [119,] 0.972844865 0.0543102692 0.0271551346 [120,] 0.978360473 0.0432790541 0.0216395271 [121,] 0.988049410 0.0239011791 0.0119505896 [122,] 0.996288826 0.0074223487 0.0037111744 [123,] 0.995978515 0.0080429696 0.0040214848 [124,] 0.995151652 0.0096966957 0.0048483478 [125,] 0.994495534 0.0110089325 0.0055044663 [126,] 0.994298674 0.0114026518 0.0057013259 [127,] 0.994575774 0.0108484527 0.0054242264 [128,] 0.993615283 0.0127694336 0.0063847168 [129,] 0.991523029 0.0169539418 0.0084769709 [130,] 0.988944882 0.0221102357 0.0110551179 [131,] 0.985557798 0.0288844041 0.0144422020 [132,] 0.981989661 0.0360206772 0.0180103386 [133,] 0.981453979 0.0370920414 0.0185460207 [134,] 0.979057965 0.0418840705 0.0209420353 [135,] 0.979608532 0.0407829364 0.0203914682 [136,] 0.985524518 0.0289509633 0.0144754816 [137,] 0.990067059 0.0198658813 0.0099329406 [138,] 0.990701630 0.0185967395 0.0092983698 [139,] 0.989233486 0.0215330284 0.0107665142 [140,] 0.986562610 0.0268747800 0.0134373900 [141,] 0.982369397 0.0352612069 0.0176306034 [142,] 0.978030562 0.0439388764 0.0219694382 [143,] 0.977267473 0.0454650542 0.0227325271 [144,] 0.978413137 0.0431737262 0.0215868631 [145,] 0.979154683 0.0416906347 0.0208453173 [146,] 0.977352568 0.0452948649 0.0226474325 [147,] 0.981062167 0.0378756665 0.0189378333 [148,] 0.991087247 0.0178255063 0.0089127531 [149,] 0.996293268 0.0074134634 0.0037067317 [150,] 0.997641327 0.0047173461 0.0023586730 [151,] 0.997290188 0.0054196233 0.0027098116 [152,] 0.996372550 0.0072549010 0.0036274505 [153,] 0.994969866 0.0100602686 0.0050301343 [154,] 0.993071793 0.0138564148 0.0069282074 [155,] 0.990733781 0.0185324381 0.0092662190 [156,] 0.987534574 0.0249308510 0.0124654255 [157,] 0.983132144 0.0337357116 0.0168678558 [158,] 0.977496847 0.0450063068 0.0225031534 [159,] 0.981490539 0.0370189230 0.0185094615 [160,] 0.987577406 0.0248451882 0.0124225941 [161,] 0.992389143 0.0152217142 0.0076108571 [162,] 0.993352871 0.0132942578 0.0066471289 [163,] 0.992676518 0.0146469645 0.0073234823 [164,] 0.991898551 0.0162028980 0.0081014490 [165,] 0.989426584 0.0211468321 0.0105734160 [166,] 0.985878678 0.0282426442 0.0141213221 [167,] 0.980480748 0.0390385034 0.0195192517 [168,] 0.973329219 0.0533415617 0.0266707809 [169,] 0.964221480 0.0715570401 0.0357785201 [170,] 0.952970845 0.0940583099 0.0470291549 [171,] 0.957072894 0.0858542117 0.0429271059 [172,] 0.968357000 0.0632859995 0.0316429998 [173,] 0.973776447 0.0524471067 0.0262235534 [174,] 0.968478500 0.0630430003 0.0315215001 [175,] 0.957435088 0.0851298246 0.0425649123 [176,] 0.943502496 0.1129950079 0.0564975040 [177,] 0.928196456 0.1436070882 0.0718035441 [178,] 0.910703192 0.1785936158 0.0892968079 [179,] 0.888469644 0.2230607116 0.1115303558 [180,] 0.857822105 0.2843557896 0.1421778948 [181,] 0.824512169 0.3509756612 0.1754878306 [182,] 0.796940495 0.4061190095 0.2030595048 [183,] 0.757723385 0.4845532304 0.2422766152 [184,] 0.707926471 0.5841470582 0.2920735291 [185,] 0.656057269 0.6878854626 0.3439427313 [186,] 0.607471532 0.7850569364 0.3925284682 [187,] 0.573395648 0.8532087033 0.4266043516 [188,] 0.533363346 0.9332733088 0.4666366544 [189,] 0.480157789 0.9603155787 0.5198422106 [190,] 0.442422720 0.8848454409 0.5575772796 [191,] 0.453576292 0.9071525840 0.5464237080 [192,] 0.566187761 0.8676244772 0.4338122386 [193,] 0.780505299 0.4389894013 0.2194947007 [194,] 0.880582541 0.2388349173 0.1194174587 [195,] 0.870380215 0.2592395690 0.1296197845 [196,] 0.938843412 0.1223131766 0.0611565883 [197,] 0.980650994 0.0386980127 0.0193490063 [198,] 0.984133322 0.0317333565 0.0158666783 [199,] 0.976715683 0.0465686347 0.0232843174 [200,] 0.972662298 0.0546754037 0.0273377019 [201,] 0.945947524 0.1081049522 0.0540524761 [202,] 0.912115948 0.1757681037 0.0878840519 [203,] 0.858689201 0.2826215977 0.1413107988 [204,] 0.786123246 0.4277535087 0.2138767543 [205,] 0.695841316 0.6083173681 0.3041586841 > postscript(file="/var/www/html/rcomp/tmp/1mwzv1262132558.ps",horizontal=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/www/html/rcomp/tmp/2m54a1262132558.ps",horizontal=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/www/html/rcomp/tmp/3v20s1262132558.ps",horizontal=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/www/html/rcomp/tmp/4kdeu1262132558.ps",horizontal=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/www/html/rcomp/tmp/5tv2j1262132558.ps",horizontal=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 = 214 Frequency = 1 1 2 3 4 5 6 -5.029060906 -5.629060906 -6.080058099 -6.780058099 -7.190257538 -7.469858660 7 8 9 10 11 12 -5.259659222 -3.008662028 -1.939260344 -2.108662028 -2.118861467 -1.639260344 13 14 15 16 17 18 -0.969858660 -1.069858660 -1.190257538 -1.680058099 -2.449459783 -2.718861467 19 20 21 22 23 24 0.250540217 3.889343585 4.530141340 4.530141340 4.050540217 4.130141340 25 26 27 28 29 30 3.950540217 3.540340778 2.460739656 1.740340778 0.919941901 0.499543023 31 32 33 34 35 36 2.599543023 5.230141340 6.030141340 5.360739656 4.370939094 3.591337972 37 38 39 40 41 42 3.291337972 2.611736849 1.811736849 0.921936288 -0.357664835 -1.427066519 43 44 45 46 47 48 0.503531797 3.593332358 4.283132920 3.883132920 3.172933481 2.652534604 49 50 51 52 53 54 2.442335165 1.742335165 0.821936288 0.181138533 -0.729060906 -1.508662028 55 56 57 58 59 60 0.432135726 3.162734042 4.232135726 4.260739656 3.270939094 2.670939094 61 62 63 64 65 66 2.270939094 1.591337972 0.452534604 -0.427066519 -0.957664835 -1.278063712 67 68 69 70 71 72 0.991337972 3.511736849 4.321936288 3.362734042 2.252534604 1.093332358 73 74 75 76 77 78 0.334130113 0.003531797 -0.516867080 -1.047465396 -1.747465396 -2.437265958 79 80 81 82 83 84 -0.137265958 3.483132920 4.803531797 3.913731236 2.723930674 2.413731236 85 86 87 88 89 90 2.483132920 2.083132920 1.952534604 1.572933481 0.503531797 -0.786268764 91 92 93 94 95 96 0.613731236 1.793332358 0.752534604 -1.657664835 -3.478063712 -3.929060906 97 98 99 100 101 102 -5.745471010 -4.329060906 -4.569858660 -5.049459783 -5.459659222 -4.720855854 103 104 105 106 107 108 -1.488263151 2.828146953 2.077149759 -0.692251925 -2.892251925 -4.720855854 109 110 111 112 113 114 -5.490257538 -5.769858660 -5.539260344 -3.510656415 -3.531055293 -4.520855854 115 116 117 118 119 120 -2.700456977 -1.769858660 -1.508662028 -0.108662028 -0.798462590 -0.718861467 121 122 123 124 125 126 -0.980058099 -1.869858660 -2.569858660 -3.978063712 -5.157664835 -6.296468203 127 128 129 130 131 132 -2.327066519 -1.647465396 -2.037265958 -2.547465396 -2.927066519 -1.747465396 133 134 135 136 137 138 -0.137265958 0.721936288 0.311736849 -0.967864274 -2.506667642 -1.867864274 139 140 141 142 143 144 3.142335165 4.421936288 4.411736849 3.142335165 2.001537410 1.311736849 145 146 147 148 149 150 0.042335165 -1.137265958 -2.616867080 -2.988263151 -2.759659222 -2.118861467 151 152 153 154 155 156 3.770939094 5.381138533 5.301537410 4.209742462 2.150540217 1.091337972 157 158 159 160 161 162 0.581138533 0.550540217 0.899543023 0.640340778 -0.049459783 0.009742462 163 164 165 166 167 168 3.609742462 4.189343585 4.279144146 2.960739656 2.050540217 2.099543023 169 170 171 172 173 174 1.099543023 0.799543023 -0.539260344 -0.380058099 -0.600456977 -0.869858660 175 176 177 178 179 180 2.840340778 3.450540217 2.791337972 1.011736849 -0.218861467 -1.229060906 181 182 183 184 185 186 -1.788263151 -1.898462590 -1.698462590 -0.398462590 -1.547465396 -2.347465396 187 188 189 190 191 192 0.352534604 -0.337265958 -1.557664835 -1.839260344 -2.310656415 -2.031055293 193 194 195 196 197 198 -1.371853047 -1.882052486 -2.663647995 -3.933049679 -3.935044066 -1.406440137 199 200 201 202 203 204 5.483360425 6.634357618 5.224158179 1.895554250 -2.441254731 -2.190257538 205 206 207 208 209 210 -0.229060906 0.991337972 0.123930674 -0.686268764 -2.994473816 -3.212878307 211 212 213 214 0.058517764 1.456523377 0.387121693 -1.523077746 > postscript(file="/var/www/html/rcomp/tmp/6u1011262132558.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > dum <- cbind(lag(myerror,k=1),myerror) > dum Time Series: Start = 0 End = 214 Frequency = 1 lag(myerror, k = 1) myerror 0 -5.029060906 NA 1 -5.629060906 -5.029060906 2 -6.080058099 -5.629060906 3 -6.780058099 -6.080058099 4 -7.190257538 -6.780058099 5 -7.469858660 -7.190257538 6 -5.259659222 -7.469858660 7 -3.008662028 -5.259659222 8 -1.939260344 -3.008662028 9 -2.108662028 -1.939260344 10 -2.118861467 -2.108662028 11 -1.639260344 -2.118861467 12 -0.969858660 -1.639260344 13 -1.069858660 -0.969858660 14 -1.190257538 -1.069858660 15 -1.680058099 -1.190257538 16 -2.449459783 -1.680058099 17 -2.718861467 -2.449459783 18 0.250540217 -2.718861467 19 3.889343585 0.250540217 20 4.530141340 3.889343585 21 4.530141340 4.530141340 22 4.050540217 4.530141340 23 4.130141340 4.050540217 24 3.950540217 4.130141340 25 3.540340778 3.950540217 26 2.460739656 3.540340778 27 1.740340778 2.460739656 28 0.919941901 1.740340778 29 0.499543023 0.919941901 30 2.599543023 0.499543023 31 5.230141340 2.599543023 32 6.030141340 5.230141340 33 5.360739656 6.030141340 34 4.370939094 5.360739656 35 3.591337972 4.370939094 36 3.291337972 3.591337972 37 2.611736849 3.291337972 38 1.811736849 2.611736849 39 0.921936288 1.811736849 40 -0.357664835 0.921936288 41 -1.427066519 -0.357664835 42 0.503531797 -1.427066519 43 3.593332358 0.503531797 44 4.283132920 3.593332358 45 3.883132920 4.283132920 46 3.172933481 3.883132920 47 2.652534604 3.172933481 48 2.442335165 2.652534604 49 1.742335165 2.442335165 50 0.821936288 1.742335165 51 0.181138533 0.821936288 52 -0.729060906 0.181138533 53 -1.508662028 -0.729060906 54 0.432135726 -1.508662028 55 3.162734042 0.432135726 56 4.232135726 3.162734042 57 4.260739656 4.232135726 58 3.270939094 4.260739656 59 2.670939094 3.270939094 60 2.270939094 2.670939094 61 1.591337972 2.270939094 62 0.452534604 1.591337972 63 -0.427066519 0.452534604 64 -0.957664835 -0.427066519 65 -1.278063712 -0.957664835 66 0.991337972 -1.278063712 67 3.511736849 0.991337972 68 4.321936288 3.511736849 69 3.362734042 4.321936288 70 2.252534604 3.362734042 71 1.093332358 2.252534604 72 0.334130113 1.093332358 73 0.003531797 0.334130113 74 -0.516867080 0.003531797 75 -1.047465396 -0.516867080 76 -1.747465396 -1.047465396 77 -2.437265958 -1.747465396 78 -0.137265958 -2.437265958 79 3.483132920 -0.137265958 80 4.803531797 3.483132920 81 3.913731236 4.803531797 82 2.723930674 3.913731236 83 2.413731236 2.723930674 84 2.483132920 2.413731236 85 2.083132920 2.483132920 86 1.952534604 2.083132920 87 1.572933481 1.952534604 88 0.503531797 1.572933481 89 -0.786268764 0.503531797 90 0.613731236 -0.786268764 91 1.793332358 0.613731236 92 0.752534604 1.793332358 93 -1.657664835 0.752534604 94 -3.478063712 -1.657664835 95 -3.929060906 -3.478063712 96 -5.745471010 -3.929060906 97 -4.329060906 -5.745471010 98 -4.569858660 -4.329060906 99 -5.049459783 -4.569858660 100 -5.459659222 -5.049459783 101 -4.720855854 -5.459659222 102 -1.488263151 -4.720855854 103 2.828146953 -1.488263151 104 2.077149759 2.828146953 105 -0.692251925 2.077149759 106 -2.892251925 -0.692251925 107 -4.720855854 -2.892251925 108 -5.490257538 -4.720855854 109 -5.769858660 -5.490257538 110 -5.539260344 -5.769858660 111 -3.510656415 -5.539260344 112 -3.531055293 -3.510656415 113 -4.520855854 -3.531055293 114 -2.700456977 -4.520855854 115 -1.769858660 -2.700456977 116 -1.508662028 -1.769858660 117 -0.108662028 -1.508662028 118 -0.798462590 -0.108662028 119 -0.718861467 -0.798462590 120 -0.980058099 -0.718861467 121 -1.869858660 -0.980058099 122 -2.569858660 -1.869858660 123 -3.978063712 -2.569858660 124 -5.157664835 -3.978063712 125 -6.296468203 -5.157664835 126 -2.327066519 -6.296468203 127 -1.647465396 -2.327066519 128 -2.037265958 -1.647465396 129 -2.547465396 -2.037265958 130 -2.927066519 -2.547465396 131 -1.747465396 -2.927066519 132 -0.137265958 -1.747465396 133 0.721936288 -0.137265958 134 0.311736849 0.721936288 135 -0.967864274 0.311736849 136 -2.506667642 -0.967864274 137 -1.867864274 -2.506667642 138 3.142335165 -1.867864274 139 4.421936288 3.142335165 140 4.411736849 4.421936288 141 3.142335165 4.411736849 142 2.001537410 3.142335165 143 1.311736849 2.001537410 144 0.042335165 1.311736849 145 -1.137265958 0.042335165 146 -2.616867080 -1.137265958 147 -2.988263151 -2.616867080 148 -2.759659222 -2.988263151 149 -2.118861467 -2.759659222 150 3.770939094 -2.118861467 151 5.381138533 3.770939094 152 5.301537410 5.381138533 153 4.209742462 5.301537410 154 2.150540217 4.209742462 155 1.091337972 2.150540217 156 0.581138533 1.091337972 157 0.550540217 0.581138533 158 0.899543023 0.550540217 159 0.640340778 0.899543023 160 -0.049459783 0.640340778 161 0.009742462 -0.049459783 162 3.609742462 0.009742462 163 4.189343585 3.609742462 164 4.279144146 4.189343585 165 2.960739656 4.279144146 166 2.050540217 2.960739656 167 2.099543023 2.050540217 168 1.099543023 2.099543023 169 0.799543023 1.099543023 170 -0.539260344 0.799543023 171 -0.380058099 -0.539260344 172 -0.600456977 -0.380058099 173 -0.869858660 -0.600456977 174 2.840340778 -0.869858660 175 3.450540217 2.840340778 176 2.791337972 3.450540217 177 1.011736849 2.791337972 178 -0.218861467 1.011736849 179 -1.229060906 -0.218861467 180 -1.788263151 -1.229060906 181 -1.898462590 -1.788263151 182 -1.698462590 -1.898462590 183 -0.398462590 -1.698462590 184 -1.547465396 -0.398462590 185 -2.347465396 -1.547465396 186 0.352534604 -2.347465396 187 -0.337265958 0.352534604 188 -1.557664835 -0.337265958 189 -1.839260344 -1.557664835 190 -2.310656415 -1.839260344 191 -2.031055293 -2.310656415 192 -1.371853047 -2.031055293 193 -1.882052486 -1.371853047 194 -2.663647995 -1.882052486 195 -3.933049679 -2.663647995 196 -3.935044066 -3.933049679 197 -1.406440137 -3.935044066 198 5.483360425 -1.406440137 199 6.634357618 5.483360425 200 5.224158179 6.634357618 201 1.895554250 5.224158179 202 -2.441254731 1.895554250 203 -2.190257538 -2.441254731 204 -0.229060906 -2.190257538 205 0.991337972 -0.229060906 206 0.123930674 0.991337972 207 -0.686268764 0.123930674 208 -2.994473816 -0.686268764 209 -3.212878307 -2.994473816 210 0.058517764 -3.212878307 211 1.456523377 0.058517764 212 0.387121693 1.456523377 213 -1.523077746 0.387121693 214 NA -1.523077746 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -5.629060906 -5.029060906 [2,] -6.080058099 -5.629060906 [3,] -6.780058099 -6.080058099 [4,] -7.190257538 -6.780058099 [5,] -7.469858660 -7.190257538 [6,] -5.259659222 -7.469858660 [7,] -3.008662028 -5.259659222 [8,] -1.939260344 -3.008662028 [9,] -2.108662028 -1.939260344 [10,] -2.118861467 -2.108662028 [11,] -1.639260344 -2.118861467 [12,] -0.969858660 -1.639260344 [13,] -1.069858660 -0.969858660 [14,] -1.190257538 -1.069858660 [15,] -1.680058099 -1.190257538 [16,] -2.449459783 -1.680058099 [17,] -2.718861467 -2.449459783 [18,] 0.250540217 -2.718861467 [19,] 3.889343585 0.250540217 [20,] 4.530141340 3.889343585 [21,] 4.530141340 4.530141340 [22,] 4.050540217 4.530141340 [23,] 4.130141340 4.050540217 [24,] 3.950540217 4.130141340 [25,] 3.540340778 3.950540217 [26,] 2.460739656 3.540340778 [27,] 1.740340778 2.460739656 [28,] 0.919941901 1.740340778 [29,] 0.499543023 0.919941901 [30,] 2.599543023 0.499543023 [31,] 5.230141340 2.599543023 [32,] 6.030141340 5.230141340 [33,] 5.360739656 6.030141340 [34,] 4.370939094 5.360739656 [35,] 3.591337972 4.370939094 [36,] 3.291337972 3.591337972 [37,] 2.611736849 3.291337972 [38,] 1.811736849 2.611736849 [39,] 0.921936288 1.811736849 [40,] -0.357664835 0.921936288 [41,] -1.427066519 -0.357664835 [42,] 0.503531797 -1.427066519 [43,] 3.593332358 0.503531797 [44,] 4.283132920 3.593332358 [45,] 3.883132920 4.283132920 [46,] 3.172933481 3.883132920 [47,] 2.652534604 3.172933481 [48,] 2.442335165 2.652534604 [49,] 1.742335165 2.442335165 [50,] 0.821936288 1.742335165 [51,] 0.181138533 0.821936288 [52,] -0.729060906 0.181138533 [53,] -1.508662028 -0.729060906 [54,] 0.432135726 -1.508662028 [55,] 3.162734042 0.432135726 [56,] 4.232135726 3.162734042 [57,] 4.260739656 4.232135726 [58,] 3.270939094 4.260739656 [59,] 2.670939094 3.270939094 [60,] 2.270939094 2.670939094 [61,] 1.591337972 2.270939094 [62,] 0.452534604 1.591337972 [63,] -0.427066519 0.452534604 [64,] -0.957664835 -0.427066519 [65,] -1.278063712 -0.957664835 [66,] 0.991337972 -1.278063712 [67,] 3.511736849 0.991337972 [68,] 4.321936288 3.511736849 [69,] 3.362734042 4.321936288 [70,] 2.252534604 3.362734042 [71,] 1.093332358 2.252534604 [72,] 0.334130113 1.093332358 [73,] 0.003531797 0.334130113 [74,] -0.516867080 0.003531797 [75,] -1.047465396 -0.516867080 [76,] -1.747465396 -1.047465396 [77,] -2.437265958 -1.747465396 [78,] -0.137265958 -2.437265958 [79,] 3.483132920 -0.137265958 [80,] 4.803531797 3.483132920 [81,] 3.913731236 4.803531797 [82,] 2.723930674 3.913731236 [83,] 2.413731236 2.723930674 [84,] 2.483132920 2.413731236 [85,] 2.083132920 2.483132920 [86,] 1.952534604 2.083132920 [87,] 1.572933481 1.952534604 [88,] 0.503531797 1.572933481 [89,] -0.786268764 0.503531797 [90,] 0.613731236 -0.786268764 [91,] 1.793332358 0.613731236 [92,] 0.752534604 1.793332358 [93,] -1.657664835 0.752534604 [94,] -3.478063712 -1.657664835 [95,] -3.929060906 -3.478063712 [96,] -5.745471010 -3.929060906 [97,] -4.329060906 -5.745471010 [98,] -4.569858660 -4.329060906 [99,] -5.049459783 -4.569858660 [100,] -5.459659222 -5.049459783 [101,] -4.720855854 -5.459659222 [102,] -1.488263151 -4.720855854 [103,] 2.828146953 -1.488263151 [104,] 2.077149759 2.828146953 [105,] -0.692251925 2.077149759 [106,] -2.892251925 -0.692251925 [107,] -4.720855854 -2.892251925 [108,] -5.490257538 -4.720855854 [109,] -5.769858660 -5.490257538 [110,] -5.539260344 -5.769858660 [111,] -3.510656415 -5.539260344 [112,] -3.531055293 -3.510656415 [113,] -4.520855854 -3.531055293 [114,] -2.700456977 -4.520855854 [115,] -1.769858660 -2.700456977 [116,] -1.508662028 -1.769858660 [117,] -0.108662028 -1.508662028 [118,] -0.798462590 -0.108662028 [119,] -0.718861467 -0.798462590 [120,] -0.980058099 -0.718861467 [121,] -1.869858660 -0.980058099 [122,] -2.569858660 -1.869858660 [123,] -3.978063712 -2.569858660 [124,] -5.157664835 -3.978063712 [125,] -6.296468203 -5.157664835 [126,] -2.327066519 -6.296468203 [127,] -1.647465396 -2.327066519 [128,] -2.037265958 -1.647465396 [129,] -2.547465396 -2.037265958 [130,] -2.927066519 -2.547465396 [131,] -1.747465396 -2.927066519 [132,] -0.137265958 -1.747465396 [133,] 0.721936288 -0.137265958 [134,] 0.311736849 0.721936288 [135,] -0.967864274 0.311736849 [136,] -2.506667642 -0.967864274 [137,] -1.867864274 -2.506667642 [138,] 3.142335165 -1.867864274 [139,] 4.421936288 3.142335165 [140,] 4.411736849 4.421936288 [141,] 3.142335165 4.411736849 [142,] 2.001537410 3.142335165 [143,] 1.311736849 2.001537410 [144,] 0.042335165 1.311736849 [145,] -1.137265958 0.042335165 [146,] -2.616867080 -1.137265958 [147,] -2.988263151 -2.616867080 [148,] -2.759659222 -2.988263151 [149,] -2.118861467 -2.759659222 [150,] 3.770939094 -2.118861467 [151,] 5.381138533 3.770939094 [152,] 5.301537410 5.381138533 [153,] 4.209742462 5.301537410 [154,] 2.150540217 4.209742462 [155,] 1.091337972 2.150540217 [156,] 0.581138533 1.091337972 [157,] 0.550540217 0.581138533 [158,] 0.899543023 0.550540217 [159,] 0.640340778 0.899543023 [160,] -0.049459783 0.640340778 [161,] 0.009742462 -0.049459783 [162,] 3.609742462 0.009742462 [163,] 4.189343585 3.609742462 [164,] 4.279144146 4.189343585 [165,] 2.960739656 4.279144146 [166,] 2.050540217 2.960739656 [167,] 2.099543023 2.050540217 [168,] 1.099543023 2.099543023 [169,] 0.799543023 1.099543023 [170,] -0.539260344 0.799543023 [171,] -0.380058099 -0.539260344 [172,] -0.600456977 -0.380058099 [173,] -0.869858660 -0.600456977 [174,] 2.840340778 -0.869858660 [175,] 3.450540217 2.840340778 [176,] 2.791337972 3.450540217 [177,] 1.011736849 2.791337972 [178,] -0.218861467 1.011736849 [179,] -1.229060906 -0.218861467 [180,] -1.788263151 -1.229060906 [181,] -1.898462590 -1.788263151 [182,] -1.698462590 -1.898462590 [183,] -0.398462590 -1.698462590 [184,] -1.547465396 -0.398462590 [185,] -2.347465396 -1.547465396 [186,] 0.352534604 -2.347465396 [187,] -0.337265958 0.352534604 [188,] -1.557664835 -0.337265958 [189,] -1.839260344 -1.557664835 [190,] -2.310656415 -1.839260344 [191,] -2.031055293 -2.310656415 [192,] -1.371853047 -2.031055293 [193,] -1.882052486 -1.371853047 [194,] -2.663647995 -1.882052486 [195,] -3.933049679 -2.663647995 [196,] -3.935044066 -3.933049679 [197,] -1.406440137 -3.935044066 [198,] 5.483360425 -1.406440137 [199,] 6.634357618 5.483360425 [200,] 5.224158179 6.634357618 [201,] 1.895554250 5.224158179 [202,] -2.441254731 1.895554250 [203,] -2.190257538 -2.441254731 [204,] -0.229060906 -2.190257538 [205,] 0.991337972 -0.229060906 [206,] 0.123930674 0.991337972 [207,] -0.686268764 0.123930674 [208,] -2.994473816 -0.686268764 [209,] -3.212878307 -2.994473816 [210,] 0.058517764 -3.212878307 [211,] 1.456523377 0.058517764 [212,] 0.387121693 1.456523377 [213,] -1.523077746 0.387121693 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -5.629060906 -5.029060906 2 -6.080058099 -5.629060906 3 -6.780058099 -6.080058099 4 -7.190257538 -6.780058099 5 -7.469858660 -7.190257538 6 -5.259659222 -7.469858660 7 -3.008662028 -5.259659222 8 -1.939260344 -3.008662028 9 -2.108662028 -1.939260344 10 -2.118861467 -2.108662028 11 -1.639260344 -2.118861467 12 -0.969858660 -1.639260344 13 -1.069858660 -0.969858660 14 -1.190257538 -1.069858660 15 -1.680058099 -1.190257538 16 -2.449459783 -1.680058099 17 -2.718861467 -2.449459783 18 0.250540217 -2.718861467 19 3.889343585 0.250540217 20 4.530141340 3.889343585 21 4.530141340 4.530141340 22 4.050540217 4.530141340 23 4.130141340 4.050540217 24 3.950540217 4.130141340 25 3.540340778 3.950540217 26 2.460739656 3.540340778 27 1.740340778 2.460739656 28 0.919941901 1.740340778 29 0.499543023 0.919941901 30 2.599543023 0.499543023 31 5.230141340 2.599543023 32 6.030141340 5.230141340 33 5.360739656 6.030141340 34 4.370939094 5.360739656 35 3.591337972 4.370939094 36 3.291337972 3.591337972 37 2.611736849 3.291337972 38 1.811736849 2.611736849 39 0.921936288 1.811736849 40 -0.357664835 0.921936288 41 -1.427066519 -0.357664835 42 0.503531797 -1.427066519 43 3.593332358 0.503531797 44 4.283132920 3.593332358 45 3.883132920 4.283132920 46 3.172933481 3.883132920 47 2.652534604 3.172933481 48 2.442335165 2.652534604 49 1.742335165 2.442335165 50 0.821936288 1.742335165 51 0.181138533 0.821936288 52 -0.729060906 0.181138533 53 -1.508662028 -0.729060906 54 0.432135726 -1.508662028 55 3.162734042 0.432135726 56 4.232135726 3.162734042 57 4.260739656 4.232135726 58 3.270939094 4.260739656 59 2.670939094 3.270939094 60 2.270939094 2.670939094 61 1.591337972 2.270939094 62 0.452534604 1.591337972 63 -0.427066519 0.452534604 64 -0.957664835 -0.427066519 65 -1.278063712 -0.957664835 66 0.991337972 -1.278063712 67 3.511736849 0.991337972 68 4.321936288 3.511736849 69 3.362734042 4.321936288 70 2.252534604 3.362734042 71 1.093332358 2.252534604 72 0.334130113 1.093332358 73 0.003531797 0.334130113 74 -0.516867080 0.003531797 75 -1.047465396 -0.516867080 76 -1.747465396 -1.047465396 77 -2.437265958 -1.747465396 78 -0.137265958 -2.437265958 79 3.483132920 -0.137265958 80 4.803531797 3.483132920 81 3.913731236 4.803531797 82 2.723930674 3.913731236 83 2.413731236 2.723930674 84 2.483132920 2.413731236 85 2.083132920 2.483132920 86 1.952534604 2.083132920 87 1.572933481 1.952534604 88 0.503531797 1.572933481 89 -0.786268764 0.503531797 90 0.613731236 -0.786268764 91 1.793332358 0.613731236 92 0.752534604 1.793332358 93 -1.657664835 0.752534604 94 -3.478063712 -1.657664835 95 -3.929060906 -3.478063712 96 -5.745471010 -3.929060906 97 -4.329060906 -5.745471010 98 -4.569858660 -4.329060906 99 -5.049459783 -4.569858660 100 -5.459659222 -5.049459783 101 -4.720855854 -5.459659222 102 -1.488263151 -4.720855854 103 2.828146953 -1.488263151 104 2.077149759 2.828146953 105 -0.692251925 2.077149759 106 -2.892251925 -0.692251925 107 -4.720855854 -2.892251925 108 -5.490257538 -4.720855854 109 -5.769858660 -5.490257538 110 -5.539260344 -5.769858660 111 -3.510656415 -5.539260344 112 -3.531055293 -3.510656415 113 -4.520855854 -3.531055293 114 -2.700456977 -4.520855854 115 -1.769858660 -2.700456977 116 -1.508662028 -1.769858660 117 -0.108662028 -1.508662028 118 -0.798462590 -0.108662028 119 -0.718861467 -0.798462590 120 -0.980058099 -0.718861467 121 -1.869858660 -0.980058099 122 -2.569858660 -1.869858660 123 -3.978063712 -2.569858660 124 -5.157664835 -3.978063712 125 -6.296468203 -5.157664835 126 -2.327066519 -6.296468203 127 -1.647465396 -2.327066519 128 -2.037265958 -1.647465396 129 -2.547465396 -2.037265958 130 -2.927066519 -2.547465396 131 -1.747465396 -2.927066519 132 -0.137265958 -1.747465396 133 0.721936288 -0.137265958 134 0.311736849 0.721936288 135 -0.967864274 0.311736849 136 -2.506667642 -0.967864274 137 -1.867864274 -2.506667642 138 3.142335165 -1.867864274 139 4.421936288 3.142335165 140 4.411736849 4.421936288 141 3.142335165 4.411736849 142 2.001537410 3.142335165 143 1.311736849 2.001537410 144 0.042335165 1.311736849 145 -1.137265958 0.042335165 146 -2.616867080 -1.137265958 147 -2.988263151 -2.616867080 148 -2.759659222 -2.988263151 149 -2.118861467 -2.759659222 150 3.770939094 -2.118861467 151 5.381138533 3.770939094 152 5.301537410 5.381138533 153 4.209742462 5.301537410 154 2.150540217 4.209742462 155 1.091337972 2.150540217 156 0.581138533 1.091337972 157 0.550540217 0.581138533 158 0.899543023 0.550540217 159 0.640340778 0.899543023 160 -0.049459783 0.640340778 161 0.009742462 -0.049459783 162 3.609742462 0.009742462 163 4.189343585 3.609742462 164 4.279144146 4.189343585 165 2.960739656 4.279144146 166 2.050540217 2.960739656 167 2.099543023 2.050540217 168 1.099543023 2.099543023 169 0.799543023 1.099543023 170 -0.539260344 0.799543023 171 -0.380058099 -0.539260344 172 -0.600456977 -0.380058099 173 -0.869858660 -0.600456977 174 2.840340778 -0.869858660 175 3.450540217 2.840340778 176 2.791337972 3.450540217 177 1.011736849 2.791337972 178 -0.218861467 1.011736849 179 -1.229060906 -0.218861467 180 -1.788263151 -1.229060906 181 -1.898462590 -1.788263151 182 -1.698462590 -1.898462590 183 -0.398462590 -1.698462590 184 -1.547465396 -0.398462590 185 -2.347465396 -1.547465396 186 0.352534604 -2.347465396 187 -0.337265958 0.352534604 188 -1.557664835 -0.337265958 189 -1.839260344 -1.557664835 190 -2.310656415 -1.839260344 191 -2.031055293 -2.310656415 192 -1.371853047 -2.031055293 193 -1.882052486 -1.371853047 194 -2.663647995 -1.882052486 195 -3.933049679 -2.663647995 196 -3.935044066 -3.933049679 197 -1.406440137 -3.935044066 198 5.483360425 -1.406440137 199 6.634357618 5.483360425 200 5.224158179 6.634357618 201 1.895554250 5.224158179 202 -2.441254731 1.895554250 203 -2.190257538 -2.441254731 204 -0.229060906 -2.190257538 205 0.991337972 -0.229060906 206 0.123930674 0.991337972 207 -0.686268764 0.123930674 208 -2.994473816 -0.686268764 209 -3.212878307 -2.994473816 210 0.058517764 -3.212878307 211 1.456523377 0.058517764 212 0.387121693 1.456523377 213 -1.523077746 0.387121693 > 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/www/html/rcomp/tmp/7rgoq1262132558.ps",horizontal=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/www/html/rcomp/tmp/8v13k1262132558.ps",horizontal=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/www/html/rcomp/tmp/97d891262132558.ps",horizontal=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/www/html/rcomp/tmp/105cb51262132558.ps",horizontal=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/www/html/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/html/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/www/html/rcomp/tmp/11ypjb1262132558.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/www/html/rcomp/tmp/12l64d1262132558.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/www/html/rcomp/tmp/13jznc1262132559.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/www/html/rcomp/tmp/14z5cf1262132559.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/www/html/rcomp/tmp/15y22e1262132559.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/www/html/rcomp/tmp/16zuwa1262132559.tab") + } > try(system("convert tmp/1mwzv1262132558.ps tmp/1mwzv1262132558.png",intern=TRUE)) character(0) > try(system("convert tmp/2m54a1262132558.ps tmp/2m54a1262132558.png",intern=TRUE)) character(0) > try(system("convert tmp/3v20s1262132558.ps tmp/3v20s1262132558.png",intern=TRUE)) character(0) > try(system("convert tmp/4kdeu1262132558.ps tmp/4kdeu1262132558.png",intern=TRUE)) character(0) > try(system("convert tmp/5tv2j1262132558.ps tmp/5tv2j1262132558.png",intern=TRUE)) character(0) > try(system("convert tmp/6u1011262132558.ps tmp/6u1011262132558.png",intern=TRUE)) character(0) > try(system("convert tmp/7rgoq1262132558.ps tmp/7rgoq1262132558.png",intern=TRUE)) character(0) > try(system("convert tmp/8v13k1262132558.ps tmp/8v13k1262132558.png",intern=TRUE)) character(0) > try(system("convert tmp/97d891262132558.ps tmp/97d891262132558.png",intern=TRUE)) character(0) > try(system("convert tmp/105cb51262132558.ps tmp/105cb51262132558.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 5.032 1.839 5.992