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(206010 + ,0 + ,198112 + ,0 + ,194519 + ,0 + ,185705 + ,0 + ,180173 + ,0 + ,176142 + ,0 + ,203401 + ,0 + ,221902 + ,0 + ,197378 + ,0 + ,185001 + ,0 + ,176356 + ,0 + ,180449 + ,0 + ,180144 + ,0 + ,173666 + ,0 + ,165688 + ,0 + ,161570 + ,0 + ,156145 + ,0 + ,153730 + ,0 + ,182698 + ,0 + ,200765 + ,0 + ,176512 + ,0 + ,166618 + ,0 + ,158644 + ,0 + ,159585 + ,0 + ,163095 + ,0 + ,159044 + ,0 + ,155511 + ,0 + ,153745 + ,0 + ,150569 + ,0 + ,150605 + ,0 + ,179612 + ,0 + ,194690 + ,0 + ,189917 + ,0 + ,184128 + ,0 + ,175335 + ,0 + ,179566 + ,0 + ,181140 + ,0 + ,177876 + ,0 + ,175041 + ,0 + ,169292 + ,0 + ,166070 + ,0 + ,166972 + ,0 + ,206348 + ,0 + ,215706 + ,0 + ,202108 + ,0 + ,195411 + ,0 + ,193111 + ,0 + ,195198 + ,0 + ,198770 + ,0 + ,194163 + ,0 + ,190420 + ,0 + ,189733 + ,0 + ,186029 + ,0 + ,191531 + ,0 + ,232571 + ,0 + ,243477 + ,0 + ,227247 + ,0 + ,217859 + ,0 + ,208679 + ,0 + ,213188 + ,0 + ,216234 + ,0 + ,213586 + ,0 + ,209465 + ,0 + ,204045 + ,0 + ,200237 + ,0 + ,203666 + ,0 + ,241476 + ,0 + ,260307 + ,0 + ,243324 + ,0 + ,244460 + ,0 + ,233575 + ,0 + ,237217 + ,0 + ,235243 + ,0 + ,230354 + ,0 + ,227184 + ,0 + ,221678 + ,0 + ,217142 + ,0 + ,219452 + ,0 + ,256446 + ,0 + ,265845 + ,0 + ,248624 + ,0 + ,241114 + ,0 + ,229245 + ,0 + ,231805 + ,0 + ,219277 + ,0 + ,219313 + ,0 + ,212610 + ,0 + ,214771 + ,0 + ,211142 + ,0 + ,211457 + ,0 + ,240048 + ,0 + ,240636 + ,0 + ,230580 + ,0 + ,208795 + ,0 + ,197922 + ,0 + ,194596 + ,0 + ,194581 + ,0 + ,185686 + ,0 + ,178106 + ,0 + ,172608 + ,0 + ,167302 + ,0 + ,168053 + ,0 + ,202300 + ,0 + ,202388 + ,0 + ,182516 + ,0 + ,173476 + ,0 + ,166444 + ,0 + ,171297 + ,0 + ,169701 + ,0 + ,164182 + ,0 + ,161914 + ,0 + ,159612 + ,0 + ,151001 + ,0 + ,158114 + ,0 + ,186530 + ,1 + ,187069 + ,1 + ,174330 + ,1 + ,169362 + ,1 + ,166827 + ,1 + ,178037 + ,1 + ,186413 + ,1 + ,189226 + ,1 + ,191563 + ,1 + ,188906 + ,1 + ,186005 + ,1 + ,195309 + ,1 + ,223532 + ,1 + ,226899 + ,1 + ,214126 + ,1 + ,206903 + ,1 + ,204442 + ,1 + ,220375 + ,1 + ,214320 + ,1 + ,212588 + ,1 + ,205816 + ,1 + ,202196 + ,1 + ,195722 + ,1 + ,198563 + ,1 + ,229139 + ,1 + ,229527 + ,1 + ,211868 + ,1 + ,203555 + ,1 + ,195770 + ,1) + ,dim=c(2 + ,143) + ,dimnames=list(c('Werkloosheid' + ,'Dummy_crisis') + ,1:143)) > y <- array(NA,dim=c(2,143),dimnames=list(c('Werkloosheid','Dummy_crisis'),1:143)) > for (i in 1:dim(x)[1]) + { + for (j in 1:dim(x)[2]) + { + y[i,j] <- as.numeric(x[i,j]) + } + } > par3 = 'Linear Trend' > par2 = 'Include Monthly 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 Werkloosheid Dummy_crisis M1 M2 M3 M4 M5 M6 M7 M8 M9 M10 M11 t 1 206010 0 1 0 0 0 0 0 0 0 0 0 0 1 2 198112 0 0 1 0 0 0 0 0 0 0 0 0 2 3 194519 0 0 0 1 0 0 0 0 0 0 0 0 3 4 185705 0 0 0 0 1 0 0 0 0 0 0 0 4 5 180173 0 0 0 0 0 1 0 0 0 0 0 0 5 6 176142 0 0 0 0 0 0 1 0 0 0 0 0 6 7 203401 0 0 0 0 0 0 0 1 0 0 0 0 7 8 221902 0 0 0 0 0 0 0 0 1 0 0 0 8 9 197378 0 0 0 0 0 0 0 0 0 1 0 0 9 10 185001 0 0 0 0 0 0 0 0 0 0 1 0 10 11 176356 0 0 0 0 0 0 0 0 0 0 0 1 11 12 180449 0 0 0 0 0 0 0 0 0 0 0 0 12 13 180144 0 1 0 0 0 0 0 0 0 0 0 0 13 14 173666 0 0 1 0 0 0 0 0 0 0 0 0 14 15 165688 0 0 0 1 0 0 0 0 0 0 0 0 15 16 161570 0 0 0 0 1 0 0 0 0 0 0 0 16 17 156145 0 0 0 0 0 1 0 0 0 0 0 0 17 18 153730 0 0 0 0 0 0 1 0 0 0 0 0 18 19 182698 0 0 0 0 0 0 0 1 0 0 0 0 19 20 200765 0 0 0 0 0 0 0 0 1 0 0 0 20 21 176512 0 0 0 0 0 0 0 0 0 1 0 0 21 22 166618 0 0 0 0 0 0 0 0 0 0 1 0 22 23 158644 0 0 0 0 0 0 0 0 0 0 0 1 23 24 159585 0 0 0 0 0 0 0 0 0 0 0 0 24 25 163095 0 1 0 0 0 0 0 0 0 0 0 0 25 26 159044 0 0 1 0 0 0 0 0 0 0 0 0 26 27 155511 0 0 0 1 0 0 0 0 0 0 0 0 27 28 153745 0 0 0 0 1 0 0 0 0 0 0 0 28 29 150569 0 0 0 0 0 1 0 0 0 0 0 0 29 30 150605 0 0 0 0 0 0 1 0 0 0 0 0 30 31 179612 0 0 0 0 0 0 0 1 0 0 0 0 31 32 194690 0 0 0 0 0 0 0 0 1 0 0 0 32 33 189917 0 0 0 0 0 0 0 0 0 1 0 0 33 34 184128 0 0 0 0 0 0 0 0 0 0 1 0 34 35 175335 0 0 0 0 0 0 0 0 0 0 0 1 35 36 179566 0 0 0 0 0 0 0 0 0 0 0 0 36 37 181140 0 1 0 0 0 0 0 0 0 0 0 0 37 38 177876 0 0 1 0 0 0 0 0 0 0 0 0 38 39 175041 0 0 0 1 0 0 0 0 0 0 0 0 39 40 169292 0 0 0 0 1 0 0 0 0 0 0 0 40 41 166070 0 0 0 0 0 1 0 0 0 0 0 0 41 42 166972 0 0 0 0 0 0 1 0 0 0 0 0 42 43 206348 0 0 0 0 0 0 0 1 0 0 0 0 43 44 215706 0 0 0 0 0 0 0 0 1 0 0 0 44 45 202108 0 0 0 0 0 0 0 0 0 1 0 0 45 46 195411 0 0 0 0 0 0 0 0 0 0 1 0 46 47 193111 0 0 0 0 0 0 0 0 0 0 0 1 47 48 195198 0 0 0 0 0 0 0 0 0 0 0 0 48 49 198770 0 1 0 0 0 0 0 0 0 0 0 0 49 50 194163 0 0 1 0 0 0 0 0 0 0 0 0 50 51 190420 0 0 0 1 0 0 0 0 0 0 0 0 51 52 189733 0 0 0 0 1 0 0 0 0 0 0 0 52 53 186029 0 0 0 0 0 1 0 0 0 0 0 0 53 54 191531 0 0 0 0 0 0 1 0 0 0 0 0 54 55 232571 0 0 0 0 0 0 0 1 0 0 0 0 55 56 243477 0 0 0 0 0 0 0 0 1 0 0 0 56 57 227247 0 0 0 0 0 0 0 0 0 1 0 0 57 58 217859 0 0 0 0 0 0 0 0 0 0 1 0 58 59 208679 0 0 0 0 0 0 0 0 0 0 0 1 59 60 213188 0 0 0 0 0 0 0 0 0 0 0 0 60 61 216234 0 1 0 0 0 0 0 0 0 0 0 0 61 62 213586 0 0 1 0 0 0 0 0 0 0 0 0 62 63 209465 0 0 0 1 0 0 0 0 0 0 0 0 63 64 204045 0 0 0 0 1 0 0 0 0 0 0 0 64 65 200237 0 0 0 0 0 1 0 0 0 0 0 0 65 66 203666 0 0 0 0 0 0 1 0 0 0 0 0 66 67 241476 0 0 0 0 0 0 0 1 0 0 0 0 67 68 260307 0 0 0 0 0 0 0 0 1 0 0 0 68 69 243324 0 0 0 0 0 0 0 0 0 1 0 0 69 70 244460 0 0 0 0 0 0 0 0 0 0 1 0 70 71 233575 0 0 0 0 0 0 0 0 0 0 0 1 71 72 237217 0 0 0 0 0 0 0 0 0 0 0 0 72 73 235243 0 1 0 0 0 0 0 0 0 0 0 0 73 74 230354 0 0 1 0 0 0 0 0 0 0 0 0 74 75 227184 0 0 0 1 0 0 0 0 0 0 0 0 75 76 221678 0 0 0 0 1 0 0 0 0 0 0 0 76 77 217142 0 0 0 0 0 1 0 0 0 0 0 0 77 78 219452 0 0 0 0 0 0 1 0 0 0 0 0 78 79 256446 0 0 0 0 0 0 0 1 0 0 0 0 79 80 265845 0 0 0 0 0 0 0 0 1 0 0 0 80 81 248624 0 0 0 0 0 0 0 0 0 1 0 0 81 82 241114 0 0 0 0 0 0 0 0 0 0 1 0 82 83 229245 0 0 0 0 0 0 0 0 0 0 0 1 83 84 231805 0 0 0 0 0 0 0 0 0 0 0 0 84 85 219277 0 1 0 0 0 0 0 0 0 0 0 0 85 86 219313 0 0 1 0 0 0 0 0 0 0 0 0 86 87 212610 0 0 0 1 0 0 0 0 0 0 0 0 87 88 214771 0 0 0 0 1 0 0 0 0 0 0 0 88 89 211142 0 0 0 0 0 1 0 0 0 0 0 0 89 90 211457 0 0 0 0 0 0 1 0 0 0 0 0 90 91 240048 0 0 0 0 0 0 0 1 0 0 0 0 91 92 240636 0 0 0 0 0 0 0 0 1 0 0 0 92 93 230580 0 0 0 0 0 0 0 0 0 1 0 0 93 94 208795 0 0 0 0 0 0 0 0 0 0 1 0 94 95 197922 0 0 0 0 0 0 0 0 0 0 0 1 95 96 194596 0 0 0 0 0 0 0 0 0 0 0 0 96 97 194581 0 1 0 0 0 0 0 0 0 0 0 0 97 98 185686 0 0 1 0 0 0 0 0 0 0 0 0 98 99 178106 0 0 0 1 0 0 0 0 0 0 0 0 99 100 172608 0 0 0 0 1 0 0 0 0 0 0 0 100 101 167302 0 0 0 0 0 1 0 0 0 0 0 0 101 102 168053 0 0 0 0 0 0 1 0 0 0 0 0 102 103 202300 0 0 0 0 0 0 0 1 0 0 0 0 103 104 202388 0 0 0 0 0 0 0 0 1 0 0 0 104 105 182516 0 0 0 0 0 0 0 0 0 1 0 0 105 106 173476 0 0 0 0 0 0 0 0 0 0 1 0 106 107 166444 0 0 0 0 0 0 0 0 0 0 0 1 107 108 171297 0 0 0 0 0 0 0 0 0 0 0 0 108 109 169701 0 1 0 0 0 0 0 0 0 0 0 0 109 110 164182 0 0 1 0 0 0 0 0 0 0 0 0 110 111 161914 0 0 0 1 0 0 0 0 0 0 0 0 111 112 159612 0 0 0 0 1 0 0 0 0 0 0 0 112 113 151001 0 0 0 0 0 1 0 0 0 0 0 0 113 114 158114 0 0 0 0 0 0 1 0 0 0 0 0 114 115 186530 1 0 0 0 0 0 0 1 0 0 0 0 115 116 187069 1 0 0 0 0 0 0 0 1 0 0 0 116 117 174330 1 0 0 0 0 0 0 0 0 1 0 0 117 118 169362 1 0 0 0 0 0 0 0 0 0 1 0 118 119 166827 1 0 0 0 0 0 0 0 0 0 0 1 119 120 178037 1 0 0 0 0 0 0 0 0 0 0 0 120 121 186413 1 1 0 0 0 0 0 0 0 0 0 0 121 122 189226 1 0 1 0 0 0 0 0 0 0 0 0 122 123 191563 1 0 0 1 0 0 0 0 0 0 0 0 123 124 188906 1 0 0 0 1 0 0 0 0 0 0 0 124 125 186005 1 0 0 0 0 1 0 0 0 0 0 0 125 126 195309 1 0 0 0 0 0 1 0 0 0 0 0 126 127 223532 1 0 0 0 0 0 0 1 0 0 0 0 127 128 226899 1 0 0 0 0 0 0 0 1 0 0 0 128 129 214126 1 0 0 0 0 0 0 0 0 1 0 0 129 130 206903 1 0 0 0 0 0 0 0 0 0 1 0 130 131 204442 1 0 0 0 0 0 0 0 0 0 0 1 131 132 220375 1 0 0 0 0 0 0 0 0 0 0 0 132 133 214320 1 1 0 0 0 0 0 0 0 0 0 0 133 134 212588 1 0 1 0 0 0 0 0 0 0 0 0 134 135 205816 1 0 0 1 0 0 0 0 0 0 0 0 135 136 202196 1 0 0 0 1 0 0 0 0 0 0 0 136 137 195722 1 0 0 0 0 1 0 0 0 0 0 0 137 138 198563 1 0 0 0 0 0 1 0 0 0 0 0 138 139 229139 1 0 0 0 0 0 0 1 0 0 0 0 139 140 229527 1 0 0 0 0 0 0 0 1 0 0 0 140 141 211868 1 0 0 0 0 0 0 0 0 1 0 0 141 142 203555 1 0 0 0 0 0 0 0 0 0 1 0 142 143 195770 1 0 0 0 0 0 0 0 0 0 0 1 143 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) Dummy_crisis M1 M2 M3 181196.2 -17091.5 1612.8 -2570.4 -6989.1 M4 M5 M6 M7 M8 -10909.3 -15858.4 -13942.5 19768.6 28272.3 M9 M10 M11 t 12126.7 3383.9 -4399.2 255.5 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -43206 -17351 1739 17114 41996 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 181196.23 7910.81 22.905 < 2e-16 *** Dummy_crisis -17091.52 6639.10 -2.574 0.011171 * M1 1612.75 9529.67 0.169 0.865877 M2 -2570.39 9528.17 -0.270 0.787770 M3 -6989.12 9527.12 -0.734 0.464522 M4 -10909.26 9526.50 -1.145 0.254268 M5 -15858.40 9526.32 -1.665 0.098401 . M6 -13942.46 9526.57 -1.464 0.145754 M7 19768.60 9534.88 2.073 0.040135 * M8 28272.29 9533.40 2.966 0.003600 ** M9 12126.73 9532.36 1.272 0.205603 M10 3383.92 9531.76 0.355 0.723158 M11 -4399.22 9531.60 -0.462 0.645188 t 255.48 64.52 3.960 0.000123 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 22820 on 129 degrees of freedom Multiple R-squared: 0.3168, Adjusted R-squared: 0.2479 F-statistic: 4.601 on 13 and 129 DF, p-value: 1.892e-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,] 4.515884e-04 9.031768e-04 9.995484e-01 [2,] 5.485343e-05 1.097069e-04 9.999451e-01 [3,] 1.173666e-05 2.347331e-05 9.999883e-01 [4,] 1.567478e-06 3.134957e-06 9.999984e-01 [5,] 2.080358e-07 4.160715e-07 9.999998e-01 [6,] 6.755330e-08 1.351066e-07 9.999999e-01 [7,] 2.101879e-08 4.203758e-08 1.000000e+00 [8,] 2.409749e-09 4.819498e-09 1.000000e+00 [9,] 4.618110e-10 9.236219e-10 1.000000e+00 [10,] 2.554913e-10 5.109826e-10 1.000000e+00 [11,] 2.207987e-10 4.415973e-10 1.000000e+00 [12,] 7.929248e-10 1.585850e-09 1.000000e+00 [13,] 2.019930e-09 4.039859e-09 1.000000e+00 [14,] 6.405195e-09 1.281039e-08 1.000000e+00 [15,] 1.248895e-08 2.497789e-08 1.000000e+00 [16,] 7.576110e-09 1.515222e-08 1.000000e+00 [17,] 4.884794e-07 9.769588e-07 9.999995e-01 [18,] 9.197599e-06 1.839520e-05 9.999908e-01 [19,] 4.040368e-05 8.080736e-05 9.999596e-01 [20,] 1.209918e-04 2.419835e-04 9.998790e-01 [21,] 1.546803e-04 3.093606e-04 9.998453e-01 [22,] 2.060680e-04 4.121359e-04 9.997939e-01 [23,] 2.712469e-04 5.424938e-04 9.997288e-01 [24,] 3.091064e-04 6.182127e-04 9.996909e-01 [25,] 3.543661e-04 7.087321e-04 9.996456e-01 [26,] 4.853700e-04 9.707400e-04 9.995146e-01 [27,] 1.170521e-03 2.341041e-03 9.988295e-01 [28,] 1.374410e-03 2.748819e-03 9.986256e-01 [29,] 1.871771e-03 3.743542e-03 9.981282e-01 [30,] 2.684342e-03 5.368684e-03 9.973157e-01 [31,] 4.590185e-03 9.180370e-03 9.954098e-01 [32,] 6.850538e-03 1.370108e-02 9.931495e-01 [33,] 7.536349e-03 1.507270e-02 9.924637e-01 [34,] 8.451989e-03 1.690398e-02 9.915480e-01 [35,] 9.530377e-03 1.906075e-02 9.904696e-01 [36,] 1.182150e-02 2.364300e-02 9.881785e-01 [37,] 1.440139e-02 2.880278e-02 9.855986e-01 [38,] 2.114706e-02 4.229412e-02 9.788529e-01 [39,] 3.607344e-02 7.214688e-02 9.639266e-01 [40,] 4.432173e-02 8.864346e-02 9.556783e-01 [41,] 5.257421e-02 1.051484e-01 9.474258e-01 [42,] 5.934483e-02 1.186897e-01 9.406552e-01 [43,] 6.329993e-02 1.265999e-01 9.367001e-01 [44,] 6.822598e-02 1.364520e-01 9.317740e-01 [45,] 6.267504e-02 1.253501e-01 9.373250e-01 [46,] 5.932164e-02 1.186433e-01 9.406784e-01 [47,] 5.618079e-02 1.123616e-01 9.438192e-01 [48,] 5.396518e-02 1.079304e-01 9.460348e-01 [49,] 5.189244e-02 1.037849e-01 9.481076e-01 [50,] 5.343059e-02 1.068612e-01 9.465694e-01 [51,] 5.200725e-02 1.040145e-01 9.479927e-01 [52,] 5.082136e-02 1.016427e-01 9.491786e-01 [53,] 4.810322e-02 9.620645e-02 9.518968e-01 [54,] 5.645163e-02 1.129033e-01 9.435484e-01 [55,] 5.777463e-02 1.155493e-01 9.422254e-01 [56,] 5.842888e-02 1.168578e-01 9.415711e-01 [57,] 4.914959e-02 9.829919e-02 9.508504e-01 [58,] 4.043061e-02 8.086122e-02 9.595694e-01 [59,] 3.343704e-02 6.687408e-02 9.665630e-01 [60,] 2.664453e-02 5.328907e-02 9.733555e-01 [61,] 2.098045e-02 4.196089e-02 9.790196e-01 [62,] 1.649712e-02 3.299424e-02 9.835029e-01 [63,] 1.519924e-02 3.039849e-02 9.848008e-01 [64,] 1.566228e-02 3.132456e-02 9.843377e-01 [65,] 1.605471e-02 3.210942e-02 9.839453e-01 [66,] 1.875494e-02 3.750988e-02 9.812451e-01 [67,] 2.028934e-02 4.057867e-02 9.797107e-01 [68,] 2.269393e-02 4.538785e-02 9.773061e-01 [69,] 2.314009e-02 4.628018e-02 9.768599e-01 [70,] 2.441076e-02 4.882152e-02 9.755892e-01 [71,] 2.584214e-02 5.168427e-02 9.741579e-01 [72,] 3.160477e-02 6.320954e-02 9.683952e-01 [73,] 4.582831e-02 9.165662e-02 9.541717e-01 [74,] 6.511622e-02 1.302324e-01 9.348838e-01 [75,] 1.075092e-01 2.150183e-01 8.924908e-01 [76,] 2.129677e-01 4.259354e-01 7.870323e-01 [77,] 4.702435e-01 9.404871e-01 5.297565e-01 [78,] 7.097990e-01 5.804020e-01 2.902010e-01 [79,] 8.849497e-01 2.301007e-01 1.150503e-01 [80,] 9.395794e-01 1.208412e-01 6.042058e-02 [81,] 9.756884e-01 4.862317e-02 2.431158e-02 [82,] 9.886567e-01 2.268666e-02 1.134333e-02 [83,] 9.938214e-01 1.235718e-02 6.178588e-03 [84,] 9.963483e-01 7.303361e-03 3.651680e-03 [85,] 9.980409e-01 3.918236e-03 1.959118e-03 [86,] 9.985767e-01 2.846591e-03 1.423295e-03 [87,] 9.992886e-01 1.422849e-03 7.114245e-04 [88,] 9.997548e-01 4.903769e-04 2.451885e-04 [89,] 9.998963e-01 2.074756e-04 1.037378e-04 [90,] 9.999572e-01 8.559874e-05 4.279937e-05 [91,] 9.999828e-01 3.447889e-05 1.723945e-05 [92,] 9.999761e-01 4.789138e-05 2.394569e-05 [93,] 9.999648e-01 7.048080e-05 3.524040e-05 [94,] 9.999393e-01 1.213061e-04 6.065307e-05 [95,] 9.998882e-01 2.235658e-04 1.117829e-04 [96,] 9.997888e-01 4.224990e-04 2.112495e-04 [97,] 9.996035e-01 7.929457e-04 3.964729e-04 [98,] 9.992071e-01 1.585721e-03 7.928606e-04 [99,] 9.986912e-01 2.617645e-03 1.308823e-03 [100,] 9.982067e-01 3.586542e-03 1.793271e-03 [101,] 9.975000e-01 5.000039e-03 2.500020e-03 [102,] 9.964685e-01 7.063010e-03 3.531505e-03 [103,] 9.952073e-01 9.585437e-03 4.792718e-03 [104,] 9.989924e-01 2.015109e-03 1.007555e-03 [105,] 9.993843e-01 1.231393e-03 6.156966e-04 [106,] 9.996424e-01 7.152454e-04 3.576227e-04 [107,] 9.993629e-01 1.274160e-03 6.370802e-04 [108,] 9.990563e-01 1.887341e-03 9.436705e-04 [109,] 9.981315e-01 3.737015e-03 1.868508e-03 [110,] 9.907271e-01 1.854581e-02 9.272906e-03 > postscript(file="/var/www/html/rcomp/tmp/10tch1293091094.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/www/html/rcomp/tmp/20tch1293091094.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/www/html/rcomp/tmp/3t2uk1293091094.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/www/html/rcomp/tmp/4t2uk1293091094.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/www/html/rcomp/tmp/5t2uk1293091094.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 = 143 Frequency = 1 1 2 3 4 5 6 22945.5420 18975.2087 19545.4587 14396.1254 13557.7920 7355.3754 7 8 9 10 11 12 647.8316 10389.6650 1755.7483 -2133.9184 -3251.2517 -3812.9474 13 14 15 16 17 18 -5986.1785 -8536.5118 -12351.2618 -12804.5951 -13535.9285 -18122.3451 19 20 21 22 23 24 -23120.8889 -13813.0555 -22175.9722 -23582.6389 -24028.9722 -27742.6679 25 26 27 28 29 30 -26100.8990 -26224.2323 -25593.9823 -23695.3157 -22177.6490 -24313.0657 31 32 33 34 35 36 -29272.6094 -22953.7760 -11836.6927 -9138.3594 -10403.6927 -10827.3884 37 38 39 40 41 42 -11121.6195 -10457.9528 -9129.7028 -11214.0362 -9742.3695 -11011.7862 43 44 45 46 47 48 -5602.3299 -5003.4966 -2711.4132 -921.0799 4306.5868 1738.8911 49 50 51 52 53 54 3442.6600 2763.3266 3183.5766 6161.2433 7150.9100 10481.4933 55 56 57 58 59 60 17554.9496 19701.7829 19361.8663 18461.1996 16808.8663 16663.1706 61 62 63 64 65 66 17840.9395 19120.6061 19162.8561 17407.5228 18293.1895 19550.7728 67 68 69 70 71 72 23394.2291 33466.0624 32373.1457 41996.4791 38639.1457 37626.4500 73 74 75 76 77 78 33784.2190 32822.8856 33816.1356 31974.8023 32132.4690 32271.0523 79 80 81 82 83 84 35298.5086 35938.3419 34607.4252 35584.7586 31243.4252 29148.7295 85 86 87 88 89 90 14752.4984 18716.1651 16176.4151 22002.0818 23066.7484 21210.3318 91 92 93 94 95 96 15834.7880 7663.6214 13497.7047 200.0380 -3145.2953 -11125.9910 97 98 99 100 101 102 -13009.2221 -17976.5554 -21393.3054 -23226.6387 -23838.9721 -25259.3887 103 104 105 106 107 108 -24978.9325 -33650.0991 -37632.0158 -38184.6825 -37689.0158 -37490.7115 109 110 111 112 113 114 -40954.9426 -42546.2759 -40651.0259 -39288.3593 -43205.6926 -38264.1093 115 116 117 118 119 120 -26723.1282 -34943.2949 -31792.2116 -28272.8782 -23280.2116 -16724.9073 121 122 123 124 125 126 -10217.1384 -3476.4717 3023.7783 4031.4450 5824.1116 12956.6950 127 128 129 130 131 132 7213.1512 1820.9846 4938.0679 6202.4012 11269.0679 22547.3722 133 134 135 136 137 138 14624.1411 16819.8078 14211.0578 14255.7245 12475.3911 13144.9745 139 140 141 142 143 9754.4307 1383.2641 -385.6526 -211.3193 -468.6526 > postscript(file="/var/www/html/rcomp/tmp/64ct51293091094.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 = 143 Frequency = 1 lag(myerror, k = 1) myerror 0 22945.5420 NA 1 18975.2087 22945.5420 2 19545.4587 18975.2087 3 14396.1254 19545.4587 4 13557.7920 14396.1254 5 7355.3754 13557.7920 6 647.8316 7355.3754 7 10389.6650 647.8316 8 1755.7483 10389.6650 9 -2133.9184 1755.7483 10 -3251.2517 -2133.9184 11 -3812.9474 -3251.2517 12 -5986.1785 -3812.9474 13 -8536.5118 -5986.1785 14 -12351.2618 -8536.5118 15 -12804.5951 -12351.2618 16 -13535.9285 -12804.5951 17 -18122.3451 -13535.9285 18 -23120.8889 -18122.3451 19 -13813.0555 -23120.8889 20 -22175.9722 -13813.0555 21 -23582.6389 -22175.9722 22 -24028.9722 -23582.6389 23 -27742.6679 -24028.9722 24 -26100.8990 -27742.6679 25 -26224.2323 -26100.8990 26 -25593.9823 -26224.2323 27 -23695.3157 -25593.9823 28 -22177.6490 -23695.3157 29 -24313.0657 -22177.6490 30 -29272.6094 -24313.0657 31 -22953.7760 -29272.6094 32 -11836.6927 -22953.7760 33 -9138.3594 -11836.6927 34 -10403.6927 -9138.3594 35 -10827.3884 -10403.6927 36 -11121.6195 -10827.3884 37 -10457.9528 -11121.6195 38 -9129.7028 -10457.9528 39 -11214.0362 -9129.7028 40 -9742.3695 -11214.0362 41 -11011.7862 -9742.3695 42 -5602.3299 -11011.7862 43 -5003.4966 -5602.3299 44 -2711.4132 -5003.4966 45 -921.0799 -2711.4132 46 4306.5868 -921.0799 47 1738.8911 4306.5868 48 3442.6600 1738.8911 49 2763.3266 3442.6600 50 3183.5766 2763.3266 51 6161.2433 3183.5766 52 7150.9100 6161.2433 53 10481.4933 7150.9100 54 17554.9496 10481.4933 55 19701.7829 17554.9496 56 19361.8663 19701.7829 57 18461.1996 19361.8663 58 16808.8663 18461.1996 59 16663.1706 16808.8663 60 17840.9395 16663.1706 61 19120.6061 17840.9395 62 19162.8561 19120.6061 63 17407.5228 19162.8561 64 18293.1895 17407.5228 65 19550.7728 18293.1895 66 23394.2291 19550.7728 67 33466.0624 23394.2291 68 32373.1457 33466.0624 69 41996.4791 32373.1457 70 38639.1457 41996.4791 71 37626.4500 38639.1457 72 33784.2190 37626.4500 73 32822.8856 33784.2190 74 33816.1356 32822.8856 75 31974.8023 33816.1356 76 32132.4690 31974.8023 77 32271.0523 32132.4690 78 35298.5086 32271.0523 79 35938.3419 35298.5086 80 34607.4252 35938.3419 81 35584.7586 34607.4252 82 31243.4252 35584.7586 83 29148.7295 31243.4252 84 14752.4984 29148.7295 85 18716.1651 14752.4984 86 16176.4151 18716.1651 87 22002.0818 16176.4151 88 23066.7484 22002.0818 89 21210.3318 23066.7484 90 15834.7880 21210.3318 91 7663.6214 15834.7880 92 13497.7047 7663.6214 93 200.0380 13497.7047 94 -3145.2953 200.0380 95 -11125.9910 -3145.2953 96 -13009.2221 -11125.9910 97 -17976.5554 -13009.2221 98 -21393.3054 -17976.5554 99 -23226.6387 -21393.3054 100 -23838.9721 -23226.6387 101 -25259.3887 -23838.9721 102 -24978.9325 -25259.3887 103 -33650.0991 -24978.9325 104 -37632.0158 -33650.0991 105 -38184.6825 -37632.0158 106 -37689.0158 -38184.6825 107 -37490.7115 -37689.0158 108 -40954.9426 -37490.7115 109 -42546.2759 -40954.9426 110 -40651.0259 -42546.2759 111 -39288.3593 -40651.0259 112 -43205.6926 -39288.3593 113 -38264.1093 -43205.6926 114 -26723.1282 -38264.1093 115 -34943.2949 -26723.1282 116 -31792.2116 -34943.2949 117 -28272.8782 -31792.2116 118 -23280.2116 -28272.8782 119 -16724.9073 -23280.2116 120 -10217.1384 -16724.9073 121 -3476.4717 -10217.1384 122 3023.7783 -3476.4717 123 4031.4450 3023.7783 124 5824.1116 4031.4450 125 12956.6950 5824.1116 126 7213.1512 12956.6950 127 1820.9846 7213.1512 128 4938.0679 1820.9846 129 6202.4012 4938.0679 130 11269.0679 6202.4012 131 22547.3722 11269.0679 132 14624.1411 22547.3722 133 16819.8078 14624.1411 134 14211.0578 16819.8078 135 14255.7245 14211.0578 136 12475.3911 14255.7245 137 13144.9745 12475.3911 138 9754.4307 13144.9745 139 1383.2641 9754.4307 140 -385.6526 1383.2641 141 -211.3193 -385.6526 142 -468.6526 -211.3193 143 NA -468.6526 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 18975.2087 22945.5420 [2,] 19545.4587 18975.2087 [3,] 14396.1254 19545.4587 [4,] 13557.7920 14396.1254 [5,] 7355.3754 13557.7920 [6,] 647.8316 7355.3754 [7,] 10389.6650 647.8316 [8,] 1755.7483 10389.6650 [9,] -2133.9184 1755.7483 [10,] -3251.2517 -2133.9184 [11,] -3812.9474 -3251.2517 [12,] -5986.1785 -3812.9474 [13,] -8536.5118 -5986.1785 [14,] -12351.2618 -8536.5118 [15,] -12804.5951 -12351.2618 [16,] -13535.9285 -12804.5951 [17,] -18122.3451 -13535.9285 [18,] -23120.8889 -18122.3451 [19,] -13813.0555 -23120.8889 [20,] -22175.9722 -13813.0555 [21,] -23582.6389 -22175.9722 [22,] -24028.9722 -23582.6389 [23,] -27742.6679 -24028.9722 [24,] -26100.8990 -27742.6679 [25,] -26224.2323 -26100.8990 [26,] -25593.9823 -26224.2323 [27,] -23695.3157 -25593.9823 [28,] -22177.6490 -23695.3157 [29,] -24313.0657 -22177.6490 [30,] -29272.6094 -24313.0657 [31,] -22953.7760 -29272.6094 [32,] -11836.6927 -22953.7760 [33,] -9138.3594 -11836.6927 [34,] -10403.6927 -9138.3594 [35,] -10827.3884 -10403.6927 [36,] -11121.6195 -10827.3884 [37,] -10457.9528 -11121.6195 [38,] -9129.7028 -10457.9528 [39,] -11214.0362 -9129.7028 [40,] -9742.3695 -11214.0362 [41,] -11011.7862 -9742.3695 [42,] -5602.3299 -11011.7862 [43,] -5003.4966 -5602.3299 [44,] -2711.4132 -5003.4966 [45,] -921.0799 -2711.4132 [46,] 4306.5868 -921.0799 [47,] 1738.8911 4306.5868 [48,] 3442.6600 1738.8911 [49,] 2763.3266 3442.6600 [50,] 3183.5766 2763.3266 [51,] 6161.2433 3183.5766 [52,] 7150.9100 6161.2433 [53,] 10481.4933 7150.9100 [54,] 17554.9496 10481.4933 [55,] 19701.7829 17554.9496 [56,] 19361.8663 19701.7829 [57,] 18461.1996 19361.8663 [58,] 16808.8663 18461.1996 [59,] 16663.1706 16808.8663 [60,] 17840.9395 16663.1706 [61,] 19120.6061 17840.9395 [62,] 19162.8561 19120.6061 [63,] 17407.5228 19162.8561 [64,] 18293.1895 17407.5228 [65,] 19550.7728 18293.1895 [66,] 23394.2291 19550.7728 [67,] 33466.0624 23394.2291 [68,] 32373.1457 33466.0624 [69,] 41996.4791 32373.1457 [70,] 38639.1457 41996.4791 [71,] 37626.4500 38639.1457 [72,] 33784.2190 37626.4500 [73,] 32822.8856 33784.2190 [74,] 33816.1356 32822.8856 [75,] 31974.8023 33816.1356 [76,] 32132.4690 31974.8023 [77,] 32271.0523 32132.4690 [78,] 35298.5086 32271.0523 [79,] 35938.3419 35298.5086 [80,] 34607.4252 35938.3419 [81,] 35584.7586 34607.4252 [82,] 31243.4252 35584.7586 [83,] 29148.7295 31243.4252 [84,] 14752.4984 29148.7295 [85,] 18716.1651 14752.4984 [86,] 16176.4151 18716.1651 [87,] 22002.0818 16176.4151 [88,] 23066.7484 22002.0818 [89,] 21210.3318 23066.7484 [90,] 15834.7880 21210.3318 [91,] 7663.6214 15834.7880 [92,] 13497.7047 7663.6214 [93,] 200.0380 13497.7047 [94,] -3145.2953 200.0380 [95,] -11125.9910 -3145.2953 [96,] -13009.2221 -11125.9910 [97,] -17976.5554 -13009.2221 [98,] -21393.3054 -17976.5554 [99,] -23226.6387 -21393.3054 [100,] -23838.9721 -23226.6387 [101,] -25259.3887 -23838.9721 [102,] -24978.9325 -25259.3887 [103,] -33650.0991 -24978.9325 [104,] -37632.0158 -33650.0991 [105,] -38184.6825 -37632.0158 [106,] -37689.0158 -38184.6825 [107,] -37490.7115 -37689.0158 [108,] -40954.9426 -37490.7115 [109,] -42546.2759 -40954.9426 [110,] -40651.0259 -42546.2759 [111,] -39288.3593 -40651.0259 [112,] -43205.6926 -39288.3593 [113,] -38264.1093 -43205.6926 [114,] -26723.1282 -38264.1093 [115,] -34943.2949 -26723.1282 [116,] -31792.2116 -34943.2949 [117,] -28272.8782 -31792.2116 [118,] -23280.2116 -28272.8782 [119,] -16724.9073 -23280.2116 [120,] -10217.1384 -16724.9073 [121,] -3476.4717 -10217.1384 [122,] 3023.7783 -3476.4717 [123,] 4031.4450 3023.7783 [124,] 5824.1116 4031.4450 [125,] 12956.6950 5824.1116 [126,] 7213.1512 12956.6950 [127,] 1820.9846 7213.1512 [128,] 4938.0679 1820.9846 [129,] 6202.4012 4938.0679 [130,] 11269.0679 6202.4012 [131,] 22547.3722 11269.0679 [132,] 14624.1411 22547.3722 [133,] 16819.8078 14624.1411 [134,] 14211.0578 16819.8078 [135,] 14255.7245 14211.0578 [136,] 12475.3911 14255.7245 [137,] 13144.9745 12475.3911 [138,] 9754.4307 13144.9745 [139,] 1383.2641 9754.4307 [140,] -385.6526 1383.2641 [141,] -211.3193 -385.6526 [142,] -468.6526 -211.3193 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 18975.2087 22945.5420 2 19545.4587 18975.2087 3 14396.1254 19545.4587 4 13557.7920 14396.1254 5 7355.3754 13557.7920 6 647.8316 7355.3754 7 10389.6650 647.8316 8 1755.7483 10389.6650 9 -2133.9184 1755.7483 10 -3251.2517 -2133.9184 11 -3812.9474 -3251.2517 12 -5986.1785 -3812.9474 13 -8536.5118 -5986.1785 14 -12351.2618 -8536.5118 15 -12804.5951 -12351.2618 16 -13535.9285 -12804.5951 17 -18122.3451 -13535.9285 18 -23120.8889 -18122.3451 19 -13813.0555 -23120.8889 20 -22175.9722 -13813.0555 21 -23582.6389 -22175.9722 22 -24028.9722 -23582.6389 23 -27742.6679 -24028.9722 24 -26100.8990 -27742.6679 25 -26224.2323 -26100.8990 26 -25593.9823 -26224.2323 27 -23695.3157 -25593.9823 28 -22177.6490 -23695.3157 29 -24313.0657 -22177.6490 30 -29272.6094 -24313.0657 31 -22953.7760 -29272.6094 32 -11836.6927 -22953.7760 33 -9138.3594 -11836.6927 34 -10403.6927 -9138.3594 35 -10827.3884 -10403.6927 36 -11121.6195 -10827.3884 37 -10457.9528 -11121.6195 38 -9129.7028 -10457.9528 39 -11214.0362 -9129.7028 40 -9742.3695 -11214.0362 41 -11011.7862 -9742.3695 42 -5602.3299 -11011.7862 43 -5003.4966 -5602.3299 44 -2711.4132 -5003.4966 45 -921.0799 -2711.4132 46 4306.5868 -921.0799 47 1738.8911 4306.5868 48 3442.6600 1738.8911 49 2763.3266 3442.6600 50 3183.5766 2763.3266 51 6161.2433 3183.5766 52 7150.9100 6161.2433 53 10481.4933 7150.9100 54 17554.9496 10481.4933 55 19701.7829 17554.9496 56 19361.8663 19701.7829 57 18461.1996 19361.8663 58 16808.8663 18461.1996 59 16663.1706 16808.8663 60 17840.9395 16663.1706 61 19120.6061 17840.9395 62 19162.8561 19120.6061 63 17407.5228 19162.8561 64 18293.1895 17407.5228 65 19550.7728 18293.1895 66 23394.2291 19550.7728 67 33466.0624 23394.2291 68 32373.1457 33466.0624 69 41996.4791 32373.1457 70 38639.1457 41996.4791 71 37626.4500 38639.1457 72 33784.2190 37626.4500 73 32822.8856 33784.2190 74 33816.1356 32822.8856 75 31974.8023 33816.1356 76 32132.4690 31974.8023 77 32271.0523 32132.4690 78 35298.5086 32271.0523 79 35938.3419 35298.5086 80 34607.4252 35938.3419 81 35584.7586 34607.4252 82 31243.4252 35584.7586 83 29148.7295 31243.4252 84 14752.4984 29148.7295 85 18716.1651 14752.4984 86 16176.4151 18716.1651 87 22002.0818 16176.4151 88 23066.7484 22002.0818 89 21210.3318 23066.7484 90 15834.7880 21210.3318 91 7663.6214 15834.7880 92 13497.7047 7663.6214 93 200.0380 13497.7047 94 -3145.2953 200.0380 95 -11125.9910 -3145.2953 96 -13009.2221 -11125.9910 97 -17976.5554 -13009.2221 98 -21393.3054 -17976.5554 99 -23226.6387 -21393.3054 100 -23838.9721 -23226.6387 101 -25259.3887 -23838.9721 102 -24978.9325 -25259.3887 103 -33650.0991 -24978.9325 104 -37632.0158 -33650.0991 105 -38184.6825 -37632.0158 106 -37689.0158 -38184.6825 107 -37490.7115 -37689.0158 108 -40954.9426 -37490.7115 109 -42546.2759 -40954.9426 110 -40651.0259 -42546.2759 111 -39288.3593 -40651.0259 112 -43205.6926 -39288.3593 113 -38264.1093 -43205.6926 114 -26723.1282 -38264.1093 115 -34943.2949 -26723.1282 116 -31792.2116 -34943.2949 117 -28272.8782 -31792.2116 118 -23280.2116 -28272.8782 119 -16724.9073 -23280.2116 120 -10217.1384 -16724.9073 121 -3476.4717 -10217.1384 122 3023.7783 -3476.4717 123 4031.4450 3023.7783 124 5824.1116 4031.4450 125 12956.6950 5824.1116 126 7213.1512 12956.6950 127 1820.9846 7213.1512 128 4938.0679 1820.9846 129 6202.4012 4938.0679 130 11269.0679 6202.4012 131 22547.3722 11269.0679 132 14624.1411 22547.3722 133 16819.8078 14624.1411 134 14211.0578 16819.8078 135 14255.7245 14211.0578 136 12475.3911 14255.7245 137 13144.9745 12475.3911 138 9754.4307 13144.9745 139 1383.2641 9754.4307 140 -385.6526 1383.2641 141 -211.3193 -385.6526 142 -468.6526 -211.3193 > 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/7e3aq1293091094.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/www/html/rcomp/tmp/8e3aq1293091094.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/www/html/rcomp/tmp/9e3aq1293091094.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/www/html/rcomp/tmp/107crb1293091094.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/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/11ad8z1293091094.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/12wvo51293091094.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/13a5me1293091094.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/142wlz1293091094.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/15oxk51293091094.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/1626iv1293091094.tab") + } > > try(system("convert tmp/10tch1293091094.ps tmp/10tch1293091094.png",intern=TRUE)) character(0) > try(system("convert tmp/20tch1293091094.ps tmp/20tch1293091094.png",intern=TRUE)) character(0) > try(system("convert tmp/3t2uk1293091094.ps tmp/3t2uk1293091094.png",intern=TRUE)) character(0) > try(system("convert tmp/4t2uk1293091094.ps tmp/4t2uk1293091094.png",intern=TRUE)) character(0) > try(system("convert tmp/5t2uk1293091094.ps tmp/5t2uk1293091094.png",intern=TRUE)) character(0) > try(system("convert tmp/64ct51293091094.ps tmp/64ct51293091094.png",intern=TRUE)) character(0) > try(system("convert tmp/7e3aq1293091094.ps tmp/7e3aq1293091094.png",intern=TRUE)) character(0) > try(system("convert tmp/8e3aq1293091094.ps tmp/8e3aq1293091094.png",intern=TRUE)) character(0) > try(system("convert tmp/9e3aq1293091094.ps tmp/9e3aq1293091094.png",intern=TRUE)) character(0) > try(system("convert tmp/107crb1293091094.ps tmp/107crb1293091094.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 3.723 1.752 8.250