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(73 + ,42 + ,140824 + ,279055 + ,73 + ,38 + ,110459 + ,209884 + ,83 + ,46 + ,105079 + ,233939 + ,106 + ,42 + ,112098 + ,222117 + ,54 + ,30 + ,43929 + ,179751 + ,28 + ,35 + ,76173 + ,70849 + ,131 + ,40 + ,187326 + ,568125 + ,19 + ,18 + ,22807 + ,33186 + ,62 + ,38 + ,144408 + ,227332 + ,48 + ,37 + ,66485 + ,258874 + ,118 + ,46 + ,79089 + ,351915 + ,129 + ,60 + ,81625 + ,260484 + ,82 + ,37 + ,68788 + ,203988 + ,85 + ,55 + ,103297 + ,368577 + ,88 + ,44 + ,69446 + ,269455 + ,186 + ,63 + ,114948 + ,394578 + ,76 + ,40 + ,167949 + ,335567 + ,171 + ,43 + ,125081 + ,423110 + ,58 + ,32 + ,125818 + ,182016 + ,88 + ,52 + ,136588 + ,267365 + ,73 + ,49 + ,112431 + ,279428 + ,109 + ,41 + ,103037 + ,506616 + ,47 + ,25 + ,82317 + ,206722 + ,58 + ,57 + ,118906 + ,200004 + ,132 + ,45 + ,83515 + ,257139 + ,137 + ,42 + ,104581 + ,270815 + ,133 + ,45 + ,103129 + ,296850 + ,90 + ,43 + ,83243 + ,307100 + ,58 + ,36 + ,37110 + ,184160 + ,79 + ,45 + ,113344 + ,393860 + ,88 + ,50 + ,139165 + ,320558 + ,82 + ,50 + ,86652 + ,252512 + ,102 + ,51 + ,112302 + ,373013 + ,46 + ,42 + ,69652 + ,115602 + ,103 + ,44 + ,119442 + ,430118 + ,56 + ,42 + ,69867 + ,273950 + ,128 + ,44 + ,101629 + ,428077 + ,91 + ,40 + ,70168 + ,251349 + ,33 + ,17 + ,31081 + ,115658 + ,208 + ,43 + ,103925 + ,388812 + ,85 + ,41 + ,92622 + ,343783 + ,75 + ,41 + ,79011 + ,202289 + ,81 + ,40 + ,93487 + ,214344 + ,65 + ,49 + ,64520 + ,182398 + ,84 + ,52 + ,93473 + ,157164 + ,156 + ,42 + ,114360 + ,459440 + ,42 + ,26 + ,33032 + ,78800 + ,84 + ,59 + ,96125 + ,217932 + ,122 + ,50 + ,151911 + ,368086 + ,66 + ,50 + ,89256 + ,210554 + ,79 + ,47 + ,95676 + ,244640 + ,24 + ,4 + ,5950 + ,24188 + ,331 + ,51 + ,149695 + ,399093 + ,17 + ,18 + ,32551 + ,65029 + ,64 + ,14 + ,31701 + ,101097 + ,64 + ,41 + ,100087 + ,300488 + ,90 + ,61 + ,169707 + ,369627 + ,204 + ,40 + ,150491 + ,367127 + ,151 + ,44 + ,120192 + ,374158 + ,88 + ,40 + ,95893 + ,270099 + ,151 + ,51 + ,151715 + ,391871 + ,121 + ,29 + ,176225 + ,315924 + ,124 + ,43 + ,59900 + ,291391 + ,92 + ,42 + ,104767 + ,286417 + ,78 + ,41 + ,114799 + ,276201 + ,71 + ,30 + ,72128 + ,267432 + ,140 + ,39 + ,143592 + ,215924 + ,156 + ,51 + ,89626 + ,252767 + ,87 + ,40 + ,131072 + ,260919 + ,73 + ,29 + ,126817 + ,182961 + ,74 + ,47 + ,81351 + ,256967 + ,32 + ,23 + ,22618 + ,73566 + ,93 + ,48 + ,88977 + ,272362 + ,61 + ,38 + ,92059 + ,220707 + ,68 + ,42 + ,81897 + ,228835 + ,91 + ,46 + ,108146 + ,371391 + ,104 + ,40 + ,126372 + ,398210 + ,110 + ,45 + ,249771 + ,220401 + ,70 + ,42 + ,71154 + ,229333 + ,70 + ,41 + ,71571 + ,217623 + ,52 + ,37 + ,55918 + ,199011 + ,131 + ,47 + ,160141 + ,483074 + ,71 + ,26 + ,38692 + ,145943 + ,108 + ,48 + ,102812 + ,295224 + ,25 + ,8 + ,56622 + ,80953 + ,61 + ,27 + ,15986 + ,180759 + ,61 + ,38 + ,123534 + ,179344 + ,221 + ,41 + ,108535 + ,415550 + ,128 + ,61 + ,93879 + ,369093 + ,106 + ,45 + ,144551 + ,180679 + ,104 + ,41 + ,56750 + ,299505 + ,84 + ,42 + ,127654 + ,292260 + ,67 + ,35 + ,65594 + ,199481 + ,78 + ,36 + ,59938 + ,282361 + ,89 + ,40 + ,146975 + ,329281 + ,48 + ,40 + ,165904 + ,234577 + ,67 + ,38 + ,169265 + ,297995 + ,88 + ,43 + ,183500 + ,305984 + ,163 + ,65 + ,165986 + ,416463 + ,117 + ,33 + ,184923 + ,412530 + ,141 + ,51 + ,140358 + ,297080 + ,70 + ,45 + ,149959 + ,318283 + ,196 + ,36 + ,57224 + ,214250 + ,14 + ,19 + ,43750 + ,43287 + ,86 + ,25 + ,48029 + ,223456 + ,158 + ,44 + ,104978 + ,258249 + ,60 + ,45 + ,100046 + ,299566 + ,95 + ,44 + ,101047 + ,321797 + ,89 + ,35 + ,197426 + ,174736 + ,101 + ,46 + ,160902 + ,169545 + ,77 + ,44 + ,147172 + ,354041 + ,90 + ,45 + ,109432 + ,303273 + ,13 + ,1 + ,1168 + ,23668 + ,79 + ,40 + ,83248 + ,196743 + ,25 + ,11 + ,25162 + ,61857 + ,53 + ,51 + ,45724 + ,207339 + ,122 + ,38 + ,110529 + ,431443 + ,16 + ,0 + ,855 + ,21054 + ,52 + ,30 + ,101382 + ,252805 + ,22 + ,8 + ,14116 + ,31961 + ,123 + ,43 + ,89506 + ,354622 + ,76 + ,48 + ,135356 + ,251240 + ,96 + ,49 + ,116066 + ,187003 + ,58 + ,32 + ,144244 + ,180842 + ,34 + ,8 + ,8773 + ,38214 + ,55 + ,43 + ,102153 + ,278173 + ,84 + ,52 + ,117440 + ,358276 + ,66 + ,53 + ,104128 + ,211775 + ,89 + ,49 + ,134238 + ,445926 + ,99 + ,48 + ,134047 + ,348017 + ,133 + ,56 + ,279488 + ,441946 + ,41 + ,45 + ,79756 + ,208962 + ,45 + ,40 + ,66089 + ,105332 + ,361 + ,48 + ,102070 + ,316128 + ,198 + ,50 + ,146760 + ,466139 + ,61 + ,43 + ,154771 + ,160799 + ,138 + ,46 + ,165933 + ,412099 + ,83 + ,40 + ,64593 + ,173802 + ,54 + ,45 + ,92280 + ,292443 + ,100 + ,46 + ,67150 + ,283913 + ,121 + ,37 + ,128692 + ,234262 + ,124 + ,45 + ,124089 + ,386740 + ,92 + ,39 + ,125386 + ,246963 + ,63 + ,21 + ,37238 + ,173260 + ,108 + ,50 + ,140015 + ,346748 + ,58 + ,55 + ,150047 + ,176654 + ,92 + ,40 + ,154451 + ,264767 + ,112 + ,48 + ,156349 + ,314070 + ,0 + ,0 + ,0 + ,1 + ,10 + ,0 + ,6023 + ,14688 + ,1 + ,0 + ,0 + ,98 + ,2 + ,0 + ,0 + ,455 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,92 + ,46 + ,84601 + ,284420 + ,164 + ,52 + ,68946 + ,410509 + ,0 + ,0 + ,0 + ,0 + ,4 + ,0 + ,0 + ,203 + ,5 + ,0 + ,1644 + ,7199 + ,20 + ,5 + ,6179 + ,46660 + ,5 + ,1 + ,3926 + ,17547 + ,46 + ,48 + ,52789 + ,121550 + ,2 + ,0 + ,0 + ,969 + ,74 + ,34 + ,100350 + ,242258) + ,dim=c(4 + ,164) + ,dimnames=list(c('Numerlogins' + ,'TotalReceivedcompendium' + ,'totalwriting' + ,'totaltime') + ,1:164)) > y <- array(NA,dim=c(4,164),dimnames=list(c('Numerlogins','TotalReceivedcompendium','totalwriting','totaltime'),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 = '4' > 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 totaltime Numerlogins TotalReceivedcompendium totalwriting 1 279055 73 42 140824 2 209884 73 38 110459 3 233939 83 46 105079 4 222117 106 42 112098 5 179751 54 30 43929 6 70849 28 35 76173 7 568125 131 40 187326 8 33186 19 18 22807 9 227332 62 38 144408 10 258874 48 37 66485 11 351915 118 46 79089 12 260484 129 60 81625 13 203988 82 37 68788 14 368577 85 55 103297 15 269455 88 44 69446 16 394578 186 63 114948 17 335567 76 40 167949 18 423110 171 43 125081 19 182016 58 32 125818 20 267365 88 52 136588 21 279428 73 49 112431 22 506616 109 41 103037 23 206722 47 25 82317 24 200004 58 57 118906 25 257139 132 45 83515 26 270815 137 42 104581 27 296850 133 45 103129 28 307100 90 43 83243 29 184160 58 36 37110 30 393860 79 45 113344 31 320558 88 50 139165 32 252512 82 50 86652 33 373013 102 51 112302 34 115602 46 42 69652 35 430118 103 44 119442 36 273950 56 42 69867 37 428077 128 44 101629 38 251349 91 40 70168 39 115658 33 17 31081 40 388812 208 43 103925 41 343783 85 41 92622 42 202289 75 41 79011 43 214344 81 40 93487 44 182398 65 49 64520 45 157164 84 52 93473 46 459440 156 42 114360 47 78800 42 26 33032 48 217932 84 59 96125 49 368086 122 50 151911 50 210554 66 50 89256 51 244640 79 47 95676 52 24188 24 4 5950 53 399093 331 51 149695 54 65029 17 18 32551 55 101097 64 14 31701 56 300488 64 41 100087 57 369627 90 61 169707 58 367127 204 40 150491 59 374158 151 44 120192 60 270099 88 40 95893 61 391871 151 51 151715 62 315924 121 29 176225 63 291391 124 43 59900 64 286417 92 42 104767 65 276201 78 41 114799 66 267432 71 30 72128 67 215924 140 39 143592 68 252767 156 51 89626 69 260919 87 40 131072 70 182961 73 29 126817 71 256967 74 47 81351 72 73566 32 23 22618 73 272362 93 48 88977 74 220707 61 38 92059 75 228835 68 42 81897 76 371391 91 46 108146 77 398210 104 40 126372 78 220401 110 45 249771 79 229333 70 42 71154 80 217623 70 41 71571 81 199011 52 37 55918 82 483074 131 47 160141 83 145943 71 26 38692 84 295224 108 48 102812 85 80953 25 8 56622 86 180759 61 27 15986 87 179344 61 38 123534 88 415550 221 41 108535 89 369093 128 61 93879 90 180679 106 45 144551 91 299505 104 41 56750 92 292260 84 42 127654 93 199481 67 35 65594 94 282361 78 36 59938 95 329281 89 40 146975 96 234577 48 40 165904 97 297995 67 38 169265 98 305984 88 43 183500 99 416463 163 65 165986 100 412530 117 33 184923 101 297080 141 51 140358 102 318283 70 45 149959 103 214250 196 36 57224 104 43287 14 19 43750 105 223456 86 25 48029 106 258249 158 44 104978 107 299566 60 45 100046 108 321797 95 44 101047 109 174736 89 35 197426 110 169545 101 46 160902 111 354041 77 44 147172 112 303273 90 45 109432 113 23668 13 1 1168 114 196743 79 40 83248 115 61857 25 11 25162 116 207339 53 51 45724 117 431443 122 38 110529 118 21054 16 0 855 119 252805 52 30 101382 120 31961 22 8 14116 121 354622 123 43 89506 122 251240 76 48 135356 123 187003 96 49 116066 124 180842 58 32 144244 125 38214 34 8 8773 126 278173 55 43 102153 127 358276 84 52 117440 128 211775 66 53 104128 129 445926 89 49 134238 130 348017 99 48 134047 131 441946 133 56 279488 132 208962 41 45 79756 133 105332 45 40 66089 134 316128 361 48 102070 135 466139 198 50 146760 136 160799 61 43 154771 137 412099 138 46 165933 138 173802 83 40 64593 139 292443 54 45 92280 140 283913 100 46 67150 141 234262 121 37 128692 142 386740 124 45 124089 143 246963 92 39 125386 144 173260 63 21 37238 145 346748 108 50 140015 146 176654 58 55 150047 147 264767 92 40 154451 148 314070 112 48 156349 149 1 0 0 0 150 14688 10 0 6023 151 98 1 0 0 152 455 2 0 0 153 0 0 0 0 154 0 0 0 0 155 284420 92 46 84601 156 410509 164 52 68946 157 0 0 0 0 158 203 4 0 0 159 7199 5 0 1644 160 46660 20 5 6179 161 17547 5 1 3926 162 121550 46 48 52789 163 969 2 0 0 164 242258 74 34 100350 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) Numerlogins TotalReceivedcompendium 6086.6596 833.3217 2746.1082 totalwriting 0.6648 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -190453 -35458 -2941 39367 228612 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 6.087e+03 1.399e+04 0.435 0.664 Numerlogins 8.333e+02 1.263e+02 6.598 5.81e-10 *** TotalReceivedcompendium 2.746e+03 5.178e+02 5.304 3.72e-07 *** totalwriting 6.648e-01 1.435e-01 4.631 7.48e-06 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 67680 on 160 degrees of freedom Multiple R-squared: 0.7099, Adjusted R-squared: 0.7045 F-statistic: 130.5 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.5857370 8.285260e-01 4.142630e-01 [2,] 0.5135235 9.729531e-01 4.864765e-01 [3,] 0.4305531 8.611062e-01 5.694469e-01 [4,] 0.8060433 3.879134e-01 1.939567e-01 [5,] 0.7401901 5.196198e-01 2.598099e-01 [6,] 0.6821394 6.357212e-01 3.178606e-01 [7,] 0.6006497 7.987006e-01 3.993503e-01 [8,] 0.7913678 4.172643e-01 2.086322e-01 [9,] 0.7368275 5.263449e-01 2.631725e-01 [10,] 0.7389437 5.221127e-01 2.610563e-01 [11,] 0.6710217 6.579567e-01 3.289783e-01 [12,] 0.6093561 7.812878e-01 3.906439e-01 [13,] 0.6025910 7.948180e-01 3.974090e-01 [14,] 0.5536089 8.927821e-01 4.463911e-01 [15,] 0.4910057 9.820114e-01 5.089943e-01 [16,] 0.8973821 2.052359e-01 1.026179e-01 [17,] 0.8677357 2.645285e-01 1.322643e-01 [18,] 0.8428555 3.142889e-01 1.571445e-01 [19,] 0.8456756 3.086489e-01 1.543244e-01 [20,] 0.8609947 2.780107e-01 1.390053e-01 [21,] 0.8372307 3.255385e-01 1.627693e-01 [22,] 0.8253574 3.492852e-01 1.746426e-01 [23,] 0.7942575 4.114850e-01 2.057425e-01 [24,] 0.8726356 2.547287e-01 1.273644e-01 [25,] 0.8395827 3.208346e-01 1.604173e-01 [26,] 0.8024734 3.950532e-01 1.975266e-01 [27,] 0.7974074 4.051853e-01 2.025926e-01 [28,] 0.7932531 4.134938e-01 2.067469e-01 [29,] 0.8596487 2.807027e-01 1.403513e-01 [30,] 0.8700272 2.599455e-01 1.299728e-01 [31,] 0.8973005 2.053991e-01 1.026995e-01 [32,] 0.8713883 2.572234e-01 1.286117e-01 [33,] 0.8415898 3.168204e-01 1.584102e-01 [34,] 0.8449828 3.100344e-01 1.550172e-01 [35,] 0.8603934 2.792131e-01 1.396066e-01 [36,] 0.8364375 3.271249e-01 1.635625e-01 [37,] 0.8156598 3.686803e-01 1.843402e-01 [38,] 0.7899100 4.201801e-01 2.100900e-01 [39,] 0.8485168 3.029663e-01 1.514832e-01 [40,] 0.8776629 2.446742e-01 1.223371e-01 [41,] 0.8658535 2.682931e-01 1.341465e-01 [42,] 0.8635597 2.728806e-01 1.364403e-01 [43,] 0.8404510 3.190980e-01 1.595490e-01 [44,] 0.8181681 3.636637e-01 1.818319e-01 [45,] 0.7861879 4.276242e-01 2.138121e-01 [46,] 0.7588584 4.822833e-01 2.411416e-01 [47,] 0.9466044 1.067912e-01 5.339559e-02 [48,] 0.9350898 1.298205e-01 6.491023e-02 [49,] 0.9207067 1.585866e-01 7.929328e-02 [50,] 0.9146484 1.707031e-01 8.535157e-02 [51,] 0.8957466 2.085069e-01 1.042534e-01 [52,] 0.8895802 2.208396e-01 1.104198e-01 [53,] 0.8730200 2.539599e-01 1.269800e-01 [54,] 0.8479651 3.040699e-01 1.520349e-01 [55,] 0.8220740 3.558520e-01 1.779260e-01 [56,] 0.8147845 3.704310e-01 1.852155e-01 [57,] 0.7904990 4.190020e-01 2.095010e-01 [58,] 0.7573707 4.852587e-01 2.426293e-01 [59,] 0.7211861 5.576278e-01 2.788139e-01 [60,] 0.7227547 5.544906e-01 2.772453e-01 [61,] 0.8065267 3.869467e-01 1.934733e-01 [62,] 0.8160220 3.679561e-01 1.839780e-01 [63,] 0.7899260 4.201481e-01 2.100740e-01 [64,] 0.7856205 4.287590e-01 2.143795e-01 [65,] 0.7516491 4.967018e-01 2.483509e-01 [66,] 0.7249632 5.500737e-01 2.750368e-01 [67,] 0.6859180 6.281640e-01 3.140820e-01 [68,] 0.6445371 7.109258e-01 3.554629e-01 [69,] 0.6015671 7.968658e-01 3.984329e-01 [70,] 0.6331618 7.336765e-01 3.668382e-01 [71,] 0.6971194 6.057612e-01 3.028806e-01 [72,] 0.8838035 2.323930e-01 1.161965e-01 [73,] 0.8600319 2.799361e-01 1.399681e-01 [74,] 0.8334896 3.330208e-01 1.665104e-01 [75,] 0.8041484 3.917032e-01 1.958516e-01 [76,] 0.8818326 2.363348e-01 1.181674e-01 [77,] 0.8593625 2.812749e-01 1.406375e-01 [78,] 0.8323855 3.352291e-01 1.676145e-01 [79,] 0.8031457 3.937086e-01 1.968543e-01 [80,] 0.7810150 4.379701e-01 2.189850e-01 [81,] 0.7774756 4.450488e-01 2.225244e-01 [82,] 0.7631214 4.737571e-01 2.368786e-01 [83,] 0.7326948 5.346104e-01 2.673052e-01 [84,] 0.8257834 3.484331e-01 1.742166e-01 [85,] 0.8179999 3.640002e-01 1.820001e-01 [86,] 0.7883661 4.232678e-01 2.116339e-01 [87,] 0.7535105 4.929789e-01 2.464895e-01 [88,] 0.7610266 4.779468e-01 2.389734e-01 [89,] 0.7404144 5.191712e-01 2.595856e-01 [90,] 0.7098797 5.802406e-01 2.901203e-01 [91,] 0.6730344 6.539312e-01 3.269656e-01 [92,] 0.6312307 7.375387e-01 3.687693e-01 [93,] 0.5876906 8.246188e-01 4.123094e-01 [94,] 0.6540561 6.918878e-01 3.459439e-01 [95,] 0.6374014 7.251971e-01 3.625986e-01 [96,] 0.6051794 7.896413e-01 3.948206e-01 [97,] 0.6323113 7.353775e-01 3.676887e-01 [98,] 0.6189326 7.621349e-01 3.810674e-01 [99,] 0.5963447 8.073105e-01 4.036553e-01 [100,] 0.5905620 8.188760e-01 4.094380e-01 [101,] 0.5725930 8.548140e-01 4.274070e-01 [102,] 0.5530014 8.939972e-01 4.469986e-01 [103,] 0.6596060 6.807881e-01 3.403940e-01 [104,] 0.8173732 3.652536e-01 1.826268e-01 [105,] 0.8158717 3.682566e-01 1.841283e-01 [106,] 0.7878681 4.242637e-01 2.121319e-01 [107,] 0.7501759 4.996482e-01 2.498241e-01 [108,] 0.7213827 5.572347e-01 2.786173e-01 [109,] 0.6785799 6.428402e-01 3.214201e-01 [110,] 0.6331899 7.336202e-01 3.668101e-01 [111,] 0.8115333 3.769334e-01 1.884667e-01 [112,] 0.7749315 4.501369e-01 2.250685e-01 [113,] 0.7653131 4.693739e-01 2.346869e-01 [114,] 0.7270075 5.459850e-01 2.729925e-01 [115,] 0.7457168 5.085665e-01 2.542832e-01 [116,] 0.7132605 5.734790e-01 2.867395e-01 [117,] 0.7778326 4.443348e-01 2.221674e-01 [118,] 0.7651892 4.696216e-01 2.348108e-01 [119,] 0.7243318 5.513365e-01 2.756682e-01 [120,] 0.6935477 6.129047e-01 3.064523e-01 [121,] 0.6918109 6.163782e-01 3.081891e-01 [122,] 0.6845615 6.308770e-01 3.154385e-01 [123,] 0.8587178 2.825643e-01 1.412822e-01 [124,] 0.8462731 3.074538e-01 1.537269e-01 [125,] 0.8087798 3.824404e-01 1.912202e-01 [126,] 0.7646731 4.706538e-01 2.353269e-01 [127,] 0.8027970 3.944060e-01 1.972030e-01 [128,] 0.9998352 3.296552e-04 1.648276e-04 [129,] 0.9997564 4.871524e-04 2.435762e-04 [130,] 0.9997871 4.258315e-04 2.129158e-04 [131,] 0.9997280 5.440004e-04 2.720002e-04 [132,] 0.9998310 3.380357e-04 1.690179e-04 [133,] 0.9999965 7.062496e-06 3.531248e-06 [134,] 0.9999911 1.781867e-05 8.909333e-06 [135,] 1.0000000 9.271215e-09 4.635607e-09 [136,] 1.0000000 3.898604e-09 1.949302e-09 [137,] 1.0000000 7.257507e-09 3.628754e-09 [138,] 1.0000000 3.158289e-08 1.579145e-08 [139,] 1.0000000 1.023861e-08 5.119306e-09 [140,] 1.0000000 2.150285e-08 1.075142e-08 [141,] 1.0000000 5.625705e-08 2.812852e-08 [142,] 1.0000000 2.080223e-10 1.040112e-10 [143,] 1.0000000 1.853822e-09 9.269112e-10 [144,] 1.0000000 5.629616e-09 2.814808e-09 [145,] 1.0000000 5.776771e-08 2.888386e-08 [146,] 0.9999997 5.531529e-07 2.765765e-07 [147,] 0.9999976 4.837390e-06 2.418695e-06 [148,] 0.9999802 3.955856e-05 1.977928e-05 [149,] 0.9999973 5.403732e-06 2.701866e-06 [150,] 0.9999561 8.771027e-05 4.385513e-05 [151,] 0.9994345 1.131054e-03 5.655270e-04 > postscript(file="/var/wessaorg/rcomp/tmp/1avvr1324578994.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/2zknm1324578994.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/333nt1324578994.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/4sjn71324578994.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/5vqmf1324578994.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 3185.164 -34815.969 -37486.644 -62156.560 17079.484 -105321.210 7 8 9 10 11 12 218502.057 -53324.899 -30769.364 66985.333 68600.206 -72128.679 13 14 15 16 17 18 -17764.547 71954.341 23042.353 -15924.134 44657.803 73293.844 19 20 21 22 23 24 -43917.542 -45649.821 3209.934 228611.973 38095.475 -89987.427 25 26 27 28 29 30 -38038.417 -34294.532 -12199.339 52595.126 6211.546 123019.511 31 32 33 34 35 36 11322.309 -16815.224 67222.142 -90455.859 137970.192 59416.000 37 38 39 40 41 42 126937.518 12940.864 14726.482 22226.601 92702.168 -31410.568 43 44 45 46 47 48 -31232.454 -55304.181 -123856.412 131996.668 -55643.334 -84074.112 49 50 51 52 53 54 22044.342 -47171.112 -19947.728 -16838.135 -122385.894 -26292.676 55 56 57 58 59 60 -17841.317 61944.491 8214.379 -18841.997 41512.181 17089.881 61 62 63 64 65 66 19047.197 12220.964 24070.678 18683.299 16211.040 71848.451 67 68 69 70 71 72 -109380.121 -82949.135 -14642.385 -47898.138 6068.566 -37382.982 73 74 75 76 77 78 -2185.114 -1761.527 -3695.922 91259.964 111606.517 -166963.660 79 80 81 82 83 84 2276.951 -6964.146 10813.564 132299.797 -16429.204 -1019.892 85 86 87 88 89 90 -5575.603 39067.943 -64047.844 40559.092 26421.567 -133406.337 91 92 93 94 95 96 56437.322 15978.513 -2156.262 72570.973 41481.295 -31639.755 97 98 99 100 101 102 19203.091 -13501.063 -14292.967 95393.736 -59860.908 30602.223 103 104 105 106 107 108 -92067.829 -55725.465 45123.216 -70116.414 53398.600 48544.024 109 110 111 112 113 114 -132870.965 -153989.326 65125.765 25866.513 3225.610 -40360.334 115 116 117 118 119 120 -11996.581 -13360.711 145863.734 1065.823 53607.678 -23811.354 121 122 123 124 125 126 68454.119 -39971.544 -110797.868 -57340.407 -24006.402 40263.776 127 128 129 130 131 132 61323.288 -64074.746 141878.368 38509.228 -14546.919 -7884.309 133 134 135 136 137 138 -92031.782 -190453.031 60189.071 -117088.490 54387.364 -54233.526 139 140 141 142 143 144 56438.056 23534.565 -59811.870 71257.189 -26239.061 32251.472 145 146 147 148 149 150 20280.829 -128546.498 -30502.415 -21096.429 -6085.660 -3735.725 151 152 153 154 155 156 -6821.981 -7298.303 -6086.660 -6086.660 19107.414 79127.418 157 158 159 160 161 162 -6086.660 -9216.946 -4147.133 6068.814 1937.776 -89774.663 163 164 -6784.303 14429.200 > postscript(file="/var/wessaorg/rcomp/tmp/6v8je1324578994.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 3185.164 NA 1 -34815.969 3185.164 2 -37486.644 -34815.969 3 -62156.560 -37486.644 4 17079.484 -62156.560 5 -105321.210 17079.484 6 218502.057 -105321.210 7 -53324.899 218502.057 8 -30769.364 -53324.899 9 66985.333 -30769.364 10 68600.206 66985.333 11 -72128.679 68600.206 12 -17764.547 -72128.679 13 71954.341 -17764.547 14 23042.353 71954.341 15 -15924.134 23042.353 16 44657.803 -15924.134 17 73293.844 44657.803 18 -43917.542 73293.844 19 -45649.821 -43917.542 20 3209.934 -45649.821 21 228611.973 3209.934 22 38095.475 228611.973 23 -89987.427 38095.475 24 -38038.417 -89987.427 25 -34294.532 -38038.417 26 -12199.339 -34294.532 27 52595.126 -12199.339 28 6211.546 52595.126 29 123019.511 6211.546 30 11322.309 123019.511 31 -16815.224 11322.309 32 67222.142 -16815.224 33 -90455.859 67222.142 34 137970.192 -90455.859 35 59416.000 137970.192 36 126937.518 59416.000 37 12940.864 126937.518 38 14726.482 12940.864 39 22226.601 14726.482 40 92702.168 22226.601 41 -31410.568 92702.168 42 -31232.454 -31410.568 43 -55304.181 -31232.454 44 -123856.412 -55304.181 45 131996.668 -123856.412 46 -55643.334 131996.668 47 -84074.112 -55643.334 48 22044.342 -84074.112 49 -47171.112 22044.342 50 -19947.728 -47171.112 51 -16838.135 -19947.728 52 -122385.894 -16838.135 53 -26292.676 -122385.894 54 -17841.317 -26292.676 55 61944.491 -17841.317 56 8214.379 61944.491 57 -18841.997 8214.379 58 41512.181 -18841.997 59 17089.881 41512.181 60 19047.197 17089.881 61 12220.964 19047.197 62 24070.678 12220.964 63 18683.299 24070.678 64 16211.040 18683.299 65 71848.451 16211.040 66 -109380.121 71848.451 67 -82949.135 -109380.121 68 -14642.385 -82949.135 69 -47898.138 -14642.385 70 6068.566 -47898.138 71 -37382.982 6068.566 72 -2185.114 -37382.982 73 -1761.527 -2185.114 74 -3695.922 -1761.527 75 91259.964 -3695.922 76 111606.517 91259.964 77 -166963.660 111606.517 78 2276.951 -166963.660 79 -6964.146 2276.951 80 10813.564 -6964.146 81 132299.797 10813.564 82 -16429.204 132299.797 83 -1019.892 -16429.204 84 -5575.603 -1019.892 85 39067.943 -5575.603 86 -64047.844 39067.943 87 40559.092 -64047.844 88 26421.567 40559.092 89 -133406.337 26421.567 90 56437.322 -133406.337 91 15978.513 56437.322 92 -2156.262 15978.513 93 72570.973 -2156.262 94 41481.295 72570.973 95 -31639.755 41481.295 96 19203.091 -31639.755 97 -13501.063 19203.091 98 -14292.967 -13501.063 99 95393.736 -14292.967 100 -59860.908 95393.736 101 30602.223 -59860.908 102 -92067.829 30602.223 103 -55725.465 -92067.829 104 45123.216 -55725.465 105 -70116.414 45123.216 106 53398.600 -70116.414 107 48544.024 53398.600 108 -132870.965 48544.024 109 -153989.326 -132870.965 110 65125.765 -153989.326 111 25866.513 65125.765 112 3225.610 25866.513 113 -40360.334 3225.610 114 -11996.581 -40360.334 115 -13360.711 -11996.581 116 145863.734 -13360.711 117 1065.823 145863.734 118 53607.678 1065.823 119 -23811.354 53607.678 120 68454.119 -23811.354 121 -39971.544 68454.119 122 -110797.868 -39971.544 123 -57340.407 -110797.868 124 -24006.402 -57340.407 125 40263.776 -24006.402 126 61323.288 40263.776 127 -64074.746 61323.288 128 141878.368 -64074.746 129 38509.228 141878.368 130 -14546.919 38509.228 131 -7884.309 -14546.919 132 -92031.782 -7884.309 133 -190453.031 -92031.782 134 60189.071 -190453.031 135 -117088.490 60189.071 136 54387.364 -117088.490 137 -54233.526 54387.364 138 56438.056 -54233.526 139 23534.565 56438.056 140 -59811.870 23534.565 141 71257.189 -59811.870 142 -26239.061 71257.189 143 32251.472 -26239.061 144 20280.829 32251.472 145 -128546.498 20280.829 146 -30502.415 -128546.498 147 -21096.429 -30502.415 148 -6085.660 -21096.429 149 -3735.725 -6085.660 150 -6821.981 -3735.725 151 -7298.303 -6821.981 152 -6086.660 -7298.303 153 -6086.660 -6086.660 154 19107.414 -6086.660 155 79127.418 19107.414 156 -6086.660 79127.418 157 -9216.946 -6086.660 158 -4147.133 -9216.946 159 6068.814 -4147.133 160 1937.776 6068.814 161 -89774.663 1937.776 162 -6784.303 -89774.663 163 14429.200 -6784.303 164 NA 14429.200 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -34815.969 3185.164 [2,] -37486.644 -34815.969 [3,] -62156.560 -37486.644 [4,] 17079.484 -62156.560 [5,] -105321.210 17079.484 [6,] 218502.057 -105321.210 [7,] -53324.899 218502.057 [8,] -30769.364 -53324.899 [9,] 66985.333 -30769.364 [10,] 68600.206 66985.333 [11,] -72128.679 68600.206 [12,] -17764.547 -72128.679 [13,] 71954.341 -17764.547 [14,] 23042.353 71954.341 [15,] -15924.134 23042.353 [16,] 44657.803 -15924.134 [17,] 73293.844 44657.803 [18,] -43917.542 73293.844 [19,] -45649.821 -43917.542 [20,] 3209.934 -45649.821 [21,] 228611.973 3209.934 [22,] 38095.475 228611.973 [23,] -89987.427 38095.475 [24,] -38038.417 -89987.427 [25,] -34294.532 -38038.417 [26,] -12199.339 -34294.532 [27,] 52595.126 -12199.339 [28,] 6211.546 52595.126 [29,] 123019.511 6211.546 [30,] 11322.309 123019.511 [31,] -16815.224 11322.309 [32,] 67222.142 -16815.224 [33,] -90455.859 67222.142 [34,] 137970.192 -90455.859 [35,] 59416.000 137970.192 [36,] 126937.518 59416.000 [37,] 12940.864 126937.518 [38,] 14726.482 12940.864 [39,] 22226.601 14726.482 [40,] 92702.168 22226.601 [41,] -31410.568 92702.168 [42,] -31232.454 -31410.568 [43,] -55304.181 -31232.454 [44,] -123856.412 -55304.181 [45,] 131996.668 -123856.412 [46,] -55643.334 131996.668 [47,] -84074.112 -55643.334 [48,] 22044.342 -84074.112 [49,] -47171.112 22044.342 [50,] -19947.728 -47171.112 [51,] -16838.135 -19947.728 [52,] -122385.894 -16838.135 [53,] -26292.676 -122385.894 [54,] -17841.317 -26292.676 [55,] 61944.491 -17841.317 [56,] 8214.379 61944.491 [57,] -18841.997 8214.379 [58,] 41512.181 -18841.997 [59,] 17089.881 41512.181 [60,] 19047.197 17089.881 [61,] 12220.964 19047.197 [62,] 24070.678 12220.964 [63,] 18683.299 24070.678 [64,] 16211.040 18683.299 [65,] 71848.451 16211.040 [66,] -109380.121 71848.451 [67,] -82949.135 -109380.121 [68,] -14642.385 -82949.135 [69,] -47898.138 -14642.385 [70,] 6068.566 -47898.138 [71,] -37382.982 6068.566 [72,] -2185.114 -37382.982 [73,] -1761.527 -2185.114 [74,] -3695.922 -1761.527 [75,] 91259.964 -3695.922 [76,] 111606.517 91259.964 [77,] -166963.660 111606.517 [78,] 2276.951 -166963.660 [79,] -6964.146 2276.951 [80,] 10813.564 -6964.146 [81,] 132299.797 10813.564 [82,] -16429.204 132299.797 [83,] -1019.892 -16429.204 [84,] -5575.603 -1019.892 [85,] 39067.943 -5575.603 [86,] -64047.844 39067.943 [87,] 40559.092 -64047.844 [88,] 26421.567 40559.092 [89,] -133406.337 26421.567 [90,] 56437.322 -133406.337 [91,] 15978.513 56437.322 [92,] -2156.262 15978.513 [93,] 72570.973 -2156.262 [94,] 41481.295 72570.973 [95,] -31639.755 41481.295 [96,] 19203.091 -31639.755 [97,] -13501.063 19203.091 [98,] -14292.967 -13501.063 [99,] 95393.736 -14292.967 [100,] -59860.908 95393.736 [101,] 30602.223 -59860.908 [102,] -92067.829 30602.223 [103,] -55725.465 -92067.829 [104,] 45123.216 -55725.465 [105,] -70116.414 45123.216 [106,] 53398.600 -70116.414 [107,] 48544.024 53398.600 [108,] -132870.965 48544.024 [109,] -153989.326 -132870.965 [110,] 65125.765 -153989.326 [111,] 25866.513 65125.765 [112,] 3225.610 25866.513 [113,] -40360.334 3225.610 [114,] -11996.581 -40360.334 [115,] -13360.711 -11996.581 [116,] 145863.734 -13360.711 [117,] 1065.823 145863.734 [118,] 53607.678 1065.823 [119,] -23811.354 53607.678 [120,] 68454.119 -23811.354 [121,] -39971.544 68454.119 [122,] -110797.868 -39971.544 [123,] -57340.407 -110797.868 [124,] -24006.402 -57340.407 [125,] 40263.776 -24006.402 [126,] 61323.288 40263.776 [127,] -64074.746 61323.288 [128,] 141878.368 -64074.746 [129,] 38509.228 141878.368 [130,] -14546.919 38509.228 [131,] -7884.309 -14546.919 [132,] -92031.782 -7884.309 [133,] -190453.031 -92031.782 [134,] 60189.071 -190453.031 [135,] -117088.490 60189.071 [136,] 54387.364 -117088.490 [137,] -54233.526 54387.364 [138,] 56438.056 -54233.526 [139,] 23534.565 56438.056 [140,] -59811.870 23534.565 [141,] 71257.189 -59811.870 [142,] -26239.061 71257.189 [143,] 32251.472 -26239.061 [144,] 20280.829 32251.472 [145,] -128546.498 20280.829 [146,] -30502.415 -128546.498 [147,] -21096.429 -30502.415 [148,] -6085.660 -21096.429 [149,] -3735.725 -6085.660 [150,] -6821.981 -3735.725 [151,] -7298.303 -6821.981 [152,] -6086.660 -7298.303 [153,] -6086.660 -6086.660 [154,] 19107.414 -6086.660 [155,] 79127.418 19107.414 [156,] -6086.660 79127.418 [157,] -9216.946 -6086.660 [158,] -4147.133 -9216.946 [159,] 6068.814 -4147.133 [160,] 1937.776 6068.814 [161,] -89774.663 1937.776 [162,] -6784.303 -89774.663 [163,] 14429.200 -6784.303 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -34815.969 3185.164 2 -37486.644 -34815.969 3 -62156.560 -37486.644 4 17079.484 -62156.560 5 -105321.210 17079.484 6 218502.057 -105321.210 7 -53324.899 218502.057 8 -30769.364 -53324.899 9 66985.333 -30769.364 10 68600.206 66985.333 11 -72128.679 68600.206 12 -17764.547 -72128.679 13 71954.341 -17764.547 14 23042.353 71954.341 15 -15924.134 23042.353 16 44657.803 -15924.134 17 73293.844 44657.803 18 -43917.542 73293.844 19 -45649.821 -43917.542 20 3209.934 -45649.821 21 228611.973 3209.934 22 38095.475 228611.973 23 -89987.427 38095.475 24 -38038.417 -89987.427 25 -34294.532 -38038.417 26 -12199.339 -34294.532 27 52595.126 -12199.339 28 6211.546 52595.126 29 123019.511 6211.546 30 11322.309 123019.511 31 -16815.224 11322.309 32 67222.142 -16815.224 33 -90455.859 67222.142 34 137970.192 -90455.859 35 59416.000 137970.192 36 126937.518 59416.000 37 12940.864 126937.518 38 14726.482 12940.864 39 22226.601 14726.482 40 92702.168 22226.601 41 -31410.568 92702.168 42 -31232.454 -31410.568 43 -55304.181 -31232.454 44 -123856.412 -55304.181 45 131996.668 -123856.412 46 -55643.334 131996.668 47 -84074.112 -55643.334 48 22044.342 -84074.112 49 -47171.112 22044.342 50 -19947.728 -47171.112 51 -16838.135 -19947.728 52 -122385.894 -16838.135 53 -26292.676 -122385.894 54 -17841.317 -26292.676 55 61944.491 -17841.317 56 8214.379 61944.491 57 -18841.997 8214.379 58 41512.181 -18841.997 59 17089.881 41512.181 60 19047.197 17089.881 61 12220.964 19047.197 62 24070.678 12220.964 63 18683.299 24070.678 64 16211.040 18683.299 65 71848.451 16211.040 66 -109380.121 71848.451 67 -82949.135 -109380.121 68 -14642.385 -82949.135 69 -47898.138 -14642.385 70 6068.566 -47898.138 71 -37382.982 6068.566 72 -2185.114 -37382.982 73 -1761.527 -2185.114 74 -3695.922 -1761.527 75 91259.964 -3695.922 76 111606.517 91259.964 77 -166963.660 111606.517 78 2276.951 -166963.660 79 -6964.146 2276.951 80 10813.564 -6964.146 81 132299.797 10813.564 82 -16429.204 132299.797 83 -1019.892 -16429.204 84 -5575.603 -1019.892 85 39067.943 -5575.603 86 -64047.844 39067.943 87 40559.092 -64047.844 88 26421.567 40559.092 89 -133406.337 26421.567 90 56437.322 -133406.337 91 15978.513 56437.322 92 -2156.262 15978.513 93 72570.973 -2156.262 94 41481.295 72570.973 95 -31639.755 41481.295 96 19203.091 -31639.755 97 -13501.063 19203.091 98 -14292.967 -13501.063 99 95393.736 -14292.967 100 -59860.908 95393.736 101 30602.223 -59860.908 102 -92067.829 30602.223 103 -55725.465 -92067.829 104 45123.216 -55725.465 105 -70116.414 45123.216 106 53398.600 -70116.414 107 48544.024 53398.600 108 -132870.965 48544.024 109 -153989.326 -132870.965 110 65125.765 -153989.326 111 25866.513 65125.765 112 3225.610 25866.513 113 -40360.334 3225.610 114 -11996.581 -40360.334 115 -13360.711 -11996.581 116 145863.734 -13360.711 117 1065.823 145863.734 118 53607.678 1065.823 119 -23811.354 53607.678 120 68454.119 -23811.354 121 -39971.544 68454.119 122 -110797.868 -39971.544 123 -57340.407 -110797.868 124 -24006.402 -57340.407 125 40263.776 -24006.402 126 61323.288 40263.776 127 -64074.746 61323.288 128 141878.368 -64074.746 129 38509.228 141878.368 130 -14546.919 38509.228 131 -7884.309 -14546.919 132 -92031.782 -7884.309 133 -190453.031 -92031.782 134 60189.071 -190453.031 135 -117088.490 60189.071 136 54387.364 -117088.490 137 -54233.526 54387.364 138 56438.056 -54233.526 139 23534.565 56438.056 140 -59811.870 23534.565 141 71257.189 -59811.870 142 -26239.061 71257.189 143 32251.472 -26239.061 144 20280.829 32251.472 145 -128546.498 20280.829 146 -30502.415 -128546.498 147 -21096.429 -30502.415 148 -6085.660 -21096.429 149 -3735.725 -6085.660 150 -6821.981 -3735.725 151 -7298.303 -6821.981 152 -6086.660 -7298.303 153 -6086.660 -6086.660 154 19107.414 -6086.660 155 79127.418 19107.414 156 -6086.660 79127.418 157 -9216.946 -6086.660 158 -4147.133 -9216.946 159 6068.814 -4147.133 160 1937.776 6068.814 161 -89774.663 1937.776 162 -6784.303 -89774.663 163 14429.200 -6784.303 > 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/7ncoy1324578994.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/874pi1324578994.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/90k901324578994.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/105wm81324578994.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/11092t1324578994.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/12tq0p1324578994.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/13gn4c1324578994.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/14wnrj1324578994.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/150fi71324578994.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/16k7ql1324578994.tab") + } > > try(system("convert tmp/1avvr1324578994.ps tmp/1avvr1324578994.png",intern=TRUE)) character(0) > try(system("convert tmp/2zknm1324578994.ps tmp/2zknm1324578994.png",intern=TRUE)) character(0) > try(system("convert tmp/333nt1324578994.ps tmp/333nt1324578994.png",intern=TRUE)) character(0) > try(system("convert tmp/4sjn71324578994.ps tmp/4sjn71324578994.png",intern=TRUE)) character(0) > try(system("convert tmp/5vqmf1324578994.ps tmp/5vqmf1324578994.png",intern=TRUE)) character(0) > try(system("convert tmp/6v8je1324578994.ps tmp/6v8je1324578994.png",intern=TRUE)) character(0) > try(system("convert tmp/7ncoy1324578994.ps tmp/7ncoy1324578994.png",intern=TRUE)) character(0) > try(system("convert tmp/874pi1324578994.ps tmp/874pi1324578994.png",intern=TRUE)) character(0) > try(system("convert tmp/90k901324578994.ps tmp/90k901324578994.png",intern=TRUE)) character(0) > try(system("convert tmp/105wm81324578994.ps tmp/105wm81324578994.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 4.734 0.546 5.288