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(1 + ,893 + ,63047 + ,52 + ,257 + ,2 + ,546 + ,66751 + ,25 + ,160 + ,3 + ,186 + ,7176 + ,17 + ,70 + ,4 + ,1405 + ,78306 + ,66 + ,360 + ,5 + ,2047 + ,137944 + ,85 + ,721 + ,6 + ,3626 + ,261308 + ,130 + ,938 + ,7 + ,845 + ,69266 + ,36 + ,287 + ,8 + ,663 + ,83529 + ,33 + ,154 + ,9 + ,1181 + ,73226 + ,33 + ,311 + ,10 + ,1836 + ,178519 + ,65 + ,617 + ,11 + ,855 + ,66476 + ,35 + ,262 + ,12 + ,1245 + ,98606 + ,46 + ,385 + ,13 + ,993 + ,50001 + ,69 + ,369 + ,14 + ,1685 + ,91093 + ,61 + ,558 + ,15 + ,742 + ,73884 + ,25 + ,220 + ,16 + ,868 + ,72961 + ,41 + ,315 + ,17 + ,949 + ,69388 + ,34 + ,229 + ,18 + ,332 + ,15629 + ,21 + ,88 + ,19 + ,1602 + ,71693 + ,54 + ,494 + ,20 + ,525 + ,19920 + ,17 + ,155 + ,21 + ,629 + ,39403 + ,38 + ,234 + ,22 + ,1279 + ,99933 + ,51 + ,361 + ,23 + ,767 + ,56088 + ,28 + ,280 + ,24 + ,1156 + ,62006 + ,32 + ,331 + ,25 + ,1120 + ,81665 + ,51 + ,378 + ,26 + ,624 + ,65638 + ,14 + ,227 + ,27 + ,1203 + ,88794 + ,98 + ,396 + ,28 + ,745 + ,90642 + ,53 + ,179 + ,29 + ,1568 + ,207062 + ,62 + ,524 + ,30 + ,1235 + ,99340 + ,26 + ,504 + ,31 + ,758 + ,56695 + ,29 + ,225 + ,32 + ,1088 + ,108143 + ,24 + ,366 + ,33 + ,1105 + ,58313 + ,60 + ,341 + ,34 + ,592 + ,29101 + ,40 + ,171 + ,35 + ,1305 + ,113060 + ,29 + ,437 + ,36 + ,0 + ,0 + ,0 + ,0 + ,37 + ,706 + ,65773 + ,34 + ,313 + ,38 + ,1188 + ,67047 + ,34 + ,366 + ,39 + ,1111 + ,41953 + ,22 + ,232 + ,40 + ,1095 + ,109835 + ,36 + ,389 + ,41 + ,1087 + ,86584 + ,35 + ,349 + ,42 + ,748 + ,59588 + ,26 + ,316 + ,43 + ,404 + ,40064 + ,12 + ,140 + ,44 + ,1077 + ,70227 + ,46 + ,419 + ,45 + ,673 + ,60437 + ,29 + ,226 + ,46 + ,537 + ,53696 + ,38 + ,167 + ,47 + ,354 + ,40295 + ,13 + ,103 + ,48 + ,1012 + ,103397 + ,55 + ,356 + ,49 + ,891 + ,78982 + ,40 + ,293 + ,50 + ,1198 + ,67317 + ,29 + ,460 + ,51 + ,518 + ,39887 + ,21 + ,156 + ,52 + ,697 + ,49791 + ,36 + ,189 + ,53 + ,1095 + ,129283 + ,44 + ,442 + ,54 + ,928 + ,104816 + ,44 + ,321 + ,55 + ,1009 + ,101395 + ,34 + ,367 + ,56 + ,951 + ,72824 + ,30 + ,309 + ,57 + ,779 + ,76018 + ,27 + ,235 + ,58 + ,439 + ,33891 + ,12 + ,137 + ,59 + ,580 + ,63694 + ,39 + ,198 + ,60 + ,614 + ,28266 + ,24 + ,220 + ,61 + ,500 + ,35093 + ,22 + ,149 + ,62 + ,824 + ,35252 + ,35 + ,306 + ,63 + ,541 + ,36977 + ,20 + ,178 + ,64 + ,476 + ,42406 + ,19 + ,145 + ,65 + ,434 + ,56353 + ,13 + ,144 + ,66 + ,818 + ,58817 + ,23 + ,270 + ,67 + ,1173 + ,76053 + ,43 + ,301 + ,68 + ,1720 + ,70872 + ,49 + ,501 + ,69 + ,549 + ,42372 + ,20 + ,153 + ,70 + ,157 + ,19144 + ,12 + ,40 + ,71 + ,1594 + ,114177 + ,73 + ,500 + ,72 + ,668 + ,59414 + ,28 + ,209 + ,73 + ,656 + ,51379 + ,33 + ,242 + ,74 + ,920 + ,40756 + ,39 + ,265 + ,75 + ,847 + ,46956 + ,22 + ,298 + ,76 + ,497 + ,17799 + ,20 + ,141 + ,77 + ,864 + ,71154 + ,30 + ,234 + ,78 + ,994 + ,58305 + ,38 + ,336 + ,79 + ,443 + ,27454 + ,16 + ,124 + ,80 + ,615 + ,34323 + ,34 + ,241 + ,81 + ,525 + ,44761 + ,33 + ,127 + ,82 + ,899 + ,113862 + ,27 + ,327 + ,83 + ,556 + ,35027 + ,16 + ,175 + ,84 + ,896 + ,62396 + ,22 + ,331 + ,85 + ,516 + ,29613 + ,26 + ,176 + ,86 + ,894 + ,65559 + ,28 + ,281 + ,87 + ,1353 + ,114480 + ,114 + ,293 + ,88 + ,557 + ,31095 + ,30 + ,152 + ,89 + ,472 + ,40181 + ,25 + ,155 + ,90 + ,639 + ,53398 + ,22 + ,194 + ,91 + ,795 + ,56435 + ,23 + ,300 + ,92 + ,1244 + ,77283 + ,46 + ,370 + ,93 + ,559 + ,71738 + ,30 + ,187 + ,94 + ,584 + ,48503 + ,31 + ,212 + ,95 + ,440 + ,25214 + ,23 + ,185 + ,96 + ,1319 + ,119424 + ,65 + ,449 + ,97 + ,765 + ,79201 + ,27 + ,234 + ,98 + ,222 + ,19349 + ,11 + ,67 + ,99 + ,965 + ,78760 + ,54 + ,316 + ,100 + ,822 + ,54133 + ,36 + ,336 + ,101 + ,317 + ,21623 + ,16 + ,116 + ,102 + ,425 + ,25497 + ,11 + ,141 + ,103 + ,711 + ,69535 + ,38 + ,236 + ,104 + ,364 + ,30709 + ,22 + ,98 + ,105 + ,427 + ,37043 + ,23 + ,97 + ,106 + ,463 + ,24716 + ,13 + ,152 + ,107 + ,546 + ,54865 + ,17 + ,132 + ,108 + ,369 + ,27246 + ,19 + ,97 + ,109 + ,0 + ,0 + ,0 + ,0 + ,110 + ,596 + ,38814 + ,13 + ,165 + ,111 + ,479 + ,27646 + ,32 + ,153 + ,112 + ,713 + ,65373 + ,18 + ,226 + ,113 + ,639 + ,43021 + ,34 + ,182 + ,114 + ,477 + ,43116 + ,40 + ,172 + ,115 + ,38 + ,3058 + ,4 + ,1 + ,116 + ,0 + ,0 + ,0 + ,0 + ,117 + ,593 + ,96347 + ,25 + ,196 + ,118 + ,724 + ,53063 + ,35 + ,274 + ,119 + ,1056 + ,73073 + ,50 + ,304 + ,120 + ,495 + ,45266 + ,22 + ,183 + ,121 + ,778 + ,43410 + ,19 + ,292 + ,122 + ,875 + ,83842 + ,34 + ,257 + ,123 + ,490 + ,39296 + ,21 + ,141 + ,124 + ,713 + ,38490 + ,25 + ,192 + ,125 + ,485 + ,39841 + ,19 + ,129 + ,126 + ,285 + ,19764 + ,12 + ,75 + ,127 + ,935 + ,59975 + ,21 + ,301 + ,128 + ,554 + ,64589 + ,16 + ,204 + ,129 + ,753 + ,63339 + ,14 + ,257 + ,130 + ,256 + ,11796 + ,9 + ,79 + ,131 + ,80 + ,7627 + ,8 + ,25 + ,132 + ,618 + ,68998 + ,30 + ,217 + ,133 + ,41 + ,6836 + ,3 + ,11 + ,134 + ,550 + ,35414 + ,17 + ,228 + ,135 + ,42 + ,5118 + ,3 + ,6 + ,136 + ,347 + ,20898 + ,13 + ,115 + ,137 + ,0 + ,0 + ,0 + ,0 + ,138 + ,441 + ,42690 + ,18 + ,167 + ,139 + ,281 + ,14507 + ,11 + ,75 + ,140 + ,81 + ,7131 + ,4 + ,27 + ,141 + ,61 + ,4194 + ,11 + ,14 + ,142 + ,314 + ,21416 + ,10 + ,96 + ,143 + ,401 + ,37679 + ,16 + ,109 + ,144 + ,554 + ,42419 + ,10 + ,228) + ,dim=c(5 + ,144) + ,dimnames=list(c('HOF' + ,'total_pageviews' + ,'number_logins' + ,'total_time' + ,'total_coursecompendiumviews') + ,1:144)) > y <- array(NA,dim=c(5,144),dimnames=list(c('HOF','total_pageviews','number_logins','total_time','total_coursecompendiumviews'),1:144)) > for (i in 1:dim(x)[1]) + { + for (j in 1:dim(x)[2]) + { + y[i,j] <- as.numeric(x[i,j]) + } + } > par3 = 'No Linear Trend' > par2 = 'Do not include Seasonal Dummies' > par1 = '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 HOF total_pageviews number_logins total_time total_coursecompendiumviews 1 1 893 63047 52 257 2 2 546 66751 25 160 3 3 186 7176 17 70 4 4 1405 78306 66 360 5 5 2047 137944 85 721 6 6 3626 261308 130 938 7 7 845 69266 36 287 8 8 663 83529 33 154 9 9 1181 73226 33 311 10 10 1836 178519 65 617 11 11 855 66476 35 262 12 12 1245 98606 46 385 13 13 993 50001 69 369 14 14 1685 91093 61 558 15 15 742 73884 25 220 16 16 868 72961 41 315 17 17 949 69388 34 229 18 18 332 15629 21 88 19 19 1602 71693 54 494 20 20 525 19920 17 155 21 21 629 39403 38 234 22 22 1279 99933 51 361 23 23 767 56088 28 280 24 24 1156 62006 32 331 25 25 1120 81665 51 378 26 26 624 65638 14 227 27 27 1203 88794 98 396 28 28 745 90642 53 179 29 29 1568 207062 62 524 30 30 1235 99340 26 504 31 31 758 56695 29 225 32 32 1088 108143 24 366 33 33 1105 58313 60 341 34 34 592 29101 40 171 35 35 1305 113060 29 437 36 36 0 0 0 0 37 37 706 65773 34 313 38 38 1188 67047 34 366 39 39 1111 41953 22 232 40 40 1095 109835 36 389 41 41 1087 86584 35 349 42 42 748 59588 26 316 43 43 404 40064 12 140 44 44 1077 70227 46 419 45 45 673 60437 29 226 46 46 537 53696 38 167 47 47 354 40295 13 103 48 48 1012 103397 55 356 49 49 891 78982 40 293 50 50 1198 67317 29 460 51 51 518 39887 21 156 52 52 697 49791 36 189 53 53 1095 129283 44 442 54 54 928 104816 44 321 55 55 1009 101395 34 367 56 56 951 72824 30 309 57 57 779 76018 27 235 58 58 439 33891 12 137 59 59 580 63694 39 198 60 60 614 28266 24 220 61 61 500 35093 22 149 62 62 824 35252 35 306 63 63 541 36977 20 178 64 64 476 42406 19 145 65 65 434 56353 13 144 66 66 818 58817 23 270 67 67 1173 76053 43 301 68 68 1720 70872 49 501 69 69 549 42372 20 153 70 70 157 19144 12 40 71 71 1594 114177 73 500 72 72 668 59414 28 209 73 73 656 51379 33 242 74 74 920 40756 39 265 75 75 847 46956 22 298 76 76 497 17799 20 141 77 77 864 71154 30 234 78 78 994 58305 38 336 79 79 443 27454 16 124 80 80 615 34323 34 241 81 81 525 44761 33 127 82 82 899 113862 27 327 83 83 556 35027 16 175 84 84 896 62396 22 331 85 85 516 29613 26 176 86 86 894 65559 28 281 87 87 1353 114480 114 293 88 88 557 31095 30 152 89 89 472 40181 25 155 90 90 639 53398 22 194 91 91 795 56435 23 300 92 92 1244 77283 46 370 93 93 559 71738 30 187 94 94 584 48503 31 212 95 95 440 25214 23 185 96 96 1319 119424 65 449 97 97 765 79201 27 234 98 98 222 19349 11 67 99 99 965 78760 54 316 100 100 822 54133 36 336 101 101 317 21623 16 116 102 102 425 25497 11 141 103 103 711 69535 38 236 104 104 364 30709 22 98 105 105 427 37043 23 97 106 106 463 24716 13 152 107 107 546 54865 17 132 108 108 369 27246 19 97 109 109 0 0 0 0 110 110 596 38814 13 165 111 111 479 27646 32 153 112 112 713 65373 18 226 113 113 639 43021 34 182 114 114 477 43116 40 172 115 115 38 3058 4 1 116 116 0 0 0 0 117 117 593 96347 25 196 118 118 724 53063 35 274 119 119 1056 73073 50 304 120 120 495 45266 22 183 121 121 778 43410 19 292 122 122 875 83842 34 257 123 123 490 39296 21 141 124 124 713 38490 25 192 125 125 485 39841 19 129 126 126 285 19764 12 75 127 127 935 59975 21 301 128 128 554 64589 16 204 129 129 753 63339 14 257 130 130 256 11796 9 79 131 131 80 7627 8 25 132 132 618 68998 30 217 133 133 41 6836 3 11 134 134 550 35414 17 228 135 135 42 5118 3 6 136 136 347 20898 13 115 137 137 0 0 0 0 138 138 441 42690 18 167 139 139 281 14507 11 75 140 140 81 7131 4 27 141 141 61 4194 11 14 142 142 314 21416 10 96 143 143 401 37679 16 109 144 144 554 42419 10 228 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) total_pageviews 1.089e+02 -1.615e-02 number_logins total_time -6.393e-06 -3.711e-01 total_coursecompendiumviews -5.287e-02 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -92.838 -24.660 0.085 30.048 62.255 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 1.089e+02 5.916e+00 18.406 <2e-16 *** total_pageviews -1.615e-02 2.739e-02 -0.590 0.556 number_logins -6.393e-06 1.662e-04 -0.038 0.969 total_time -3.711e-01 2.756e-01 -1.347 0.180 total_coursecompendiumviews -5.287e-02 7.708e-02 -0.686 0.494 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 36.06 on 139 degrees of freedom Multiple R-squared: 0.2735, Adjusted R-squared: 0.2526 F-statistic: 13.09 on 4 and 139 DF, p-value: 4.522e-09 > 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,] 1.115248e-03 2.230495e-03 9.988848e-01 [2,] 9.691250e-05 1.938250e-04 9.999031e-01 [3,] 7.906632e-06 1.581326e-05 9.999921e-01 [4,] 2.756191e-06 5.512382e-06 9.999972e-01 [5,] 5.943556e-07 1.188711e-06 9.999994e-01 [6,] 1.318574e-06 2.637147e-06 9.999987e-01 [7,] 2.432238e-07 4.864476e-07 9.999998e-01 [8,] 1.148516e-07 2.297033e-07 9.999999e-01 [9,] 4.904750e-08 9.809500e-08 1.000000e+00 [10,] 3.259817e-08 6.519635e-08 1.000000e+00 [11,] 2.237542e-08 4.475084e-08 1.000000e+00 [12,] 5.170469e-09 1.034094e-08 1.000000e+00 [13,] 1.848033e-09 3.696066e-09 1.000000e+00 [14,] 1.984699e-09 3.969397e-09 1.000000e+00 [15,] 2.576104e-09 5.152208e-09 1.000000e+00 [16,] 1.390060e-09 2.780120e-09 1.000000e+00 [17,] 4.918907e-10 9.837814e-10 1.000000e+00 [18,] 6.965573e-10 1.393115e-09 1.000000e+00 [19,] 3.976000e-10 7.952001e-10 1.000000e+00 [20,] 3.559649e-09 7.119298e-09 1.000000e+00 [21,] 6.422126e-09 1.284425e-08 1.000000e+00 [22,] 4.114702e-09 8.229403e-09 1.000000e+00 [23,] 2.288513e-09 4.577026e-09 1.000000e+00 [24,] 3.540958e-09 7.081916e-09 1.000000e+00 [25,] 2.627764e-09 5.255528e-09 1.000000e+00 [26,] 5.486612e-09 1.097322e-08 1.000000e+00 [27,] 1.182487e-08 2.364975e-08 1.000000e+00 [28,] 1.083578e-08 2.167156e-08 1.000000e+00 [29,] 2.687607e-08 5.375213e-08 1.000000e+00 [30,] 2.620910e-08 5.241819e-08 1.000000e+00 [31,] 4.100642e-08 8.201283e-08 1.000000e+00 [32,] 9.707391e-08 1.941478e-07 9.999999e-01 [33,] 1.076076e-07 2.152153e-07 9.999999e-01 [34,] 1.463520e-07 2.927040e-07 9.999999e-01 [35,] 1.605625e-07 3.211250e-07 9.999998e-01 [36,] 3.024700e-07 6.049400e-07 9.999997e-01 [37,] 3.797023e-07 7.594045e-07 9.999996e-01 [38,] 7.474638e-07 1.494928e-06 9.999993e-01 [39,] 2.172822e-06 4.345645e-06 9.999978e-01 [40,] 5.249477e-06 1.049895e-05 9.999948e-01 [41,] 9.562545e-06 1.912509e-05 9.999904e-01 [42,] 1.768833e-05 3.537666e-05 9.999823e-01 [43,] 1.943979e-05 3.887957e-05 9.999806e-01 [44,] 4.626706e-05 9.253411e-05 9.999537e-01 [45,] 1.240242e-04 2.480485e-04 9.998760e-01 [46,] 1.392307e-04 2.784613e-04 9.998608e-01 [47,] 2.289851e-04 4.579702e-04 9.997710e-01 [48,] 3.198672e-04 6.397344e-04 9.996801e-01 [49,] 5.581019e-04 1.116204e-03 9.994419e-01 [50,] 1.088755e-03 2.177510e-03 9.989112e-01 [51,] 2.312997e-03 4.625994e-03 9.976870e-01 [52,] 4.897944e-03 9.795889e-03 9.951021e-01 [53,] 8.715429e-03 1.743086e-02 9.912846e-01 [54,] 1.696932e-02 3.393864e-02 9.830307e-01 [55,] 2.638525e-02 5.277050e-02 9.736148e-01 [56,] 4.464956e-02 8.929912e-02 9.553504e-01 [57,] 7.650695e-02 1.530139e-01 9.234931e-01 [58,] 1.312934e-01 2.625867e-01 8.687066e-01 [59,] 1.808661e-01 3.617321e-01 8.191339e-01 [60,] 2.562052e-01 5.124105e-01 7.437948e-01 [61,] 3.204101e-01 6.408203e-01 6.795899e-01 [62,] 4.184928e-01 8.369856e-01 5.815072e-01 [63,] 5.811261e-01 8.377478e-01 4.188739e-01 [64,] 6.750604e-01 6.498792e-01 3.249396e-01 [65,] 7.602592e-01 4.794816e-01 2.397408e-01 [66,] 8.224551e-01 3.550898e-01 1.775449e-01 [67,] 8.530980e-01 2.938041e-01 1.469020e-01 [68,] 8.791492e-01 2.417017e-01 1.208508e-01 [69,] 9.171863e-01 1.656273e-01 8.281366e-02 [70,] 9.449746e-01 1.100509e-01 5.502545e-02 [71,] 9.570191e-01 8.596186e-02 4.298093e-02 [72,] 9.769612e-01 4.607760e-02 2.303880e-02 [73,] 9.843896e-01 3.122071e-02 1.561036e-02 [74,] 9.919600e-01 1.608004e-02 8.040019e-03 [75,] 9.956222e-01 8.755508e-03 4.377754e-03 [76,] 9.978360e-01 4.327931e-03 2.163966e-03 [77,] 9.986808e-01 2.638445e-03 1.319223e-03 [78,] 9.993164e-01 1.367283e-03 6.836414e-04 [79,] 9.996388e-01 7.224846e-04 3.612423e-04 [80,] 9.999020e-01 1.960045e-04 9.800227e-05 [81,] 9.999363e-01 1.273080e-04 6.365402e-05 [82,] 9.999675e-01 6.501532e-05 3.250766e-05 [83,] 9.999862e-01 2.769421e-05 1.384711e-05 [84,] 9.999949e-01 1.017021e-05 5.085104e-06 [85,] 9.999964e-01 7.250847e-06 3.625424e-06 [86,] 9.999978e-01 4.394999e-06 2.197499e-06 [87,] 9.999986e-01 2.794364e-06 1.397182e-06 [88,] 9.999994e-01 1.227038e-06 6.135191e-07 [89,] 9.999994e-01 1.146536e-06 5.732681e-07 [90,] 9.999997e-01 6.247586e-07 3.123793e-07 [91,] 9.999999e-01 2.244207e-07 1.122104e-07 [92,] 9.999999e-01 2.627623e-07 1.313811e-07 [93,] 9.999999e-01 1.340909e-07 6.704547e-08 [94,] 1.000000e+00 5.029554e-08 2.514777e-08 [95,] 1.000000e+00 1.440896e-08 7.204481e-09 [96,] 1.000000e+00 1.256920e-08 6.284602e-09 [97,] 1.000000e+00 1.032876e-08 5.164378e-09 [98,] 1.000000e+00 1.158800e-08 5.794000e-09 [99,] 1.000000e+00 4.646207e-09 2.323104e-09 [100,] 1.000000e+00 4.622670e-09 2.311335e-09 [101,] 1.000000e+00 3.864771e-09 1.932385e-09 [102,] 1.000000e+00 7.133501e-10 3.566751e-10 [103,] 1.000000e+00 3.157061e-10 1.578531e-10 [104,] 1.000000e+00 4.168097e-10 2.084049e-10 [105,] 1.000000e+00 2.262563e-10 1.131281e-10 [106,] 1.000000e+00 3.915257e-10 1.957629e-10 [107,] 1.000000e+00 8.346030e-10 4.173015e-10 [108,] 1.000000e+00 2.396230e-10 1.198115e-10 [109,] 1.000000e+00 1.184812e-11 5.924062e-12 [110,] 1.000000e+00 1.474690e-11 7.373448e-12 [111,] 1.000000e+00 3.280093e-11 1.640047e-11 [112,] 1.000000e+00 9.651015e-11 4.825508e-11 [113,] 1.000000e+00 8.393153e-11 4.196576e-11 [114,] 1.000000e+00 6.618949e-11 3.309474e-11 [115,] 1.000000e+00 2.973584e-10 1.486792e-10 [116,] 1.000000e+00 7.512578e-10 3.756289e-10 [117,] 1.000000e+00 3.199315e-09 1.599657e-09 [118,] 1.000000e+00 1.027228e-08 5.136142e-09 [119,] 1.000000e+00 1.698373e-08 8.491866e-09 [120,] 1.000000e+00 4.314433e-08 2.157217e-08 [121,] 9.999999e-01 1.691094e-07 8.455472e-08 [122,] 9.999999e-01 1.276880e-07 6.384399e-08 [123,] 9.999999e-01 1.555384e-07 7.776920e-08 [124,] 9.999996e-01 7.514181e-07 3.757091e-07 [125,] 9.999986e-01 2.886231e-06 1.443115e-06 [126,] 9.999947e-01 1.053826e-05 5.269131e-06 [127,] 9.999710e-01 5.798816e-05 2.899408e-05 [128,] 9.998319e-01 3.361430e-04 1.680715e-04 [129,] 9.991224e-01 1.755143e-03 8.775713e-04 > postscript(file="/var/wessaorg/rcomp/tmp/1yv901322149810.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/29gio1322149810.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/3jfny1322149810.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/49pug1322149810.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/5kk3q1322149810.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > qqnorm(mysum$resid, main='Residual Normal Q-Q Plot') > qqline(mysum$resid) > grid() > dev.off() null device 1 > (myerror <- as.ts(mysum$resid)) Time Series: Start = 1 End = 144 Frequency = 1 1 2 3 4 5 6 -60.18494651 -79.91442160 -92.83760286 -38.17588980 -0.28718353 55.17982881 7 8 9 10 11 12 -59.27192192 -69.26568440 -51.66342666 -11.35650994 -56.82107142 -38.73075255 13 14 15 16 17 18 -34.42297396 -14.95832443 -60.53052425 -46.54094268 -51.39983645 -72.98912106 19 20 21 22 23 24 -17.40442886 -65.78613044 -51.01192960 -27.58647503 -47.95497076 -36.45268275 25 26 27 28 29 30 -26.37287505 -55.20127464 -4.59356649 -39.15202702 -2.53336906 -22.01788169 31 32 33 34 35 36 -42.63324100 -30.37443792 -17.38083909 -41.26410982 -18.22845183 -72.89750824 37 38 39 40 41 42 -30.90714576 -19.31090183 -31.25286337 -16.58142618 -18.34520185 -28.07836744 43 44 45 46 47 48 -47.26043164 -7.82838147 -29.92949348 -30.94897669 -45.65173461 -4.65729119 49 50 51 52 53 54 -14.66515621 -4.03330148 -33.23431405 -21.96842456 2.31376598 -5.93758230 55 56 57 58 59 60 -4.92991264 -9.60031407 -16.38396507 -31.89313539 -15.18038957 -18.26090484 61 62 63 64 65 66 -23.55472487 -4.19515986 -20.08933551 -22.22041244 -24.08911616 -6.49785897 67 68 69 70 71 72 9.40763788 32.01106406 -15.24737189 -29.67110742 42.10592137 -4.28668680 73 74 75 76 77 78 0.06827996 8.70745197 4.00403660 -9.87889443 6.01839062 17.39769597 79 80 81 82 83 84 -10.07261853 6.61516750 -0.17021031 15.66045469 -1.50247901 15.63898447 85 86 87 88 89 90 3.58056049 17.20994109 58.48551209 7.46781121 5.45600363 10.18679522 91 92 93 94 95 96 19.70148883 40.32371956 14.61041257 17.55855205 11.68732804 57.03214133 97 98 99 100 101 102 23.35736540 0.43658305 42.94008647 35.85044079 9.43180269 11.66744048 103 104 105 106 107 108 32.61103479 14.52399333 16.90037876 17.60003625 20.56048657 17.41647470 109 110 111 112 113 114 0.10249176 24.52589266 29.98084413 33.66618919 36.93911619 37.02071015 115 116 117 118 119 120 8.27311294 7.10249176 37.93733144 48.61151374 62.25488440 37.22713250 121 122 123 124 125 126 47.43627869 53.97757856 37.51655695 46.29437956 38.06264706 30.25095931 127 128 129 130 131 132 57.29629393 45.18744461 51.45393290 32.82977224 27.73402297 56.13205706 133 134 135 136 137 138 26.50333673 52.57628760 28.24415571 43.74562555 28.10249176 52.00808394 139 140 141 142 143 144 42.78164447 35.36837745 37.93686313 47.09806199 52.52125210 60.08804082 > postscript(file="/var/wessaorg/rcomp/tmp/65a981322149810.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > dum <- cbind(lag(myerror,k=1),myerror) > dum Time Series: Start = 0 End = 144 Frequency = 1 lag(myerror, k = 1) myerror 0 -60.18494651 NA 1 -79.91442160 -60.18494651 2 -92.83760286 -79.91442160 3 -38.17588980 -92.83760286 4 -0.28718353 -38.17588980 5 55.17982881 -0.28718353 6 -59.27192192 55.17982881 7 -69.26568440 -59.27192192 8 -51.66342666 -69.26568440 9 -11.35650994 -51.66342666 10 -56.82107142 -11.35650994 11 -38.73075255 -56.82107142 12 -34.42297396 -38.73075255 13 -14.95832443 -34.42297396 14 -60.53052425 -14.95832443 15 -46.54094268 -60.53052425 16 -51.39983645 -46.54094268 17 -72.98912106 -51.39983645 18 -17.40442886 -72.98912106 19 -65.78613044 -17.40442886 20 -51.01192960 -65.78613044 21 -27.58647503 -51.01192960 22 -47.95497076 -27.58647503 23 -36.45268275 -47.95497076 24 -26.37287505 -36.45268275 25 -55.20127464 -26.37287505 26 -4.59356649 -55.20127464 27 -39.15202702 -4.59356649 28 -2.53336906 -39.15202702 29 -22.01788169 -2.53336906 30 -42.63324100 -22.01788169 31 -30.37443792 -42.63324100 32 -17.38083909 -30.37443792 33 -41.26410982 -17.38083909 34 -18.22845183 -41.26410982 35 -72.89750824 -18.22845183 36 -30.90714576 -72.89750824 37 -19.31090183 -30.90714576 38 -31.25286337 -19.31090183 39 -16.58142618 -31.25286337 40 -18.34520185 -16.58142618 41 -28.07836744 -18.34520185 42 -47.26043164 -28.07836744 43 -7.82838147 -47.26043164 44 -29.92949348 -7.82838147 45 -30.94897669 -29.92949348 46 -45.65173461 -30.94897669 47 -4.65729119 -45.65173461 48 -14.66515621 -4.65729119 49 -4.03330148 -14.66515621 50 -33.23431405 -4.03330148 51 -21.96842456 -33.23431405 52 2.31376598 -21.96842456 53 -5.93758230 2.31376598 54 -4.92991264 -5.93758230 55 -9.60031407 -4.92991264 56 -16.38396507 -9.60031407 57 -31.89313539 -16.38396507 58 -15.18038957 -31.89313539 59 -18.26090484 -15.18038957 60 -23.55472487 -18.26090484 61 -4.19515986 -23.55472487 62 -20.08933551 -4.19515986 63 -22.22041244 -20.08933551 64 -24.08911616 -22.22041244 65 -6.49785897 -24.08911616 66 9.40763788 -6.49785897 67 32.01106406 9.40763788 68 -15.24737189 32.01106406 69 -29.67110742 -15.24737189 70 42.10592137 -29.67110742 71 -4.28668680 42.10592137 72 0.06827996 -4.28668680 73 8.70745197 0.06827996 74 4.00403660 8.70745197 75 -9.87889443 4.00403660 76 6.01839062 -9.87889443 77 17.39769597 6.01839062 78 -10.07261853 17.39769597 79 6.61516750 -10.07261853 80 -0.17021031 6.61516750 81 15.66045469 -0.17021031 82 -1.50247901 15.66045469 83 15.63898447 -1.50247901 84 3.58056049 15.63898447 85 17.20994109 3.58056049 86 58.48551209 17.20994109 87 7.46781121 58.48551209 88 5.45600363 7.46781121 89 10.18679522 5.45600363 90 19.70148883 10.18679522 91 40.32371956 19.70148883 92 14.61041257 40.32371956 93 17.55855205 14.61041257 94 11.68732804 17.55855205 95 57.03214133 11.68732804 96 23.35736540 57.03214133 97 0.43658305 23.35736540 98 42.94008647 0.43658305 99 35.85044079 42.94008647 100 9.43180269 35.85044079 101 11.66744048 9.43180269 102 32.61103479 11.66744048 103 14.52399333 32.61103479 104 16.90037876 14.52399333 105 17.60003625 16.90037876 106 20.56048657 17.60003625 107 17.41647470 20.56048657 108 0.10249176 17.41647470 109 24.52589266 0.10249176 110 29.98084413 24.52589266 111 33.66618919 29.98084413 112 36.93911619 33.66618919 113 37.02071015 36.93911619 114 8.27311294 37.02071015 115 7.10249176 8.27311294 116 37.93733144 7.10249176 117 48.61151374 37.93733144 118 62.25488440 48.61151374 119 37.22713250 62.25488440 120 47.43627869 37.22713250 121 53.97757856 47.43627869 122 37.51655695 53.97757856 123 46.29437956 37.51655695 124 38.06264706 46.29437956 125 30.25095931 38.06264706 126 57.29629393 30.25095931 127 45.18744461 57.29629393 128 51.45393290 45.18744461 129 32.82977224 51.45393290 130 27.73402297 32.82977224 131 56.13205706 27.73402297 132 26.50333673 56.13205706 133 52.57628760 26.50333673 134 28.24415571 52.57628760 135 43.74562555 28.24415571 136 28.10249176 43.74562555 137 52.00808394 28.10249176 138 42.78164447 52.00808394 139 35.36837745 42.78164447 140 37.93686313 35.36837745 141 47.09806199 37.93686313 142 52.52125210 47.09806199 143 60.08804082 52.52125210 144 NA 60.08804082 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -79.91442160 -60.18494651 [2,] -92.83760286 -79.91442160 [3,] -38.17588980 -92.83760286 [4,] -0.28718353 -38.17588980 [5,] 55.17982881 -0.28718353 [6,] -59.27192192 55.17982881 [7,] -69.26568440 -59.27192192 [8,] -51.66342666 -69.26568440 [9,] -11.35650994 -51.66342666 [10,] -56.82107142 -11.35650994 [11,] -38.73075255 -56.82107142 [12,] -34.42297396 -38.73075255 [13,] -14.95832443 -34.42297396 [14,] -60.53052425 -14.95832443 [15,] -46.54094268 -60.53052425 [16,] -51.39983645 -46.54094268 [17,] -72.98912106 -51.39983645 [18,] -17.40442886 -72.98912106 [19,] -65.78613044 -17.40442886 [20,] -51.01192960 -65.78613044 [21,] -27.58647503 -51.01192960 [22,] -47.95497076 -27.58647503 [23,] -36.45268275 -47.95497076 [24,] -26.37287505 -36.45268275 [25,] -55.20127464 -26.37287505 [26,] -4.59356649 -55.20127464 [27,] -39.15202702 -4.59356649 [28,] -2.53336906 -39.15202702 [29,] -22.01788169 -2.53336906 [30,] -42.63324100 -22.01788169 [31,] -30.37443792 -42.63324100 [32,] -17.38083909 -30.37443792 [33,] -41.26410982 -17.38083909 [34,] -18.22845183 -41.26410982 [35,] -72.89750824 -18.22845183 [36,] -30.90714576 -72.89750824 [37,] -19.31090183 -30.90714576 [38,] -31.25286337 -19.31090183 [39,] -16.58142618 -31.25286337 [40,] -18.34520185 -16.58142618 [41,] -28.07836744 -18.34520185 [42,] -47.26043164 -28.07836744 [43,] -7.82838147 -47.26043164 [44,] -29.92949348 -7.82838147 [45,] -30.94897669 -29.92949348 [46,] -45.65173461 -30.94897669 [47,] -4.65729119 -45.65173461 [48,] -14.66515621 -4.65729119 [49,] -4.03330148 -14.66515621 [50,] -33.23431405 -4.03330148 [51,] -21.96842456 -33.23431405 [52,] 2.31376598 -21.96842456 [53,] -5.93758230 2.31376598 [54,] -4.92991264 -5.93758230 [55,] -9.60031407 -4.92991264 [56,] -16.38396507 -9.60031407 [57,] -31.89313539 -16.38396507 [58,] -15.18038957 -31.89313539 [59,] -18.26090484 -15.18038957 [60,] -23.55472487 -18.26090484 [61,] -4.19515986 -23.55472487 [62,] -20.08933551 -4.19515986 [63,] -22.22041244 -20.08933551 [64,] -24.08911616 -22.22041244 [65,] -6.49785897 -24.08911616 [66,] 9.40763788 -6.49785897 [67,] 32.01106406 9.40763788 [68,] -15.24737189 32.01106406 [69,] -29.67110742 -15.24737189 [70,] 42.10592137 -29.67110742 [71,] -4.28668680 42.10592137 [72,] 0.06827996 -4.28668680 [73,] 8.70745197 0.06827996 [74,] 4.00403660 8.70745197 [75,] -9.87889443 4.00403660 [76,] 6.01839062 -9.87889443 [77,] 17.39769597 6.01839062 [78,] -10.07261853 17.39769597 [79,] 6.61516750 -10.07261853 [80,] -0.17021031 6.61516750 [81,] 15.66045469 -0.17021031 [82,] -1.50247901 15.66045469 [83,] 15.63898447 -1.50247901 [84,] 3.58056049 15.63898447 [85,] 17.20994109 3.58056049 [86,] 58.48551209 17.20994109 [87,] 7.46781121 58.48551209 [88,] 5.45600363 7.46781121 [89,] 10.18679522 5.45600363 [90,] 19.70148883 10.18679522 [91,] 40.32371956 19.70148883 [92,] 14.61041257 40.32371956 [93,] 17.55855205 14.61041257 [94,] 11.68732804 17.55855205 [95,] 57.03214133 11.68732804 [96,] 23.35736540 57.03214133 [97,] 0.43658305 23.35736540 [98,] 42.94008647 0.43658305 [99,] 35.85044079 42.94008647 [100,] 9.43180269 35.85044079 [101,] 11.66744048 9.43180269 [102,] 32.61103479 11.66744048 [103,] 14.52399333 32.61103479 [104,] 16.90037876 14.52399333 [105,] 17.60003625 16.90037876 [106,] 20.56048657 17.60003625 [107,] 17.41647470 20.56048657 [108,] 0.10249176 17.41647470 [109,] 24.52589266 0.10249176 [110,] 29.98084413 24.52589266 [111,] 33.66618919 29.98084413 [112,] 36.93911619 33.66618919 [113,] 37.02071015 36.93911619 [114,] 8.27311294 37.02071015 [115,] 7.10249176 8.27311294 [116,] 37.93733144 7.10249176 [117,] 48.61151374 37.93733144 [118,] 62.25488440 48.61151374 [119,] 37.22713250 62.25488440 [120,] 47.43627869 37.22713250 [121,] 53.97757856 47.43627869 [122,] 37.51655695 53.97757856 [123,] 46.29437956 37.51655695 [124,] 38.06264706 46.29437956 [125,] 30.25095931 38.06264706 [126,] 57.29629393 30.25095931 [127,] 45.18744461 57.29629393 [128,] 51.45393290 45.18744461 [129,] 32.82977224 51.45393290 [130,] 27.73402297 32.82977224 [131,] 56.13205706 27.73402297 [132,] 26.50333673 56.13205706 [133,] 52.57628760 26.50333673 [134,] 28.24415571 52.57628760 [135,] 43.74562555 28.24415571 [136,] 28.10249176 43.74562555 [137,] 52.00808394 28.10249176 [138,] 42.78164447 52.00808394 [139,] 35.36837745 42.78164447 [140,] 37.93686313 35.36837745 [141,] 47.09806199 37.93686313 [142,] 52.52125210 47.09806199 [143,] 60.08804082 52.52125210 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -79.91442160 -60.18494651 2 -92.83760286 -79.91442160 3 -38.17588980 -92.83760286 4 -0.28718353 -38.17588980 5 55.17982881 -0.28718353 6 -59.27192192 55.17982881 7 -69.26568440 -59.27192192 8 -51.66342666 -69.26568440 9 -11.35650994 -51.66342666 10 -56.82107142 -11.35650994 11 -38.73075255 -56.82107142 12 -34.42297396 -38.73075255 13 -14.95832443 -34.42297396 14 -60.53052425 -14.95832443 15 -46.54094268 -60.53052425 16 -51.39983645 -46.54094268 17 -72.98912106 -51.39983645 18 -17.40442886 -72.98912106 19 -65.78613044 -17.40442886 20 -51.01192960 -65.78613044 21 -27.58647503 -51.01192960 22 -47.95497076 -27.58647503 23 -36.45268275 -47.95497076 24 -26.37287505 -36.45268275 25 -55.20127464 -26.37287505 26 -4.59356649 -55.20127464 27 -39.15202702 -4.59356649 28 -2.53336906 -39.15202702 29 -22.01788169 -2.53336906 30 -42.63324100 -22.01788169 31 -30.37443792 -42.63324100 32 -17.38083909 -30.37443792 33 -41.26410982 -17.38083909 34 -18.22845183 -41.26410982 35 -72.89750824 -18.22845183 36 -30.90714576 -72.89750824 37 -19.31090183 -30.90714576 38 -31.25286337 -19.31090183 39 -16.58142618 -31.25286337 40 -18.34520185 -16.58142618 41 -28.07836744 -18.34520185 42 -47.26043164 -28.07836744 43 -7.82838147 -47.26043164 44 -29.92949348 -7.82838147 45 -30.94897669 -29.92949348 46 -45.65173461 -30.94897669 47 -4.65729119 -45.65173461 48 -14.66515621 -4.65729119 49 -4.03330148 -14.66515621 50 -33.23431405 -4.03330148 51 -21.96842456 -33.23431405 52 2.31376598 -21.96842456 53 -5.93758230 2.31376598 54 -4.92991264 -5.93758230 55 -9.60031407 -4.92991264 56 -16.38396507 -9.60031407 57 -31.89313539 -16.38396507 58 -15.18038957 -31.89313539 59 -18.26090484 -15.18038957 60 -23.55472487 -18.26090484 61 -4.19515986 -23.55472487 62 -20.08933551 -4.19515986 63 -22.22041244 -20.08933551 64 -24.08911616 -22.22041244 65 -6.49785897 -24.08911616 66 9.40763788 -6.49785897 67 32.01106406 9.40763788 68 -15.24737189 32.01106406 69 -29.67110742 -15.24737189 70 42.10592137 -29.67110742 71 -4.28668680 42.10592137 72 0.06827996 -4.28668680 73 8.70745197 0.06827996 74 4.00403660 8.70745197 75 -9.87889443 4.00403660 76 6.01839062 -9.87889443 77 17.39769597 6.01839062 78 -10.07261853 17.39769597 79 6.61516750 -10.07261853 80 -0.17021031 6.61516750 81 15.66045469 -0.17021031 82 -1.50247901 15.66045469 83 15.63898447 -1.50247901 84 3.58056049 15.63898447 85 17.20994109 3.58056049 86 58.48551209 17.20994109 87 7.46781121 58.48551209 88 5.45600363 7.46781121 89 10.18679522 5.45600363 90 19.70148883 10.18679522 91 40.32371956 19.70148883 92 14.61041257 40.32371956 93 17.55855205 14.61041257 94 11.68732804 17.55855205 95 57.03214133 11.68732804 96 23.35736540 57.03214133 97 0.43658305 23.35736540 98 42.94008647 0.43658305 99 35.85044079 42.94008647 100 9.43180269 35.85044079 101 11.66744048 9.43180269 102 32.61103479 11.66744048 103 14.52399333 32.61103479 104 16.90037876 14.52399333 105 17.60003625 16.90037876 106 20.56048657 17.60003625 107 17.41647470 20.56048657 108 0.10249176 17.41647470 109 24.52589266 0.10249176 110 29.98084413 24.52589266 111 33.66618919 29.98084413 112 36.93911619 33.66618919 113 37.02071015 36.93911619 114 8.27311294 37.02071015 115 7.10249176 8.27311294 116 37.93733144 7.10249176 117 48.61151374 37.93733144 118 62.25488440 48.61151374 119 37.22713250 62.25488440 120 47.43627869 37.22713250 121 53.97757856 47.43627869 122 37.51655695 53.97757856 123 46.29437956 37.51655695 124 38.06264706 46.29437956 125 30.25095931 38.06264706 126 57.29629393 30.25095931 127 45.18744461 57.29629393 128 51.45393290 45.18744461 129 32.82977224 51.45393290 130 27.73402297 32.82977224 131 56.13205706 27.73402297 132 26.50333673 56.13205706 133 52.57628760 26.50333673 134 28.24415571 52.57628760 135 43.74562555 28.24415571 136 28.10249176 43.74562555 137 52.00808394 28.10249176 138 42.78164447 52.00808394 139 35.36837745 42.78164447 140 37.93686313 35.36837745 141 47.09806199 37.93686313 142 52.52125210 47.09806199 143 60.08804082 52.52125210 > 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/7fh0f1322149810.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/850v41322149810.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/9w4551322149810.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/10knu41322149810.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/113i2c1322149810.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/127xtr1322149810.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/13hwhm1322149810.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/146rvl1322149810.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/158v1e1322149810.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/16wwit1322149810.tab") + } > > try(system("convert tmp/1yv901322149810.ps tmp/1yv901322149810.png",intern=TRUE)) character(0) > try(system("convert tmp/29gio1322149810.ps tmp/29gio1322149810.png",intern=TRUE)) character(0) > try(system("convert tmp/3jfny1322149810.ps tmp/3jfny1322149810.png",intern=TRUE)) character(0) > try(system("convert tmp/49pug1322149810.ps tmp/49pug1322149810.png",intern=TRUE)) character(0) > try(system("convert tmp/5kk3q1322149810.ps tmp/5kk3q1322149810.png",intern=TRUE)) character(0) > try(system("convert tmp/65a981322149810.ps tmp/65a981322149810.png",intern=TRUE)) character(0) > try(system("convert tmp/7fh0f1322149810.ps tmp/7fh0f1322149810.png",intern=TRUE)) character(0) > try(system("convert tmp/850v41322149810.ps tmp/850v41322149810.png",intern=TRUE)) character(0) > try(system("convert tmp/9w4551322149810.ps tmp/9w4551322149810.png",intern=TRUE)) character(0) > try(system("convert tmp/10knu41322149810.ps tmp/10knu41322149810.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 4.746 0.793 8.246