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(95556 + ,1173 + ,170650 + ,26 + ,54565 + ,669 + ,86621 + ,20 + ,63016 + ,1154 + ,127843 + ,27 + ,79774 + ,1948 + ,152526 + ,25 + ,31258 + ,722 + ,92389 + ,17 + ,52491 + ,336 + ,38778 + ,16 + ,91256 + ,2727 + ,316392 + ,20 + ,22807 + ,345 + ,32750 + ,18 + ,77411 + ,1416 + ,123444 + ,19 + ,48821 + ,1208 + ,137034 + ,22 + ,52295 + ,1432 + ,176816 + ,30 + ,63262 + ,1246 + ,143205 + ,40 + ,50466 + ,1205 + ,113286 + ,26 + ,62932 + ,1732 + ,195452 + ,36 + ,38439 + ,1214 + ,144513 + ,31 + ,70817 + ,3222 + ,263581 + ,41 + ,105965 + ,1385 + ,183271 + ,24 + ,73795 + ,2011 + ,210763 + ,27 + ,82043 + ,884 + ,113853 + ,19 + ,74349 + ,1631 + ,159968 + ,30 + ,82204 + ,1460 + ,174585 + ,31 + ,55709 + ,1950 + ,294675 + ,26 + ,37137 + ,865 + ,98759 + ,16 + ,70780 + ,1165 + ,116390 + ,33 + ,55027 + ,2115 + ,146342 + ,28 + ,56699 + ,1940 + ,152647 + ,27 + ,65911 + ,1858 + ,166661 + ,21 + ,56316 + ,1347 + ,175505 + ,27 + ,26982 + ,1093 + ,112485 + ,21 + ,54628 + ,1650 + ,198790 + ,30 + ,96750 + ,1551 + ,191822 + ,30 + ,53009 + ,1273 + ,140267 + ,33 + ,64664 + ,1478 + ,221991 + ,35 + ,36990 + ,670 + ,75339 + ,26 + ,85224 + ,2040 + ,247985 + ,27 + ,37048 + ,1562 + ,167351 + ,25 + ,59635 + ,2079 + ,266609 + ,30 + ,42051 + ,1131 + ,124188 + ,20 + ,26998 + ,686 + ,80964 + ,8 + ,63717 + ,2066 + ,215183 + ,24 + ,55071 + ,2251 + ,225469 + ,25 + ,40001 + ,1107 + ,125382 + ,28 + ,54506 + ,1245 + ,141437 + ,23 + ,35838 + ,1049 + ,84863 + ,21 + ,50838 + ,1735 + ,93125 + ,21 + ,86997 + ,3681 + ,318668 + ,26 + ,33032 + ,918 + ,78800 + ,26 + ,61704 + ,1582 + ,161048 + ,30 + ,117986 + ,2900 + ,236367 + ,34 + ,56733 + ,1497 + ,131108 + ,30 + ,55064 + ,1121 + ,131101 + ,18 + ,5950 + ,496 + ,24188 + ,4 + ,84607 + ,1778 + ,267003 + ,31 + ,32551 + ,744 + ,65029 + ,18 + ,31701 + ,1104 + ,100147 + ,14 + ,71170 + ,1703 + ,178549 + ,21 + ,101773 + ,1871 + ,186965 + ,37 + ,101653 + ,2460 + ,197266 + ,24 + ,81493 + ,1705 + ,217300 + ,29 + ,55901 + ,1334 + ,149594 + ,24 + ,109104 + ,2664 + ,263693 + ,31 + ,114425 + ,2218 + ,209228 + ,21 + ,36311 + ,1635 + ,145699 + ,31 + ,70027 + ,1741 + ,187197 + ,26 + ,73713 + ,991 + ,150752 + ,24 + ,40671 + ,1195 + ,131218 + ,18 + ,89041 + ,1283 + ,118697 + ,21 + ,57231 + ,1992 + ,147913 + ,29 + ,68608 + ,1558 + ,160065 + ,24 + ,59155 + ,1071 + ,96487 + ,21 + ,55827 + ,1441 + ,128780 + ,30 + ,22618 + ,853 + ,71972 + ,20 + ,58425 + ,1425 + ,140266 + ,30 + ,65724 + ,1246 + ,152455 + ,24 + ,56979 + ,1100 + ,110655 + ,26 + ,72369 + ,1400 + ,204822 + ,27 + ,79194 + ,1556 + ,216052 + ,24 + ,202316 + ,1015 + ,113421 + ,23 + ,44970 + ,1002 + ,103660 + ,26 + ,49319 + ,1198 + ,128906 + ,25 + ,36252 + ,1244 + ,105502 + ,18 + ,75741 + ,2657 + ,299359 + ,30 + ,38417 + ,1232 + ,141493 + ,25 + ,64102 + ,1352 + ,149880 + ,27 + ,56622 + ,870 + ,80953 + ,8 + ,15430 + ,1474 + ,109237 + ,21 + ,72571 + ,881 + ,102104 + ,26 + ,67271 + ,2515 + ,239765 + ,24 + ,43460 + ,1444 + ,176507 + ,30 + ,99501 + ,1995 + ,118217 + ,27 + ,28340 + ,1258 + ,142694 + ,24 + ,76013 + ,1357 + ,152193 + ,25 + ,37361 + ,1329 + ,126500 + ,21 + ,48204 + ,2041 + ,174710 + ,24 + ,76168 + ,1454 + ,187772 + ,24 + ,85168 + ,1171 + ,140903 + ,24 + ,125410 + ,1219 + ,155350 + ,24 + ,123328 + ,1522 + ,202077 + ,24 + ,83038 + ,2314 + ,213875 + ,40 + ,120087 + ,2289 + ,252952 + ,22 + ,91939 + ,1371 + ,166981 + ,31 + ,103646 + ,1639 + ,190790 + ,26 + ,29467 + ,1000 + ,106351 + ,20 + ,43750 + ,602 + ,43287 + ,19 + ,34497 + ,1380 + ,127493 + ,15 + ,66477 + ,1208 + ,132143 + ,22 + ,71181 + ,1490 + ,157469 + ,25 + ,74482 + ,1801 + ,197727 + ,28 + ,174949 + ,728 + ,88077 + ,23 + ,46765 + ,1152 + ,94968 + ,25 + ,90257 + ,1277 + ,191753 + ,26 + ,51370 + ,1401 + ,153332 + ,32 + ,1168 + ,391 + ,22938 + ,1 + ,51360 + ,1264 + ,125927 + ,24 + ,25162 + ,530 + ,61857 + ,11 + ,21067 + ,1123 + ,103749 + ,31 + ,58233 + ,2055 + ,269909 + ,26 + ,855 + ,387 + ,21054 + ,0 + ,85903 + ,1486 + ,174409 + ,19 + ,14116 + ,449 + ,31414 + ,8 + ,57637 + ,2212 + ,200405 + ,27 + ,94137 + ,1148 + ,139456 + ,31 + ,62147 + ,814 + ,78001 + ,24 + ,62832 + ,1015 + ,82724 + ,20 + ,8773 + ,568 + ,38214 + ,8 + ,63785 + ,936 + ,91390 + ,22 + ,65196 + ,1586 + ,197612 + ,33 + ,73087 + ,871 + ,137161 + ,33 + ,72631 + ,2276 + ,251103 + ,31 + ,86281 + ,1670 + ,215918 + ,33 + ,162365 + ,2238 + ,269470 + ,35 + ,56530 + ,838 + ,139215 + ,21 + ,35606 + ,841 + ,77796 + ,24 + ,70111 + ,1904 + ,197114 + ,25 + ,92046 + ,3054 + ,291962 + ,31 + ,63989 + ,655 + ,56727 + ,22 + ,104911 + ,2617 + ,254843 + ,27 + ,43448 + ,1314 + ,105908 + ,24 + ,60029 + ,1154 + ,170155 + ,27 + ,38650 + ,1497 + ,136745 + ,26 + ,47261 + ,754 + ,86706 + ,16 + ,73586 + ,2849 + ,253025 + ,23 + ,83042 + ,1281 + ,152366 + ,24 + ,37238 + ,2035 + ,173260 + ,21 + ,63958 + ,1894 + ,212582 + ,30 + ,78956 + ,1268 + ,87850 + ,37 + ,99518 + ,1714 + ,148636 + ,24 + ,111436 + ,1568 + ,185455 + ,29 + ,0 + ,0 + ,0 + ,0 + ,6023 + ,207 + ,14688 + ,0 + ,0 + ,5 + ,98 + ,0 + ,0 + ,8 + ,455 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,42564 + ,1302 + ,137891 + ,20 + ,38885 + ,1831 + ,201052 + ,31 + ,0 + ,0 + ,0 + ,0 + ,0 + ,4 + ,203 + ,0 + ,1644 + ,151 + ,7199 + ,0 + ,6179 + ,474 + ,46660 + ,5 + ,3926 + ,141 + ,17547 + ,1 + ,23238 + ,705 + ,73567 + ,23 + ,0 + ,29 + ,969 + ,0 + ,49288 + ,1033 + ,106662 + ,16) + ,dim=c(4 + ,164) + ,dimnames=list(c('CompendiumWriting' + ,'Pageviews' + ,'TimeRFC' + ,'ReviewedCompendiums') + ,1:164)) > y <- array(NA,dim=c(4,164),dimnames=list(c('CompendiumWriting','Pageviews','TimeRFC','ReviewedCompendiums'),1:164)) > 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 CompendiumWriting Pageviews TimeRFC ReviewedCompendiums 1 95556 1173 170650 26 2 54565 669 86621 20 3 63016 1154 127843 27 4 79774 1948 152526 25 5 31258 722 92389 17 6 52491 336 38778 16 7 91256 2727 316392 20 8 22807 345 32750 18 9 77411 1416 123444 19 10 48821 1208 137034 22 11 52295 1432 176816 30 12 63262 1246 143205 40 13 50466 1205 113286 26 14 62932 1732 195452 36 15 38439 1214 144513 31 16 70817 3222 263581 41 17 105965 1385 183271 24 18 73795 2011 210763 27 19 82043 884 113853 19 20 74349 1631 159968 30 21 82204 1460 174585 31 22 55709 1950 294675 26 23 37137 865 98759 16 24 70780 1165 116390 33 25 55027 2115 146342 28 26 56699 1940 152647 27 27 65911 1858 166661 21 28 56316 1347 175505 27 29 26982 1093 112485 21 30 54628 1650 198790 30 31 96750 1551 191822 30 32 53009 1273 140267 33 33 64664 1478 221991 35 34 36990 670 75339 26 35 85224 2040 247985 27 36 37048 1562 167351 25 37 59635 2079 266609 30 38 42051 1131 124188 20 39 26998 686 80964 8 40 63717 2066 215183 24 41 55071 2251 225469 25 42 40001 1107 125382 28 43 54506 1245 141437 23 44 35838 1049 84863 21 45 50838 1735 93125 21 46 86997 3681 318668 26 47 33032 918 78800 26 48 61704 1582 161048 30 49 117986 2900 236367 34 50 56733 1497 131108 30 51 55064 1121 131101 18 52 5950 496 24188 4 53 84607 1778 267003 31 54 32551 744 65029 18 55 31701 1104 100147 14 56 71170 1703 178549 21 57 101773 1871 186965 37 58 101653 2460 197266 24 59 81493 1705 217300 29 60 55901 1334 149594 24 61 109104 2664 263693 31 62 114425 2218 209228 21 63 36311 1635 145699 31 64 70027 1741 187197 26 65 73713 991 150752 24 66 40671 1195 131218 18 67 89041 1283 118697 21 68 57231 1992 147913 29 69 68608 1558 160065 24 70 59155 1071 96487 21 71 55827 1441 128780 30 72 22618 853 71972 20 73 58425 1425 140266 30 74 65724 1246 152455 24 75 56979 1100 110655 26 76 72369 1400 204822 27 77 79194 1556 216052 24 78 202316 1015 113421 23 79 44970 1002 103660 26 80 49319 1198 128906 25 81 36252 1244 105502 18 82 75741 2657 299359 30 83 38417 1232 141493 25 84 64102 1352 149880 27 85 56622 870 80953 8 86 15430 1474 109237 21 87 72571 881 102104 26 88 67271 2515 239765 24 89 43460 1444 176507 30 90 99501 1995 118217 27 91 28340 1258 142694 24 92 76013 1357 152193 25 93 37361 1329 126500 21 94 48204 2041 174710 24 95 76168 1454 187772 24 96 85168 1171 140903 24 97 125410 1219 155350 24 98 123328 1522 202077 24 99 83038 2314 213875 40 100 120087 2289 252952 22 101 91939 1371 166981 31 102 103646 1639 190790 26 103 29467 1000 106351 20 104 43750 602 43287 19 105 34497 1380 127493 15 106 66477 1208 132143 22 107 71181 1490 157469 25 108 74482 1801 197727 28 109 174949 728 88077 23 110 46765 1152 94968 25 111 90257 1277 191753 26 112 51370 1401 153332 32 113 1168 391 22938 1 114 51360 1264 125927 24 115 25162 530 61857 11 116 21067 1123 103749 31 117 58233 2055 269909 26 118 855 387 21054 0 119 85903 1486 174409 19 120 14116 449 31414 8 121 57637 2212 200405 27 122 94137 1148 139456 31 123 62147 814 78001 24 124 62832 1015 82724 20 125 8773 568 38214 8 126 63785 936 91390 22 127 65196 1586 197612 33 128 73087 871 137161 33 129 72631 2276 251103 31 130 86281 1670 215918 33 131 162365 2238 269470 35 132 56530 838 139215 21 133 35606 841 77796 24 134 70111 1904 197114 25 135 92046 3054 291962 31 136 63989 655 56727 22 137 104911 2617 254843 27 138 43448 1314 105908 24 139 60029 1154 170155 27 140 38650 1497 136745 26 141 47261 754 86706 16 142 73586 2849 253025 23 143 83042 1281 152366 24 144 37238 2035 173260 21 145 63958 1894 212582 30 146 78956 1268 87850 37 147 99518 1714 148636 24 148 111436 1568 185455 29 149 0 0 0 0 150 6023 207 14688 0 151 0 5 98 0 152 0 8 455 0 153 0 0 0 0 154 0 0 0 0 155 42564 1302 137891 20 156 38885 1831 201052 31 157 0 0 0 0 158 0 4 203 0 159 1644 151 7199 0 160 6179 474 46660 5 161 3926 141 17547 1 162 23238 705 73567 23 163 0 29 969 0 164 49288 1033 106662 16 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) Pageviews TimeRFC 6722.2594 -3.6818 0.2236 ReviewedCompendiums 1131.0116 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -41103 -12718 -6524 8686 147962 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 6722.25938 5379.45068 1.250 0.213264 Pageviews -3.68184 7.09225 -0.519 0.604384 TimeRFC 0.22355 0.07031 3.180 0.001771 ** ReviewedCompendiums 1131.01158 311.17955 3.635 0.000375 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 25180 on 160 degrees of freedom Multiple R-squared: 0.4454, Adjusted R-squared: 0.435 F-statistic: 42.83 on 3 and 160 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,] 2.948871e-01 5.897742e-01 7.051129e-01 [2,] 2.210815e-01 4.421631e-01 7.789185e-01 [3,] 2.051774e-01 4.103548e-01 7.948226e-01 [4,] 1.686222e-01 3.372443e-01 8.313778e-01 [5,] 2.008809e-01 4.017618e-01 7.991191e-01 [6,] 1.307033e-01 2.614066e-01 8.692967e-01 [7,] 8.702403e-02 1.740481e-01 9.129760e-01 [8,] 5.969757e-02 1.193951e-01 9.403024e-01 [9,] 6.030966e-02 1.206193e-01 9.396903e-01 [10,] 4.838683e-02 9.677366e-02 9.516132e-01 [11,] 1.055715e-01 2.111430e-01 8.944285e-01 [12,] 7.040730e-02 1.408146e-01 9.295927e-01 [13,] 7.148908e-02 1.429782e-01 9.285109e-01 [14,] 5.246884e-02 1.049377e-01 9.475312e-01 [15,] 4.007268e-02 8.014535e-02 9.599273e-01 [16,] 7.968202e-02 1.593640e-01 9.203180e-01 [17,] 7.428093e-02 1.485619e-01 9.257191e-01 [18,] 5.825588e-02 1.165118e-01 9.417441e-01 [19,] 4.334423e-02 8.668845e-02 9.566558e-01 [20,] 3.053533e-02 6.107066e-02 9.694647e-01 [21,] 2.017102e-02 4.034204e-02 9.798290e-01 [22,] 1.452391e-02 2.904782e-02 9.854761e-01 [23,] 2.035530e-02 4.071060e-02 9.796447e-01 [24,] 1.659650e-02 3.319299e-02 9.834035e-01 [25,] 2.105825e-02 4.211650e-02 9.789417e-01 [26,] 1.525813e-02 3.051626e-02 9.847419e-01 [27,] 1.147215e-02 2.294430e-02 9.885279e-01 [28,] 8.629742e-03 1.725948e-02 9.913703e-01 [29,] 5.852762e-03 1.170552e-02 9.941472e-01 [30,] 7.623341e-03 1.524668e-02 9.923767e-01 [31,] 7.685115e-03 1.537023e-02 9.923149e-01 [32,] 5.970866e-03 1.194173e-02 9.940291e-01 [33,] 5.207439e-03 1.041488e-02 9.947926e-01 [34,] 3.527806e-03 7.055611e-03 9.964722e-01 [35,] 2.948295e-03 5.896590e-03 9.970517e-01 [36,] 2.508149e-03 5.016297e-03 9.974919e-01 [37,] 1.613330e-03 3.226659e-03 9.983867e-01 [38,] 1.150968e-03 2.301935e-03 9.988490e-01 [39,] 7.235235e-04 1.447047e-03 9.992765e-01 [40,] 4.485263e-04 8.970527e-04 9.995515e-01 [41,] 3.454105e-04 6.908210e-04 9.996546e-01 [42,] 2.131643e-04 4.263287e-04 9.997868e-01 [43,] 6.619946e-04 1.323989e-03 9.993380e-01 [44,] 4.189671e-04 8.379341e-04 9.995810e-01 [45,] 2.589366e-04 5.178733e-04 9.997411e-01 [46,] 2.454290e-04 4.908580e-04 9.997546e-01 [47,] 1.644720e-04 3.289440e-04 9.998355e-01 [48,] 1.034944e-04 2.069889e-04 9.998965e-01 [49,] 7.032352e-05 1.406470e-04 9.999297e-01 [50,] 4.617936e-05 9.235872e-05 9.999538e-01 [51,] 6.283704e-05 1.256741e-04 9.999372e-01 [52,] 1.139147e-04 2.278294e-04 9.998861e-01 [53,] 7.556299e-05 1.511260e-04 9.999244e-01 [54,] 4.617296e-05 9.234591e-05 9.999538e-01 [55,] 4.501918e-05 9.003835e-05 9.999550e-01 [56,] 1.910195e-04 3.820389e-04 9.998090e-01 [57,] 2.600685e-04 5.201370e-04 9.997399e-01 [58,] 1.645776e-04 3.291553e-04 9.998354e-01 [59,] 1.320852e-04 2.641704e-04 9.998679e-01 [60,] 9.302938e-05 1.860588e-04 9.999070e-01 [61,] 2.032752e-04 4.065504e-04 9.997967e-01 [62,] 1.355129e-04 2.710258e-04 9.998645e-01 [63,] 8.716020e-05 1.743204e-04 9.999128e-01 [64,] 6.033961e-05 1.206792e-04 9.999397e-01 [65,] 3.814736e-05 7.629471e-05 9.999619e-01 [66,] 3.398645e-05 6.797290e-05 9.999660e-01 [67,] 2.141108e-05 4.282215e-05 9.999786e-01 [68,] 1.334320e-05 2.668640e-05 9.999867e-01 [69,] 8.096639e-06 1.619328e-05 9.999919e-01 [70,] 5.071152e-06 1.014230e-05 9.999949e-01 [71,] 3.108999e-06 6.217999e-06 9.999969e-01 [72,] 3.961940e-01 7.923880e-01 6.038060e-01 [73,] 3.617876e-01 7.235751e-01 6.382124e-01 [74,] 3.279123e-01 6.558246e-01 6.720877e-01 [75,] 2.969730e-01 5.939459e-01 7.030270e-01 [76,] 2.872769e-01 5.745538e-01 7.127231e-01 [77,] 2.866367e-01 5.732734e-01 7.133633e-01 [78,] 2.506728e-01 5.013456e-01 7.493272e-01 [79,] 2.456170e-01 4.912340e-01 7.543830e-01 [80,] 2.803388e-01 5.606776e-01 7.196612e-01 [81,] 2.591734e-01 5.183467e-01 7.408266e-01 [82,] 2.300937e-01 4.601875e-01 7.699063e-01 [83,] 2.570237e-01 5.140474e-01 7.429763e-01 [84,] 3.650936e-01 7.301872e-01 6.349064e-01 [85,] 4.093399e-01 8.186798e-01 5.906601e-01 [86,] 3.741465e-01 7.482930e-01 6.258535e-01 [87,] 3.516188e-01 7.032376e-01 6.483812e-01 [88,] 3.258713e-01 6.517426e-01 6.741287e-01 [89,] 2.897864e-01 5.795729e-01 7.102136e-01 [90,] 2.805446e-01 5.610891e-01 7.194554e-01 [91,] 4.694458e-01 9.388915e-01 5.305542e-01 [92,] 5.789909e-01 8.420181e-01 4.210091e-01 [93,] 5.393936e-01 9.212128e-01 4.606064e-01 [94,] 6.126105e-01 7.747791e-01 3.873895e-01 [95,] 5.870006e-01 8.259987e-01 4.129994e-01 [96,] 6.060460e-01 7.879080e-01 3.939540e-01 [97,] 5.951113e-01 8.097774e-01 4.048887e-01 [98,] 5.509374e-01 8.981253e-01 4.490626e-01 [99,] 5.169749e-01 9.660503e-01 4.830251e-01 [100,] 4.745051e-01 9.490102e-01 5.254949e-01 [101,] 4.294831e-01 8.589661e-01 5.705169e-01 [102,] 3.833225e-01 7.666451e-01 6.166775e-01 [103,] 9.969423e-01 6.115491e-03 3.057745e-03 [104,] 9.955791e-01 8.841848e-03 4.420924e-03 [105,] 9.944983e-01 1.100337e-02 5.501687e-03 [106,] 9.942108e-01 1.157848e-02 5.789240e-03 [107,] 9.924356e-01 1.512875e-02 7.564374e-03 [108,] 9.894752e-01 2.104963e-02 1.052482e-02 [109,] 9.855908e-01 2.881843e-02 1.440921e-02 [110,] 9.941249e-01 1.175016e-02 5.875082e-03 [111,] 9.957813e-01 8.437308e-03 4.218654e-03 [112,] 9.941209e-01 1.175828e-02 5.879139e-03 [113,] 9.944990e-01 1.100206e-02 5.501030e-03 [114,] 9.921293e-01 1.574141e-02 7.870706e-03 [115,] 9.905563e-01 1.888741e-02 9.443705e-03 [116,] 9.901758e-01 1.964841e-02 9.824207e-03 [117,] 9.872394e-01 2.552117e-02 1.276058e-02 [118,] 9.860224e-01 2.795524e-02 1.397762e-02 [119,] 9.814328e-01 3.713435e-02 1.856718e-02 [120,] 9.777840e-01 4.443200e-02 2.221600e-02 [121,] 9.764229e-01 4.715418e-02 2.357709e-02 [122,] 9.672956e-01 6.540876e-02 3.270438e-02 [123,] 9.659685e-01 6.806299e-02 3.403149e-02 [124,] 9.552041e-01 8.959181e-02 4.479590e-02 [125,] 9.962867e-01 7.426623e-03 3.713311e-03 [126,] 9.940971e-01 1.180589e-02 5.902944e-03 [127,] 9.921613e-01 1.567749e-02 7.838744e-03 [128,] 9.877753e-01 2.444949e-02 1.222474e-02 [129,] 9.813594e-01 3.728121e-02 1.864060e-02 [130,] 9.815928e-01 3.681437e-02 1.840719e-02 [131,] 9.832968e-01 3.340641e-02 1.670321e-02 [132,] 9.760230e-01 4.795409e-02 2.397705e-02 [133,] 9.654841e-01 6.903186e-02 3.451593e-02 [134,] 9.662312e-01 6.753752e-02 3.376876e-02 [135,] 9.520792e-01 9.584157e-02 4.792078e-02 [136,] 9.301914e-01 1.396172e-01 6.980860e-02 [137,] 9.357826e-01 1.284348e-01 6.421742e-02 [138,] 9.661155e-01 6.776907e-02 3.388454e-02 [139,] 9.557094e-01 8.858117e-02 4.429059e-02 [140,] 9.345812e-01 1.308377e-01 6.541885e-02 [141,] 9.936731e-01 1.265376e-02 6.326882e-03 [142,] 9.999917e-01 1.663795e-05 8.318976e-06 [143,] 9.999690e-01 6.197740e-05 3.098870e-05 [144,] 9.998978e-01 2.043048e-04 1.021524e-04 [145,] 9.996450e-01 7.099145e-04 3.549573e-04 [146,] 9.988260e-01 2.347935e-03 1.173967e-03 [147,] 9.963480e-01 7.303963e-03 3.651982e-03 [148,] 9.893289e-01 2.134224e-02 1.067112e-02 [149,] 9.737762e-01 5.244756e-02 2.622378e-02 [150,] 9.893515e-01 2.129704e-02 1.064852e-02 [151,] 9.608951e-01 7.820985e-02 3.910493e-02 > postscript(file="/var/wessaorg/rcomp/tmp/1g1sr1321984707.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/2lu921321984707.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/3vc8v1321984707.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/4iyux1321984707.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/5wnjv1321984707.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 = 164 Frequency = 1 1 2 3 4 5 6 25597.22629 8321.43163 1425.81499 17851.30312 -12686.83945 20240.78510 7 8 9 10 11 12 1224.07514 -10324.53504 26816.95057 -8969.96677 -22612.64077 -16126.79971 13 14 15 16 17 18 -6551.16528 -21823.25884 -31180.91921 -29337.69754 36227.35952 -3176.71413 19 20 21 22 23 24 31634.29256 3940.43501 6767.18176 -39114.92087 -6574.34615 5004.57733 25 26 27 28 29 30 -8291.42436 -7542.22443 5021.08823 -15218.48659 -24613.40864 -24389.31383 31 32 33 34 35 36 18925.88889 -17706.51569 -25828.25853 -13513.85165 38.03729 -29610.03217 37 38 39 40 41 42 -32963.82291 -10889.70666 -4346.20918 -10647.27454 -22042.59366 -22343.08349 43 44 45 46 47 48 -5264.04620 -9744.47889 5934.28153 -6817.32424 -17332.46667 -9126.41027 49 50 51 52 53 54 30646.55368 -7717.24422 2803.08885 -8877.37035 -10319.14661 -6327.49044 55 56 57 58 59 60 -9178.65296 7051.82711 18295.78376 32744.73568 -328.73347 -6495.88122 61 62 63 64 65 66 18179.91544 45344.64669 -32023.99749 -1539.59155 9794.37640 -11343.61069 67 68 69 70 71 72 36756.44051 -8022.50079 4695.04592 11054.96266 -8308.99996 -19673.30917 73 74 75 76 77 78 -8337.61816 2363.53720 163.40497 -5524.19905 2757.72257 147962.14101 79 80 81 82 83 84 -10642.67459 -10084.79592 -9833.35864 -22051.02208 -23675.45211 -1685.57853 85 86 87 88 89 90 25957.70791 -34036.53449 16860.66876 -10935.46469 -31334.38142 43159.14359 91 92 93 94 95 96 -32794.19773 11988.77995 -16498.56481 -17204.53373 5678.20244 24113.86260 97 98 99 100 101 102 61302.94695 49890.66779 -8216.95929 40362.49393 17874.38140 30900.64169 103 104 105 106 107 108 -19968.54499 8078.12678 -12610.70796 9779.42203 6467.00827 -1479.69837 109 110 111 112 113 114 125204.13477 -5221.28062 15963.53689 -20663.92507 -10373.48953 -6003.82414 115 116 117 118 119 120 -5878.21819 -39775.12625 -30667.85956 -9149.03488 24173.39349 -7023.84381 121 122 123 124 125 126 -16279.12179 25404.57784 13840.26282 18733.52619 -13448.85319 15196.34341 127 128 129 130 131 132 -17186.64286 1585.73576 -16907.12805 115.30364 64056.95138 -1979.80002 133 134 135 136 137 138 -12555.49959 -1941.39754 -3761.73629 22114.70160 20316.34332 -9256.46130 139 140 141 142 143 144 -11020.08236 -22536.35588 5835.43225 -5224.00812 19830.29755 -24475.44081 145 146 147 148 149 150 -17244.16339 15415.91079 38734.37890 36228.84204 -6722.25938 -3220.63877 151 152 153 154 155 156 -6725.75821 -6794.52047 -6722.25938 -6722.25938 -12810.43428 -41102.58565 157 158 159 160 161 162 -6722.25938 -6752.91292 -6131.64690 -14884.02436 -7330.78441 -23347.81993 163 164 -6832.10719 4428.47754 > postscript(file="/var/wessaorg/rcomp/tmp/6nmvc1321984707.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 = 164 Frequency = 1 lag(myerror, k = 1) myerror 0 25597.22629 NA 1 8321.43163 25597.22629 2 1425.81499 8321.43163 3 17851.30312 1425.81499 4 -12686.83945 17851.30312 5 20240.78510 -12686.83945 6 1224.07514 20240.78510 7 -10324.53504 1224.07514 8 26816.95057 -10324.53504 9 -8969.96677 26816.95057 10 -22612.64077 -8969.96677 11 -16126.79971 -22612.64077 12 -6551.16528 -16126.79971 13 -21823.25884 -6551.16528 14 -31180.91921 -21823.25884 15 -29337.69754 -31180.91921 16 36227.35952 -29337.69754 17 -3176.71413 36227.35952 18 31634.29256 -3176.71413 19 3940.43501 31634.29256 20 6767.18176 3940.43501 21 -39114.92087 6767.18176 22 -6574.34615 -39114.92087 23 5004.57733 -6574.34615 24 -8291.42436 5004.57733 25 -7542.22443 -8291.42436 26 5021.08823 -7542.22443 27 -15218.48659 5021.08823 28 -24613.40864 -15218.48659 29 -24389.31383 -24613.40864 30 18925.88889 -24389.31383 31 -17706.51569 18925.88889 32 -25828.25853 -17706.51569 33 -13513.85165 -25828.25853 34 38.03729 -13513.85165 35 -29610.03217 38.03729 36 -32963.82291 -29610.03217 37 -10889.70666 -32963.82291 38 -4346.20918 -10889.70666 39 -10647.27454 -4346.20918 40 -22042.59366 -10647.27454 41 -22343.08349 -22042.59366 42 -5264.04620 -22343.08349 43 -9744.47889 -5264.04620 44 5934.28153 -9744.47889 45 -6817.32424 5934.28153 46 -17332.46667 -6817.32424 47 -9126.41027 -17332.46667 48 30646.55368 -9126.41027 49 -7717.24422 30646.55368 50 2803.08885 -7717.24422 51 -8877.37035 2803.08885 52 -10319.14661 -8877.37035 53 -6327.49044 -10319.14661 54 -9178.65296 -6327.49044 55 7051.82711 -9178.65296 56 18295.78376 7051.82711 57 32744.73568 18295.78376 58 -328.73347 32744.73568 59 -6495.88122 -328.73347 60 18179.91544 -6495.88122 61 45344.64669 18179.91544 62 -32023.99749 45344.64669 63 -1539.59155 -32023.99749 64 9794.37640 -1539.59155 65 -11343.61069 9794.37640 66 36756.44051 -11343.61069 67 -8022.50079 36756.44051 68 4695.04592 -8022.50079 69 11054.96266 4695.04592 70 -8308.99996 11054.96266 71 -19673.30917 -8308.99996 72 -8337.61816 -19673.30917 73 2363.53720 -8337.61816 74 163.40497 2363.53720 75 -5524.19905 163.40497 76 2757.72257 -5524.19905 77 147962.14101 2757.72257 78 -10642.67459 147962.14101 79 -10084.79592 -10642.67459 80 -9833.35864 -10084.79592 81 -22051.02208 -9833.35864 82 -23675.45211 -22051.02208 83 -1685.57853 -23675.45211 84 25957.70791 -1685.57853 85 -34036.53449 25957.70791 86 16860.66876 -34036.53449 87 -10935.46469 16860.66876 88 -31334.38142 -10935.46469 89 43159.14359 -31334.38142 90 -32794.19773 43159.14359 91 11988.77995 -32794.19773 92 -16498.56481 11988.77995 93 -17204.53373 -16498.56481 94 5678.20244 -17204.53373 95 24113.86260 5678.20244 96 61302.94695 24113.86260 97 49890.66779 61302.94695 98 -8216.95929 49890.66779 99 40362.49393 -8216.95929 100 17874.38140 40362.49393 101 30900.64169 17874.38140 102 -19968.54499 30900.64169 103 8078.12678 -19968.54499 104 -12610.70796 8078.12678 105 9779.42203 -12610.70796 106 6467.00827 9779.42203 107 -1479.69837 6467.00827 108 125204.13477 -1479.69837 109 -5221.28062 125204.13477 110 15963.53689 -5221.28062 111 -20663.92507 15963.53689 112 -10373.48953 -20663.92507 113 -6003.82414 -10373.48953 114 -5878.21819 -6003.82414 115 -39775.12625 -5878.21819 116 -30667.85956 -39775.12625 117 -9149.03488 -30667.85956 118 24173.39349 -9149.03488 119 -7023.84381 24173.39349 120 -16279.12179 -7023.84381 121 25404.57784 -16279.12179 122 13840.26282 25404.57784 123 18733.52619 13840.26282 124 -13448.85319 18733.52619 125 15196.34341 -13448.85319 126 -17186.64286 15196.34341 127 1585.73576 -17186.64286 128 -16907.12805 1585.73576 129 115.30364 -16907.12805 130 64056.95138 115.30364 131 -1979.80002 64056.95138 132 -12555.49959 -1979.80002 133 -1941.39754 -12555.49959 134 -3761.73629 -1941.39754 135 22114.70160 -3761.73629 136 20316.34332 22114.70160 137 -9256.46130 20316.34332 138 -11020.08236 -9256.46130 139 -22536.35588 -11020.08236 140 5835.43225 -22536.35588 141 -5224.00812 5835.43225 142 19830.29755 -5224.00812 143 -24475.44081 19830.29755 144 -17244.16339 -24475.44081 145 15415.91079 -17244.16339 146 38734.37890 15415.91079 147 36228.84204 38734.37890 148 -6722.25938 36228.84204 149 -3220.63877 -6722.25938 150 -6725.75821 -3220.63877 151 -6794.52047 -6725.75821 152 -6722.25938 -6794.52047 153 -6722.25938 -6722.25938 154 -12810.43428 -6722.25938 155 -41102.58565 -12810.43428 156 -6722.25938 -41102.58565 157 -6752.91292 -6722.25938 158 -6131.64690 -6752.91292 159 -14884.02436 -6131.64690 160 -7330.78441 -14884.02436 161 -23347.81993 -7330.78441 162 -6832.10719 -23347.81993 163 4428.47754 -6832.10719 164 NA 4428.47754 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 8321.43163 25597.22629 [2,] 1425.81499 8321.43163 [3,] 17851.30312 1425.81499 [4,] -12686.83945 17851.30312 [5,] 20240.78510 -12686.83945 [6,] 1224.07514 20240.78510 [7,] -10324.53504 1224.07514 [8,] 26816.95057 -10324.53504 [9,] -8969.96677 26816.95057 [10,] -22612.64077 -8969.96677 [11,] -16126.79971 -22612.64077 [12,] -6551.16528 -16126.79971 [13,] -21823.25884 -6551.16528 [14,] -31180.91921 -21823.25884 [15,] -29337.69754 -31180.91921 [16,] 36227.35952 -29337.69754 [17,] -3176.71413 36227.35952 [18,] 31634.29256 -3176.71413 [19,] 3940.43501 31634.29256 [20,] 6767.18176 3940.43501 [21,] -39114.92087 6767.18176 [22,] -6574.34615 -39114.92087 [23,] 5004.57733 -6574.34615 [24,] -8291.42436 5004.57733 [25,] -7542.22443 -8291.42436 [26,] 5021.08823 -7542.22443 [27,] -15218.48659 5021.08823 [28,] -24613.40864 -15218.48659 [29,] -24389.31383 -24613.40864 [30,] 18925.88889 -24389.31383 [31,] -17706.51569 18925.88889 [32,] -25828.25853 -17706.51569 [33,] -13513.85165 -25828.25853 [34,] 38.03729 -13513.85165 [35,] -29610.03217 38.03729 [36,] -32963.82291 -29610.03217 [37,] -10889.70666 -32963.82291 [38,] -4346.20918 -10889.70666 [39,] -10647.27454 -4346.20918 [40,] -22042.59366 -10647.27454 [41,] -22343.08349 -22042.59366 [42,] -5264.04620 -22343.08349 [43,] -9744.47889 -5264.04620 [44,] 5934.28153 -9744.47889 [45,] -6817.32424 5934.28153 [46,] -17332.46667 -6817.32424 [47,] -9126.41027 -17332.46667 [48,] 30646.55368 -9126.41027 [49,] -7717.24422 30646.55368 [50,] 2803.08885 -7717.24422 [51,] -8877.37035 2803.08885 [52,] -10319.14661 -8877.37035 [53,] -6327.49044 -10319.14661 [54,] -9178.65296 -6327.49044 [55,] 7051.82711 -9178.65296 [56,] 18295.78376 7051.82711 [57,] 32744.73568 18295.78376 [58,] -328.73347 32744.73568 [59,] -6495.88122 -328.73347 [60,] 18179.91544 -6495.88122 [61,] 45344.64669 18179.91544 [62,] -32023.99749 45344.64669 [63,] -1539.59155 -32023.99749 [64,] 9794.37640 -1539.59155 [65,] -11343.61069 9794.37640 [66,] 36756.44051 -11343.61069 [67,] -8022.50079 36756.44051 [68,] 4695.04592 -8022.50079 [69,] 11054.96266 4695.04592 [70,] -8308.99996 11054.96266 [71,] -19673.30917 -8308.99996 [72,] -8337.61816 -19673.30917 [73,] 2363.53720 -8337.61816 [74,] 163.40497 2363.53720 [75,] -5524.19905 163.40497 [76,] 2757.72257 -5524.19905 [77,] 147962.14101 2757.72257 [78,] -10642.67459 147962.14101 [79,] -10084.79592 -10642.67459 [80,] -9833.35864 -10084.79592 [81,] -22051.02208 -9833.35864 [82,] -23675.45211 -22051.02208 [83,] -1685.57853 -23675.45211 [84,] 25957.70791 -1685.57853 [85,] -34036.53449 25957.70791 [86,] 16860.66876 -34036.53449 [87,] -10935.46469 16860.66876 [88,] -31334.38142 -10935.46469 [89,] 43159.14359 -31334.38142 [90,] -32794.19773 43159.14359 [91,] 11988.77995 -32794.19773 [92,] -16498.56481 11988.77995 [93,] -17204.53373 -16498.56481 [94,] 5678.20244 -17204.53373 [95,] 24113.86260 5678.20244 [96,] 61302.94695 24113.86260 [97,] 49890.66779 61302.94695 [98,] -8216.95929 49890.66779 [99,] 40362.49393 -8216.95929 [100,] 17874.38140 40362.49393 [101,] 30900.64169 17874.38140 [102,] -19968.54499 30900.64169 [103,] 8078.12678 -19968.54499 [104,] -12610.70796 8078.12678 [105,] 9779.42203 -12610.70796 [106,] 6467.00827 9779.42203 [107,] -1479.69837 6467.00827 [108,] 125204.13477 -1479.69837 [109,] -5221.28062 125204.13477 [110,] 15963.53689 -5221.28062 [111,] -20663.92507 15963.53689 [112,] -10373.48953 -20663.92507 [113,] -6003.82414 -10373.48953 [114,] -5878.21819 -6003.82414 [115,] -39775.12625 -5878.21819 [116,] -30667.85956 -39775.12625 [117,] -9149.03488 -30667.85956 [118,] 24173.39349 -9149.03488 [119,] -7023.84381 24173.39349 [120,] -16279.12179 -7023.84381 [121,] 25404.57784 -16279.12179 [122,] 13840.26282 25404.57784 [123,] 18733.52619 13840.26282 [124,] -13448.85319 18733.52619 [125,] 15196.34341 -13448.85319 [126,] -17186.64286 15196.34341 [127,] 1585.73576 -17186.64286 [128,] -16907.12805 1585.73576 [129,] 115.30364 -16907.12805 [130,] 64056.95138 115.30364 [131,] -1979.80002 64056.95138 [132,] -12555.49959 -1979.80002 [133,] -1941.39754 -12555.49959 [134,] -3761.73629 -1941.39754 [135,] 22114.70160 -3761.73629 [136,] 20316.34332 22114.70160 [137,] -9256.46130 20316.34332 [138,] -11020.08236 -9256.46130 [139,] -22536.35588 -11020.08236 [140,] 5835.43225 -22536.35588 [141,] -5224.00812 5835.43225 [142,] 19830.29755 -5224.00812 [143,] -24475.44081 19830.29755 [144,] -17244.16339 -24475.44081 [145,] 15415.91079 -17244.16339 [146,] 38734.37890 15415.91079 [147,] 36228.84204 38734.37890 [148,] -6722.25938 36228.84204 [149,] -3220.63877 -6722.25938 [150,] -6725.75821 -3220.63877 [151,] -6794.52047 -6725.75821 [152,] -6722.25938 -6794.52047 [153,] -6722.25938 -6722.25938 [154,] -12810.43428 -6722.25938 [155,] -41102.58565 -12810.43428 [156,] -6722.25938 -41102.58565 [157,] -6752.91292 -6722.25938 [158,] -6131.64690 -6752.91292 [159,] -14884.02436 -6131.64690 [160,] -7330.78441 -14884.02436 [161,] -23347.81993 -7330.78441 [162,] -6832.10719 -23347.81993 [163,] 4428.47754 -6832.10719 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 8321.43163 25597.22629 2 1425.81499 8321.43163 3 17851.30312 1425.81499 4 -12686.83945 17851.30312 5 20240.78510 -12686.83945 6 1224.07514 20240.78510 7 -10324.53504 1224.07514 8 26816.95057 -10324.53504 9 -8969.96677 26816.95057 10 -22612.64077 -8969.96677 11 -16126.79971 -22612.64077 12 -6551.16528 -16126.79971 13 -21823.25884 -6551.16528 14 -31180.91921 -21823.25884 15 -29337.69754 -31180.91921 16 36227.35952 -29337.69754 17 -3176.71413 36227.35952 18 31634.29256 -3176.71413 19 3940.43501 31634.29256 20 6767.18176 3940.43501 21 -39114.92087 6767.18176 22 -6574.34615 -39114.92087 23 5004.57733 -6574.34615 24 -8291.42436 5004.57733 25 -7542.22443 -8291.42436 26 5021.08823 -7542.22443 27 -15218.48659 5021.08823 28 -24613.40864 -15218.48659 29 -24389.31383 -24613.40864 30 18925.88889 -24389.31383 31 -17706.51569 18925.88889 32 -25828.25853 -17706.51569 33 -13513.85165 -25828.25853 34 38.03729 -13513.85165 35 -29610.03217 38.03729 36 -32963.82291 -29610.03217 37 -10889.70666 -32963.82291 38 -4346.20918 -10889.70666 39 -10647.27454 -4346.20918 40 -22042.59366 -10647.27454 41 -22343.08349 -22042.59366 42 -5264.04620 -22343.08349 43 -9744.47889 -5264.04620 44 5934.28153 -9744.47889 45 -6817.32424 5934.28153 46 -17332.46667 -6817.32424 47 -9126.41027 -17332.46667 48 30646.55368 -9126.41027 49 -7717.24422 30646.55368 50 2803.08885 -7717.24422 51 -8877.37035 2803.08885 52 -10319.14661 -8877.37035 53 -6327.49044 -10319.14661 54 -9178.65296 -6327.49044 55 7051.82711 -9178.65296 56 18295.78376 7051.82711 57 32744.73568 18295.78376 58 -328.73347 32744.73568 59 -6495.88122 -328.73347 60 18179.91544 -6495.88122 61 45344.64669 18179.91544 62 -32023.99749 45344.64669 63 -1539.59155 -32023.99749 64 9794.37640 -1539.59155 65 -11343.61069 9794.37640 66 36756.44051 -11343.61069 67 -8022.50079 36756.44051 68 4695.04592 -8022.50079 69 11054.96266 4695.04592 70 -8308.99996 11054.96266 71 -19673.30917 -8308.99996 72 -8337.61816 -19673.30917 73 2363.53720 -8337.61816 74 163.40497 2363.53720 75 -5524.19905 163.40497 76 2757.72257 -5524.19905 77 147962.14101 2757.72257 78 -10642.67459 147962.14101 79 -10084.79592 -10642.67459 80 -9833.35864 -10084.79592 81 -22051.02208 -9833.35864 82 -23675.45211 -22051.02208 83 -1685.57853 -23675.45211 84 25957.70791 -1685.57853 85 -34036.53449 25957.70791 86 16860.66876 -34036.53449 87 -10935.46469 16860.66876 88 -31334.38142 -10935.46469 89 43159.14359 -31334.38142 90 -32794.19773 43159.14359 91 11988.77995 -32794.19773 92 -16498.56481 11988.77995 93 -17204.53373 -16498.56481 94 5678.20244 -17204.53373 95 24113.86260 5678.20244 96 61302.94695 24113.86260 97 49890.66779 61302.94695 98 -8216.95929 49890.66779 99 40362.49393 -8216.95929 100 17874.38140 40362.49393 101 30900.64169 17874.38140 102 -19968.54499 30900.64169 103 8078.12678 -19968.54499 104 -12610.70796 8078.12678 105 9779.42203 -12610.70796 106 6467.00827 9779.42203 107 -1479.69837 6467.00827 108 125204.13477 -1479.69837 109 -5221.28062 125204.13477 110 15963.53689 -5221.28062 111 -20663.92507 15963.53689 112 -10373.48953 -20663.92507 113 -6003.82414 -10373.48953 114 -5878.21819 -6003.82414 115 -39775.12625 -5878.21819 116 -30667.85956 -39775.12625 117 -9149.03488 -30667.85956 118 24173.39349 -9149.03488 119 -7023.84381 24173.39349 120 -16279.12179 -7023.84381 121 25404.57784 -16279.12179 122 13840.26282 25404.57784 123 18733.52619 13840.26282 124 -13448.85319 18733.52619 125 15196.34341 -13448.85319 126 -17186.64286 15196.34341 127 1585.73576 -17186.64286 128 -16907.12805 1585.73576 129 115.30364 -16907.12805 130 64056.95138 115.30364 131 -1979.80002 64056.95138 132 -12555.49959 -1979.80002 133 -1941.39754 -12555.49959 134 -3761.73629 -1941.39754 135 22114.70160 -3761.73629 136 20316.34332 22114.70160 137 -9256.46130 20316.34332 138 -11020.08236 -9256.46130 139 -22536.35588 -11020.08236 140 5835.43225 -22536.35588 141 -5224.00812 5835.43225 142 19830.29755 -5224.00812 143 -24475.44081 19830.29755 144 -17244.16339 -24475.44081 145 15415.91079 -17244.16339 146 38734.37890 15415.91079 147 36228.84204 38734.37890 148 -6722.25938 36228.84204 149 -3220.63877 -6722.25938 150 -6725.75821 -3220.63877 151 -6794.52047 -6725.75821 152 -6722.25938 -6794.52047 153 -6722.25938 -6722.25938 154 -12810.43428 -6722.25938 155 -41102.58565 -12810.43428 156 -6722.25938 -41102.58565 157 -6752.91292 -6722.25938 158 -6131.64690 -6752.91292 159 -14884.02436 -6131.64690 160 -7330.78441 -14884.02436 161 -23347.81993 -7330.78441 162 -6832.10719 -23347.81993 163 4428.47754 -6832.10719 > 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/7zdhc1321984707.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/857bl1321984707.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/984cu1321984707.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/10ymwu1321984707.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/11y5qh1321984707.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/123le01321984707.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/139yvw1321984707.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/14lr8l1321984707.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/154qx91321984707.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/16y9v61321984707.tab") + } > > try(system("convert tmp/1g1sr1321984707.ps tmp/1g1sr1321984707.png",intern=TRUE)) character(0) > try(system("convert tmp/2lu921321984707.ps tmp/2lu921321984707.png",intern=TRUE)) character(0) > try(system("convert tmp/3vc8v1321984707.ps tmp/3vc8v1321984707.png",intern=TRUE)) character(0) > try(system("convert tmp/4iyux1321984707.ps tmp/4iyux1321984707.png",intern=TRUE)) character(0) > try(system("convert tmp/5wnjv1321984707.ps tmp/5wnjv1321984707.png",intern=TRUE)) character(0) > try(system("convert tmp/6nmvc1321984707.ps tmp/6nmvc1321984707.png",intern=TRUE)) character(0) > try(system("convert tmp/7zdhc1321984707.ps tmp/7zdhc1321984707.png",intern=TRUE)) character(0) > try(system("convert tmp/857bl1321984707.ps tmp/857bl1321984707.png",intern=TRUE)) character(0) > try(system("convert tmp/984cu1321984707.ps tmp/984cu1321984707.png",intern=TRUE)) character(0) > try(system("convert tmp/10ymwu1321984707.ps tmp/10ymwu1321984707.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 4.732 0.499 5.263