R version 2.12.1 (2010-12-16) Copyright (C) 2010 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i486-pc-linux-gnu (32-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > x <- array(list(63031 + ,256 + ,13 + ,5 + ,10345 + ,66751 + ,160 + ,26 + ,7 + ,17607 + ,7176 + ,70 + ,0 + ,0 + ,1423 + ,78306 + ,360 + ,37 + ,12 + ,20050 + ,137944 + ,721 + ,47 + ,15 + ,21212 + ,261308 + ,938 + ,80 + ,16 + ,93979 + ,69266 + ,287 + ,21 + ,12 + ,15524 + ,80226 + ,149 + ,36 + ,13 + ,16182 + ,73226 + ,311 + ,35 + ,15 + ,19238 + ,178519 + ,617 + ,40 + ,13 + ,28909 + ,66476 + ,262 + ,35 + ,6 + ,22357 + ,98606 + ,385 + ,46 + ,16 + ,25560 + ,50001 + ,369 + ,20 + ,7 + ,9954 + ,91093 + ,558 + ,24 + ,12 + ,18490 + ,73884 + ,220 + ,19 + ,9 + ,17777 + ,72377 + ,313 + ,15 + ,10 + ,25268 + ,69388 + ,229 + ,48 + ,16 + ,37525 + ,15629 + ,88 + ,0 + ,5 + ,6023 + ,71693 + ,494 + ,38 + ,20 + ,25042 + ,19920 + ,155 + ,12 + ,7 + ,35713 + ,39403 + ,234 + ,10 + ,13 + ,7039 + ,99933 + ,361 + ,51 + ,13 + ,40841 + ,56088 + ,280 + ,4 + ,11 + ,9214 + ,62006 + ,331 + ,24 + ,9 + ,17446 + ,81665 + ,378 + ,39 + ,10 + ,10295 + ,65223 + ,227 + ,19 + ,7 + ,13206 + ,88794 + ,396 + ,23 + ,13 + ,26093 + ,90642 + ,179 + ,39 + ,15 + ,20744 + ,203699 + ,509 + ,37 + ,13 + ,68013 + ,99340 + ,504 + ,20 + ,7 + ,12840 + ,56695 + ,225 + ,20 + ,14 + ,12672 + ,108143 + ,366 + ,41 + ,11 + ,10872 + ,58313 + ,341 + ,26 + ,3 + ,21325 + ,29101 + ,171 + ,0 + ,8 + ,24542 + ,113060 + ,437 + ,31 + ,12 + ,16401 + ,0 + ,0 + ,0 + ,0 + ,0 + ,65773 + ,313 + ,8 + ,12 + ,12821 + ,67047 + ,366 + ,35 + ,8 + ,14662 + ,41953 + ,232 + ,3 + ,20 + ,22190 + ,109835 + ,389 + ,47 + ,18 + ,37929 + ,82577 + ,340 + ,42 + ,9 + ,18009 + ,59588 + ,316 + ,11 + ,14 + ,11076 + ,40064 + ,140 + ,10 + ,7 + ,24981 + ,70227 + ,419 + ,26 + ,13 + ,30691 + ,60437 + ,226 + ,27 + ,11 + ,29164 + ,47000 + ,161 + ,0 + ,11 + ,13985 + ,40295 + ,103 + ,15 + ,14 + ,7588 + ,103397 + ,356 + ,32 + ,9 + ,20023 + ,78982 + ,293 + ,13 + ,12 + ,25524 + ,60206 + ,414 + ,24 + ,11 + ,14717 + ,39887 + ,156 + ,10 + ,17 + ,6832 + ,49791 + ,189 + ,14 + ,10 + ,9624 + ,129283 + ,442 + ,24 + ,11 + ,24300 + ,104816 + ,321 + ,29 + ,12 + ,21790 + ,101395 + ,367 + ,40 + ,17 + ,16493 + ,72824 + ,309 + ,22 + ,6 + ,9269 + ,76018 + ,235 + ,27 + ,8 + ,20105 + ,33891 + ,137 + ,8 + ,12 + ,11216 + ,62164 + ,194 + ,27 + ,13 + ,15569 + ,28266 + ,220 + ,0 + ,14 + ,21799 + ,35093 + ,149 + ,0 + ,17 + ,3772 + ,35252 + ,306 + ,17 + ,8 + ,6057 + ,36977 + ,178 + ,7 + ,9 + ,20828 + ,42406 + ,145 + ,18 + ,9 + ,9976 + ,56353 + ,144 + ,7 + ,9 + ,14055 + ,58817 + ,270 + ,24 + ,15 + ,17455 + ,76053 + ,301 + ,18 + ,16 + ,39553 + ,70872 + ,501 + ,39 + ,13 + ,14818 + ,42372 + ,153 + ,17 + ,12 + ,17065 + ,19144 + ,40 + ,0 + ,10 + ,1536 + ,114177 + ,500 + ,39 + ,9 + ,11938 + ,53544 + ,199 + ,20 + ,3 + ,24589 + ,51379 + ,242 + ,29 + ,12 + ,21332 + ,40756 + ,265 + ,27 + ,8 + ,13229 + ,46357 + ,293 + ,23 + ,17 + ,11331 + ,17799 + ,141 + ,0 + ,9 + ,853 + ,71154 + ,234 + ,31 + ,8 + ,19821 + ,58305 + ,336 + ,19 + ,9 + ,34666 + ,27454 + ,124 + ,12 + ,12 + ,15051 + ,34323 + ,241 + ,23 + ,5 + ,27969 + ,44761 + ,127 + ,33 + ,14 + ,17897 + ,113862 + ,327 + ,21 + ,14 + ,6031 + ,35027 + ,175 + ,17 + ,10 + ,7153 + ,62396 + ,331 + ,27 + ,12 + ,13365 + ,29613 + ,176 + ,14 + ,10 + ,11197 + ,65559 + ,281 + ,12 + ,12 + ,25291 + ,109788 + ,291 + ,21 + ,17 + ,28994 + ,27883 + ,137 + ,14 + ,11 + ,10461 + ,40181 + ,155 + ,14 + ,10 + ,16415 + ,53398 + ,194 + ,22 + ,11 + ,8495 + ,56435 + ,300 + ,25 + ,7 + ,18318 + ,77283 + ,370 + ,36 + ,10 + ,25143 + ,71738 + ,187 + ,10 + ,11 + ,20471 + ,48096 + ,210 + ,16 + ,5 + ,14561 + ,25214 + ,185 + ,12 + ,6 + ,16902 + ,119332 + ,445 + ,20 + ,14 + ,12994 + ,79201 + ,234 + ,38 + ,13 + ,29697 + ,19349 + ,67 + ,13 + ,1 + ,3895 + ,78760 + ,316 + ,12 + ,13 + ,9807 + ,54133 + ,336 + ,11 + ,9 + ,10711 + ,21623 + ,116 + ,8 + ,1 + ,2325 + ,25497 + ,141 + ,22 + ,6 + ,19000 + ,69535 + ,236 + ,14 + ,12 + ,22418 + ,30709 + ,98 + ,7 + ,9 + ,7872 + ,37043 + ,97 + ,14 + ,9 + ,5650 + ,24716 + ,152 + ,2 + ,12 + ,3979 + ,54865 + ,132 + ,35 + ,10 + ,14956 + ,27246 + ,97 + ,5 + ,2 + ,3738 + ,0 + ,0 + ,0 + ,0 + ,0 + ,38814 + ,165 + ,34 + ,8 + ,10586 + ,27646 + ,153 + ,12 + ,7 + ,18122 + ,65373 + ,226 + ,34 + ,11 + ,17899 + ,43021 + ,182 + ,30 + ,14 + ,10913 + ,43116 + ,172 + ,21 + ,4 + ,18060 + ,3058 + ,1 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,96347 + ,196 + ,28 + ,13 + ,15452 + ,48626 + ,263 + ,16 + ,17 + ,33996 + ,73073 + ,304 + ,12 + ,13 + ,8877 + ,45266 + ,183 + ,14 + ,12 + ,18708 + ,43410 + ,292 + ,7 + ,1 + ,2781 + ,83842 + ,257 + ,41 + ,12 + ,20854 + ,39296 + ,141 + ,21 + ,6 + ,8179 + ,35223 + ,189 + ,28 + ,11 + ,7139 + ,39841 + ,129 + ,1 + ,8 + ,13798 + ,19764 + ,75 + ,10 + ,2 + ,5619 + ,59975 + ,301 + ,31 + ,12 + ,13050 + ,64589 + ,204 + ,7 + ,12 + ,11297 + ,63339 + ,257 + ,26 + ,14 + ,16170 + ,11796 + ,79 + ,1 + ,2 + ,0 + ,7627 + ,25 + ,0 + ,0 + ,0 + ,68998 + ,217 + ,12 + ,9 + ,20539 + ,6836 + ,11 + ,0 + ,1 + ,0 + ,28834 + ,209 + ,17 + ,3 + ,10056 + ,5118 + ,6 + ,5 + ,0 + ,0 + ,20898 + ,115 + ,4 + ,2 + ,2418 + ,0 + ,0 + ,0 + ,0 + ,0 + ,42690 + ,167 + ,6 + ,12 + ,11806 + ,14507 + ,75 + ,0 + ,14 + ,15924 + ,7131 + ,27 + ,0 + ,0 + ,0 + ,4194 + ,14 + ,0 + ,0 + ,0 + ,21416 + ,96 + ,15 + ,4 + ,7084 + ,30591 + ,95 + ,0 + ,7 + ,14831 + ,42419 + ,228 + ,12 + ,10 + ,6585) + ,dim=c(5 + ,144) + ,dimnames=list(c('Yt' + ,'X_1t' + ,'X_2t' + ,'X_3t' + ,'X_4t') + ,1:144)) > y <- array(NA,dim=c(5,144),dimnames=list(c('Yt','X_1t','X_2t','X_3t','X_4t'),1:144)) > for (i in 1:dim(x)[1]) + { + for (j in 1:dim(x)[2]) + { + y[i,j] <- as.numeric(x[i,j]) + } + } > par3 = 'No Linear Trend' > par2 = 'Do not include Seasonal Dummies' > par1 = '1' > #'GNU S' R Code compiled by R2WASP v. 1.0.44 () > #Author: Prof. Dr. P. Wessa > #To cite this work: AUTHOR(S), (YEAR), YOUR SOFTWARE TITLE (vNUMBER) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_YOURPAGE.wasp/ > #Source of accompanying publication: Office for Research, Development, and Education > #Technical description: Write here your technical program description (don't use hard returns!) > library(lattice) > library(lmtest) Loading required package: zoo > n25 <- 25 #minimum number of obs. for Goldfeld-Quandt test > par1 <- as.numeric(par1) > x <- t(y) > k <- length(x[1,]) > n <- length(x[,1]) > x1 <- cbind(x[,par1], x[,1:k!=par1]) > mycolnames <- c(colnames(x)[par1], colnames(x)[1:k!=par1]) > colnames(x1) <- mycolnames #colnames(x)[par1] > x <- x1 > if (par3 == 'First Differences'){ + x2 <- array(0, dim=c(n-1,k), dimnames=list(1:(n-1), paste('(1-B)',colnames(x),sep=''))) + for (i in 1:n-1) { + for (j in 1:k) { + x2[i,j] <- x[i+1,j] - x[i,j] + } + } + x <- x2 + } > if (par2 == 'Include Monthly Dummies'){ + x2 <- array(0, dim=c(n,11), dimnames=list(1:n, paste('M', seq(1:11), sep =''))) + for (i in 1:11){ + x2[seq(i,n,12),i] <- 1 + } + x <- cbind(x, x2) + } > if (par2 == 'Include Quarterly Dummies'){ + x2 <- array(0, dim=c(n,3), dimnames=list(1:n, paste('Q', seq(1:3), sep =''))) + for (i in 1:3){ + x2[seq(i,n,4),i] <- 1 + } + x <- cbind(x, x2) + } > k <- length(x[1,]) > if (par3 == 'Linear Trend'){ + x <- cbind(x, c(1:n)) + colnames(x)[k+1] <- 't' + } > x Yt X_1t X_2t X_3t X_4t 1 63031 256 13 5 10345 2 66751 160 26 7 17607 3 7176 70 0 0 1423 4 78306 360 37 12 20050 5 137944 721 47 15 21212 6 261308 938 80 16 93979 7 69266 287 21 12 15524 8 80226 149 36 13 16182 9 73226 311 35 15 19238 10 178519 617 40 13 28909 11 66476 262 35 6 22357 12 98606 385 46 16 25560 13 50001 369 20 7 9954 14 91093 558 24 12 18490 15 73884 220 19 9 17777 16 72377 313 15 10 25268 17 69388 229 48 16 37525 18 15629 88 0 5 6023 19 71693 494 38 20 25042 20 19920 155 12 7 35713 21 39403 234 10 13 7039 22 99933 361 51 13 40841 23 56088 280 4 11 9214 24 62006 331 24 9 17446 25 81665 378 39 10 10295 26 65223 227 19 7 13206 27 88794 396 23 13 26093 28 90642 179 39 15 20744 29 203699 509 37 13 68013 30 99340 504 20 7 12840 31 56695 225 20 14 12672 32 108143 366 41 11 10872 33 58313 341 26 3 21325 34 29101 171 0 8 24542 35 113060 437 31 12 16401 36 0 0 0 0 0 37 65773 313 8 12 12821 38 67047 366 35 8 14662 39 41953 232 3 20 22190 40 109835 389 47 18 37929 41 82577 340 42 9 18009 42 59588 316 11 14 11076 43 40064 140 10 7 24981 44 70227 419 26 13 30691 45 60437 226 27 11 29164 46 47000 161 0 11 13985 47 40295 103 15 14 7588 48 103397 356 32 9 20023 49 78982 293 13 12 25524 50 60206 414 24 11 14717 51 39887 156 10 17 6832 52 49791 189 14 10 9624 53 129283 442 24 11 24300 54 104816 321 29 12 21790 55 101395 367 40 17 16493 56 72824 309 22 6 9269 57 76018 235 27 8 20105 58 33891 137 8 12 11216 59 62164 194 27 13 15569 60 28266 220 0 14 21799 61 35093 149 0 17 3772 62 35252 306 17 8 6057 63 36977 178 7 9 20828 64 42406 145 18 9 9976 65 56353 144 7 9 14055 66 58817 270 24 15 17455 67 76053 301 18 16 39553 68 70872 501 39 13 14818 69 42372 153 17 12 17065 70 19144 40 0 10 1536 71 114177 500 39 9 11938 72 53544 199 20 3 24589 73 51379 242 29 12 21332 74 40756 265 27 8 13229 75 46357 293 23 17 11331 76 17799 141 0 9 853 77 71154 234 31 8 19821 78 58305 336 19 9 34666 79 27454 124 12 12 15051 80 34323 241 23 5 27969 81 44761 127 33 14 17897 82 113862 327 21 14 6031 83 35027 175 17 10 7153 84 62396 331 27 12 13365 85 29613 176 14 10 11197 86 65559 281 12 12 25291 87 109788 291 21 17 28994 88 27883 137 14 11 10461 89 40181 155 14 10 16415 90 53398 194 22 11 8495 91 56435 300 25 7 18318 92 77283 370 36 10 25143 93 71738 187 10 11 20471 94 48096 210 16 5 14561 95 25214 185 12 6 16902 96 119332 445 20 14 12994 97 79201 234 38 13 29697 98 19349 67 13 1 3895 99 78760 316 12 13 9807 100 54133 336 11 9 10711 101 21623 116 8 1 2325 102 25497 141 22 6 19000 103 69535 236 14 12 22418 104 30709 98 7 9 7872 105 37043 97 14 9 5650 106 24716 152 2 12 3979 107 54865 132 35 10 14956 108 27246 97 5 2 3738 109 0 0 0 0 0 110 38814 165 34 8 10586 111 27646 153 12 7 18122 112 65373 226 34 11 17899 113 43021 182 30 14 10913 114 43116 172 21 4 18060 115 3058 1 0 0 0 116 0 0 0 0 0 117 96347 196 28 13 15452 118 48626 263 16 17 33996 119 73073 304 12 13 8877 120 45266 183 14 12 18708 121 43410 292 7 1 2781 122 83842 257 41 12 20854 123 39296 141 21 6 8179 124 35223 189 28 11 7139 125 39841 129 1 8 13798 126 19764 75 10 2 5619 127 59975 301 31 12 13050 128 64589 204 7 12 11297 129 63339 257 26 14 16170 130 11796 79 1 2 0 131 7627 25 0 0 0 132 68998 217 12 9 20539 133 6836 11 0 1 0 134 28834 209 17 3 10056 135 5118 6 5 0 0 136 20898 115 4 2 2418 137 0 0 0 0 0 138 42690 167 6 12 11806 139 14507 75 0 14 15924 140 7131 27 0 0 0 141 4194 14 0 0 0 142 21416 96 15 4 7084 143 30591 95 0 7 14831 144 42419 228 12 10 6585 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) X_1t X_2t X_3t X_4t -2688.8440 147.0815 513.0889 469.1092 0.6747 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -44051 -10145 -444 8109 60554 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) -2688.8440 3246.1996 -0.828 0.408918 X_1t 147.0815 14.6636 10.030 < 2e-16 *** X_2t 513.0889 145.2960 3.531 0.000561 *** X_3t 469.1092 347.6423 1.349 0.179402 X_4t 0.6747 0.1560 4.325 2.90e-05 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 16470 on 139 degrees of freedom Multiple R-squared: 0.8163, Adjusted R-squared: 0.8111 F-statistic: 154.5 on 4 and 139 DF, p-value: < 2.2e-16 > if (n > n25) { + kp3 <- k + 3 + nmkm3 <- n - k - 3 + gqarr <- array(NA, dim=c(nmkm3-kp3+1,3)) + numgqtests <- 0 + numsignificant1 <- 0 + numsignificant5 <- 0 + numsignificant10 <- 0 + for (mypoint in kp3:nmkm3) { + j <- 0 + numgqtests <- numgqtests + 1 + for (myalt in c('greater', 'two.sided', 'less')) { + j <- j + 1 + gqarr[mypoint-kp3+1,j] <- gqtest(mylm, point=mypoint, alternative=myalt)$p.value + } + if (gqarr[mypoint-kp3+1,2] < 0.01) numsignificant1 <- numsignificant1 + 1 + if (gqarr[mypoint-kp3+1,2] < 0.05) numsignificant5 <- numsignificant5 + 1 + if (gqarr[mypoint-kp3+1,2] < 0.10) numsignificant10 <- numsignificant10 + 1 + } + gqarr + } [,1] [,2] [,3] [1,] 0.3882694 0.7765387001 0.6117306500 [2,] 0.3507499 0.7014997058 0.6492501471 [3,] 0.9199377 0.1601246970 0.0800623485 [4,] 0.8853125 0.2293750808 0.1146875404 [5,] 0.8373584 0.3252831971 0.1626415985 [6,] 0.8731008 0.2537983313 0.1268991657 [7,] 0.8700683 0.2598634235 0.1299317118 [8,] 0.8408107 0.3183785082 0.1591892541 [9,] 0.7946566 0.4106867314 0.2053433657 [10,] 0.8670662 0.2658676831 0.1329338415 [11,] 0.8198198 0.3603603083 0.1801801541 [12,] 0.9224385 0.1551229593 0.0775614797 [13,] 0.9614924 0.0770151281 0.0385075640 [14,] 0.9501665 0.0996670331 0.0498335165 [15,] 0.9406665 0.1186669457 0.0593334728 [16,] 0.9362148 0.1275703295 0.0637851648 [17,] 0.9240516 0.1518967469 0.0759483735 [18,] 0.9017529 0.1964941663 0.0982470832 [19,] 0.8855840 0.2288319158 0.1144159579 [20,] 0.8547248 0.2905503206 0.1452751603 [21,] 0.9085082 0.1829836884 0.0914918442 [22,] 0.9981983 0.0036034385 0.0018017192 [23,] 0.9973091 0.0053817110 0.0026908555 [24,] 0.9960099 0.0079801260 0.0039900630 [25,] 0.9972925 0.0054149602 0.0027074801 [26,] 0.9978922 0.0042155597 0.0021077799 [27,] 0.9973801 0.0052397775 0.0026198887 [28,] 0.9977231 0.0045537950 0.0022768975 [29,] 0.9965387 0.0069226982 0.0034613491 [30,] 0.9951620 0.0096760215 0.0048380108 [31,] 0.9948543 0.0102914937 0.0051457469 [32,] 0.9938334 0.0123331752 0.0061665876 [33,] 0.9913257 0.0173486064 0.0086743032 [34,] 0.9878960 0.0242080246 0.0121040123 [35,] 0.9835494 0.0329012971 0.0164506485 [36,] 0.9777058 0.0445884148 0.0222942074 [37,] 0.9862423 0.0275154393 0.0137577197 [38,] 0.9821872 0.0356255064 0.0178127532 [39,] 0.9803500 0.0392999806 0.0196499903 [40,] 0.9762872 0.0474256422 0.0237128211 [41,] 0.9794306 0.0411388431 0.0205694216 [42,] 0.9754864 0.0490271443 0.0245135721 [43,] 0.9825552 0.0348895410 0.0174447705 [44,] 0.9775701 0.0448597706 0.0224298853 [45,] 0.9712469 0.0575062092 0.0287531046 [46,] 0.9902117 0.0195766311 0.0097883156 [47,] 0.9945004 0.0109992679 0.0054996339 [48,] 0.9933659 0.0132681808 0.0066340904 [49,] 0.9919127 0.0161745000 0.0080872500 [50,] 0.9916889 0.0166221744 0.0083110872 [51,] 0.9885617 0.0228765965 0.0114382983 [52,] 0.9849357 0.0301286891 0.0150643446 [53,] 0.9884172 0.0231656759 0.0115828379 [54,] 0.9860336 0.0279328005 0.0139664002 [55,] 0.9905094 0.0189812721 0.0094906361 [56,] 0.9877100 0.0245799520 0.0122899760 [57,] 0.9833679 0.0332642302 0.0166321151 [58,] 0.9860349 0.0279301140 0.0139650570 [59,] 0.9828172 0.0343655420 0.0171827710 [60,] 0.9778468 0.0443064692 0.0221532346 [61,] 0.9937077 0.0125846944 0.0062923472 [62,] 0.9912597 0.0174805436 0.0087402718 [63,] 0.9887777 0.0224445451 0.0112222726 [64,] 0.9868437 0.0263125951 0.0131562976 [65,] 0.9842928 0.0314143626 0.0157071813 [66,] 0.9834489 0.0331021633 0.0165510816 [67,] 0.9870047 0.0259905273 0.0129952636 [68,] 0.9933103 0.0133793403 0.0066896702 [69,] 0.9929188 0.0141624116 0.0070812058 [70,] 0.9919242 0.0161515006 0.0080757503 [71,] 0.9930242 0.0139516429 0.0069758214 [72,] 0.9919779 0.0160442190 0.0080221095 [73,] 0.9951161 0.0097677403 0.0048838701 [74,] 0.9933807 0.0132385872 0.0066192936 [75,] 0.9994772 0.0010456364 0.0005228182 [76,] 0.9992953 0.0014094840 0.0007047420 [77,] 0.9992169 0.0015662434 0.0007831217 [78,] 0.9992327 0.0015346548 0.0007673274 [79,] 0.9988216 0.0023567997 0.0011783998 [80,] 0.9997600 0.0004800197 0.0002400098 [81,] 0.9997203 0.0005594788 0.0002797394 [82,] 0.9995538 0.0008923707 0.0004461854 [83,] 0.9992980 0.0014040878 0.0007020439 [84,] 0.9990989 0.0018022584 0.0009011292 [85,] 0.9988662 0.0022675872 0.0011337936 [86,] 0.9994577 0.0010846736 0.0005423368 [87,] 0.9991314 0.0017371506 0.0008685753 [88,] 0.9992842 0.0014316514 0.0007158257 [89,] 0.9998162 0.0003676526 0.0001838263 [90,] 0.9997402 0.0005196924 0.0002598462 [91,] 0.9995691 0.0008618364 0.0004309182 [92,] 0.9995656 0.0008687736 0.0004343868 [93,] 0.9994055 0.0011890933 0.0005945466 [94,] 0.9990222 0.0019555271 0.0009777635 [95,] 0.9991588 0.0016824843 0.0008412421 [96,] 0.9990099 0.0019802425 0.0009901213 [97,] 0.9984190 0.0031619461 0.0015809730 [98,] 0.9977548 0.0044903282 0.0022451641 [99,] 0.9970719 0.0058562843 0.0029281421 [100,] 0.9958804 0.0082391911 0.0041195955 [101,] 0.9943647 0.0112706169 0.0056353085 [102,] 0.9913223 0.0173554844 0.0086777422 [103,] 0.9891123 0.0217754440 0.0108877220 [104,] 0.9873175 0.0253649410 0.0126824705 [105,] 0.9810169 0.0379662876 0.0189831438 [106,] 0.9800755 0.0398489953 0.0199244976 [107,] 0.9703970 0.0592059335 0.0296029667 [108,] 0.9574777 0.0850446859 0.0425223429 [109,] 0.9398414 0.1203172561 0.0601586280 [110,] 0.9976029 0.0047941705 0.0023970853 [111,] 0.9996821 0.0006358056 0.0003179028 [112,] 0.9997423 0.0005154882 0.0002577441 [113,] 0.9996122 0.0007756909 0.0003878454 [114,] 0.9992440 0.0015119306 0.0007559653 [115,] 0.9996220 0.0007559321 0.0003779661 [116,] 0.9994930 0.0010139201 0.0005069601 [117,] 0.9989042 0.0021915437 0.0010957718 [118,] 0.9977006 0.0045988135 0.0022994068 [119,] 0.9953475 0.0093049894 0.0046524947 [120,] 0.9910407 0.0179186399 0.0089593199 [121,] 0.9966702 0.0066596518 0.0033298259 [122,] 0.9953204 0.0093591862 0.0046795931 [123,] 0.9897504 0.0204991886 0.0102495943 [124,] 0.9777435 0.0445129230 0.0222564615 [125,] 0.9962533 0.0074933890 0.0037466945 [126,] 0.9892687 0.0214626181 0.0107313090 [127,] 0.9956726 0.0086547104 0.0043273552 [128,] 0.9880981 0.0238038809 0.0119019405 [129,] 0.9737495 0.0525010805 0.0262505402 > postscript(file="/var/www/rcomp/tmp/1frn01322168361.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/rcomp/tmp/2cm781322168361.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/rcomp/tmp/3afbf1322168361.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/rcomp/tmp/46k291322168361.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/rcomp/tmp/5e2fn1322168361.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > qqnorm(mysum$resid, main='Residual Normal Q-Q Plot') > qqline(mysum$resid) > grid() > dev.off() null device 1 > (myerror <- as.ts(mysum$resid)) Time Series: Start = 1 End = 144 Frequency = 1 1 2 3 4 5 6 12071.7489 17403.6979 -1390.9258 -10095.3612 -10875.9741 14076.1093 7 8 9 10 11 12 2864.5967 25512.4641 -7801.6802 44332.3575 -5227.0196 -3684.1036 13 14 15 16 17 18 -21844.5030 -18707.8475 18250.5166 -405.8187 -19056.0719 -1034.4511 19 20 21 22 23 24 -44051.2306 -33724.3435 -8303.5846 -10294.9965 4164.9967 -12295.6566 25 26 27 28 29 30 -2890.3179 12582.1110 -2265.2303 25960.6595 60553.8748 5691.3778 31 32 33 34 35 36 911.6977 23468.0847 -18288.0643 -13671.8784 18873.7912 2688.8440 37 38 39 40 41 42 4041.2840 -15699.0783 -15373.5883 -2839.8111 -2663.8332 -3885.1351 43 44 45 46 47 48 -3107.3145 -28856.5343 -8804.4438 11413.1692 8451.1410 19574.9532 49 50 51 52 53 54 9056.0535 -25400.4474 1915.9936 6314.0162 33092.8452 25081.5913 55 56 57 58 59 60 10479.0798 9708.4720 12972.0452 -871.5158 5863.1733 -22677.8896 61 62 63 64 65 66 5346.9633 -23627.9964 -8380.4317 3579.8698 20565.9236 -9333.4125 67 68 69 70 71 72 -8956.5172 -36233.2323 -3307.8030 10222.1884 11038.3546 -1295.1019 73 74 75 76 77 78 -16426.9682 -22063.3240 -21469.6975 -5048.1299 6394.3792 -25784.5497 79 80 81 82 83 84 -10036.1964 -31451.4169 -6803.6557 47043.8226 -6262.9837 -12098.8961 85 86 87 88 89 90 -13013.1904 -1931.6800 31364.8315 -8979.5592 -2876.9411 5373.4981 91 92 93 94 95 96 -13470.3184 -14573.9965 22820.2091 -481.2050 -19682.3389 30973.5216 97 98 99 100 101 102 1841.1052 2416.2534 16099.0498 -9689.9620 1107.9465 -19474.1132 103 104 105 106 107 108 9575.1555 5859.1977 10247.7882 -4291.5708 5399.4197 9642.3345 109 110 111 112 113 114 2688.8440 -11105.6260 -13835.9454 140.1651 -10381.9306 -4329.1364 115 116 117 118 119 120 5599.7625 2688.8440 39317.8586 -26488.1740 12804.4770 -4395.4749 121 122 123 124 125 126 -2785.9614 7995.2379 2138.6506 -14229.7663 9981.1806 1561.6165 127 128 129 130 131 132 -11947.2835 20430.4637 -2589.4622 1414.0980 6638.8065 15533.9268 133 134 135 136 137 138 7437.8383 -16131.5761 4358.9105 2050.5294 2688.8440 4143.1577 139 140 141 142 143 144 -11146.3472 5848.6435 4823.7030 -4367.1592 6017.2089 -3717.6425 > postscript(file="/var/www/rcomp/tmp/6vsv61322168361.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > dum <- cbind(lag(myerror,k=1),myerror) > dum Time Series: Start = 0 End = 144 Frequency = 1 lag(myerror, k = 1) myerror 0 12071.7489 NA 1 17403.6979 12071.7489 2 -1390.9258 17403.6979 3 -10095.3612 -1390.9258 4 -10875.9741 -10095.3612 5 14076.1093 -10875.9741 6 2864.5967 14076.1093 7 25512.4641 2864.5967 8 -7801.6802 25512.4641 9 44332.3575 -7801.6802 10 -5227.0196 44332.3575 11 -3684.1036 -5227.0196 12 -21844.5030 -3684.1036 13 -18707.8475 -21844.5030 14 18250.5166 -18707.8475 15 -405.8187 18250.5166 16 -19056.0719 -405.8187 17 -1034.4511 -19056.0719 18 -44051.2306 -1034.4511 19 -33724.3435 -44051.2306 20 -8303.5846 -33724.3435 21 -10294.9965 -8303.5846 22 4164.9967 -10294.9965 23 -12295.6566 4164.9967 24 -2890.3179 -12295.6566 25 12582.1110 -2890.3179 26 -2265.2303 12582.1110 27 25960.6595 -2265.2303 28 60553.8748 25960.6595 29 5691.3778 60553.8748 30 911.6977 5691.3778 31 23468.0847 911.6977 32 -18288.0643 23468.0847 33 -13671.8784 -18288.0643 34 18873.7912 -13671.8784 35 2688.8440 18873.7912 36 4041.2840 2688.8440 37 -15699.0783 4041.2840 38 -15373.5883 -15699.0783 39 -2839.8111 -15373.5883 40 -2663.8332 -2839.8111 41 -3885.1351 -2663.8332 42 -3107.3145 -3885.1351 43 -28856.5343 -3107.3145 44 -8804.4438 -28856.5343 45 11413.1692 -8804.4438 46 8451.1410 11413.1692 47 19574.9532 8451.1410 48 9056.0535 19574.9532 49 -25400.4474 9056.0535 50 1915.9936 -25400.4474 51 6314.0162 1915.9936 52 33092.8452 6314.0162 53 25081.5913 33092.8452 54 10479.0798 25081.5913 55 9708.4720 10479.0798 56 12972.0452 9708.4720 57 -871.5158 12972.0452 58 5863.1733 -871.5158 59 -22677.8896 5863.1733 60 5346.9633 -22677.8896 61 -23627.9964 5346.9633 62 -8380.4317 -23627.9964 63 3579.8698 -8380.4317 64 20565.9236 3579.8698 65 -9333.4125 20565.9236 66 -8956.5172 -9333.4125 67 -36233.2323 -8956.5172 68 -3307.8030 -36233.2323 69 10222.1884 -3307.8030 70 11038.3546 10222.1884 71 -1295.1019 11038.3546 72 -16426.9682 -1295.1019 73 -22063.3240 -16426.9682 74 -21469.6975 -22063.3240 75 -5048.1299 -21469.6975 76 6394.3792 -5048.1299 77 -25784.5497 6394.3792 78 -10036.1964 -25784.5497 79 -31451.4169 -10036.1964 80 -6803.6557 -31451.4169 81 47043.8226 -6803.6557 82 -6262.9837 47043.8226 83 -12098.8961 -6262.9837 84 -13013.1904 -12098.8961 85 -1931.6800 -13013.1904 86 31364.8315 -1931.6800 87 -8979.5592 31364.8315 88 -2876.9411 -8979.5592 89 5373.4981 -2876.9411 90 -13470.3184 5373.4981 91 -14573.9965 -13470.3184 92 22820.2091 -14573.9965 93 -481.2050 22820.2091 94 -19682.3389 -481.2050 95 30973.5216 -19682.3389 96 1841.1052 30973.5216 97 2416.2534 1841.1052 98 16099.0498 2416.2534 99 -9689.9620 16099.0498 100 1107.9465 -9689.9620 101 -19474.1132 1107.9465 102 9575.1555 -19474.1132 103 5859.1977 9575.1555 104 10247.7882 5859.1977 105 -4291.5708 10247.7882 106 5399.4197 -4291.5708 107 9642.3345 5399.4197 108 2688.8440 9642.3345 109 -11105.6260 2688.8440 110 -13835.9454 -11105.6260 111 140.1651 -13835.9454 112 -10381.9306 140.1651 113 -4329.1364 -10381.9306 114 5599.7625 -4329.1364 115 2688.8440 5599.7625 116 39317.8586 2688.8440 117 -26488.1740 39317.8586 118 12804.4770 -26488.1740 119 -4395.4749 12804.4770 120 -2785.9614 -4395.4749 121 7995.2379 -2785.9614 122 2138.6506 7995.2379 123 -14229.7663 2138.6506 124 9981.1806 -14229.7663 125 1561.6165 9981.1806 126 -11947.2835 1561.6165 127 20430.4637 -11947.2835 128 -2589.4622 20430.4637 129 1414.0980 -2589.4622 130 6638.8065 1414.0980 131 15533.9268 6638.8065 132 7437.8383 15533.9268 133 -16131.5761 7437.8383 134 4358.9105 -16131.5761 135 2050.5294 4358.9105 136 2688.8440 2050.5294 137 4143.1577 2688.8440 138 -11146.3472 4143.1577 139 5848.6435 -11146.3472 140 4823.7030 5848.6435 141 -4367.1592 4823.7030 142 6017.2089 -4367.1592 143 -3717.6425 6017.2089 144 NA -3717.6425 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 17403.6979 12071.7489 [2,] -1390.9258 17403.6979 [3,] -10095.3612 -1390.9258 [4,] -10875.9741 -10095.3612 [5,] 14076.1093 -10875.9741 [6,] 2864.5967 14076.1093 [7,] 25512.4641 2864.5967 [8,] -7801.6802 25512.4641 [9,] 44332.3575 -7801.6802 [10,] -5227.0196 44332.3575 [11,] -3684.1036 -5227.0196 [12,] -21844.5030 -3684.1036 [13,] -18707.8475 -21844.5030 [14,] 18250.5166 -18707.8475 [15,] -405.8187 18250.5166 [16,] -19056.0719 -405.8187 [17,] -1034.4511 -19056.0719 [18,] -44051.2306 -1034.4511 [19,] -33724.3435 -44051.2306 [20,] -8303.5846 -33724.3435 [21,] -10294.9965 -8303.5846 [22,] 4164.9967 -10294.9965 [23,] -12295.6566 4164.9967 [24,] -2890.3179 -12295.6566 [25,] 12582.1110 -2890.3179 [26,] -2265.2303 12582.1110 [27,] 25960.6595 -2265.2303 [28,] 60553.8748 25960.6595 [29,] 5691.3778 60553.8748 [30,] 911.6977 5691.3778 [31,] 23468.0847 911.6977 [32,] -18288.0643 23468.0847 [33,] -13671.8784 -18288.0643 [34,] 18873.7912 -13671.8784 [35,] 2688.8440 18873.7912 [36,] 4041.2840 2688.8440 [37,] -15699.0783 4041.2840 [38,] -15373.5883 -15699.0783 [39,] -2839.8111 -15373.5883 [40,] -2663.8332 -2839.8111 [41,] -3885.1351 -2663.8332 [42,] -3107.3145 -3885.1351 [43,] -28856.5343 -3107.3145 [44,] -8804.4438 -28856.5343 [45,] 11413.1692 -8804.4438 [46,] 8451.1410 11413.1692 [47,] 19574.9532 8451.1410 [48,] 9056.0535 19574.9532 [49,] -25400.4474 9056.0535 [50,] 1915.9936 -25400.4474 [51,] 6314.0162 1915.9936 [52,] 33092.8452 6314.0162 [53,] 25081.5913 33092.8452 [54,] 10479.0798 25081.5913 [55,] 9708.4720 10479.0798 [56,] 12972.0452 9708.4720 [57,] -871.5158 12972.0452 [58,] 5863.1733 -871.5158 [59,] -22677.8896 5863.1733 [60,] 5346.9633 -22677.8896 [61,] -23627.9964 5346.9633 [62,] -8380.4317 -23627.9964 [63,] 3579.8698 -8380.4317 [64,] 20565.9236 3579.8698 [65,] -9333.4125 20565.9236 [66,] -8956.5172 -9333.4125 [67,] -36233.2323 -8956.5172 [68,] -3307.8030 -36233.2323 [69,] 10222.1884 -3307.8030 [70,] 11038.3546 10222.1884 [71,] -1295.1019 11038.3546 [72,] -16426.9682 -1295.1019 [73,] -22063.3240 -16426.9682 [74,] -21469.6975 -22063.3240 [75,] -5048.1299 -21469.6975 [76,] 6394.3792 -5048.1299 [77,] -25784.5497 6394.3792 [78,] -10036.1964 -25784.5497 [79,] -31451.4169 -10036.1964 [80,] -6803.6557 -31451.4169 [81,] 47043.8226 -6803.6557 [82,] -6262.9837 47043.8226 [83,] -12098.8961 -6262.9837 [84,] -13013.1904 -12098.8961 [85,] -1931.6800 -13013.1904 [86,] 31364.8315 -1931.6800 [87,] -8979.5592 31364.8315 [88,] -2876.9411 -8979.5592 [89,] 5373.4981 -2876.9411 [90,] -13470.3184 5373.4981 [91,] -14573.9965 -13470.3184 [92,] 22820.2091 -14573.9965 [93,] -481.2050 22820.2091 [94,] -19682.3389 -481.2050 [95,] 30973.5216 -19682.3389 [96,] 1841.1052 30973.5216 [97,] 2416.2534 1841.1052 [98,] 16099.0498 2416.2534 [99,] -9689.9620 16099.0498 [100,] 1107.9465 -9689.9620 [101,] -19474.1132 1107.9465 [102,] 9575.1555 -19474.1132 [103,] 5859.1977 9575.1555 [104,] 10247.7882 5859.1977 [105,] -4291.5708 10247.7882 [106,] 5399.4197 -4291.5708 [107,] 9642.3345 5399.4197 [108,] 2688.8440 9642.3345 [109,] -11105.6260 2688.8440 [110,] -13835.9454 -11105.6260 [111,] 140.1651 -13835.9454 [112,] -10381.9306 140.1651 [113,] -4329.1364 -10381.9306 [114,] 5599.7625 -4329.1364 [115,] 2688.8440 5599.7625 [116,] 39317.8586 2688.8440 [117,] -26488.1740 39317.8586 [118,] 12804.4770 -26488.1740 [119,] -4395.4749 12804.4770 [120,] -2785.9614 -4395.4749 [121,] 7995.2379 -2785.9614 [122,] 2138.6506 7995.2379 [123,] -14229.7663 2138.6506 [124,] 9981.1806 -14229.7663 [125,] 1561.6165 9981.1806 [126,] -11947.2835 1561.6165 [127,] 20430.4637 -11947.2835 [128,] -2589.4622 20430.4637 [129,] 1414.0980 -2589.4622 [130,] 6638.8065 1414.0980 [131,] 15533.9268 6638.8065 [132,] 7437.8383 15533.9268 [133,] -16131.5761 7437.8383 [134,] 4358.9105 -16131.5761 [135,] 2050.5294 4358.9105 [136,] 2688.8440 2050.5294 [137,] 4143.1577 2688.8440 [138,] -11146.3472 4143.1577 [139,] 5848.6435 -11146.3472 [140,] 4823.7030 5848.6435 [141,] -4367.1592 4823.7030 [142,] 6017.2089 -4367.1592 [143,] -3717.6425 6017.2089 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 17403.6979 12071.7489 2 -1390.9258 17403.6979 3 -10095.3612 -1390.9258 4 -10875.9741 -10095.3612 5 14076.1093 -10875.9741 6 2864.5967 14076.1093 7 25512.4641 2864.5967 8 -7801.6802 25512.4641 9 44332.3575 -7801.6802 10 -5227.0196 44332.3575 11 -3684.1036 -5227.0196 12 -21844.5030 -3684.1036 13 -18707.8475 -21844.5030 14 18250.5166 -18707.8475 15 -405.8187 18250.5166 16 -19056.0719 -405.8187 17 -1034.4511 -19056.0719 18 -44051.2306 -1034.4511 19 -33724.3435 -44051.2306 20 -8303.5846 -33724.3435 21 -10294.9965 -8303.5846 22 4164.9967 -10294.9965 23 -12295.6566 4164.9967 24 -2890.3179 -12295.6566 25 12582.1110 -2890.3179 26 -2265.2303 12582.1110 27 25960.6595 -2265.2303 28 60553.8748 25960.6595 29 5691.3778 60553.8748 30 911.6977 5691.3778 31 23468.0847 911.6977 32 -18288.0643 23468.0847 33 -13671.8784 -18288.0643 34 18873.7912 -13671.8784 35 2688.8440 18873.7912 36 4041.2840 2688.8440 37 -15699.0783 4041.2840 38 -15373.5883 -15699.0783 39 -2839.8111 -15373.5883 40 -2663.8332 -2839.8111 41 -3885.1351 -2663.8332 42 -3107.3145 -3885.1351 43 -28856.5343 -3107.3145 44 -8804.4438 -28856.5343 45 11413.1692 -8804.4438 46 8451.1410 11413.1692 47 19574.9532 8451.1410 48 9056.0535 19574.9532 49 -25400.4474 9056.0535 50 1915.9936 -25400.4474 51 6314.0162 1915.9936 52 33092.8452 6314.0162 53 25081.5913 33092.8452 54 10479.0798 25081.5913 55 9708.4720 10479.0798 56 12972.0452 9708.4720 57 -871.5158 12972.0452 58 5863.1733 -871.5158 59 -22677.8896 5863.1733 60 5346.9633 -22677.8896 61 -23627.9964 5346.9633 62 -8380.4317 -23627.9964 63 3579.8698 -8380.4317 64 20565.9236 3579.8698 65 -9333.4125 20565.9236 66 -8956.5172 -9333.4125 67 -36233.2323 -8956.5172 68 -3307.8030 -36233.2323 69 10222.1884 -3307.8030 70 11038.3546 10222.1884 71 -1295.1019 11038.3546 72 -16426.9682 -1295.1019 73 -22063.3240 -16426.9682 74 -21469.6975 -22063.3240 75 -5048.1299 -21469.6975 76 6394.3792 -5048.1299 77 -25784.5497 6394.3792 78 -10036.1964 -25784.5497 79 -31451.4169 -10036.1964 80 -6803.6557 -31451.4169 81 47043.8226 -6803.6557 82 -6262.9837 47043.8226 83 -12098.8961 -6262.9837 84 -13013.1904 -12098.8961 85 -1931.6800 -13013.1904 86 31364.8315 -1931.6800 87 -8979.5592 31364.8315 88 -2876.9411 -8979.5592 89 5373.4981 -2876.9411 90 -13470.3184 5373.4981 91 -14573.9965 -13470.3184 92 22820.2091 -14573.9965 93 -481.2050 22820.2091 94 -19682.3389 -481.2050 95 30973.5216 -19682.3389 96 1841.1052 30973.5216 97 2416.2534 1841.1052 98 16099.0498 2416.2534 99 -9689.9620 16099.0498 100 1107.9465 -9689.9620 101 -19474.1132 1107.9465 102 9575.1555 -19474.1132 103 5859.1977 9575.1555 104 10247.7882 5859.1977 105 -4291.5708 10247.7882 106 5399.4197 -4291.5708 107 9642.3345 5399.4197 108 2688.8440 9642.3345 109 -11105.6260 2688.8440 110 -13835.9454 -11105.6260 111 140.1651 -13835.9454 112 -10381.9306 140.1651 113 -4329.1364 -10381.9306 114 5599.7625 -4329.1364 115 2688.8440 5599.7625 116 39317.8586 2688.8440 117 -26488.1740 39317.8586 118 12804.4770 -26488.1740 119 -4395.4749 12804.4770 120 -2785.9614 -4395.4749 121 7995.2379 -2785.9614 122 2138.6506 7995.2379 123 -14229.7663 2138.6506 124 9981.1806 -14229.7663 125 1561.6165 9981.1806 126 -11947.2835 1561.6165 127 20430.4637 -11947.2835 128 -2589.4622 20430.4637 129 1414.0980 -2589.4622 130 6638.8065 1414.0980 131 15533.9268 6638.8065 132 7437.8383 15533.9268 133 -16131.5761 7437.8383 134 4358.9105 -16131.5761 135 2050.5294 4358.9105 136 2688.8440 2050.5294 137 4143.1577 2688.8440 138 -11146.3472 4143.1577 139 5848.6435 -11146.3472 140 4823.7030 5848.6435 141 -4367.1592 4823.7030 142 6017.2089 -4367.1592 143 -3717.6425 6017.2089 > 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/rcomp/tmp/7rqdv1322168361.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/rcomp/tmp/8112g1322168361.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/rcomp/tmp/9tph51322168361.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/rcomp/tmp/10coen1322168361.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/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/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/rcomp/tmp/113p2a1322168361.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/rcomp/tmp/12a5jo1322168361.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/rcomp/tmp/137zb31322168361.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/rcomp/tmp/14r7aj1322168361.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/rcomp/tmp/15xnfy1322168361.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/rcomp/tmp/16phfi1322168361.tab") + } > > try(system("convert tmp/1frn01322168361.ps tmp/1frn01322168361.png",intern=TRUE)) character(0) > try(system("convert tmp/2cm781322168361.ps tmp/2cm781322168361.png",intern=TRUE)) character(0) > try(system("convert tmp/3afbf1322168361.ps tmp/3afbf1322168361.png",intern=TRUE)) character(0) > try(system("convert tmp/46k291322168361.ps tmp/46k291322168361.png",intern=TRUE)) character(0) > try(system("convert tmp/5e2fn1322168361.ps tmp/5e2fn1322168361.png",intern=TRUE)) character(0) > try(system("convert tmp/6vsv61322168361.ps tmp/6vsv61322168361.png",intern=TRUE)) character(0) > try(system("convert tmp/7rqdv1322168361.ps tmp/7rqdv1322168361.png",intern=TRUE)) character(0) > try(system("convert tmp/8112g1322168361.ps tmp/8112g1322168361.png",intern=TRUE)) character(0) > try(system("convert tmp/9tph51322168361.ps tmp/9tph51322168361.png",intern=TRUE)) character(0) > try(system("convert tmp/10coen1322168361.ps tmp/10coen1322168361.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 5.864 0.668 6.700