R version 2.13.0 (2011-04-13) Copyright (C) 2011 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i486-pc-linux-gnu (32-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > x <- array(list(1565 + ,129404 + ,20 + ,18 + ,63 + ,18158 + ,1134 + ,130358 + ,38 + ,17 + ,50 + ,30461 + ,192 + ,7215 + ,0 + ,0 + ,0 + ,1423 + ,2033 + ,112861 + ,49 + ,22 + ,51 + ,25629 + ,3283 + ,219904 + ,76 + ,30 + ,112 + ,48758 + ,5877 + ,402036 + ,104 + ,31 + ,118 + ,129230 + ,1322 + ,117604 + ,37 + ,19 + ,59 + ,27376 + ,1225 + ,131822 + ,57 + ,25 + ,90 + ,26706 + ,1463 + ,99729 + ,42 + ,30 + ,50 + ,26505 + ,2568 + ,256310 + ,62 + ,26 + ,79 + ,49801 + ,1810 + ,113066 + ,50 + ,20 + ,49 + ,46580 + ,1915 + ,165392 + ,66 + ,30 + ,91 + ,48352 + ,1452 + ,78240 + ,38 + ,15 + ,32 + ,13899 + ,2415 + ,152673 + ,48 + ,22 + ,82 + ,39342 + ,1254 + ,134368 + ,42 + ,17 + ,58 + ,27465 + ,1374 + ,125769 + ,47 + ,19 + ,65 + ,55211 + ,1504 + ,123467 + ,71 + ,28 + ,111 + ,74098 + ,999 + ,56232 + ,0 + ,12 + ,36 + ,13497 + ,2222 + ,108458 + ,50 + ,28 + ,89 + ,38338 + ,634 + ,22762 + ,12 + ,13 + ,28 + ,52505 + ,849 + ,48633 + ,16 + ,14 + ,35 + ,10663 + ,2189 + ,182081 + ,77 + ,27 + ,78 + ,74484 + ,1469 + ,140857 + ,29 + ,25 + ,67 + ,28895 + ,1791 + ,93773 + ,38 + ,30 + ,61 + ,32827 + ,1743 + ,133398 + ,50 + ,21 + ,58 + ,36188 + ,1180 + ,113933 + ,33 + ,17 + ,49 + ,28173 + ,1749 + ,153851 + ,49 + ,22 + ,77 + ,54926 + ,1101 + ,140711 + ,59 + ,28 + ,71 + ,38900 + ,2391 + ,303844 + ,55 + ,26 + ,85 + ,88530 + ,1826 + ,163810 + ,42 + ,17 + ,56 + ,35482 + ,1301 + ,123344 + ,40 + ,23 + ,71 + ,26730 + ,1433 + ,157640 + ,51 + ,20 + ,58 + ,29806 + ,1893 + ,103274 + ,45 + ,16 + ,34 + ,41799 + ,2525 + ,193500 + ,73 + ,20 + ,59 + ,54289 + ,2033 + ,178768 + ,51 + ,21 + ,77 + ,36805 + ,1 + ,0 + ,0 + ,0 + ,0 + ,0 + ,1817 + ,181412 + ,46 + ,27 + ,75 + ,33146 + ,1506 + ,92342 + ,44 + ,14 + ,39 + ,23333 + ,1820 + ,100023 + ,31 + ,29 + ,83 + ,47686 + ,1649 + ,178277 + ,71 + ,31 + ,123 + ,77783 + ,1672 + ,145067 + ,61 + ,19 + ,67 + ,36042 + ,1433 + ,114146 + ,28 + ,30 + ,105 + ,34541 + ,864 + ,86039 + ,21 + ,23 + ,76 + ,75620 + ,1683 + ,125481 + ,42 + ,21 + ,57 + ,60610 + ,1024 + ,95535 + ,44 + ,22 + ,82 + ,55041 + ,1029 + ,129221 + ,40 + ,21 + ,64 + ,32087 + ,629 + ,61554 + ,15 + ,32 + ,57 + ,16356 + ,1679 + ,168048 + ,46 + ,20 + ,80 + ,40161 + ,1715 + ,159121 + ,43 + ,26 + ,94 + ,55459 + ,2093 + ,129362 + ,47 + ,25 + ,72 + ,36679 + ,658 + ,48188 + ,12 + ,22 + ,39 + ,22346 + ,1234 + ,95461 + ,46 + ,19 + ,60 + ,27377 + ,2059 + ,229864 + ,56 + ,24 + ,84 + ,50273 + ,1725 + ,191094 + ,47 + ,26 + ,69 + ,32104 + ,1504 + ,161082 + ,50 + ,27 + ,102 + ,27016 + ,1454 + ,111388 + ,35 + ,10 + ,28 + ,19715 + ,1620 + ,172614 + ,45 + ,26 + ,65 + ,33629 + ,733 + ,63205 + ,25 + ,23 + ,67 + ,27084 + ,894 + ,109102 + ,47 + ,21 + ,80 + ,32352 + ,2343 + ,137303 + ,28 + ,34 + ,79 + ,51845 + ,1503 + ,125304 + ,48 + ,29 + ,107 + ,26591 + ,1627 + ,88620 + ,32 + ,19 + ,60 + ,29677 + ,1119 + ,95808 + ,28 + ,19 + ,53 + ,54237 + ,897 + ,83419 + ,31 + ,23 + ,59 + ,20284 + ,855 + ,101723 + ,13 + ,22 + ,80 + ,22741 + ,1229 + ,94982 + ,38 + ,29 + ,89 + ,34178 + ,1991 + ,143566 + ,48 + ,31 + ,115 + ,69551 + ,2393 + ,113325 + ,68 + ,21 + ,59 + ,29653 + ,820 + ,81518 + ,32 + ,21 + ,66 + ,38071 + ,340 + ,31970 + ,5 + ,21 + ,42 + ,4157 + ,2443 + ,192268 + ,53 + ,15 + ,35 + ,28321 + ,1030 + ,91261 + ,33 + ,9 + ,3 + ,40195 + ,1091 + ,80820 + ,54 + ,23 + ,72 + ,48158 + ,1414 + ,85829 + ,37 + ,18 + ,38 + ,13310 + ,2192 + ,116322 + ,52 + ,31 + ,107 + ,78474 + ,1082 + ,56544 + ,0 + ,25 + ,73 + ,6386 + ,1764 + ,116173 + ,52 + ,24 + ,80 + ,31588 + ,2072 + ,118781 + ,51 + ,22 + ,69 + ,61254 + ,816 + ,60138 + ,16 + ,21 + ,46 + ,21152 + ,1121 + ,73422 + ,33 + ,26 + ,52 + ,41272 + ,810 + ,67751 + ,48 + ,22 + ,58 + ,34165 + ,1699 + ,214002 + ,33 + ,26 + ,85 + ,37054 + ,751 + ,51185 + ,24 + ,20 + ,13 + ,12368 + ,1309 + ,97181 + ,37 + ,25 + ,61 + ,23168 + ,732 + ,45100 + ,17 + ,19 + ,49 + ,16380 + ,1327 + ,115801 + ,32 + ,22 + ,47 + ,41242 + ,2246 + ,186310 + ,55 + ,25 + ,93 + ,48450 + ,968 + ,71960 + ,39 + ,22 + ,65 + ,20790 + ,1015 + ,80105 + ,31 + ,21 + ,64 + ,34585 + ,1100 + ,103613 + ,26 + ,20 + ,64 + ,35672 + ,1300 + ,98707 + ,37 + ,23 + ,57 + ,52168 + ,1982 + ,136234 + ,66 + ,22 + ,61 + ,53933 + ,1091 + ,136781 + ,35 + ,21 + ,71 + ,34474 + ,1107 + ,105863 + ,24 + ,12 + ,43 + ,43753 + ,666 + ,42228 + ,22 + ,9 + ,18 + ,36456 + ,1903 + ,179997 + ,37 + ,32 + ,103 + ,51183 + ,1608 + ,169406 + ,86 + ,24 + ,76 + ,52742 + ,223 + ,19349 + ,13 + ,1 + ,0 + ,3895 + ,1807 + ,160819 + ,21 + ,24 + ,83 + ,37076 + ,1466 + ,109510 + ,32 + ,25 + ,73 + ,24079 + ,552 + ,43803 + ,8 + ,4 + ,4 + ,2325 + ,708 + ,47062 + ,38 + ,15 + ,41 + ,29354 + ,1079 + ,110845 + ,45 + ,21 + ,57 + ,30341 + ,957 + ,92517 + ,24 + ,23 + ,52 + ,18992 + ,585 + ,58660 + ,23 + ,12 + ,24 + ,15292 + ,596 + ,27676 + ,2 + ,16 + ,17 + ,5842 + ,980 + ,98550 + ,52 + ,24 + ,89 + ,28918 + ,585 + ,43646 + ,5 + ,9 + ,20 + ,3738 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,975 + ,75566 + ,43 + ,25 + ,51 + ,95352 + ,750 + ,57359 + ,18 + ,17 + ,63 + ,37478 + ,1071 + ,104330 + ,44 + ,18 + ,48 + ,26839 + ,931 + ,70369 + ,45 + ,21 + ,70 + ,26783 + ,783 + ,65494 + ,29 + ,17 + ,32 + ,33392 + ,78 + ,3616 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,874 + ,143931 + ,32 + ,20 + ,72 + ,25446 + ,1327 + ,117946 + ,65 + ,26 + ,56 + ,59847 + ,1831 + ,137332 + ,26 + ,27 + ,66 + ,28162 + ,750 + ,84336 + ,24 + ,20 + ,77 + ,33298 + ,778 + ,43410 + ,7 + ,1 + ,3 + ,2781 + ,1373 + ,136250 + ,62 + ,24 + ,73 + ,37121 + ,807 + ,79015 + ,30 + ,14 + ,37 + ,22698 + ,1562 + ,101354 + ,49 + ,27 + ,57 + ,27615 + ,685 + ,57586 + ,3 + ,12 + ,32 + ,32689 + ,285 + ,19764 + ,10 + ,2 + ,4 + ,5752 + ,1336 + ,105757 + ,42 + ,16 + ,55 + ,23164 + ,954 + ,103651 + ,23 + ,23 + ,84 + ,20304 + ,1283 + ,113402 + ,40 + ,28 + ,90 + ,34409 + ,256 + ,11796 + ,1 + ,2 + ,1 + ,0 + ,81 + ,7627 + ,0 + ,0 + ,0 + ,0 + ,1214 + ,121085 + ,29 + ,17 + ,38 + ,92538 + ,41 + ,6836 + ,0 + ,1 + ,0 + ,0 + ,1634 + ,139563 + ,46 + ,17 + ,36 + ,46037 + ,42 + ,5118 + ,5 + ,0 + ,0 + ,0 + ,528 + ,40248 + ,8 + ,4 + ,7 + ,5444 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,890 + ,95079 + ,21 + ,25 + ,75 + ,23924 + ,1203 + ,80763 + ,21 + ,26 + ,52 + ,52230 + ,81 + ,7131 + ,0 + ,0 + ,0 + ,0 + ,61 + ,4194 + ,0 + ,0 + ,0 + ,0 + ,849 + ,60378 + ,15 + ,15 + ,45 + ,8019 + ,1035 + ,109173 + ,47 + ,20 + ,66 + ,34542 + ,964 + ,83484 + ,17 + ,19 + ,48 + ,21157) + ,dim=c(6 + ,144) + ,dimnames=list(c('pageviews' + ,'time' + ,'blogs' + ,'peerreviews' + ,'peerreviews+' + ,'compcharachters') + ,1:144)) > y <- array(NA,dim=c(6,144),dimnames=list(c('pageviews','time','blogs','peerreviews','peerreviews+','compcharachters'),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 = '2' > #'GNU S' R Code compiled by R2WASP v. 1.0.44 () > #Author: Prof. Dr. P. Wessa > #To cite this work: AUTHOR(S), (YEAR), YOUR SOFTWARE TITLE (vNUMBER) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_YOURPAGE.wasp/ > #Source of accompanying publication: Office for Research, Development, and Education > #Technical description: Write here your technical program description (don't use hard returns!) > library(lattice) > library(lmtest) Loading required package: zoo > n25 <- 25 #minimum number of obs. for Goldfeld-Quandt test > par1 <- as.numeric(par1) > x <- t(y) > k <- length(x[1,]) > n <- length(x[,1]) > x1 <- cbind(x[,par1], x[,1:k!=par1]) > mycolnames <- c(colnames(x)[par1], colnames(x)[1:k!=par1]) > colnames(x1) <- mycolnames #colnames(x)[par1] > x <- x1 > if (par3 == 'First Differences'){ + x2 <- array(0, dim=c(n-1,k), dimnames=list(1:(n-1), paste('(1-B)',colnames(x),sep=''))) + for (i in 1:n-1) { + for (j in 1:k) { + x2[i,j] <- x[i+1,j] - x[i,j] + } + } + x <- x2 + } > if (par2 == 'Include Monthly Dummies'){ + x2 <- array(0, dim=c(n,11), dimnames=list(1:n, paste('M', seq(1:11), sep =''))) + for (i in 1:11){ + x2[seq(i,n,12),i] <- 1 + } + x <- cbind(x, x2) + } > if (par2 == 'Include Quarterly Dummies'){ + x2 <- array(0, dim=c(n,3), dimnames=list(1:n, paste('Q', seq(1:3), sep =''))) + for (i in 1:3){ + x2[seq(i,n,4),i] <- 1 + } + x <- cbind(x, x2) + } > k <- length(x[1,]) > if (par3 == 'Linear Trend'){ + x <- cbind(x, c(1:n)) + colnames(x)[k+1] <- 't' + } > x time pageviews blogs peerreviews peerreviews+ compcharachters 1 129404 1565 20 18 63 18158 2 130358 1134 38 17 50 30461 3 7215 192 0 0 0 1423 4 112861 2033 49 22 51 25629 5 219904 3283 76 30 112 48758 6 402036 5877 104 31 118 129230 7 117604 1322 37 19 59 27376 8 131822 1225 57 25 90 26706 9 99729 1463 42 30 50 26505 10 256310 2568 62 26 79 49801 11 113066 1810 50 20 49 46580 12 165392 1915 66 30 91 48352 13 78240 1452 38 15 32 13899 14 152673 2415 48 22 82 39342 15 134368 1254 42 17 58 27465 16 125769 1374 47 19 65 55211 17 123467 1504 71 28 111 74098 18 56232 999 0 12 36 13497 19 108458 2222 50 28 89 38338 20 22762 634 12 13 28 52505 21 48633 849 16 14 35 10663 22 182081 2189 77 27 78 74484 23 140857 1469 29 25 67 28895 24 93773 1791 38 30 61 32827 25 133398 1743 50 21 58 36188 26 113933 1180 33 17 49 28173 27 153851 1749 49 22 77 54926 28 140711 1101 59 28 71 38900 29 303844 2391 55 26 85 88530 30 163810 1826 42 17 56 35482 31 123344 1301 40 23 71 26730 32 157640 1433 51 20 58 29806 33 103274 1893 45 16 34 41799 34 193500 2525 73 20 59 54289 35 178768 2033 51 21 77 36805 36 0 1 0 0 0 0 37 181412 1817 46 27 75 33146 38 92342 1506 44 14 39 23333 39 100023 1820 31 29 83 47686 40 178277 1649 71 31 123 77783 41 145067 1672 61 19 67 36042 42 114146 1433 28 30 105 34541 43 86039 864 21 23 76 75620 44 125481 1683 42 21 57 60610 45 95535 1024 44 22 82 55041 46 129221 1029 40 21 64 32087 47 61554 629 15 32 57 16356 48 168048 1679 46 20 80 40161 49 159121 1715 43 26 94 55459 50 129362 2093 47 25 72 36679 51 48188 658 12 22 39 22346 52 95461 1234 46 19 60 27377 53 229864 2059 56 24 84 50273 54 191094 1725 47 26 69 32104 55 161082 1504 50 27 102 27016 56 111388 1454 35 10 28 19715 57 172614 1620 45 26 65 33629 58 63205 733 25 23 67 27084 59 109102 894 47 21 80 32352 60 137303 2343 28 34 79 51845 61 125304 1503 48 29 107 26591 62 88620 1627 32 19 60 29677 63 95808 1119 28 19 53 54237 64 83419 897 31 23 59 20284 65 101723 855 13 22 80 22741 66 94982 1229 38 29 89 34178 67 143566 1991 48 31 115 69551 68 113325 2393 68 21 59 29653 69 81518 820 32 21 66 38071 70 31970 340 5 21 42 4157 71 192268 2443 53 15 35 28321 72 91261 1030 33 9 3 40195 73 80820 1091 54 23 72 48158 74 85829 1414 37 18 38 13310 75 116322 2192 52 31 107 78474 76 56544 1082 0 25 73 6386 77 116173 1764 52 24 80 31588 78 118781 2072 51 22 69 61254 79 60138 816 16 21 46 21152 80 73422 1121 33 26 52 41272 81 67751 810 48 22 58 34165 82 214002 1699 33 26 85 37054 83 51185 751 24 20 13 12368 84 97181 1309 37 25 61 23168 85 45100 732 17 19 49 16380 86 115801 1327 32 22 47 41242 87 186310 2246 55 25 93 48450 88 71960 968 39 22 65 20790 89 80105 1015 31 21 64 34585 90 103613 1100 26 20 64 35672 91 98707 1300 37 23 57 52168 92 136234 1982 66 22 61 53933 93 136781 1091 35 21 71 34474 94 105863 1107 24 12 43 43753 95 42228 666 22 9 18 36456 96 179997 1903 37 32 103 51183 97 169406 1608 86 24 76 52742 98 19349 223 13 1 0 3895 99 160819 1807 21 24 83 37076 100 109510 1466 32 25 73 24079 101 43803 552 8 4 4 2325 102 47062 708 38 15 41 29354 103 110845 1079 45 21 57 30341 104 92517 957 24 23 52 18992 105 58660 585 23 12 24 15292 106 27676 596 2 16 17 5842 107 98550 980 52 24 89 28918 108 43646 585 5 9 20 3738 109 0 0 0 0 0 0 110 75566 975 43 25 51 95352 111 57359 750 18 17 63 37478 112 104330 1071 44 18 48 26839 113 70369 931 45 21 70 26783 114 65494 783 29 17 32 33392 115 3616 78 0 0 0 0 116 0 0 0 0 0 0 117 143931 874 32 20 72 25446 118 117946 1327 65 26 56 59847 119 137332 1831 26 27 66 28162 120 84336 750 24 20 77 33298 121 43410 778 7 1 3 2781 122 136250 1373 62 24 73 37121 123 79015 807 30 14 37 22698 124 101354 1562 49 27 57 27615 125 57586 685 3 12 32 32689 126 19764 285 10 2 4 5752 127 105757 1336 42 16 55 23164 128 103651 954 23 23 84 20304 129 113402 1283 40 28 90 34409 130 11796 256 1 2 1 0 131 7627 81 0 0 0 0 132 121085 1214 29 17 38 92538 133 6836 41 0 1 0 0 134 139563 1634 46 17 36 46037 135 5118 42 5 0 0 0 136 40248 528 8 4 7 5444 137 0 0 0 0 0 0 138 95079 890 21 25 75 23924 139 80763 1203 21 26 52 52230 140 7131 81 0 0 0 0 141 4194 61 0 0 0 0 142 60378 849 15 15 45 8019 143 109173 1035 47 20 66 34542 144 83484 964 17 19 48 21157 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) pageviews blogs peerreviews 4642.6546 50.0114 467.6779 -1032.1522 `peerreviews+` compcharachters 616.7896 0.1627 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -69034 -14672 -1435 10779 113905 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 4642.6546 5460.4599 0.850 0.396669 pageviews 50.0114 5.0152 9.972 < 2e-16 *** blogs 467.6779 186.6861 2.505 0.013403 * peerreviews -1032.1522 562.2779 -1.836 0.068560 . `peerreviews+` 616.7896 168.2815 3.665 0.000352 *** compcharachters 0.1627 0.1489 1.093 0.276472 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 25620 on 138 degrees of freedom Multiple R-squared: 0.8293, Adjusted R-squared: 0.8231 F-statistic: 134.1 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.1326443 2.652885e-01 8.673557e-01 [2,] 0.8726274 2.547452e-01 1.273726e-01 [3,] 0.8859165 2.281671e-01 1.140835e-01 [4,] 0.8427751 3.144499e-01 1.572249e-01 [5,] 0.7724069 4.551861e-01 2.275931e-01 [6,] 0.7820765 4.358470e-01 2.179235e-01 [7,] 0.7463826 5.072349e-01 2.536174e-01 [8,] 0.7419505 5.160989e-01 2.580495e-01 [9,] 0.8762913 2.474174e-01 1.237087e-01 [10,] 0.8468329 3.063341e-01 1.531671e-01 [11,] 0.9448951 1.102097e-01 5.510487e-02 [12,] 0.9394232 1.211537e-01 6.057683e-02 [13,] 0.9170406 1.659188e-01 8.295940e-02 [14,] 0.8856452 2.287096e-01 1.143548e-01 [15,] 0.9148054 1.703892e-01 8.519462e-02 [16,] 0.9076022 1.847955e-01 9.239776e-02 [17,] 0.8761592 2.476816e-01 1.238408e-01 [18,] 0.8603476 2.793048e-01 1.396524e-01 [19,] 0.8274094 3.451812e-01 1.725906e-01 [20,] 0.8448432 3.103137e-01 1.551568e-01 [21,] 0.9993836 1.232792e-03 6.163959e-04 [22,] 0.9993588 1.282392e-03 6.411960e-04 [23,] 0.9990245 1.950989e-03 9.754946e-04 [24,] 0.9993416 1.316860e-03 6.584299e-04 [25,] 0.9993612 1.277550e-03 6.387748e-04 [26,] 0.9989764 2.047194e-03 1.023597e-03 [27,] 0.9986504 2.699110e-03 1.349555e-03 [28,] 0.9979079 4.184268e-03 2.092134e-03 [29,] 0.9987377 2.524576e-03 1.262288e-03 [30,] 0.9983789 3.242199e-03 1.621099e-03 [31,] 0.9991349 1.730170e-03 8.650848e-04 [32,] 0.9987934 2.413285e-03 1.206643e-03 [33,] 0.9981413 3.717345e-03 1.858672e-03 [34,] 0.9974386 5.122853e-03 2.561426e-03 [35,] 0.9964746 7.050820e-03 3.525410e-03 [36,] 0.9949879 1.002428e-02 5.012141e-03 [37,] 0.9939960 1.200792e-02 6.003961e-03 [38,] 0.9947108 1.057840e-02 5.289200e-03 [39,] 0.9931111 1.377787e-02 6.888936e-03 [40,] 0.9924902 1.501969e-02 7.509845e-03 [41,] 0.9897719 2.045614e-02 1.022807e-02 [42,] 0.9896174 2.076518e-02 1.038259e-02 [43,] 0.9855414 2.891713e-02 1.445857e-02 [44,] 0.9819990 3.600197e-02 1.800099e-02 [45,] 0.9960103 7.979381e-03 3.989691e-03 [46,] 0.9991332 1.733636e-03 8.668178e-04 [47,] 0.9989765 2.047037e-03 1.023519e-03 [48,] 0.9985342 2.931692e-03 1.465846e-03 [49,] 0.9994811 1.037708e-03 5.188540e-04 [50,] 0.9992795 1.441060e-03 7.205298e-04 [51,] 0.9989603 2.079499e-03 1.039750e-03 [52,] 0.9987601 2.479770e-03 1.239885e-03 [53,] 0.9983851 3.229822e-03 1.614911e-03 [54,] 0.9987624 2.475291e-03 1.237646e-03 [55,] 0.9981524 3.695205e-03 1.847602e-03 [56,] 0.9972990 5.401992e-03 2.700996e-03 [57,] 0.9968877 6.224554e-03 3.112277e-03 [58,] 0.9962905 7.418974e-03 3.709487e-03 [59,] 0.9968953 6.209424e-03 3.104712e-03 [60,] 0.9996664 6.672550e-04 3.336275e-04 [61,] 0.9994863 1.027323e-03 5.136615e-04 [62,] 0.9992148 1.570402e-03 7.852012e-04 [63,] 0.9992434 1.513218e-03 7.566092e-04 [64,] 0.9991511 1.697868e-03 8.489342e-04 [65,] 0.9993335 1.333099e-03 6.665497e-04 [66,] 0.9991082 1.783513e-03 8.917567e-04 [67,] 0.9999797 4.056589e-05 2.028294e-05 [68,] 0.9999867 2.654060e-05 1.327030e-05 [69,] 0.9999934 1.313972e-05 6.569861e-06 [70,] 0.9999996 7.418367e-07 3.709184e-07 [71,] 0.9999993 1.420012e-06 7.100058e-07 [72,] 0.9999990 2.095645e-06 1.047823e-06 [73,] 0.9999984 3.135478e-06 1.567739e-06 [74,] 1.0000000 4.189730e-09 2.094865e-09 [75,] 1.0000000 6.178369e-09 3.089184e-09 [76,] 1.0000000 1.287065e-08 6.435327e-09 [77,] 1.0000000 1.581987e-08 7.909934e-09 [78,] 1.0000000 2.306758e-08 1.153379e-08 [79,] 1.0000000 4.039893e-08 2.019947e-08 [80,] 1.0000000 4.283860e-08 2.141930e-08 [81,] 1.0000000 5.700797e-08 2.850398e-08 [82,] 0.9999999 1.226720e-07 6.133602e-08 [83,] 0.9999999 2.128150e-07 1.064075e-07 [84,] 1.0000000 7.171453e-08 3.585727e-08 [85,] 1.0000000 2.572891e-08 1.286446e-08 [86,] 1.0000000 5.579958e-08 2.789979e-08 [87,] 1.0000000 8.179203e-08 4.089601e-08 [88,] 0.9999999 1.347073e-07 6.735364e-08 [89,] 0.9999999 2.167334e-07 1.083667e-07 [90,] 0.9999998 4.833065e-07 2.416532e-07 [91,] 0.9999996 8.711419e-07 4.355709e-07 [92,] 0.9999993 1.302589e-06 6.512947e-07 [93,] 0.9999987 2.553108e-06 1.276554e-06 [94,] 0.9999990 1.967726e-06 9.838628e-07 [95,] 0.9999985 3.061060e-06 1.530530e-06 [96,] 0.9999983 3.342848e-06 1.671424e-06 [97,] 0.9999974 5.156485e-06 2.578242e-06 [98,] 0.9999945 1.096780e-05 5.483900e-06 [99,] 0.9999922 1.561285e-05 7.806425e-06 [100,] 0.9999839 3.217697e-05 1.608848e-05 [101,] 0.9999665 6.693925e-05 3.346963e-05 [102,] 0.9999675 6.492432e-05 3.246216e-05 [103,] 0.9999895 2.097510e-05 1.048755e-05 [104,] 0.9999825 3.495536e-05 1.747768e-05 [105,] 0.9999970 6.028568e-06 3.014284e-06 [106,] 0.9999929 1.426817e-05 7.134085e-06 [107,] 0.9999833 3.336170e-05 1.668085e-05 [108,] 0.9999616 7.685769e-05 3.842885e-05 [109,] 1.0000000 2.066701e-08 1.033350e-08 [110,] 1.0000000 7.328384e-08 3.664192e-08 [111,] 0.9999999 1.199418e-07 5.997090e-08 [112,] 0.9999999 2.156860e-07 1.078430e-07 [113,] 0.9999997 6.401032e-07 3.200516e-07 [114,] 0.9999991 1.824393e-06 9.121963e-07 [115,] 0.9999983 3.393289e-06 1.696645e-06 [116,] 0.9999962 7.567661e-06 3.783830e-06 [117,] 0.9999873 2.546435e-05 1.273217e-05 [118,] 0.9999607 7.852249e-05 3.926124e-05 [119,] 0.9999724 5.528573e-05 2.764287e-05 [120,] 0.9999110 1.780532e-04 8.902661e-05 [121,] 0.9999275 1.450100e-04 7.250498e-05 [122,] 0.9997260 5.480613e-04 2.740306e-04 [123,] 0.9989515 2.096923e-03 1.048461e-03 [124,] 0.9965863 6.827323e-03 3.413661e-03 [125,] 0.9902935 1.941295e-02 9.706474e-03 [126,] 0.9826397 3.472069e-02 1.736035e-02 [127,] 0.9493144 1.013712e-01 5.068558e-02 > postscript(file="/var/wessaorg/rcomp/tmp/1izfx1324575700.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(x[,1], type='l', main='Actuals and Interpolation', ylab='value of Actuals and Interpolation (dots)', xlab='time or index') > points(x[,1]-mysum$resid) > grid() > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/2axeb1324575700.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(mysum$resid, type='b', pch=19, main='Residuals', ylab='value of Residuals', xlab='time or index') > grid() > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/3sx9g1324575700.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > hist(mysum$resid, main='Residual Histogram', xlab='values of Residuals') > grid() > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/4v3c91324575700.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > densityplot(~mysum$resid,col='black',main='Residual Density Plot', xlab='values of Residuals') > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/55ej01324575700.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 13906.12637 32980.96108 -7261.40755 -29290.51826 -30519.72927 -6975.75330 7 8 9 10 11 12 8307.69316 5204.70384 -1910.79414 64247.66494 -22640.61969 1079.34180 13 14 15 16 17 18 -23307.71734 -29467.13301 24672.08366 965.13519 -41218.95929 -10386.97534 19 20 21 22 23 24 -62926.52022 -31596.03840 -14824.85087 -409.76589 28961.85310 -30213.26551 25 26 27 28 29 30 -1785.77143 17582.92888 5098.84887 32190.95892 113904.52612 25436.55707 31 32 33 34 35 36 10527.15305 37498.45318 -28343.95599 3856.26943 16793.83017 -4692.66602 37 38 39 40 41 42 40600.59277 -21597.22839 -39159.30426 1434.72267 697.92968 -14677.04677 43 44 45 46 47 48 -7076.53490 -6317.93835 -17723.13263 31388.76931 13649.31855 22687.64211 49 50 51 52 53 54 8431.75812 -26509.08367 41.98998 -14260.35442 60838.49418 57254.11171 55 56 57 58 59 60 18397.64324 7503.28325 47179.67142 -11780.62881 4835.81115 -19681.10377 61 62 63 64 65 66 -17345.47507 -34582.62427 202.90166 3466.27425 17904.40794 -19419.94242 67 68 69 70 71 72 -33349.72733 -62337.78988 -4327.74199 3078.65297 29946.59486 20571.47136 73 74 75 76 77 78 -32145.59448 -13859.04103 -69034.41424 -22472.02547 -30720.74844 -43155.60623 79 80 81 82 83 84 -2935.91474 -14669.92796 -18475.40216 77335.77805 8371.68580 -5821.07785 85 86 87 88 89 90 -17378.78258 16834.61535 4177.72670 -20100.19002 -13224.45577 7161.92783 91 92 93 94 95 96 -8161.14142 -22091.12055 33480.49840 13377.58862 -13756.32529 24049.29419 97 98 99 100 101 102 13437.86246 -2127.67888 23529.37325 -6555.20139 9095.72494 -25343.22899 103 104 105 106 107 108 12775.45289 17365.10172 9098.55055 -2630.45219 -14251.41485 3753.57823 109 110 111 112 113 114 -4642.65459 -19116.56020 -20620.19456 10152.73473 -27738.14502 505.34317 115 116 117 118 119 120 -4927.54651 -4642.65459 52706.15165 -903.75032 11536.11892 -1307.67055 121 122 123 124 125 126 -4686.05103 7651.11406 7918.16538 -16105.28057 4611.72468 -5147.54036 127 128 129 130 131 132 -6521.75777 9166.05059 -6322.44711 -4669.74502 -1066.58082 21216.15312 133 134 135 136 137 138 1175.02882 19539.27278 -3963.52457 4383.09167 -4642.65459 11756.48558 139 140 141 142 143 144 -7600.86917 -1562.58082 -3499.35212 -7317.67256 5101.73408 9242.01757 > postscript(file="/var/wessaorg/rcomp/tmp/6r53t1324575700.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 13906.12637 NA 1 32980.96108 13906.12637 2 -7261.40755 32980.96108 3 -29290.51826 -7261.40755 4 -30519.72927 -29290.51826 5 -6975.75330 -30519.72927 6 8307.69316 -6975.75330 7 5204.70384 8307.69316 8 -1910.79414 5204.70384 9 64247.66494 -1910.79414 10 -22640.61969 64247.66494 11 1079.34180 -22640.61969 12 -23307.71734 1079.34180 13 -29467.13301 -23307.71734 14 24672.08366 -29467.13301 15 965.13519 24672.08366 16 -41218.95929 965.13519 17 -10386.97534 -41218.95929 18 -62926.52022 -10386.97534 19 -31596.03840 -62926.52022 20 -14824.85087 -31596.03840 21 -409.76589 -14824.85087 22 28961.85310 -409.76589 23 -30213.26551 28961.85310 24 -1785.77143 -30213.26551 25 17582.92888 -1785.77143 26 5098.84887 17582.92888 27 32190.95892 5098.84887 28 113904.52612 32190.95892 29 25436.55707 113904.52612 30 10527.15305 25436.55707 31 37498.45318 10527.15305 32 -28343.95599 37498.45318 33 3856.26943 -28343.95599 34 16793.83017 3856.26943 35 -4692.66602 16793.83017 36 40600.59277 -4692.66602 37 -21597.22839 40600.59277 38 -39159.30426 -21597.22839 39 1434.72267 -39159.30426 40 697.92968 1434.72267 41 -14677.04677 697.92968 42 -7076.53490 -14677.04677 43 -6317.93835 -7076.53490 44 -17723.13263 -6317.93835 45 31388.76931 -17723.13263 46 13649.31855 31388.76931 47 22687.64211 13649.31855 48 8431.75812 22687.64211 49 -26509.08367 8431.75812 50 41.98998 -26509.08367 51 -14260.35442 41.98998 52 60838.49418 -14260.35442 53 57254.11171 60838.49418 54 18397.64324 57254.11171 55 7503.28325 18397.64324 56 47179.67142 7503.28325 57 -11780.62881 47179.67142 58 4835.81115 -11780.62881 59 -19681.10377 4835.81115 60 -17345.47507 -19681.10377 61 -34582.62427 -17345.47507 62 202.90166 -34582.62427 63 3466.27425 202.90166 64 17904.40794 3466.27425 65 -19419.94242 17904.40794 66 -33349.72733 -19419.94242 67 -62337.78988 -33349.72733 68 -4327.74199 -62337.78988 69 3078.65297 -4327.74199 70 29946.59486 3078.65297 71 20571.47136 29946.59486 72 -32145.59448 20571.47136 73 -13859.04103 -32145.59448 74 -69034.41424 -13859.04103 75 -22472.02547 -69034.41424 76 -30720.74844 -22472.02547 77 -43155.60623 -30720.74844 78 -2935.91474 -43155.60623 79 -14669.92796 -2935.91474 80 -18475.40216 -14669.92796 81 77335.77805 -18475.40216 82 8371.68580 77335.77805 83 -5821.07785 8371.68580 84 -17378.78258 -5821.07785 85 16834.61535 -17378.78258 86 4177.72670 16834.61535 87 -20100.19002 4177.72670 88 -13224.45577 -20100.19002 89 7161.92783 -13224.45577 90 -8161.14142 7161.92783 91 -22091.12055 -8161.14142 92 33480.49840 -22091.12055 93 13377.58862 33480.49840 94 -13756.32529 13377.58862 95 24049.29419 -13756.32529 96 13437.86246 24049.29419 97 -2127.67888 13437.86246 98 23529.37325 -2127.67888 99 -6555.20139 23529.37325 100 9095.72494 -6555.20139 101 -25343.22899 9095.72494 102 12775.45289 -25343.22899 103 17365.10172 12775.45289 104 9098.55055 17365.10172 105 -2630.45219 9098.55055 106 -14251.41485 -2630.45219 107 3753.57823 -14251.41485 108 -4642.65459 3753.57823 109 -19116.56020 -4642.65459 110 -20620.19456 -19116.56020 111 10152.73473 -20620.19456 112 -27738.14502 10152.73473 113 505.34317 -27738.14502 114 -4927.54651 505.34317 115 -4642.65459 -4927.54651 116 52706.15165 -4642.65459 117 -903.75032 52706.15165 118 11536.11892 -903.75032 119 -1307.67055 11536.11892 120 -4686.05103 -1307.67055 121 7651.11406 -4686.05103 122 7918.16538 7651.11406 123 -16105.28057 7918.16538 124 4611.72468 -16105.28057 125 -5147.54036 4611.72468 126 -6521.75777 -5147.54036 127 9166.05059 -6521.75777 128 -6322.44711 9166.05059 129 -4669.74502 -6322.44711 130 -1066.58082 -4669.74502 131 21216.15312 -1066.58082 132 1175.02882 21216.15312 133 19539.27278 1175.02882 134 -3963.52457 19539.27278 135 4383.09167 -3963.52457 136 -4642.65459 4383.09167 137 11756.48558 -4642.65459 138 -7600.86917 11756.48558 139 -1562.58082 -7600.86917 140 -3499.35212 -1562.58082 141 -7317.67256 -3499.35212 142 5101.73408 -7317.67256 143 9242.01757 5101.73408 144 NA 9242.01757 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 32980.96108 13906.12637 [2,] -7261.40755 32980.96108 [3,] -29290.51826 -7261.40755 [4,] -30519.72927 -29290.51826 [5,] -6975.75330 -30519.72927 [6,] 8307.69316 -6975.75330 [7,] 5204.70384 8307.69316 [8,] -1910.79414 5204.70384 [9,] 64247.66494 -1910.79414 [10,] -22640.61969 64247.66494 [11,] 1079.34180 -22640.61969 [12,] -23307.71734 1079.34180 [13,] -29467.13301 -23307.71734 [14,] 24672.08366 -29467.13301 [15,] 965.13519 24672.08366 [16,] -41218.95929 965.13519 [17,] -10386.97534 -41218.95929 [18,] -62926.52022 -10386.97534 [19,] -31596.03840 -62926.52022 [20,] -14824.85087 -31596.03840 [21,] -409.76589 -14824.85087 [22,] 28961.85310 -409.76589 [23,] -30213.26551 28961.85310 [24,] -1785.77143 -30213.26551 [25,] 17582.92888 -1785.77143 [26,] 5098.84887 17582.92888 [27,] 32190.95892 5098.84887 [28,] 113904.52612 32190.95892 [29,] 25436.55707 113904.52612 [30,] 10527.15305 25436.55707 [31,] 37498.45318 10527.15305 [32,] -28343.95599 37498.45318 [33,] 3856.26943 -28343.95599 [34,] 16793.83017 3856.26943 [35,] -4692.66602 16793.83017 [36,] 40600.59277 -4692.66602 [37,] -21597.22839 40600.59277 [38,] -39159.30426 -21597.22839 [39,] 1434.72267 -39159.30426 [40,] 697.92968 1434.72267 [41,] -14677.04677 697.92968 [42,] -7076.53490 -14677.04677 [43,] -6317.93835 -7076.53490 [44,] -17723.13263 -6317.93835 [45,] 31388.76931 -17723.13263 [46,] 13649.31855 31388.76931 [47,] 22687.64211 13649.31855 [48,] 8431.75812 22687.64211 [49,] -26509.08367 8431.75812 [50,] 41.98998 -26509.08367 [51,] -14260.35442 41.98998 [52,] 60838.49418 -14260.35442 [53,] 57254.11171 60838.49418 [54,] 18397.64324 57254.11171 [55,] 7503.28325 18397.64324 [56,] 47179.67142 7503.28325 [57,] -11780.62881 47179.67142 [58,] 4835.81115 -11780.62881 [59,] -19681.10377 4835.81115 [60,] -17345.47507 -19681.10377 [61,] -34582.62427 -17345.47507 [62,] 202.90166 -34582.62427 [63,] 3466.27425 202.90166 [64,] 17904.40794 3466.27425 [65,] -19419.94242 17904.40794 [66,] -33349.72733 -19419.94242 [67,] -62337.78988 -33349.72733 [68,] -4327.74199 -62337.78988 [69,] 3078.65297 -4327.74199 [70,] 29946.59486 3078.65297 [71,] 20571.47136 29946.59486 [72,] -32145.59448 20571.47136 [73,] -13859.04103 -32145.59448 [74,] -69034.41424 -13859.04103 [75,] -22472.02547 -69034.41424 [76,] -30720.74844 -22472.02547 [77,] -43155.60623 -30720.74844 [78,] -2935.91474 -43155.60623 [79,] -14669.92796 -2935.91474 [80,] -18475.40216 -14669.92796 [81,] 77335.77805 -18475.40216 [82,] 8371.68580 77335.77805 [83,] -5821.07785 8371.68580 [84,] -17378.78258 -5821.07785 [85,] 16834.61535 -17378.78258 [86,] 4177.72670 16834.61535 [87,] -20100.19002 4177.72670 [88,] -13224.45577 -20100.19002 [89,] 7161.92783 -13224.45577 [90,] -8161.14142 7161.92783 [91,] -22091.12055 -8161.14142 [92,] 33480.49840 -22091.12055 [93,] 13377.58862 33480.49840 [94,] -13756.32529 13377.58862 [95,] 24049.29419 -13756.32529 [96,] 13437.86246 24049.29419 [97,] -2127.67888 13437.86246 [98,] 23529.37325 -2127.67888 [99,] -6555.20139 23529.37325 [100,] 9095.72494 -6555.20139 [101,] -25343.22899 9095.72494 [102,] 12775.45289 -25343.22899 [103,] 17365.10172 12775.45289 [104,] 9098.55055 17365.10172 [105,] -2630.45219 9098.55055 [106,] -14251.41485 -2630.45219 [107,] 3753.57823 -14251.41485 [108,] -4642.65459 3753.57823 [109,] -19116.56020 -4642.65459 [110,] -20620.19456 -19116.56020 [111,] 10152.73473 -20620.19456 [112,] -27738.14502 10152.73473 [113,] 505.34317 -27738.14502 [114,] -4927.54651 505.34317 [115,] -4642.65459 -4927.54651 [116,] 52706.15165 -4642.65459 [117,] -903.75032 52706.15165 [118,] 11536.11892 -903.75032 [119,] -1307.67055 11536.11892 [120,] -4686.05103 -1307.67055 [121,] 7651.11406 -4686.05103 [122,] 7918.16538 7651.11406 [123,] -16105.28057 7918.16538 [124,] 4611.72468 -16105.28057 [125,] -5147.54036 4611.72468 [126,] -6521.75777 -5147.54036 [127,] 9166.05059 -6521.75777 [128,] -6322.44711 9166.05059 [129,] -4669.74502 -6322.44711 [130,] -1066.58082 -4669.74502 [131,] 21216.15312 -1066.58082 [132,] 1175.02882 21216.15312 [133,] 19539.27278 1175.02882 [134,] -3963.52457 19539.27278 [135,] 4383.09167 -3963.52457 [136,] -4642.65459 4383.09167 [137,] 11756.48558 -4642.65459 [138,] -7600.86917 11756.48558 [139,] -1562.58082 -7600.86917 [140,] -3499.35212 -1562.58082 [141,] -7317.67256 -3499.35212 [142,] 5101.73408 -7317.67256 [143,] 9242.01757 5101.73408 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 32980.96108 13906.12637 2 -7261.40755 32980.96108 3 -29290.51826 -7261.40755 4 -30519.72927 -29290.51826 5 -6975.75330 -30519.72927 6 8307.69316 -6975.75330 7 5204.70384 8307.69316 8 -1910.79414 5204.70384 9 64247.66494 -1910.79414 10 -22640.61969 64247.66494 11 1079.34180 -22640.61969 12 -23307.71734 1079.34180 13 -29467.13301 -23307.71734 14 24672.08366 -29467.13301 15 965.13519 24672.08366 16 -41218.95929 965.13519 17 -10386.97534 -41218.95929 18 -62926.52022 -10386.97534 19 -31596.03840 -62926.52022 20 -14824.85087 -31596.03840 21 -409.76589 -14824.85087 22 28961.85310 -409.76589 23 -30213.26551 28961.85310 24 -1785.77143 -30213.26551 25 17582.92888 -1785.77143 26 5098.84887 17582.92888 27 32190.95892 5098.84887 28 113904.52612 32190.95892 29 25436.55707 113904.52612 30 10527.15305 25436.55707 31 37498.45318 10527.15305 32 -28343.95599 37498.45318 33 3856.26943 -28343.95599 34 16793.83017 3856.26943 35 -4692.66602 16793.83017 36 40600.59277 -4692.66602 37 -21597.22839 40600.59277 38 -39159.30426 -21597.22839 39 1434.72267 -39159.30426 40 697.92968 1434.72267 41 -14677.04677 697.92968 42 -7076.53490 -14677.04677 43 -6317.93835 -7076.53490 44 -17723.13263 -6317.93835 45 31388.76931 -17723.13263 46 13649.31855 31388.76931 47 22687.64211 13649.31855 48 8431.75812 22687.64211 49 -26509.08367 8431.75812 50 41.98998 -26509.08367 51 -14260.35442 41.98998 52 60838.49418 -14260.35442 53 57254.11171 60838.49418 54 18397.64324 57254.11171 55 7503.28325 18397.64324 56 47179.67142 7503.28325 57 -11780.62881 47179.67142 58 4835.81115 -11780.62881 59 -19681.10377 4835.81115 60 -17345.47507 -19681.10377 61 -34582.62427 -17345.47507 62 202.90166 -34582.62427 63 3466.27425 202.90166 64 17904.40794 3466.27425 65 -19419.94242 17904.40794 66 -33349.72733 -19419.94242 67 -62337.78988 -33349.72733 68 -4327.74199 -62337.78988 69 3078.65297 -4327.74199 70 29946.59486 3078.65297 71 20571.47136 29946.59486 72 -32145.59448 20571.47136 73 -13859.04103 -32145.59448 74 -69034.41424 -13859.04103 75 -22472.02547 -69034.41424 76 -30720.74844 -22472.02547 77 -43155.60623 -30720.74844 78 -2935.91474 -43155.60623 79 -14669.92796 -2935.91474 80 -18475.40216 -14669.92796 81 77335.77805 -18475.40216 82 8371.68580 77335.77805 83 -5821.07785 8371.68580 84 -17378.78258 -5821.07785 85 16834.61535 -17378.78258 86 4177.72670 16834.61535 87 -20100.19002 4177.72670 88 -13224.45577 -20100.19002 89 7161.92783 -13224.45577 90 -8161.14142 7161.92783 91 -22091.12055 -8161.14142 92 33480.49840 -22091.12055 93 13377.58862 33480.49840 94 -13756.32529 13377.58862 95 24049.29419 -13756.32529 96 13437.86246 24049.29419 97 -2127.67888 13437.86246 98 23529.37325 -2127.67888 99 -6555.20139 23529.37325 100 9095.72494 -6555.20139 101 -25343.22899 9095.72494 102 12775.45289 -25343.22899 103 17365.10172 12775.45289 104 9098.55055 17365.10172 105 -2630.45219 9098.55055 106 -14251.41485 -2630.45219 107 3753.57823 -14251.41485 108 -4642.65459 3753.57823 109 -19116.56020 -4642.65459 110 -20620.19456 -19116.56020 111 10152.73473 -20620.19456 112 -27738.14502 10152.73473 113 505.34317 -27738.14502 114 -4927.54651 505.34317 115 -4642.65459 -4927.54651 116 52706.15165 -4642.65459 117 -903.75032 52706.15165 118 11536.11892 -903.75032 119 -1307.67055 11536.11892 120 -4686.05103 -1307.67055 121 7651.11406 -4686.05103 122 7918.16538 7651.11406 123 -16105.28057 7918.16538 124 4611.72468 -16105.28057 125 -5147.54036 4611.72468 126 -6521.75777 -5147.54036 127 9166.05059 -6521.75777 128 -6322.44711 9166.05059 129 -4669.74502 -6322.44711 130 -1066.58082 -4669.74502 131 21216.15312 -1066.58082 132 1175.02882 21216.15312 133 19539.27278 1175.02882 134 -3963.52457 19539.27278 135 4383.09167 -3963.52457 136 -4642.65459 4383.09167 137 11756.48558 -4642.65459 138 -7600.86917 11756.48558 139 -1562.58082 -7600.86917 140 -3499.35212 -1562.58082 141 -7317.67256 -3499.35212 142 5101.73408 -7317.67256 143 9242.01757 5101.73408 > plot(z,main=paste('Residual Lag plot, lowess, and regression line'), ylab='values of Residuals', xlab='lagged values of Residuals') > lines(lowess(z)) > abline(lm(z)) > grid() > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/7yycn1324575700.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > acf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Autocorrelation Function') > grid() > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/84klm1324575700.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > pacf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Partial Autocorrelation Function') > grid() > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/9j1ju1324575700.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > opar <- par(mfrow = c(2,2), oma = c(0, 0, 1.1, 0)) > plot(mylm, las = 1, sub='Residual Diagnostics') > par(opar) > dev.off() null device 1 > if (n > n25) { + postscript(file="/var/wessaorg/rcomp/tmp/10zy6r1324575700.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) + plot(kp3:nmkm3,gqarr[,2], main='Goldfeld-Quandt test',ylab='2-sided p-value',xlab='breakpoint') + grid() + dev.off() + } null device 1 > > #Note: the /var/wessaorg/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/wessaorg/rcomp/createtable") > > a<-table.start() > a<-table.row.start(a) > a<-table.element(a, 'Multiple Linear Regression - Estimated Regression Equation', 1, TRUE) > a<-table.row.end(a) > myeq <- colnames(x)[1] > myeq <- paste(myeq, '[t] = ', sep='') > for (i in 1:k){ + if (mysum$coefficients[i,1] > 0) myeq <- paste(myeq, '+', '') + myeq <- paste(myeq, mysum$coefficients[i,1], sep=' ') + if (rownames(mysum$coefficients)[i] != '(Intercept)') { + myeq <- paste(myeq, rownames(mysum$coefficients)[i], sep='') + if (rownames(mysum$coefficients)[i] != 't') myeq <- paste(myeq, '[t]', sep='') + } + } > myeq <- paste(myeq, ' + e[t]') > a<-table.row.start(a) > a<-table.element(a, myeq) > a<-table.row.end(a) > a<-table.end(a) > table.save(a,file="/var/wessaorg/rcomp/tmp/11vg8r1324575701.tab") > a<-table.start() > a<-table.row.start(a) > a<-table.element(a,hyperlink('http://www.xycoon.com/ols1.htm','Multiple Linear Regression - Ordinary Least Squares',''), 6, TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'Variable',header=TRUE) > a<-table.element(a,'Parameter',header=TRUE) > a<-table.element(a,'S.D.',header=TRUE) > a<-table.element(a,'T-STAT
H0: parameter = 0',header=TRUE) > a<-table.element(a,'2-tail p-value',header=TRUE) > a<-table.element(a,'1-tail p-value',header=TRUE) > a<-table.row.end(a) > for (i in 1:k){ + a<-table.row.start(a) + a<-table.element(a,rownames(mysum$coefficients)[i],header=TRUE) + a<-table.element(a,mysum$coefficients[i,1]) + a<-table.element(a, round(mysum$coefficients[i,2],6)) + a<-table.element(a, round(mysum$coefficients[i,3],4)) + a<-table.element(a, round(mysum$coefficients[i,4],6)) + a<-table.element(a, round(mysum$coefficients[i,4]/2,6)) + a<-table.row.end(a) + } > a<-table.end(a) > table.save(a,file="/var/wessaorg/rcomp/tmp/12kk0p1324575701.tab") > a<-table.start() > a<-table.row.start(a) > a<-table.element(a, 'Multiple Linear Regression - Regression Statistics', 2, TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Multiple R',1,TRUE) > a<-table.element(a, sqrt(mysum$r.squared)) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'R-squared',1,TRUE) > a<-table.element(a, mysum$r.squared) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Adjusted R-squared',1,TRUE) > a<-table.element(a, mysum$adj.r.squared) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'F-TEST (value)',1,TRUE) > a<-table.element(a, mysum$fstatistic[1]) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'F-TEST (DF numerator)',1,TRUE) > a<-table.element(a, mysum$fstatistic[2]) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'F-TEST (DF denominator)',1,TRUE) > a<-table.element(a, mysum$fstatistic[3]) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'p-value',1,TRUE) > a<-table.element(a, 1-pf(mysum$fstatistic[1],mysum$fstatistic[2],mysum$fstatistic[3])) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Multiple Linear Regression - Residual Statistics', 2, TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Residual Standard Deviation',1,TRUE) > a<-table.element(a, mysum$sigma) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Sum Squared Residuals',1,TRUE) > a<-table.element(a, sum(myerror*myerror)) > a<-table.row.end(a) > a<-table.end(a) > table.save(a,file="/var/wessaorg/rcomp/tmp/13zjpr1324575701.tab") > a<-table.start() > a<-table.row.start(a) > a<-table.element(a, 'Multiple Linear Regression - Actuals, Interpolation, and Residuals', 4, TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Time or Index', 1, TRUE) > a<-table.element(a, 'Actuals', 1, TRUE) > a<-table.element(a, 'Interpolation
Forecast', 1, TRUE) > a<-table.element(a, 'Residuals
Prediction Error', 1, TRUE) > a<-table.row.end(a) > for (i in 1:n) { + a<-table.row.start(a) + a<-table.element(a,i, 1, TRUE) + a<-table.element(a,x[i]) + a<-table.element(a,x[i]-mysum$resid[i]) + a<-table.element(a,mysum$resid[i]) + a<-table.row.end(a) + } > a<-table.end(a) > table.save(a,file="/var/wessaorg/rcomp/tmp/14ptko1324575701.tab") > if (n > n25) { + a<-table.start() + a<-table.row.start(a) + a<-table.element(a,'Goldfeld-Quandt test for Heteroskedasticity',4,TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'p-values',header=TRUE) + a<-table.element(a,'Alternative Hypothesis',3,header=TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'breakpoint index',header=TRUE) + a<-table.element(a,'greater',header=TRUE) + a<-table.element(a,'2-sided',header=TRUE) + a<-table.element(a,'less',header=TRUE) + a<-table.row.end(a) + for (mypoint in kp3:nmkm3) { + a<-table.row.start(a) + a<-table.element(a,mypoint,header=TRUE) + a<-table.element(a,gqarr[mypoint-kp3+1,1]) + a<-table.element(a,gqarr[mypoint-kp3+1,2]) + a<-table.element(a,gqarr[mypoint-kp3+1,3]) + a<-table.row.end(a) + } + a<-table.end(a) + table.save(a,file="/var/wessaorg/rcomp/tmp/15sxbw1324575701.tab") + a<-table.start() + a<-table.row.start(a) + a<-table.element(a,'Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity',4,TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'Description',header=TRUE) + a<-table.element(a,'# significant tests',header=TRUE) + a<-table.element(a,'% significant tests',header=TRUE) + a<-table.element(a,'OK/NOK',header=TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'1% type I error level',header=TRUE) + a<-table.element(a,numsignificant1) + a<-table.element(a,numsignificant1/numgqtests) + if (numsignificant1/numgqtests < 0.01) dum <- 'OK' else dum <- 'NOK' + a<-table.element(a,dum) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'5% type I error level',header=TRUE) + a<-table.element(a,numsignificant5) + a<-table.element(a,numsignificant5/numgqtests) + if (numsignificant5/numgqtests < 0.05) dum <- 'OK' else dum <- 'NOK' + a<-table.element(a,dum) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'10% type I error level',header=TRUE) + a<-table.element(a,numsignificant10) + a<-table.element(a,numsignificant10/numgqtests) + if (numsignificant10/numgqtests < 0.1) dum <- 'OK' else dum <- 'NOK' + a<-table.element(a,dum) + a<-table.row.end(a) + a<-table.end(a) + table.save(a,file="/var/wessaorg/rcomp/tmp/16hxj11324575701.tab") + } > > try(system("convert tmp/1izfx1324575700.ps tmp/1izfx1324575700.png",intern=TRUE)) character(0) > try(system("convert tmp/2axeb1324575700.ps tmp/2axeb1324575700.png",intern=TRUE)) character(0) > try(system("convert tmp/3sx9g1324575700.ps tmp/3sx9g1324575700.png",intern=TRUE)) character(0) > try(system("convert tmp/4v3c91324575700.ps tmp/4v3c91324575700.png",intern=TRUE)) character(0) > try(system("convert tmp/55ej01324575700.ps tmp/55ej01324575700.png",intern=TRUE)) character(0) > try(system("convert tmp/6r53t1324575700.ps tmp/6r53t1324575700.png",intern=TRUE)) character(0) > try(system("convert tmp/7yycn1324575700.ps tmp/7yycn1324575700.png",intern=TRUE)) character(0) > try(system("convert tmp/84klm1324575700.ps tmp/84klm1324575700.png",intern=TRUE)) character(0) > try(system("convert tmp/9j1ju1324575700.ps tmp/9j1ju1324575700.png",intern=TRUE)) character(0) > try(system("convert tmp/10zy6r1324575700.ps tmp/10zy6r1324575700.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 4.599 0.576 5.189