R version 2.12.0 (2010-10-15) 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(158258 + ,48 + ,18 + ,63 + ,20465 + ,23975 + ,186930 + ,53 + ,20 + ,56 + ,33629 + ,85634 + ,7215 + ,0 + ,0 + ,0 + ,1423 + ,1929 + ,128162 + ,51 + ,27 + ,63 + ,25629 + ,36294 + ,226974 + ,76 + ,31 + ,116 + ,54002 + ,72255 + ,500344 + ,125 + ,36 + ,138 + ,151036 + ,189748 + ,171007 + ,59 + ,23 + ,71 + ,33287 + ,61834 + ,179835 + ,80 + ,30 + ,107 + ,31172 + ,68167 + ,154581 + ,55 + ,30 + ,50 + ,28113 + ,38462 + ,278960 + ,67 + ,26 + ,79 + ,57803 + ,101219 + ,121844 + ,50 + ,24 + ,58 + ,49830 + ,43270 + ,183086 + ,77 + ,30 + ,91 + ,52143 + ,76183 + ,98796 + ,44 + ,22 + ,41 + ,21055 + ,31476 + ,209322 + ,79 + ,25 + ,91 + ,47007 + ,62157 + ,157125 + ,51 + ,18 + ,61 + ,28735 + ,46261 + ,154565 + ,54 + ,22 + ,74 + ,59147 + ,50063 + ,134198 + ,75 + ,33 + ,131 + ,78950 + ,64483 + ,69128 + ,2 + ,15 + ,45 + ,13497 + ,2341 + ,150680 + ,73 + ,34 + ,110 + ,46154 + ,48149 + ,27997 + ,13 + ,18 + ,41 + ,53249 + ,12743 + ,69919 + ,19 + ,15 + ,37 + ,10726 + ,18743 + ,233044 + ,93 + ,30 + ,84 + ,83700 + ,97057 + ,195820 + ,38 + ,25 + ,67 + ,40400 + ,17675 + ,127994 + ,48 + ,34 + ,69 + ,33797 + ,33106 + ,145433 + ,50 + ,21 + ,58 + ,36205 + ,53311 + ,170864 + ,48 + ,21 + ,60 + ,30165 + ,42754 + ,199655 + ,60 + ,25 + ,88 + ,58534 + ,59056 + ,188633 + ,81 + ,31 + ,75 + ,44663 + ,101621 + ,354266 + ,60 + ,31 + ,98 + ,92556 + ,118120 + ,192399 + ,52 + ,20 + ,67 + ,40078 + ,79572 + ,165753 + ,50 + ,28 + ,84 + ,34711 + ,42744 + ,173721 + ,60 + ,20 + ,58 + ,31076 + ,65931 + ,126739 + ,53 + ,17 + ,35 + ,74608 + ,38575 + ,224762 + ,76 + ,25 + ,74 + ,58092 + ,28795 + ,219428 + ,63 + ,24 + ,89 + ,42009 + ,94440 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,217267 + ,54 + ,27 + ,75 + ,36022 + ,38229 + ,99706 + ,44 + ,14 + ,39 + ,23333 + ,31972 + ,136733 + ,36 + ,35 + ,101 + ,53349 + ,40071 + ,249965 + ,83 + ,34 + ,135 + ,92596 + ,132480 + ,232951 + ,105 + ,22 + ,76 + ,49598 + ,62797 + ,143755 + ,37 + ,34 + ,118 + ,44093 + ,40429 + ,95734 + ,25 + ,23 + ,76 + ,84205 + ,45545 + ,191416 + ,63 + ,24 + ,65 + ,63369 + ,57568 + ,114820 + ,55 + ,26 + ,97 + ,60132 + ,39019 + ,157625 + ,41 + ,22 + ,67 + ,37403 + ,53866 + ,81293 + ,23 + ,35 + ,63 + ,24460 + ,38345 + ,210040 + ,63 + ,24 + ,96 + ,46456 + ,50210 + ,223771 + ,54 + ,31 + ,112 + ,66616 + ,80947 + ,160344 + ,68 + ,26 + ,75 + ,41554 + ,43461 + ,48188 + ,12 + ,22 + ,39 + ,22346 + ,14812 + ,145235 + ,84 + ,21 + ,63 + ,30874 + ,37819 + ,287839 + ,66 + ,27 + ,93 + ,68701 + ,102738 + ,235223 + ,56 + ,30 + ,76 + ,35728 + ,54509 + ,195583 + ,67 + ,33 + ,117 + ,29010 + ,62956 + ,145942 + ,40 + ,11 + ,30 + ,23110 + ,55411 + ,207309 + ,53 + ,26 + ,65 + ,38844 + ,50611 + ,93764 + ,26 + ,26 + ,78 + ,27084 + ,26692 + ,151985 + ,67 + ,23 + ,87 + ,35139 + ,60056 + ,190545 + ,36 + ,38 + ,85 + ,57476 + ,25155 + ,146414 + ,50 + ,30 + ,111 + ,33277 + ,42840 + ,130794 + ,48 + ,19 + ,60 + ,31141 + ,39358 + ,124234 + ,46 + ,19 + ,53 + ,61281 + ,47241 + ,112718 + ,53 + ,26 + ,67 + ,25820 + ,49611 + ,160817 + ,27 + ,26 + ,90 + ,23284 + ,41833 + ,99070 + ,38 + ,33 + ,100 + ,35378 + ,48930 + ,178653 + ,68 + ,36 + ,135 + ,74990 + ,110600 + ,138708 + ,93 + ,25 + ,71 + ,29653 + ,52235 + ,114408 + ,59 + ,24 + ,75 + ,64622 + ,53986 + ,31970 + ,5 + ,21 + ,42 + ,4157 + ,4105 + ,224494 + ,53 + ,19 + ,42 + ,29245 + ,59331 + ,123328 + ,36 + ,12 + ,8 + ,50008 + ,47796 + ,113504 + ,72 + ,30 + ,86 + ,52338 + ,38302 + ,105932 + ,49 + ,21 + ,41 + ,13310 + ,14063 + ,162203 + ,81 + ,34 + ,118 + ,92901 + ,54414 + ,100098 + ,27 + ,32 + ,91 + ,10956 + ,9903 + ,174768 + ,94 + ,28 + ,102 + ,34241 + ,53987 + ,156752 + ,71 + ,28 + ,89 + ,75043 + ,88937 + ,77269 + ,18 + ,21 + ,46 + ,21152 + ,21928 + ,84971 + ,34 + ,31 + ,60 + ,42249 + ,29487 + ,80522 + ,54 + ,26 + ,69 + ,42005 + ,35334 + ,276525 + ,44 + ,29 + ,95 + ,41152 + ,57596 + ,62974 + ,26 + ,23 + ,17 + ,14399 + ,29750 + ,120296 + ,44 + ,25 + ,61 + ,28263 + ,41029 + ,75555 + ,35 + ,22 + ,55 + ,17215 + ,12416 + ,157988 + ,32 + ,26 + ,55 + ,48140 + ,51158 + ,223247 + ,55 + ,33 + ,124 + ,62897 + ,79935 + ,115019 + ,58 + ,24 + ,73 + ,22883 + ,26552 + ,99602 + ,44 + ,24 + ,73 + ,41622 + ,25807 + ,151804 + ,39 + ,21 + ,67 + ,40715 + ,50620 + ,146005 + ,49 + ,28 + ,66 + ,65897 + ,61467 + ,163444 + ,72 + ,27 + ,75 + ,76542 + ,65292 + ,151517 + ,39 + ,25 + ,83 + ,37477 + ,55516 + ,133686 + ,28 + ,15 + ,55 + ,53216 + ,42006 + ,58128 + ,24 + ,13 + ,27 + ,40911 + ,26273 + ,234325 + ,49 + ,36 + ,115 + ,57021 + ,90248 + ,195576 + ,96 + ,24 + ,76 + ,73116 + ,61476 + ,19349 + ,13 + ,1 + ,0 + ,3895 + ,9604 + ,213189 + ,32 + ,24 + ,83 + ,46609 + ,45108 + ,151672 + ,41 + ,31 + ,90 + ,29351 + ,47232 + ,59117 + ,24 + ,4 + ,4 + ,2325 + ,3439 + ,71931 + ,52 + ,20 + ,56 + ,31747 + ,30553 + ,126653 + ,57 + ,23 + ,63 + ,32665 + ,24751 + ,113552 + ,28 + ,23 + ,52 + ,19249 + ,34458 + ,85338 + ,36 + ,12 + ,24 + ,15292 + ,24649 + ,27676 + ,2 + ,16 + ,17 + ,5842 + ,2342 + ,138522 + ,80 + ,29 + ,105 + ,33994 + ,52739 + ,122417 + ,29 + ,26 + ,20 + ,13018 + ,6245 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,87592 + ,46 + ,25 + ,51 + ,98177 + ,35381 + ,107205 + ,25 + ,21 + ,76 + ,37941 + ,19595 + ,144664 + ,51 + ,23 + ,59 + ,31032 + ,50848 + ,136540 + ,59 + ,21 + ,70 + ,32683 + ,39443 + ,71894 + ,36 + ,21 + ,38 + ,34545 + ,27023 + ,3616 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,175055 + ,38 + ,23 + ,81 + ,27525 + ,61022 + ,144618 + ,68 + ,33 + ,78 + ,66856 + ,63528 + ,152826 + ,28 + ,28 + ,67 + ,28549 + ,34835 + ,113245 + ,36 + ,23 + ,89 + ,38610 + ,37172 + ,43410 + ,7 + ,1 + ,3 + ,2781 + ,13 + ,175762 + ,70 + ,29 + ,87 + ,41211 + ,62548 + ,93634 + ,30 + ,17 + ,48 + ,22698 + ,31334 + ,117426 + ,59 + ,31 + ,66 + ,41194 + ,20839 + ,60493 + ,3 + ,12 + ,32 + ,32689 + ,5084 + ,19764 + ,10 + ,2 + ,4 + ,5752 + ,9927 + ,164062 + ,46 + ,21 + ,70 + ,26757 + ,53229 + ,128144 + ,34 + ,26 + ,94 + ,22527 + ,29877 + ,154959 + ,54 + ,29 + ,91 + ,44810 + ,37310 + ,11796 + ,1 + ,2 + ,1 + ,0 + ,0 + ,10674 + ,0 + ,0 + ,0 + ,0 + ,0 + ,138547 + ,35 + ,18 + ,39 + ,100674 + ,50067 + ,6836 + ,0 + ,1 + ,0 + ,0 + ,0 + ,154135 + ,48 + ,21 + ,45 + ,57786 + ,47708 + ,5118 + ,5 + ,0 + ,0 + ,0 + ,0 + ,40248 + ,8 + ,4 + ,7 + ,5444 + ,6012 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,120460 + ,36 + ,25 + ,75 + ,28470 + ,27749 + ,88837 + ,21 + ,26 + ,52 + ,61849 + ,47555 + ,7131 + ,0 + ,0 + ,0 + ,0 + ,0 + ,9056 + ,0 + ,4 + ,1 + ,2179 + ,1336 + ,68916 + ,15 + ,17 + ,49 + ,8019 + ,11017 + ,132697 + ,50 + ,21 + ,69 + ,39644 + ,55184 + ,100681 + ,17 + ,22 + ,56 + ,23494 + ,43485) + ,dim=c(6 + ,144) + ,dimnames=list(c('A' + ,'B' + ,'C' + ,'D' + ,'E' + ,'F') + ,1:144)) > y <- array(NA,dim=c(6,144),dimnames=list(c('A','B','C','D','E','F'),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 = '5' > #'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 E A B C D F 1 20465 158258 48 18 63 23975 2 33629 186930 53 20 56 85634 3 1423 7215 0 0 0 1929 4 25629 128162 51 27 63 36294 5 54002 226974 76 31 116 72255 6 151036 500344 125 36 138 189748 7 33287 171007 59 23 71 61834 8 31172 179835 80 30 107 68167 9 28113 154581 55 30 50 38462 10 57803 278960 67 26 79 101219 11 49830 121844 50 24 58 43270 12 52143 183086 77 30 91 76183 13 21055 98796 44 22 41 31476 14 47007 209322 79 25 91 62157 15 28735 157125 51 18 61 46261 16 59147 154565 54 22 74 50063 17 78950 134198 75 33 131 64483 18 13497 69128 2 15 45 2341 19 46154 150680 73 34 110 48149 20 53249 27997 13 18 41 12743 21 10726 69919 19 15 37 18743 22 83700 233044 93 30 84 97057 23 40400 195820 38 25 67 17675 24 33797 127994 48 34 69 33106 25 36205 145433 50 21 58 53311 26 30165 170864 48 21 60 42754 27 58534 199655 60 25 88 59056 28 44663 188633 81 31 75 101621 29 92556 354266 60 31 98 118120 30 40078 192399 52 20 67 79572 31 34711 165753 50 28 84 42744 32 31076 173721 60 20 58 65931 33 74608 126739 53 17 35 38575 34 58092 224762 76 25 74 28795 35 42009 219428 63 24 89 94440 36 0 0 0 0 0 0 37 36022 217267 54 27 75 38229 38 23333 99706 44 14 39 31972 39 53349 136733 36 35 101 40071 40 92596 249965 83 34 135 132480 41 49598 232951 105 22 76 62797 42 44093 143755 37 34 118 40429 43 84205 95734 25 23 76 45545 44 63369 191416 63 24 65 57568 45 60132 114820 55 26 97 39019 46 37403 157625 41 22 67 53866 47 24460 81293 23 35 63 38345 48 46456 210040 63 24 96 50210 49 66616 223771 54 31 112 80947 50 41554 160344 68 26 75 43461 51 22346 48188 12 22 39 14812 52 30874 145235 84 21 63 37819 53 68701 287839 66 27 93 102738 54 35728 235223 56 30 76 54509 55 29010 195583 67 33 117 62956 56 23110 145942 40 11 30 55411 57 38844 207309 53 26 65 50611 58 27084 93764 26 26 78 26692 59 35139 151985 67 23 87 60056 60 57476 190545 36 38 85 25155 61 33277 146414 50 30 111 42840 62 31141 130794 48 19 60 39358 63 61281 124234 46 19 53 47241 64 25820 112718 53 26 67 49611 65 23284 160817 27 26 90 41833 66 35378 99070 38 33 100 48930 67 74990 178653 68 36 135 110600 68 29653 138708 93 25 71 52235 69 64622 114408 59 24 75 53986 70 4157 31970 5 21 42 4105 71 29245 224494 53 19 42 59331 72 50008 123328 36 12 8 47796 73 52338 113504 72 30 86 38302 74 13310 105932 49 21 41 14063 75 92901 162203 81 34 118 54414 76 10956 100098 27 32 91 9903 77 34241 174768 94 28 102 53987 78 75043 156752 71 28 89 88937 79 21152 77269 18 21 46 21928 80 42249 84971 34 31 60 29487 81 42005 80522 54 26 69 35334 82 41152 276525 44 29 95 57596 83 14399 62974 26 23 17 29750 84 28263 120296 44 25 61 41029 85 17215 75555 35 22 55 12416 86 48140 157988 32 26 55 51158 87 62897 223247 55 33 124 79935 88 22883 115019 58 24 73 26552 89 41622 99602 44 24 73 25807 90 40715 151804 39 21 67 50620 91 65897 146005 49 28 66 61467 92 76542 163444 72 27 75 65292 93 37477 151517 39 25 83 55516 94 53216 133686 28 15 55 42006 95 40911 58128 24 13 27 26273 96 57021 234325 49 36 115 90248 97 73116 195576 96 24 76 61476 98 3895 19349 13 1 0 9604 99 46609 213189 32 24 83 45108 100 29351 151672 41 31 90 47232 101 2325 59117 24 4 4 3439 102 31747 71931 52 20 56 30553 103 32665 126653 57 23 63 24751 104 19249 113552 28 23 52 34458 105 15292 85338 36 12 24 24649 106 5842 27676 2 16 17 2342 107 33994 138522 80 29 105 52739 108 13018 122417 29 26 20 6245 109 0 0 0 0 0 0 110 98177 87592 46 25 51 35381 111 37941 107205 25 21 76 19595 112 31032 144664 51 23 59 50848 113 32683 136540 59 21 70 39443 114 34545 71894 36 21 38 27023 115 0 3616 0 0 0 0 116 0 0 0 0 0 0 117 27525 175055 38 23 81 61022 118 66856 144618 68 33 78 63528 119 28549 152826 28 28 67 34835 120 38610 113245 36 23 89 37172 121 2781 43410 7 1 3 13 122 41211 175762 70 29 87 62548 123 22698 93634 30 17 48 31334 124 41194 117426 59 31 66 20839 125 32689 60493 3 12 32 5084 126 5752 19764 10 2 4 9927 127 26757 164062 46 21 70 53229 128 22527 128144 34 26 94 29877 129 44810 154959 54 29 91 37310 130 0 11796 1 2 1 0 131 0 10674 0 0 0 0 132 100674 138547 35 18 39 50067 133 0 6836 0 1 0 0 134 57786 154135 48 21 45 47708 135 0 5118 5 0 0 0 136 5444 40248 8 4 7 6012 137 0 0 0 0 0 0 138 28470 120460 36 25 75 27749 139 61849 88837 21 26 52 47555 140 0 7131 0 0 0 0 141 2179 9056 0 4 1 1336 142 8019 68916 15 17 49 11017 143 39644 132697 50 21 69 55184 144 23494 100681 17 22 56 43485 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) A B C D F 1.297e+03 -4.211e-03 1.040e+02 6.155e+02 -2.188e+01 4.755e-01 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -30028 -10108 -3256 7150 62286 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 1.297e+03 3.499e+03 0.371 0.7114 A -4.211e-03 3.911e-02 -0.108 0.9144 B 1.040e+02 9.250e+01 1.124 0.2628 C 6.155e+02 3.032e+02 2.030 0.0442 * D -2.188e+01 9.576e+01 -0.228 0.8196 F 4.755e-01 9.465e-02 5.024 1.54e-06 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 15930 on 138 degrees of freedom Multiple R-squared: 0.6116, Adjusted R-squared: 0.5975 F-statistic: 43.45 on 5 and 138 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.3684959 0.736991828 0.631504086 [2,] 0.3863283 0.772656594 0.613671703 [3,] 0.6751477 0.649704579 0.324852289 [4,] 0.5654291 0.869141709 0.434570855 [5,] 0.4497625 0.899525015 0.550237493 [6,] 0.3496432 0.699286496 0.650356752 [7,] 0.2639789 0.527957898 0.736021051 [8,] 0.4323602 0.864720356 0.567639822 [9,] 0.5706503 0.858699432 0.429349716 [10,] 0.4847776 0.969555163 0.515222418 [11,] 0.3996973 0.799394536 0.600302732 [12,] 0.6569542 0.686091522 0.343045761 [13,] 0.6132514 0.773497223 0.386748612 [14,] 0.6611306 0.677738847 0.338869423 [15,] 0.6502617 0.699476691 0.349738346 [16,] 0.5903658 0.819268363 0.409634181 [17,] 0.5233546 0.953290746 0.476645373 [18,] 0.4591466 0.918293275 0.540853362 [19,] 0.4065924 0.813184737 0.593407632 [20,] 0.4644046 0.928809180 0.535595410 [21,] 0.4153191 0.830638270 0.584680865 [22,] 0.4083222 0.816644381 0.591677809 [23,] 0.3730009 0.746001823 0.626999089 [24,] 0.3452600 0.690520072 0.654739964 [25,] 0.8222797 0.355440676 0.177720338 [26,] 0.8302731 0.339453803 0.169726902 [27,] 0.8527852 0.294429647 0.147214824 [28,] 0.8173165 0.365367055 0.182683527 [29,] 0.7900000 0.420000081 0.210000040 [30,] 0.7487953 0.502409410 0.251204705 [31,] 0.7233850 0.553230042 0.276615021 [32,] 0.6832728 0.633454332 0.316727166 [33,] 0.6334688 0.733062435 0.366531217 [34,] 0.5852585 0.829483035 0.414741517 [35,] 0.8770326 0.245934716 0.122967358 [36,] 0.8778747 0.244250662 0.122125331 [37,] 0.8883630 0.223274062 0.111637031 [38,] 0.8657720 0.268455965 0.134227982 [39,] 0.8623415 0.275316908 0.137658454 [40,] 0.8398205 0.320359091 0.160179546 [41,] 0.8098092 0.380381566 0.190190783 [42,] 0.7723872 0.455225617 0.227612809 [43,] 0.7330158 0.533968441 0.266984221 [44,] 0.6947401 0.610519786 0.305259893 [45,] 0.6507080 0.698583996 0.349291998 [46,] 0.6371254 0.725749198 0.362874599 [47,] 0.7329857 0.534028632 0.267014316 [48,] 0.7248888 0.550222406 0.275111203 [49,] 0.6874359 0.625128219 0.312564109 [50,] 0.6462359 0.707528163 0.353764081 [51,] 0.6331073 0.733785390 0.366892695 [52,] 0.6599630 0.680074076 0.340037038 [53,] 0.6379518 0.724096493 0.362048246 [54,] 0.5924907 0.815018622 0.407509311 [55,] 0.6483089 0.703382196 0.351691098 [56,] 0.6618533 0.676293419 0.338146710 [57,] 0.6649841 0.670031845 0.335015922 [58,] 0.6376278 0.724744413 0.362372207 [59,] 0.6121109 0.775778108 0.387889054 [60,] 0.6448921 0.710215782 0.355107891 [61,] 0.6661297 0.667740621 0.333870310 [62,] 0.6376287 0.724742622 0.362371311 [63,] 0.6447424 0.710515288 0.355257644 [64,] 0.6460751 0.707849799 0.353924899 [65,] 0.6202189 0.759562269 0.379781135 [66,] 0.5943193 0.811361356 0.405680678 [67,] 0.8188871 0.362225787 0.181112893 [68,] 0.8059129 0.388174288 0.194087144 [69,] 0.8138434 0.372313240 0.186156620 [70,] 0.7905518 0.418896432 0.209448216 [71,] 0.7541042 0.491791635 0.245895817 [72,] 0.7230694 0.553861192 0.276930596 [73,] 0.6838106 0.632378815 0.316189408 [74,] 0.6483848 0.703230489 0.351615244 [75,] 0.6991590 0.601681914 0.300840957 [76,] 0.6862917 0.627416548 0.313708274 [77,] 0.6435778 0.712844337 0.356422168 [78,] 0.6019872 0.796025565 0.398012782 [79,] 0.5556299 0.888740124 0.444370062 [80,] 0.5214335 0.957133027 0.478566514 [81,] 0.5016729 0.996654232 0.498327116 [82,] 0.4507448 0.901489661 0.549255170 [83,] 0.4296404 0.859280803 0.570359599 [84,] 0.4480982 0.896196432 0.551901784 [85,] 0.4066671 0.813334128 0.593332936 [86,] 0.4544293 0.908858551 0.545570725 [87,] 0.4481620 0.896323988 0.551838006 [88,] 0.4240683 0.848136587 0.575931707 [89,] 0.4432362 0.886472478 0.556763761 [90,] 0.3959996 0.791999283 0.604000358 [91,] 0.3932439 0.786487748 0.606756126 [92,] 0.3847713 0.769542624 0.615228688 [93,] 0.3364378 0.672875564 0.663562218 [94,] 0.2909058 0.581811600 0.709094200 [95,] 0.2478741 0.495748138 0.752125931 [96,] 0.2532886 0.506577117 0.746711441 [97,] 0.2260574 0.452114837 0.773942581 [98,] 0.2194172 0.438834399 0.780582800 [99,] 0.2135689 0.427137702 0.786431149 [100,] 0.2806402 0.561280474 0.719359763 [101,] 0.2335845 0.467168998 0.766415501 [102,] 0.7906002 0.418799601 0.209399800 [103,] 0.8306703 0.338659486 0.169329743 [104,] 0.8452634 0.309473234 0.154736617 [105,] 0.8041718 0.391656440 0.195828220 [106,] 0.7642384 0.471523175 0.235761588 [107,] 0.7099842 0.580031576 0.290015788 [108,] 0.6497762 0.700447620 0.350223810 [109,] 0.6708740 0.658252060 0.329126030 [110,] 0.6115649 0.776870288 0.388435144 [111,] 0.7163382 0.567323547 0.283661774 [112,] 0.8228885 0.354223048 0.177111524 [113,] 0.7867433 0.426513342 0.213256671 [114,] 0.7445567 0.510886571 0.255443286 [115,] 0.6877655 0.624468995 0.312234497 [116,] 0.6347111 0.730577749 0.365288874 [117,] 0.6770923 0.645815461 0.322907731 [118,] 0.5955363 0.808927389 0.404463694 [119,] 0.7192250 0.561549913 0.280774956 [120,] 0.6656517 0.668696630 0.334348315 [121,] 0.6243328 0.751334435 0.375667218 [122,] 0.5238461 0.952307749 0.476153874 [123,] 0.4138393 0.827678502 0.586160749 [124,] 0.9979107 0.004178627 0.002089314 [125,] 0.9923967 0.015206533 0.007603267 [126,] 0.9749226 0.050154702 0.025077351 [127,] 0.9256704 0.148659191 0.074329595 > postscript(file="/var/www/rcomp/tmp/100sy1324507011.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/2cbwi1324507011.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/354vo1324507011.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/47r9f1324507011.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/5x6d11324507011.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 -6259.5972 -24199.3942 -760.8478 -12932.1249 -5146.0417 29476.0383 7 8 9 10 11 12 -15433.4412 -26227.9705 -13914.7876 -11694.9268 9766.2315 -9093.0928 13 14 15 16 17 18 -12014.3198 -4579.2360 -8947.6540 17155.8736 22308.0884 2921.3899 19 20 21 22 23 24 -3518.2115 34475.6608 -9588.8417 10931.0689 13648.1699 -7114.3366 25 26 27 28 29 30 -6687.5654 -7348.6041 10292.0350 -30027.6649 13404.3598 -14500.1000 31 32 33 34 35 36 -6811.0863 -18123.0209 40291.0187 22375.3386 -22650.2341 -1296.9468 37 38 39 40 41 42 -3133.5005 -5087.8344 10494.9396 2747.3752 -3378.6115 1981.6957 43 44 45 46 47 48 46558.7648 15600.3053 21162.1922 -5184.7824 -17286.0593 2942.7954 49 50 51 52 53 54 5521.7205 -1169.6416 271.9498 -8079.2161 -1687.1263 -13126.1392 55 56 57 58 59 60 -26121.5277 -14196.2095 -5740.6026 -3512.3221 -13298.0590 19744.8693 61 62 63 64 65 66 -9012.5998 -3695.4079 22723.2785 -18643.6859 -14071.3387 -10846.1533 67 68 69 70 71 72 -4425.5365 -19405.9909 18867.0827 -11484.7489 -15608.2130 15546.8720 73 74 75 76 77 78 9232.8261 -11353.4339 39641.1597 -15142.8849 -16771.6963 9442.4865 79 80 81 82 83 84 -4038.7483 5983.1230 4134.5345 -6716.9643 -17268.9691 -10667.5407 85 86 87 88 89 90 -5646.4396 5052.8282 1209.1873 -9763.5644 10720.7811 469.7888 91 92 93 94 95 96 15098.7436 22418.7099 -7209.7057 21565.3465 17458.1103 -10943.7187 97 98 99 100 101 102 20315.0937 -3854.9346 8474.8112 -15143.8794 -5228.9510 -269.3504 103 104 105 106 107 108 1424.6253 -13887.0810 -7972.1469 -6136.7118 -15671.7867 -9315.4088 109 110 111 112 113 114 -1296.9468 61367.7317 13913.9927 -12005.7787 -4325.9423 4861.8043 115 116 117 118 119 120 -1281.7184 -1296.9468 -18389.4993 10280.6819 -7350.4840 4159.4546 121 122 123 124 125 126 382.7785 -12316.1313 -5638.7315 6708.3793 22230.8749 -2365.8096 127 128 129 130 131 132 -15339.6067 -9921.0702 4948.0501 -2560.4602 -1251.9945 62286.0018 133 134 135 136 137 138 -1883.6909 17518.0596 -1795.3954 -1683.3041 -1296.9468 -3006.6234 139 140 141 142 143 144 21262.2984 -1266.9154 -2155.3654 -9178.7202 -3952.2244 -12141.8009 > postscript(file="/var/www/rcomp/tmp/6ugpa1324507011.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 -6259.5972 NA 1 -24199.3942 -6259.5972 2 -760.8478 -24199.3942 3 -12932.1249 -760.8478 4 -5146.0417 -12932.1249 5 29476.0383 -5146.0417 6 -15433.4412 29476.0383 7 -26227.9705 -15433.4412 8 -13914.7876 -26227.9705 9 -11694.9268 -13914.7876 10 9766.2315 -11694.9268 11 -9093.0928 9766.2315 12 -12014.3198 -9093.0928 13 -4579.2360 -12014.3198 14 -8947.6540 -4579.2360 15 17155.8736 -8947.6540 16 22308.0884 17155.8736 17 2921.3899 22308.0884 18 -3518.2115 2921.3899 19 34475.6608 -3518.2115 20 -9588.8417 34475.6608 21 10931.0689 -9588.8417 22 13648.1699 10931.0689 23 -7114.3366 13648.1699 24 -6687.5654 -7114.3366 25 -7348.6041 -6687.5654 26 10292.0350 -7348.6041 27 -30027.6649 10292.0350 28 13404.3598 -30027.6649 29 -14500.1000 13404.3598 30 -6811.0863 -14500.1000 31 -18123.0209 -6811.0863 32 40291.0187 -18123.0209 33 22375.3386 40291.0187 34 -22650.2341 22375.3386 35 -1296.9468 -22650.2341 36 -3133.5005 -1296.9468 37 -5087.8344 -3133.5005 38 10494.9396 -5087.8344 39 2747.3752 10494.9396 40 -3378.6115 2747.3752 41 1981.6957 -3378.6115 42 46558.7648 1981.6957 43 15600.3053 46558.7648 44 21162.1922 15600.3053 45 -5184.7824 21162.1922 46 -17286.0593 -5184.7824 47 2942.7954 -17286.0593 48 5521.7205 2942.7954 49 -1169.6416 5521.7205 50 271.9498 -1169.6416 51 -8079.2161 271.9498 52 -1687.1263 -8079.2161 53 -13126.1392 -1687.1263 54 -26121.5277 -13126.1392 55 -14196.2095 -26121.5277 56 -5740.6026 -14196.2095 57 -3512.3221 -5740.6026 58 -13298.0590 -3512.3221 59 19744.8693 -13298.0590 60 -9012.5998 19744.8693 61 -3695.4079 -9012.5998 62 22723.2785 -3695.4079 63 -18643.6859 22723.2785 64 -14071.3387 -18643.6859 65 -10846.1533 -14071.3387 66 -4425.5365 -10846.1533 67 -19405.9909 -4425.5365 68 18867.0827 -19405.9909 69 -11484.7489 18867.0827 70 -15608.2130 -11484.7489 71 15546.8720 -15608.2130 72 9232.8261 15546.8720 73 -11353.4339 9232.8261 74 39641.1597 -11353.4339 75 -15142.8849 39641.1597 76 -16771.6963 -15142.8849 77 9442.4865 -16771.6963 78 -4038.7483 9442.4865 79 5983.1230 -4038.7483 80 4134.5345 5983.1230 81 -6716.9643 4134.5345 82 -17268.9691 -6716.9643 83 -10667.5407 -17268.9691 84 -5646.4396 -10667.5407 85 5052.8282 -5646.4396 86 1209.1873 5052.8282 87 -9763.5644 1209.1873 88 10720.7811 -9763.5644 89 469.7888 10720.7811 90 15098.7436 469.7888 91 22418.7099 15098.7436 92 -7209.7057 22418.7099 93 21565.3465 -7209.7057 94 17458.1103 21565.3465 95 -10943.7187 17458.1103 96 20315.0937 -10943.7187 97 -3854.9346 20315.0937 98 8474.8112 -3854.9346 99 -15143.8794 8474.8112 100 -5228.9510 -15143.8794 101 -269.3504 -5228.9510 102 1424.6253 -269.3504 103 -13887.0810 1424.6253 104 -7972.1469 -13887.0810 105 -6136.7118 -7972.1469 106 -15671.7867 -6136.7118 107 -9315.4088 -15671.7867 108 -1296.9468 -9315.4088 109 61367.7317 -1296.9468 110 13913.9927 61367.7317 111 -12005.7787 13913.9927 112 -4325.9423 -12005.7787 113 4861.8043 -4325.9423 114 -1281.7184 4861.8043 115 -1296.9468 -1281.7184 116 -18389.4993 -1296.9468 117 10280.6819 -18389.4993 118 -7350.4840 10280.6819 119 4159.4546 -7350.4840 120 382.7785 4159.4546 121 -12316.1313 382.7785 122 -5638.7315 -12316.1313 123 6708.3793 -5638.7315 124 22230.8749 6708.3793 125 -2365.8096 22230.8749 126 -15339.6067 -2365.8096 127 -9921.0702 -15339.6067 128 4948.0501 -9921.0702 129 -2560.4602 4948.0501 130 -1251.9945 -2560.4602 131 62286.0018 -1251.9945 132 -1883.6909 62286.0018 133 17518.0596 -1883.6909 134 -1795.3954 17518.0596 135 -1683.3041 -1795.3954 136 -1296.9468 -1683.3041 137 -3006.6234 -1296.9468 138 21262.2984 -3006.6234 139 -1266.9154 21262.2984 140 -2155.3654 -1266.9154 141 -9178.7202 -2155.3654 142 -3952.2244 -9178.7202 143 -12141.8009 -3952.2244 144 NA -12141.8009 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -24199.3942 -6259.5972 [2,] -760.8478 -24199.3942 [3,] -12932.1249 -760.8478 [4,] -5146.0417 -12932.1249 [5,] 29476.0383 -5146.0417 [6,] -15433.4412 29476.0383 [7,] -26227.9705 -15433.4412 [8,] -13914.7876 -26227.9705 [9,] -11694.9268 -13914.7876 [10,] 9766.2315 -11694.9268 [11,] -9093.0928 9766.2315 [12,] -12014.3198 -9093.0928 [13,] -4579.2360 -12014.3198 [14,] -8947.6540 -4579.2360 [15,] 17155.8736 -8947.6540 [16,] 22308.0884 17155.8736 [17,] 2921.3899 22308.0884 [18,] -3518.2115 2921.3899 [19,] 34475.6608 -3518.2115 [20,] -9588.8417 34475.6608 [21,] 10931.0689 -9588.8417 [22,] 13648.1699 10931.0689 [23,] -7114.3366 13648.1699 [24,] -6687.5654 -7114.3366 [25,] -7348.6041 -6687.5654 [26,] 10292.0350 -7348.6041 [27,] -30027.6649 10292.0350 [28,] 13404.3598 -30027.6649 [29,] -14500.1000 13404.3598 [30,] -6811.0863 -14500.1000 [31,] -18123.0209 -6811.0863 [32,] 40291.0187 -18123.0209 [33,] 22375.3386 40291.0187 [34,] -22650.2341 22375.3386 [35,] -1296.9468 -22650.2341 [36,] -3133.5005 -1296.9468 [37,] -5087.8344 -3133.5005 [38,] 10494.9396 -5087.8344 [39,] 2747.3752 10494.9396 [40,] -3378.6115 2747.3752 [41,] 1981.6957 -3378.6115 [42,] 46558.7648 1981.6957 [43,] 15600.3053 46558.7648 [44,] 21162.1922 15600.3053 [45,] -5184.7824 21162.1922 [46,] -17286.0593 -5184.7824 [47,] 2942.7954 -17286.0593 [48,] 5521.7205 2942.7954 [49,] -1169.6416 5521.7205 [50,] 271.9498 -1169.6416 [51,] -8079.2161 271.9498 [52,] -1687.1263 -8079.2161 [53,] -13126.1392 -1687.1263 [54,] -26121.5277 -13126.1392 [55,] -14196.2095 -26121.5277 [56,] -5740.6026 -14196.2095 [57,] -3512.3221 -5740.6026 [58,] -13298.0590 -3512.3221 [59,] 19744.8693 -13298.0590 [60,] -9012.5998 19744.8693 [61,] -3695.4079 -9012.5998 [62,] 22723.2785 -3695.4079 [63,] -18643.6859 22723.2785 [64,] -14071.3387 -18643.6859 [65,] -10846.1533 -14071.3387 [66,] -4425.5365 -10846.1533 [67,] -19405.9909 -4425.5365 [68,] 18867.0827 -19405.9909 [69,] -11484.7489 18867.0827 [70,] -15608.2130 -11484.7489 [71,] 15546.8720 -15608.2130 [72,] 9232.8261 15546.8720 [73,] -11353.4339 9232.8261 [74,] 39641.1597 -11353.4339 [75,] -15142.8849 39641.1597 [76,] -16771.6963 -15142.8849 [77,] 9442.4865 -16771.6963 [78,] -4038.7483 9442.4865 [79,] 5983.1230 -4038.7483 [80,] 4134.5345 5983.1230 [81,] -6716.9643 4134.5345 [82,] -17268.9691 -6716.9643 [83,] -10667.5407 -17268.9691 [84,] -5646.4396 -10667.5407 [85,] 5052.8282 -5646.4396 [86,] 1209.1873 5052.8282 [87,] -9763.5644 1209.1873 [88,] 10720.7811 -9763.5644 [89,] 469.7888 10720.7811 [90,] 15098.7436 469.7888 [91,] 22418.7099 15098.7436 [92,] -7209.7057 22418.7099 [93,] 21565.3465 -7209.7057 [94,] 17458.1103 21565.3465 [95,] -10943.7187 17458.1103 [96,] 20315.0937 -10943.7187 [97,] -3854.9346 20315.0937 [98,] 8474.8112 -3854.9346 [99,] -15143.8794 8474.8112 [100,] -5228.9510 -15143.8794 [101,] -269.3504 -5228.9510 [102,] 1424.6253 -269.3504 [103,] -13887.0810 1424.6253 [104,] -7972.1469 -13887.0810 [105,] -6136.7118 -7972.1469 [106,] -15671.7867 -6136.7118 [107,] -9315.4088 -15671.7867 [108,] -1296.9468 -9315.4088 [109,] 61367.7317 -1296.9468 [110,] 13913.9927 61367.7317 [111,] -12005.7787 13913.9927 [112,] -4325.9423 -12005.7787 [113,] 4861.8043 -4325.9423 [114,] -1281.7184 4861.8043 [115,] -1296.9468 -1281.7184 [116,] -18389.4993 -1296.9468 [117,] 10280.6819 -18389.4993 [118,] -7350.4840 10280.6819 [119,] 4159.4546 -7350.4840 [120,] 382.7785 4159.4546 [121,] -12316.1313 382.7785 [122,] -5638.7315 -12316.1313 [123,] 6708.3793 -5638.7315 [124,] 22230.8749 6708.3793 [125,] -2365.8096 22230.8749 [126,] -15339.6067 -2365.8096 [127,] -9921.0702 -15339.6067 [128,] 4948.0501 -9921.0702 [129,] -2560.4602 4948.0501 [130,] -1251.9945 -2560.4602 [131,] 62286.0018 -1251.9945 [132,] -1883.6909 62286.0018 [133,] 17518.0596 -1883.6909 [134,] -1795.3954 17518.0596 [135,] -1683.3041 -1795.3954 [136,] -1296.9468 -1683.3041 [137,] -3006.6234 -1296.9468 [138,] 21262.2984 -3006.6234 [139,] -1266.9154 21262.2984 [140,] -2155.3654 -1266.9154 [141,] -9178.7202 -2155.3654 [142,] -3952.2244 -9178.7202 [143,] -12141.8009 -3952.2244 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -24199.3942 -6259.5972 2 -760.8478 -24199.3942 3 -12932.1249 -760.8478 4 -5146.0417 -12932.1249 5 29476.0383 -5146.0417 6 -15433.4412 29476.0383 7 -26227.9705 -15433.4412 8 -13914.7876 -26227.9705 9 -11694.9268 -13914.7876 10 9766.2315 -11694.9268 11 -9093.0928 9766.2315 12 -12014.3198 -9093.0928 13 -4579.2360 -12014.3198 14 -8947.6540 -4579.2360 15 17155.8736 -8947.6540 16 22308.0884 17155.8736 17 2921.3899 22308.0884 18 -3518.2115 2921.3899 19 34475.6608 -3518.2115 20 -9588.8417 34475.6608 21 10931.0689 -9588.8417 22 13648.1699 10931.0689 23 -7114.3366 13648.1699 24 -6687.5654 -7114.3366 25 -7348.6041 -6687.5654 26 10292.0350 -7348.6041 27 -30027.6649 10292.0350 28 13404.3598 -30027.6649 29 -14500.1000 13404.3598 30 -6811.0863 -14500.1000 31 -18123.0209 -6811.0863 32 40291.0187 -18123.0209 33 22375.3386 40291.0187 34 -22650.2341 22375.3386 35 -1296.9468 -22650.2341 36 -3133.5005 -1296.9468 37 -5087.8344 -3133.5005 38 10494.9396 -5087.8344 39 2747.3752 10494.9396 40 -3378.6115 2747.3752 41 1981.6957 -3378.6115 42 46558.7648 1981.6957 43 15600.3053 46558.7648 44 21162.1922 15600.3053 45 -5184.7824 21162.1922 46 -17286.0593 -5184.7824 47 2942.7954 -17286.0593 48 5521.7205 2942.7954 49 -1169.6416 5521.7205 50 271.9498 -1169.6416 51 -8079.2161 271.9498 52 -1687.1263 -8079.2161 53 -13126.1392 -1687.1263 54 -26121.5277 -13126.1392 55 -14196.2095 -26121.5277 56 -5740.6026 -14196.2095 57 -3512.3221 -5740.6026 58 -13298.0590 -3512.3221 59 19744.8693 -13298.0590 60 -9012.5998 19744.8693 61 -3695.4079 -9012.5998 62 22723.2785 -3695.4079 63 -18643.6859 22723.2785 64 -14071.3387 -18643.6859 65 -10846.1533 -14071.3387 66 -4425.5365 -10846.1533 67 -19405.9909 -4425.5365 68 18867.0827 -19405.9909 69 -11484.7489 18867.0827 70 -15608.2130 -11484.7489 71 15546.8720 -15608.2130 72 9232.8261 15546.8720 73 -11353.4339 9232.8261 74 39641.1597 -11353.4339 75 -15142.8849 39641.1597 76 -16771.6963 -15142.8849 77 9442.4865 -16771.6963 78 -4038.7483 9442.4865 79 5983.1230 -4038.7483 80 4134.5345 5983.1230 81 -6716.9643 4134.5345 82 -17268.9691 -6716.9643 83 -10667.5407 -17268.9691 84 -5646.4396 -10667.5407 85 5052.8282 -5646.4396 86 1209.1873 5052.8282 87 -9763.5644 1209.1873 88 10720.7811 -9763.5644 89 469.7888 10720.7811 90 15098.7436 469.7888 91 22418.7099 15098.7436 92 -7209.7057 22418.7099 93 21565.3465 -7209.7057 94 17458.1103 21565.3465 95 -10943.7187 17458.1103 96 20315.0937 -10943.7187 97 -3854.9346 20315.0937 98 8474.8112 -3854.9346 99 -15143.8794 8474.8112 100 -5228.9510 -15143.8794 101 -269.3504 -5228.9510 102 1424.6253 -269.3504 103 -13887.0810 1424.6253 104 -7972.1469 -13887.0810 105 -6136.7118 -7972.1469 106 -15671.7867 -6136.7118 107 -9315.4088 -15671.7867 108 -1296.9468 -9315.4088 109 61367.7317 -1296.9468 110 13913.9927 61367.7317 111 -12005.7787 13913.9927 112 -4325.9423 -12005.7787 113 4861.8043 -4325.9423 114 -1281.7184 4861.8043 115 -1296.9468 -1281.7184 116 -18389.4993 -1296.9468 117 10280.6819 -18389.4993 118 -7350.4840 10280.6819 119 4159.4546 -7350.4840 120 382.7785 4159.4546 121 -12316.1313 382.7785 122 -5638.7315 -12316.1313 123 6708.3793 -5638.7315 124 22230.8749 6708.3793 125 -2365.8096 22230.8749 126 -15339.6067 -2365.8096 127 -9921.0702 -15339.6067 128 4948.0501 -9921.0702 129 -2560.4602 4948.0501 130 -1251.9945 -2560.4602 131 62286.0018 -1251.9945 132 -1883.6909 62286.0018 133 17518.0596 -1883.6909 134 -1795.3954 17518.0596 135 -1683.3041 -1795.3954 136 -1296.9468 -1683.3041 137 -3006.6234 -1296.9468 138 21262.2984 -3006.6234 139 -1266.9154 21262.2984 140 -2155.3654 -1266.9154 141 -9178.7202 -2155.3654 142 -3952.2244 -9178.7202 143 -12141.8009 -3952.2244 > 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/7weqy1324507011.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/8qvir1324507011.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/9vaq81324507011.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/10mnrs1324507011.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/11rmgz1324507011.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/12dpeb1324507011.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/13wrcq1324507011.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/1481041324507011.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/15fr361324507011.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/16mlyh1324507011.tab") + } > > try(system("convert tmp/100sy1324507011.ps tmp/100sy1324507011.png",intern=TRUE)) character(0) > try(system("convert tmp/2cbwi1324507011.ps tmp/2cbwi1324507011.png",intern=TRUE)) character(0) > try(system("convert tmp/354vo1324507011.ps tmp/354vo1324507011.png",intern=TRUE)) character(0) > try(system("convert tmp/47r9f1324507011.ps tmp/47r9f1324507011.png",intern=TRUE)) character(0) > try(system("convert tmp/5x6d11324507011.ps tmp/5x6d11324507011.png",intern=TRUE)) character(0) > try(system("convert tmp/6ugpa1324507011.ps tmp/6ugpa1324507011.png",intern=TRUE)) character(0) > try(system("convert tmp/7weqy1324507011.ps tmp/7weqy1324507011.png",intern=TRUE)) character(0) > try(system("convert tmp/8qvir1324507011.ps tmp/8qvir1324507011.png",intern=TRUE)) character(0) > try(system("convert tmp/9vaq81324507011.ps tmp/9vaq81324507011.png",intern=TRUE)) character(0) > try(system("convert tmp/10mnrs1324507011.ps tmp/10mnrs1324507011.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 4.980 0.230 5.181