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(140824 + ,1818 + ,279055 + ,42 + ,110459 + ,1439 + ,212450 + ,38 + ,105079 + ,2059 + ,233939 + ,46 + ,112098 + ,2733 + ,222117 + ,42 + ,43929 + ,1399 + ,189911 + ,30 + ,76173 + ,631 + ,70849 + ,35 + ,187326 + ,5460 + ,605767 + ,40 + ,22807 + ,381 + ,33186 + ,18 + ,144408 + ,2150 + ,227332 + ,38 + ,66485 + ,2042 + ,267925 + ,37 + ,79089 + ,2541 + ,372083 + ,46 + ,81625 + ,2429 + ,276291 + ,60 + ,68788 + ,2100 + ,212638 + ,37 + ,103297 + ,3020 + ,368577 + ,55 + ,69446 + ,2265 + ,269455 + ,44 + ,114948 + ,5148 + ,400733 + ,63 + ,167949 + ,2363 + ,335567 + ,40 + ,125081 + ,3564 + ,432711 + ,43 + ,125818 + ,1516 + ,185822 + ,32 + ,136588 + ,2398 + ,267365 + ,52 + ,112431 + ,2546 + ,279428 + ,49 + ,103037 + ,3253 + ,527853 + ,41 + ,82317 + ,1761 + ,227252 + ,25 + ,118906 + ,1787 + ,200004 + ,57 + ,83515 + ,3792 + ,257139 + ,45 + ,104581 + ,3108 + ,270941 + ,42 + ,103129 + ,3230 + ,324969 + ,45 + ,83243 + ,2348 + ,329962 + ,43 + ,37110 + ,1826 + ,196752 + ,36 + ,113344 + ,3257 + ,399591 + ,45 + ,139165 + ,2692 + ,327660 + ,50 + ,86652 + ,2187 + ,269239 + ,50 + ,112302 + ,2593 + ,397689 + ,51 + ,69652 + ,1293 + ,130446 + ,42 + ,119442 + ,3567 + ,430118 + ,44 + ,69867 + ,2764 + ,273950 + ,42 + ,101629 + ,3755 + ,428077 + ,44 + ,70168 + ,2075 + ,254312 + ,40 + ,31081 + ,995 + ,120351 + ,17 + ,103925 + ,3750 + ,395658 + ,43 + ,92622 + ,3413 + ,345875 + ,41 + ,79011 + ,2053 + ,216827 + ,41 + ,93487 + ,2038 + ,234780 + ,40 + ,64520 + ,1825 + ,182485 + ,49 + ,93473 + ,2879 + ,176781 + ,52 + ,114360 + ,5572 + ,459455 + ,42 + ,33032 + ,918 + ,78800 + ,26 + ,96125 + ,2685 + ,255072 + ,59 + ,151911 + ,4145 + ,368086 + ,50 + ,89256 + ,2841 + ,230299 + ,50 + ,95676 + ,2175 + ,244782 + ,47 + ,5950 + ,496 + ,24188 + ,4 + ,149695 + ,2699 + ,400109 + ,51 + ,32551 + ,744 + ,65029 + ,18 + ,31701 + ,1161 + ,101097 + ,14 + ,100087 + ,3333 + ,309810 + ,41 + ,169707 + ,2970 + ,375638 + ,61 + ,150491 + ,3970 + ,367230 + ,40 + ,120192 + ,2919 + ,387748 + ,44 + ,95893 + ,2399 + ,280106 + ,40 + ,151715 + ,4121 + ,400971 + ,51 + ,176225 + ,3330 + ,322780 + ,29 + ,59900 + ,3132 + ,291391 + ,43 + ,104767 + ,2868 + ,295075 + ,42 + ,114799 + ,1778 + ,280018 + ,41 + ,72128 + ,2109 + ,267432 + ,30 + ,143592 + ,2148 + ,217181 + ,39 + ,89626 + ,3009 + ,258166 + ,51 + ,131072 + ,2582 + ,270167 + ,40 + ,126817 + ,1737 + ,182961 + ,29 + ,81351 + ,2680 + ,256967 + ,47 + ,22618 + ,893 + ,73566 + ,23 + ,88977 + ,2395 + ,272823 + ,48 + ,92059 + ,2197 + ,229056 + ,38 + ,81897 + ,2227 + ,229851 + ,42 + ,108146 + ,2370 + ,371391 + ,46 + ,126372 + ,3231 + ,398312 + ,40 + ,249771 + ,1978 + ,220419 + ,45 + ,71154 + ,2516 + ,231884 + ,42 + ,71571 + ,2147 + ,219381 + ,41 + ,55918 + ,2150 + ,206169 + ,37 + ,160141 + ,4229 + ,483074 + ,47 + ,38692 + ,1380 + ,146100 + ,26 + ,102812 + ,2449 + ,295224 + ,48 + ,56622 + ,870 + ,80953 + ,8 + ,15986 + ,2700 + ,217384 + ,27 + ,123534 + ,1574 + ,179344 + ,38 + ,108535 + ,4046 + ,415550 + ,41 + ,93879 + ,3319 + ,393492 + ,61 + ,144551 + ,3098 + ,180679 + ,45 + ,56750 + ,2615 + ,299505 + ,41 + ,127654 + ,2404 + ,292260 + ,42 + ,65594 + ,1932 + ,199481 + ,35 + ,59938 + ,3147 + ,282361 + ,36 + ,146975 + ,2598 + ,329281 + ,40 + ,165904 + ,2108 + ,234577 + ,40 + ,169265 + ,2193 + ,297995 + ,38 + ,183500 + ,2506 + ,352078 + ,43 + ,165986 + ,4198 + ,416463 + ,65 + ,184923 + ,4165 + ,429565 + ,33 + ,140358 + ,2842 + ,297080 + ,51 + ,149959 + ,2562 + ,331792 + ,45 + ,57224 + ,2497 + ,237763 + ,36 + ,43750 + ,602 + ,43287 + ,19 + ,48029 + ,2579 + ,238089 + ,25 + ,104978 + ,2591 + ,263322 + ,44 + ,100046 + ,2957 + ,302082 + ,45 + ,101047 + ,2786 + ,321797 + ,44 + ,197426 + ,1477 + ,193926 + ,35 + ,160902 + ,3358 + ,175737 + ,46 + ,147172 + ,2107 + ,354041 + ,44 + ,109432 + ,2338 + ,303566 + ,45 + ,1168 + ,400 + ,23668 + ,1 + ,83248 + ,2233 + ,196743 + ,40 + ,25162 + ,530 + ,61857 + ,11 + ,45724 + ,2033 + ,217543 + ,51 + ,110529 + ,3246 + ,440711 + ,38 + ,855 + ,387 + ,21054 + ,0 + ,101382 + ,2137 + ,252805 + ,30 + ,14116 + ,492 + ,31961 + ,8 + ,89506 + ,3838 + ,360436 + ,43 + ,135356 + ,2193 + ,251948 + ,48 + ,116066 + ,1796 + ,187320 + ,49 + ,144244 + ,1907 + ,180842 + ,32 + ,8773 + ,568 + ,38214 + ,8 + ,102153 + ,2644 + ,289276 + ,43 + ,117440 + ,2819 + ,358276 + ,52 + ,104128 + ,1464 + ,211775 + ,53 + ,134238 + ,3946 + ,447335 + ,49 + ,134047 + ,2554 + ,348017 + ,48 + ,279488 + ,3506 + ,441946 + ,56 + ,79756 + ,1552 + ,215177 + ,45 + ,66089 + ,1476 + ,140328 + ,40 + ,102070 + ,3101 + ,318037 + ,48 + ,146760 + ,4541 + ,466139 + ,50 + ,154771 + ,1872 + ,162279 + ,43 + ,165933 + ,4469 + ,417354 + ,46 + ,64593 + ,2113 + ,178322 + ,40 + ,92280 + ,2046 + ,292443 + ,45 + ,67150 + ,2564 + ,283913 + ,46 + ,128692 + ,2209 + ,253950 + ,37 + ,124089 + ,4112 + ,387072 + ,45 + ,125386 + ,2340 + ,246963 + ,39 + ,37238 + ,2035 + ,173260 + ,21 + ,140015 + ,3241 + ,346748 + ,50 + ,150047 + ,1991 + ,178402 + ,55 + ,154451 + ,2864 + ,277892 + ,40 + ,156349 + ,2749 + ,314070 + ,48 + ,0 + ,2 + ,1 + ,0 + ,6023 + ,207 + ,14688 + ,0 + ,0 + ,5 + ,98 + ,0 + ,0 + ,8 + ,455 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,84601 + ,2449 + ,291847 + ,46 + ,68946 + ,3497 + ,415839 + ,52 + ,0 + ,0 + ,0 + ,0 + ,0 + ,4 + ,203 + ,0 + ,1644 + ,151 + ,7199 + ,0 + ,6179 + ,475 + ,46660 + ,5 + ,3926 + ,141 + ,17547 + ,1 + ,52789 + ,1145 + ,121550 + ,48 + ,0 + ,29 + ,969 + ,0 + ,100350 + ,2080 + ,242774 + ,34) + ,dim=c(4 + ,164) + ,dimnames=list(c('Writing' + ,'Pageviews' + ,'TimeRFC' + ,'Reviews') + ,1:164)) > y <- array(NA,dim=c(4,164),dimnames=list(c('Writing','Pageviews','TimeRFC','Reviews'),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 Writing Pageviews TimeRFC Reviews 1 140824 1818 279055 42 2 110459 1439 212450 38 3 105079 2059 233939 46 4 112098 2733 222117 42 5 43929 1399 189911 30 6 76173 631 70849 35 7 187326 5460 605767 40 8 22807 381 33186 18 9 144408 2150 227332 38 10 66485 2042 267925 37 11 79089 2541 372083 46 12 81625 2429 276291 60 13 68788 2100 212638 37 14 103297 3020 368577 55 15 69446 2265 269455 44 16 114948 5148 400733 63 17 167949 2363 335567 40 18 125081 3564 432711 43 19 125818 1516 185822 32 20 136588 2398 267365 52 21 112431 2546 279428 49 22 103037 3253 527853 41 23 82317 1761 227252 25 24 118906 1787 200004 57 25 83515 3792 257139 45 26 104581 3108 270941 42 27 103129 3230 324969 45 28 83243 2348 329962 43 29 37110 1826 196752 36 30 113344 3257 399591 45 31 139165 2692 327660 50 32 86652 2187 269239 50 33 112302 2593 397689 51 34 69652 1293 130446 42 35 119442 3567 430118 44 36 69867 2764 273950 42 37 101629 3755 428077 44 38 70168 2075 254312 40 39 31081 995 120351 17 40 103925 3750 395658 43 41 92622 3413 345875 41 42 79011 2053 216827 41 43 93487 2038 234780 40 44 64520 1825 182485 49 45 93473 2879 176781 52 46 114360 5572 459455 42 47 33032 918 78800 26 48 96125 2685 255072 59 49 151911 4145 368086 50 50 89256 2841 230299 50 51 95676 2175 244782 47 52 5950 496 24188 4 53 149695 2699 400109 51 54 32551 744 65029 18 55 31701 1161 101097 14 56 100087 3333 309810 41 57 169707 2970 375638 61 58 150491 3970 367230 40 59 120192 2919 387748 44 60 95893 2399 280106 40 61 151715 4121 400971 51 62 176225 3330 322780 29 63 59900 3132 291391 43 64 104767 2868 295075 42 65 114799 1778 280018 41 66 72128 2109 267432 30 67 143592 2148 217181 39 68 89626 3009 258166 51 69 131072 2582 270167 40 70 126817 1737 182961 29 71 81351 2680 256967 47 72 22618 893 73566 23 73 88977 2395 272823 48 74 92059 2197 229056 38 75 81897 2227 229851 42 76 108146 2370 371391 46 77 126372 3231 398312 40 78 249771 1978 220419 45 79 71154 2516 231884 42 80 71571 2147 219381 41 81 55918 2150 206169 37 82 160141 4229 483074 47 83 38692 1380 146100 26 84 102812 2449 295224 48 85 56622 870 80953 8 86 15986 2700 217384 27 87 123534 1574 179344 38 88 108535 4046 415550 41 89 93879 3319 393492 61 90 144551 3098 180679 45 91 56750 2615 299505 41 92 127654 2404 292260 42 93 65594 1932 199481 35 94 59938 3147 282361 36 95 146975 2598 329281 40 96 165904 2108 234577 40 97 169265 2193 297995 38 98 183500 2506 352078 43 99 165986 4198 416463 65 100 184923 4165 429565 33 101 140358 2842 297080 51 102 149959 2562 331792 45 103 57224 2497 237763 36 104 43750 602 43287 19 105 48029 2579 238089 25 106 104978 2591 263322 44 107 100046 2957 302082 45 108 101047 2786 321797 44 109 197426 1477 193926 35 110 160902 3358 175737 46 111 147172 2107 354041 44 112 109432 2338 303566 45 113 1168 400 23668 1 114 83248 2233 196743 40 115 25162 530 61857 11 116 45724 2033 217543 51 117 110529 3246 440711 38 118 855 387 21054 0 119 101382 2137 252805 30 120 14116 492 31961 8 121 89506 3838 360436 43 122 135356 2193 251948 48 123 116066 1796 187320 49 124 144244 1907 180842 32 125 8773 568 38214 8 126 102153 2644 289276 43 127 117440 2819 358276 52 128 104128 1464 211775 53 129 134238 3946 447335 49 130 134047 2554 348017 48 131 279488 3506 441946 56 132 79756 1552 215177 45 133 66089 1476 140328 40 134 102070 3101 318037 48 135 146760 4541 466139 50 136 154771 1872 162279 43 137 165933 4469 417354 46 138 64593 2113 178322 40 139 92280 2046 292443 45 140 67150 2564 283913 46 141 128692 2209 253950 37 142 124089 4112 387072 45 143 125386 2340 246963 39 144 37238 2035 173260 21 145 140015 3241 346748 50 146 150047 1991 178402 55 147 154451 2864 277892 40 148 156349 2749 314070 48 149 0 2 1 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 84601 2449 291847 46 156 68946 3497 415839 52 157 0 0 0 0 158 0 4 203 0 159 1644 151 7199 0 160 6179 475 46660 5 161 3926 141 17547 1 162 52789 1145 121550 48 163 0 29 969 0 164 100350 2080 242774 34 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) Pageviews TimeRFC Reviews 4158.0590 -1.0801 0.1802 1287.0452 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -73299 -21318 -6024 15724 150111 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 4158.05902 7282.77488 0.571 0.56884 Pageviews -1.08009 5.94635 -0.182 0.85610 TimeRFC 0.18021 0.05555 3.244 0.00144 ** Reviews 1287.04520 276.92734 4.648 6.98e-06 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 35140 on 160 degrees of freedom Multiple R-squared: 0.5549, Adjusted R-squared: 0.5465 F-statistic: 66.48 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,] 0.2843643948 0.5687287897 0.7156356052 [2,] 0.1848370537 0.3696741075 0.8151629463 [3,] 0.2673477127 0.5346954254 0.7326522873 [4,] 0.3525439442 0.7050878883 0.6474560558 [5,] 0.4986969589 0.9973939179 0.5013030411 [6,] 0.5843517747 0.8312964507 0.4156482253 [7,] 0.5357238464 0.9285523072 0.4642761536 [8,] 0.4715759644 0.9431519287 0.5284240356 [9,] 0.4438498154 0.8876996307 0.5561501846 [10,] 0.4187831025 0.8375662050 0.5812168975 [11,] 0.5498485686 0.9003028628 0.4501514314 [12,] 0.4766759102 0.9533518205 0.5233240898 [13,] 0.5091311237 0.9817377525 0.4908688763 [14,] 0.5122035250 0.9755929500 0.4877964750 [15,] 0.4404180923 0.8808361846 0.5595819077 [16,] 0.4774663713 0.9549327426 0.5225336287 [17,] 0.4117300832 0.8234601663 0.5882699168 [18,] 0.3729029788 0.7458059577 0.6270970212 [19,] 0.3372010989 0.6744021978 0.6627989011 [20,] 0.2775160698 0.5550321396 0.7224839302 [21,] 0.2282779165 0.4565558330 0.7717220835 [22,] 0.2121375081 0.4242750163 0.7878624919 [23,] 0.2657004132 0.5314008264 0.7342995868 [24,] 0.2199570118 0.4399140236 0.7800429882 [25,] 0.2001568284 0.4003136569 0.7998431716 [26,] 0.1723401711 0.3446803422 0.8276598289 [27,] 0.1426002472 0.2852004945 0.8573997528 [28,] 0.1129507858 0.2259015717 0.8870492142 [29,] 0.0883264887 0.1766529775 0.9116735113 [30,] 0.0852441423 0.1704882845 0.9147558577 [31,] 0.0750722667 0.1501445334 0.9249277333 [32,] 0.0666986457 0.1333972914 0.9333013543 [33,] 0.0588154168 0.1176308337 0.9411845832 [34,] 0.0468017900 0.0936035801 0.9531982100 [35,] 0.0372713345 0.0745426689 0.9627286655 [36,] 0.0280439953 0.0560879907 0.9719560047 [37,] 0.0203955562 0.0407911123 0.9796044438 [38,] 0.0180537554 0.0361075109 0.9819462446 [39,] 0.0129604827 0.0259209654 0.9870395173 [40,] 0.0095878703 0.0191757407 0.9904121297 [41,] 0.0076179319 0.0152358638 0.9923820681 [42,] 0.0057629713 0.0115259426 0.9942370287 [43,] 0.0061060015 0.0122120030 0.9938939985 [44,] 0.0043756189 0.0087512378 0.9956243811 [45,] 0.0030156558 0.0060313116 0.9969843442 [46,] 0.0021948802 0.0043897604 0.9978051198 [47,] 0.0018147442 0.0036294884 0.9981852558 [48,] 0.0012059336 0.0024118672 0.9987940664 [49,] 0.0007989884 0.0015979767 0.9992010116 [50,] 0.0005213281 0.0010426562 0.9994786719 [51,] 0.0005655253 0.0011310506 0.9994344747 [52,] 0.0007507083 0.0015014166 0.9992492917 [53,] 0.0004917446 0.0009834892 0.9995082554 [54,] 0.0003176999 0.0006353997 0.9996823001 [55,] 0.0002508413 0.0005016825 0.9997491587 [56,] 0.0025227152 0.0050454304 0.9974772848 [57,] 0.0035813397 0.0071626793 0.9964186603 [58,] 0.0024967473 0.0049934945 0.9975032527 [59,] 0.0018615893 0.0037231785 0.9981384107 [60,] 0.0013789263 0.0027578526 0.9986210737 [61,] 0.0028952736 0.0057905473 0.9971047264 [62,] 0.0022848848 0.0045697695 0.9977151152 [63,] 0.0022683009 0.0045366019 0.9977316991 [64,] 0.0041169161 0.0082338321 0.9958830839 [65,] 0.0034771675 0.0069543350 0.9965228325 [66,] 0.0029880452 0.0059760904 0.9970119548 [67,] 0.0024027656 0.0048055313 0.9975972344 [68,] 0.0016745469 0.0033490938 0.9983254531 [69,] 0.0012283291 0.0024566582 0.9987716709 [70,] 0.0009284204 0.0018568408 0.9990715796 [71,] 0.0006283686 0.0012567373 0.9993716314 [72,] 0.1480581713 0.2961163425 0.8519418287 [73,] 0.1368042281 0.2736084563 0.8631957719 [74,] 0.1231486233 0.2462972466 0.8768513767 [75,] 0.1187837638 0.2375675277 0.8812162362 [76,] 0.1012049683 0.2024099366 0.8987950317 [77,] 0.0918632679 0.1837265358 0.9081367321 [78,] 0.0776055755 0.1552111509 0.9223944245 [79,] 0.0702200106 0.1404400211 0.9297799894 [80,] 0.1069911522 0.2139823044 0.8930088478 [81,] 0.1129484884 0.2258969769 0.8870515116 [82,] 0.0996429651 0.1992859303 0.9003570349 [83,] 0.1370643210 0.2741286420 0.8629356790 [84,] 0.1710967091 0.3421934182 0.8289032909 [85,] 0.2135070875 0.4270141751 0.7864929125 [86,] 0.1908431594 0.3816863188 0.8091568406 [87,] 0.1706517301 0.3413034603 0.8293482699 [88,] 0.1822974138 0.3645948277 0.8177025862 [89,] 0.1789251034 0.3578502068 0.8210748966 [90,] 0.2738007994 0.5476015988 0.7261992006 [91,] 0.3623247241 0.7246494482 0.6376752759 [92,] 0.4568329599 0.9136659197 0.5431670401 [93,] 0.4182936844 0.8365873688 0.5817063156 [94,] 0.5174215999 0.9651568002 0.4825784001 [95,] 0.4832503164 0.9665006328 0.5167496836 [96,] 0.4711216641 0.9422433281 0.5288783359 [97,] 0.4752789519 0.9505579039 0.5247210481 [98,] 0.4291983011 0.8583966022 0.5708016989 [99,] 0.4195634338 0.8391268676 0.5804365662 [100,] 0.3756415027 0.7512830055 0.6243584973 [101,] 0.3432057335 0.6864114670 0.6567942665 [102,] 0.3106837542 0.6213675084 0.6893162458 [103,] 0.7471091189 0.5057817622 0.2528908811 [104,] 0.8109855236 0.3780289528 0.1890144764 [105,] 0.7971118816 0.4057762369 0.2028881184 [106,] 0.7607518323 0.4784963353 0.2392481677 [107,] 0.7239126214 0.5521747573 0.2760873786 [108,] 0.6841062160 0.6317875679 0.3158937840 [109,] 0.6390119671 0.7219760657 0.3609880329 [110,] 0.7521086424 0.4957827152 0.2478913576 [111,] 0.7179927116 0.5640145768 0.2820072884 [112,] 0.6750642025 0.6498715950 0.3249357975 [113,] 0.6355463927 0.7289072146 0.3644536073 [114,] 0.5871147819 0.8257704362 0.4128852181 [115,] 0.6025376749 0.7949246503 0.3974623251 [116,] 0.5720613402 0.8558773195 0.4279386598 [117,] 0.5255584742 0.9488830516 0.4744415258 [118,] 0.6484214868 0.7031570263 0.3515785132 [119,] 0.6022566066 0.7954867867 0.3977433934 [120,] 0.5531214668 0.8937570665 0.4468785332 [121,] 0.5118723826 0.9762552348 0.4881276174 [122,] 0.4574979141 0.9149958282 0.5425020859 [123,] 0.4163454830 0.8326909660 0.5836545170 [124,] 0.3626252475 0.7252504950 0.6373747525 [125,] 0.9678470925 0.0643058150 0.0321529075 [126,] 0.9554532850 0.0890934300 0.0445467150 [127,] 0.9481924057 0.1036151885 0.0518075943 [128,] 0.9394657414 0.1210685171 0.0605342586 [129,] 0.9174091980 0.1651816039 0.0825908020 [130,] 0.9530969157 0.0938061685 0.0469030843 [131,] 0.9412708744 0.1174582511 0.0587291256 [132,] 0.9482468517 0.1035062965 0.0517531483 [133,] 0.9293768770 0.1412462461 0.0706231230 [134,] 0.9482606229 0.1034787542 0.0517393771 [135,] 0.9618874248 0.0762251504 0.0381125752 [136,] 0.9621103861 0.0757792279 0.0378896139 [137,] 0.9567582213 0.0864835574 0.0432417787 [138,] 0.9967354544 0.0065290913 0.0032645456 [139,] 0.9940314808 0.0119370385 0.0059685192 [140,] 0.9897253398 0.0205493204 0.0102746602 [141,] 0.9834794371 0.0330411257 0.0165205629 [142,] 0.9994628288 0.0010743423 0.0005371712 [143,] 0.9986095889 0.0027808222 0.0013904111 [144,] 0.9965628677 0.0068742646 0.0034371323 [145,] 0.9918505003 0.0162989993 0.0081494997 [146,] 0.9816156194 0.0367687613 0.0183843806 [147,] 0.9606971597 0.0786056806 0.0393028403 [148,] 0.9208272705 0.1583454590 0.0791727295 [149,] 0.8626778580 0.2746442840 0.1373221420 [150,] 0.9993854266 0.0012291469 0.0006145734 [151,] 0.9951013825 0.0097972349 0.0048986175 > postscript(file="/var/wessaorg/rcomp/tmp/1w0n11324663934.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/2ixxq1324663934.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/39gyt1324663934.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/44efr1324663934.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/58teb1324663934.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 34285.57930 20662.18917 1782.98323 16808.56749 -31552.93493 14882.30744 7 8 9 10 11 12 28419.09415 -10086.75605 52697.26997 -31370.53513 -48581.12760 -46922.20442 13 14 15 16 17 18 -19041.70656 -34807.36147 -37453.71080 -36949.07785 54389.37895 -8548.73853 19 20 21 22 23 24 48625.21724 19912.21492 -2397.65072 -45499.94594 6932.12001 7274.07509 25 26 27 28 29 30 -20803.01443 898.10417 -14019.56173 -33183.88973 -46865.81439 -17222.91279 31 32 33 34 35 36 14515.18396 -28015.30387 -26361.60609 -10672.87244 -15004.26301 -34729.69331 37 38 39 40 41 42 -32246.40104 -29059.85047 -15570.40452 -22826.57919 -22948.16223 -14772.54463 43 44 45 46 47 48 -2260.98269 -33617.44845 -6359.26231 -20633.37063 -17798.13767 -27034.81399 49 50 51 52 53 54 21545.44602 -17687.60999 -10735.77175 -7179.39762 10709.77885 -5689.06109 55 56 57 58 59 60 -7440.24117 -9070.35226 22553.91118 32961.14104 -7318.72894 -7633.19816 61 62 63 64 65 66 14110.32449 80171.64658 -48729.28131 -3524.26722 9330.88026 -16557.01004 67 68 69 70 71 72 52421.36036 -23445.06870 29534.54955 54239.62864 -26711.16697 -23434.79334 73 74 75 76 77 78 -23537.42215 88.35478 -15332.68909 -19584.11844 2442.71751 150110.95927 79 80 81 82 83 84 -26129.90736 -22571.26868 -30691.93383 13005.50211 -23767.16428 -13680.94642 85 86 87 88 89 90 28518.84301 -59180.47087 39848.98134 -18907.48879 -56114.57937 53262.14096 91 92 93 94 95 96 -51325.80766 19368.85862 -17472.06865 -38038.48144 34801.98985 70268.20579 97 98 99 100 101 102 64866.64550 63258.27456 7654.06943 65379.78218 20093.92575 30859.37729 103 104 105 106 107 108 -33417.60317 7987.61287 -28425.28666 -464.38377 -13272.99546 -14722.45451 109 110 111 112 113 114 114869.54908 69497.50872 24858.52505 -4822.99931 -8110.24209 -5434.77746 115 116 117 118 119 120 -3728.26239 -61080.62766 -18450.64797 -6679.17319 15363.14112 -5566.65891 121 122 123 124 125 126 -30803.23013 26385.25102 17025.92123 68370.96968 -11954.41552 -6622.22348 127 128 129 130 131 132 -15163.99654 -4825.84598 -9336.78416 8153.71920 127399.80387 -19419.50568 133 134 135 136 137 138 -13244.94561 -17829.82387 -847.81625 68047.87844 32187.06646 -20899.76855 139 140 141 142 143 144 -20285.92668 -44606.30833 33535.25239 -3298.40812 29055.76983 -22972.94149 145 146 147 148 149 150 12518.33383 45102.36597 51826.02428 36783.87195 -4156.07905 -558.38219 151 152 153 154 155 156 -4170.31900 -4231.41315 -4158.05902 -4158.05902 -28709.29215 -73299.03463 157 158 159 160 161 162 -4158.05902 -4190.32098 -3648.28620 -12309.76851 -4528.92911 -33814.86251 163 164 -4301.35843 10929.06605 > postscript(file="/var/wessaorg/rcomp/tmp/61cos1324663934.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 34285.57930 NA 1 20662.18917 34285.57930 2 1782.98323 20662.18917 3 16808.56749 1782.98323 4 -31552.93493 16808.56749 5 14882.30744 -31552.93493 6 28419.09415 14882.30744 7 -10086.75605 28419.09415 8 52697.26997 -10086.75605 9 -31370.53513 52697.26997 10 -48581.12760 -31370.53513 11 -46922.20442 -48581.12760 12 -19041.70656 -46922.20442 13 -34807.36147 -19041.70656 14 -37453.71080 -34807.36147 15 -36949.07785 -37453.71080 16 54389.37895 -36949.07785 17 -8548.73853 54389.37895 18 48625.21724 -8548.73853 19 19912.21492 48625.21724 20 -2397.65072 19912.21492 21 -45499.94594 -2397.65072 22 6932.12001 -45499.94594 23 7274.07509 6932.12001 24 -20803.01443 7274.07509 25 898.10417 -20803.01443 26 -14019.56173 898.10417 27 -33183.88973 -14019.56173 28 -46865.81439 -33183.88973 29 -17222.91279 -46865.81439 30 14515.18396 -17222.91279 31 -28015.30387 14515.18396 32 -26361.60609 -28015.30387 33 -10672.87244 -26361.60609 34 -15004.26301 -10672.87244 35 -34729.69331 -15004.26301 36 -32246.40104 -34729.69331 37 -29059.85047 -32246.40104 38 -15570.40452 -29059.85047 39 -22826.57919 -15570.40452 40 -22948.16223 -22826.57919 41 -14772.54463 -22948.16223 42 -2260.98269 -14772.54463 43 -33617.44845 -2260.98269 44 -6359.26231 -33617.44845 45 -20633.37063 -6359.26231 46 -17798.13767 -20633.37063 47 -27034.81399 -17798.13767 48 21545.44602 -27034.81399 49 -17687.60999 21545.44602 50 -10735.77175 -17687.60999 51 -7179.39762 -10735.77175 52 10709.77885 -7179.39762 53 -5689.06109 10709.77885 54 -7440.24117 -5689.06109 55 -9070.35226 -7440.24117 56 22553.91118 -9070.35226 57 32961.14104 22553.91118 58 -7318.72894 32961.14104 59 -7633.19816 -7318.72894 60 14110.32449 -7633.19816 61 80171.64658 14110.32449 62 -48729.28131 80171.64658 63 -3524.26722 -48729.28131 64 9330.88026 -3524.26722 65 -16557.01004 9330.88026 66 52421.36036 -16557.01004 67 -23445.06870 52421.36036 68 29534.54955 -23445.06870 69 54239.62864 29534.54955 70 -26711.16697 54239.62864 71 -23434.79334 -26711.16697 72 -23537.42215 -23434.79334 73 88.35478 -23537.42215 74 -15332.68909 88.35478 75 -19584.11844 -15332.68909 76 2442.71751 -19584.11844 77 150110.95927 2442.71751 78 -26129.90736 150110.95927 79 -22571.26868 -26129.90736 80 -30691.93383 -22571.26868 81 13005.50211 -30691.93383 82 -23767.16428 13005.50211 83 -13680.94642 -23767.16428 84 28518.84301 -13680.94642 85 -59180.47087 28518.84301 86 39848.98134 -59180.47087 87 -18907.48879 39848.98134 88 -56114.57937 -18907.48879 89 53262.14096 -56114.57937 90 -51325.80766 53262.14096 91 19368.85862 -51325.80766 92 -17472.06865 19368.85862 93 -38038.48144 -17472.06865 94 34801.98985 -38038.48144 95 70268.20579 34801.98985 96 64866.64550 70268.20579 97 63258.27456 64866.64550 98 7654.06943 63258.27456 99 65379.78218 7654.06943 100 20093.92575 65379.78218 101 30859.37729 20093.92575 102 -33417.60317 30859.37729 103 7987.61287 -33417.60317 104 -28425.28666 7987.61287 105 -464.38377 -28425.28666 106 -13272.99546 -464.38377 107 -14722.45451 -13272.99546 108 114869.54908 -14722.45451 109 69497.50872 114869.54908 110 24858.52505 69497.50872 111 -4822.99931 24858.52505 112 -8110.24209 -4822.99931 113 -5434.77746 -8110.24209 114 -3728.26239 -5434.77746 115 -61080.62766 -3728.26239 116 -18450.64797 -61080.62766 117 -6679.17319 -18450.64797 118 15363.14112 -6679.17319 119 -5566.65891 15363.14112 120 -30803.23013 -5566.65891 121 26385.25102 -30803.23013 122 17025.92123 26385.25102 123 68370.96968 17025.92123 124 -11954.41552 68370.96968 125 -6622.22348 -11954.41552 126 -15163.99654 -6622.22348 127 -4825.84598 -15163.99654 128 -9336.78416 -4825.84598 129 8153.71920 -9336.78416 130 127399.80387 8153.71920 131 -19419.50568 127399.80387 132 -13244.94561 -19419.50568 133 -17829.82387 -13244.94561 134 -847.81625 -17829.82387 135 68047.87844 -847.81625 136 32187.06646 68047.87844 137 -20899.76855 32187.06646 138 -20285.92668 -20899.76855 139 -44606.30833 -20285.92668 140 33535.25239 -44606.30833 141 -3298.40812 33535.25239 142 29055.76983 -3298.40812 143 -22972.94149 29055.76983 144 12518.33383 -22972.94149 145 45102.36597 12518.33383 146 51826.02428 45102.36597 147 36783.87195 51826.02428 148 -4156.07905 36783.87195 149 -558.38219 -4156.07905 150 -4170.31900 -558.38219 151 -4231.41315 -4170.31900 152 -4158.05902 -4231.41315 153 -4158.05902 -4158.05902 154 -28709.29215 -4158.05902 155 -73299.03463 -28709.29215 156 -4158.05902 -73299.03463 157 -4190.32098 -4158.05902 158 -3648.28620 -4190.32098 159 -12309.76851 -3648.28620 160 -4528.92911 -12309.76851 161 -33814.86251 -4528.92911 162 -4301.35843 -33814.86251 163 10929.06605 -4301.35843 164 NA 10929.06605 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 20662.18917 34285.57930 [2,] 1782.98323 20662.18917 [3,] 16808.56749 1782.98323 [4,] -31552.93493 16808.56749 [5,] 14882.30744 -31552.93493 [6,] 28419.09415 14882.30744 [7,] -10086.75605 28419.09415 [8,] 52697.26997 -10086.75605 [9,] -31370.53513 52697.26997 [10,] -48581.12760 -31370.53513 [11,] -46922.20442 -48581.12760 [12,] -19041.70656 -46922.20442 [13,] -34807.36147 -19041.70656 [14,] -37453.71080 -34807.36147 [15,] -36949.07785 -37453.71080 [16,] 54389.37895 -36949.07785 [17,] -8548.73853 54389.37895 [18,] 48625.21724 -8548.73853 [19,] 19912.21492 48625.21724 [20,] -2397.65072 19912.21492 [21,] -45499.94594 -2397.65072 [22,] 6932.12001 -45499.94594 [23,] 7274.07509 6932.12001 [24,] -20803.01443 7274.07509 [25,] 898.10417 -20803.01443 [26,] -14019.56173 898.10417 [27,] -33183.88973 -14019.56173 [28,] -46865.81439 -33183.88973 [29,] -17222.91279 -46865.81439 [30,] 14515.18396 -17222.91279 [31,] -28015.30387 14515.18396 [32,] -26361.60609 -28015.30387 [33,] -10672.87244 -26361.60609 [34,] -15004.26301 -10672.87244 [35,] -34729.69331 -15004.26301 [36,] -32246.40104 -34729.69331 [37,] -29059.85047 -32246.40104 [38,] -15570.40452 -29059.85047 [39,] -22826.57919 -15570.40452 [40,] -22948.16223 -22826.57919 [41,] -14772.54463 -22948.16223 [42,] -2260.98269 -14772.54463 [43,] -33617.44845 -2260.98269 [44,] -6359.26231 -33617.44845 [45,] -20633.37063 -6359.26231 [46,] -17798.13767 -20633.37063 [47,] -27034.81399 -17798.13767 [48,] 21545.44602 -27034.81399 [49,] -17687.60999 21545.44602 [50,] -10735.77175 -17687.60999 [51,] -7179.39762 -10735.77175 [52,] 10709.77885 -7179.39762 [53,] -5689.06109 10709.77885 [54,] -7440.24117 -5689.06109 [55,] -9070.35226 -7440.24117 [56,] 22553.91118 -9070.35226 [57,] 32961.14104 22553.91118 [58,] -7318.72894 32961.14104 [59,] -7633.19816 -7318.72894 [60,] 14110.32449 -7633.19816 [61,] 80171.64658 14110.32449 [62,] -48729.28131 80171.64658 [63,] -3524.26722 -48729.28131 [64,] 9330.88026 -3524.26722 [65,] -16557.01004 9330.88026 [66,] 52421.36036 -16557.01004 [67,] -23445.06870 52421.36036 [68,] 29534.54955 -23445.06870 [69,] 54239.62864 29534.54955 [70,] -26711.16697 54239.62864 [71,] -23434.79334 -26711.16697 [72,] -23537.42215 -23434.79334 [73,] 88.35478 -23537.42215 [74,] -15332.68909 88.35478 [75,] -19584.11844 -15332.68909 [76,] 2442.71751 -19584.11844 [77,] 150110.95927 2442.71751 [78,] -26129.90736 150110.95927 [79,] -22571.26868 -26129.90736 [80,] -30691.93383 -22571.26868 [81,] 13005.50211 -30691.93383 [82,] -23767.16428 13005.50211 [83,] -13680.94642 -23767.16428 [84,] 28518.84301 -13680.94642 [85,] -59180.47087 28518.84301 [86,] 39848.98134 -59180.47087 [87,] -18907.48879 39848.98134 [88,] -56114.57937 -18907.48879 [89,] 53262.14096 -56114.57937 [90,] -51325.80766 53262.14096 [91,] 19368.85862 -51325.80766 [92,] -17472.06865 19368.85862 [93,] -38038.48144 -17472.06865 [94,] 34801.98985 -38038.48144 [95,] 70268.20579 34801.98985 [96,] 64866.64550 70268.20579 [97,] 63258.27456 64866.64550 [98,] 7654.06943 63258.27456 [99,] 65379.78218 7654.06943 [100,] 20093.92575 65379.78218 [101,] 30859.37729 20093.92575 [102,] -33417.60317 30859.37729 [103,] 7987.61287 -33417.60317 [104,] -28425.28666 7987.61287 [105,] -464.38377 -28425.28666 [106,] -13272.99546 -464.38377 [107,] -14722.45451 -13272.99546 [108,] 114869.54908 -14722.45451 [109,] 69497.50872 114869.54908 [110,] 24858.52505 69497.50872 [111,] -4822.99931 24858.52505 [112,] -8110.24209 -4822.99931 [113,] -5434.77746 -8110.24209 [114,] -3728.26239 -5434.77746 [115,] -61080.62766 -3728.26239 [116,] -18450.64797 -61080.62766 [117,] -6679.17319 -18450.64797 [118,] 15363.14112 -6679.17319 [119,] -5566.65891 15363.14112 [120,] -30803.23013 -5566.65891 [121,] 26385.25102 -30803.23013 [122,] 17025.92123 26385.25102 [123,] 68370.96968 17025.92123 [124,] -11954.41552 68370.96968 [125,] -6622.22348 -11954.41552 [126,] -15163.99654 -6622.22348 [127,] -4825.84598 -15163.99654 [128,] -9336.78416 -4825.84598 [129,] 8153.71920 -9336.78416 [130,] 127399.80387 8153.71920 [131,] -19419.50568 127399.80387 [132,] -13244.94561 -19419.50568 [133,] -17829.82387 -13244.94561 [134,] -847.81625 -17829.82387 [135,] 68047.87844 -847.81625 [136,] 32187.06646 68047.87844 [137,] -20899.76855 32187.06646 [138,] -20285.92668 -20899.76855 [139,] -44606.30833 -20285.92668 [140,] 33535.25239 -44606.30833 [141,] -3298.40812 33535.25239 [142,] 29055.76983 -3298.40812 [143,] -22972.94149 29055.76983 [144,] 12518.33383 -22972.94149 [145,] 45102.36597 12518.33383 [146,] 51826.02428 45102.36597 [147,] 36783.87195 51826.02428 [148,] -4156.07905 36783.87195 [149,] -558.38219 -4156.07905 [150,] -4170.31900 -558.38219 [151,] -4231.41315 -4170.31900 [152,] -4158.05902 -4231.41315 [153,] -4158.05902 -4158.05902 [154,] -28709.29215 -4158.05902 [155,] -73299.03463 -28709.29215 [156,] -4158.05902 -73299.03463 [157,] -4190.32098 -4158.05902 [158,] -3648.28620 -4190.32098 [159,] -12309.76851 -3648.28620 [160,] -4528.92911 -12309.76851 [161,] -33814.86251 -4528.92911 [162,] -4301.35843 -33814.86251 [163,] 10929.06605 -4301.35843 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 20662.18917 34285.57930 2 1782.98323 20662.18917 3 16808.56749 1782.98323 4 -31552.93493 16808.56749 5 14882.30744 -31552.93493 6 28419.09415 14882.30744 7 -10086.75605 28419.09415 8 52697.26997 -10086.75605 9 -31370.53513 52697.26997 10 -48581.12760 -31370.53513 11 -46922.20442 -48581.12760 12 -19041.70656 -46922.20442 13 -34807.36147 -19041.70656 14 -37453.71080 -34807.36147 15 -36949.07785 -37453.71080 16 54389.37895 -36949.07785 17 -8548.73853 54389.37895 18 48625.21724 -8548.73853 19 19912.21492 48625.21724 20 -2397.65072 19912.21492 21 -45499.94594 -2397.65072 22 6932.12001 -45499.94594 23 7274.07509 6932.12001 24 -20803.01443 7274.07509 25 898.10417 -20803.01443 26 -14019.56173 898.10417 27 -33183.88973 -14019.56173 28 -46865.81439 -33183.88973 29 -17222.91279 -46865.81439 30 14515.18396 -17222.91279 31 -28015.30387 14515.18396 32 -26361.60609 -28015.30387 33 -10672.87244 -26361.60609 34 -15004.26301 -10672.87244 35 -34729.69331 -15004.26301 36 -32246.40104 -34729.69331 37 -29059.85047 -32246.40104 38 -15570.40452 -29059.85047 39 -22826.57919 -15570.40452 40 -22948.16223 -22826.57919 41 -14772.54463 -22948.16223 42 -2260.98269 -14772.54463 43 -33617.44845 -2260.98269 44 -6359.26231 -33617.44845 45 -20633.37063 -6359.26231 46 -17798.13767 -20633.37063 47 -27034.81399 -17798.13767 48 21545.44602 -27034.81399 49 -17687.60999 21545.44602 50 -10735.77175 -17687.60999 51 -7179.39762 -10735.77175 52 10709.77885 -7179.39762 53 -5689.06109 10709.77885 54 -7440.24117 -5689.06109 55 -9070.35226 -7440.24117 56 22553.91118 -9070.35226 57 32961.14104 22553.91118 58 -7318.72894 32961.14104 59 -7633.19816 -7318.72894 60 14110.32449 -7633.19816 61 80171.64658 14110.32449 62 -48729.28131 80171.64658 63 -3524.26722 -48729.28131 64 9330.88026 -3524.26722 65 -16557.01004 9330.88026 66 52421.36036 -16557.01004 67 -23445.06870 52421.36036 68 29534.54955 -23445.06870 69 54239.62864 29534.54955 70 -26711.16697 54239.62864 71 -23434.79334 -26711.16697 72 -23537.42215 -23434.79334 73 88.35478 -23537.42215 74 -15332.68909 88.35478 75 -19584.11844 -15332.68909 76 2442.71751 -19584.11844 77 150110.95927 2442.71751 78 -26129.90736 150110.95927 79 -22571.26868 -26129.90736 80 -30691.93383 -22571.26868 81 13005.50211 -30691.93383 82 -23767.16428 13005.50211 83 -13680.94642 -23767.16428 84 28518.84301 -13680.94642 85 -59180.47087 28518.84301 86 39848.98134 -59180.47087 87 -18907.48879 39848.98134 88 -56114.57937 -18907.48879 89 53262.14096 -56114.57937 90 -51325.80766 53262.14096 91 19368.85862 -51325.80766 92 -17472.06865 19368.85862 93 -38038.48144 -17472.06865 94 34801.98985 -38038.48144 95 70268.20579 34801.98985 96 64866.64550 70268.20579 97 63258.27456 64866.64550 98 7654.06943 63258.27456 99 65379.78218 7654.06943 100 20093.92575 65379.78218 101 30859.37729 20093.92575 102 -33417.60317 30859.37729 103 7987.61287 -33417.60317 104 -28425.28666 7987.61287 105 -464.38377 -28425.28666 106 -13272.99546 -464.38377 107 -14722.45451 -13272.99546 108 114869.54908 -14722.45451 109 69497.50872 114869.54908 110 24858.52505 69497.50872 111 -4822.99931 24858.52505 112 -8110.24209 -4822.99931 113 -5434.77746 -8110.24209 114 -3728.26239 -5434.77746 115 -61080.62766 -3728.26239 116 -18450.64797 -61080.62766 117 -6679.17319 -18450.64797 118 15363.14112 -6679.17319 119 -5566.65891 15363.14112 120 -30803.23013 -5566.65891 121 26385.25102 -30803.23013 122 17025.92123 26385.25102 123 68370.96968 17025.92123 124 -11954.41552 68370.96968 125 -6622.22348 -11954.41552 126 -15163.99654 -6622.22348 127 -4825.84598 -15163.99654 128 -9336.78416 -4825.84598 129 8153.71920 -9336.78416 130 127399.80387 8153.71920 131 -19419.50568 127399.80387 132 -13244.94561 -19419.50568 133 -17829.82387 -13244.94561 134 -847.81625 -17829.82387 135 68047.87844 -847.81625 136 32187.06646 68047.87844 137 -20899.76855 32187.06646 138 -20285.92668 -20899.76855 139 -44606.30833 -20285.92668 140 33535.25239 -44606.30833 141 -3298.40812 33535.25239 142 29055.76983 -3298.40812 143 -22972.94149 29055.76983 144 12518.33383 -22972.94149 145 45102.36597 12518.33383 146 51826.02428 45102.36597 147 36783.87195 51826.02428 148 -4156.07905 36783.87195 149 -558.38219 -4156.07905 150 -4170.31900 -558.38219 151 -4231.41315 -4170.31900 152 -4158.05902 -4231.41315 153 -4158.05902 -4158.05902 154 -28709.29215 -4158.05902 155 -73299.03463 -28709.29215 156 -4158.05902 -73299.03463 157 -4190.32098 -4158.05902 158 -3648.28620 -4190.32098 159 -12309.76851 -3648.28620 160 -4528.92911 -12309.76851 161 -33814.86251 -4528.92911 162 -4301.35843 -33814.86251 163 10929.06605 -4301.35843 > 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/70ae91324663934.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/8ydiv1324663934.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/9e6xw1324663934.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/103vmd1324663934.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/11bl7g1324663934.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/120n791324663934.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/13hmki1324663934.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/14y9by1324663934.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/15jp8i1324663934.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/163rdh1324663934.tab") + } > > try(system("convert tmp/1w0n11324663934.ps tmp/1w0n11324663934.png",intern=TRUE)) character(0) > try(system("convert tmp/2ixxq1324663934.ps tmp/2ixxq1324663934.png",intern=TRUE)) character(0) > try(system("convert tmp/39gyt1324663934.ps tmp/39gyt1324663934.png",intern=TRUE)) character(0) > try(system("convert tmp/44efr1324663934.ps tmp/44efr1324663934.png",intern=TRUE)) character(0) > try(system("convert tmp/58teb1324663934.ps tmp/58teb1324663934.png",intern=TRUE)) character(0) > try(system("convert tmp/61cos1324663934.ps tmp/61cos1324663934.png",intern=TRUE)) character(0) > try(system("convert tmp/70ae91324663934.ps tmp/70ae91324663934.png",intern=TRUE)) character(0) > try(system("convert tmp/8ydiv1324663934.ps tmp/8ydiv1324663934.png",intern=TRUE)) character(0) > try(system("convert tmp/9e6xw1324663934.ps tmp/9e6xw1324663934.png",intern=TRUE)) character(0) > try(system("convert tmp/103vmd1324663934.ps tmp/103vmd1324663934.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 4.644 0.583 5.243