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(159261 + ,1801 + ,586 + ,91 + ,189672 + ,1717 + ,520 + ,59 + ,7215 + ,192 + ,72 + ,18 + ,129098 + ,2295 + ,645 + ,95 + ,230632 + ,3450 + ,1163 + ,136 + ,515038 + ,6861 + ,1945 + ,263 + ,180745 + ,1795 + ,585 + ,56 + ,185559 + ,1681 + ,470 + ,59 + ,154581 + ,1897 + ,612 + ,44 + ,298001 + ,2974 + ,992 + ,96 + ,121844 + ,1946 + ,634 + ,75 + ,184039 + ,2148 + ,677 + ,69 + ,100324 + ,1832 + ,665 + ,98 + ,220269 + ,3183 + ,1079 + ,119 + ,168265 + ,1476 + ,413 + ,58 + ,154647 + ,1567 + ,469 + ,88 + ,142018 + ,1756 + ,431 + ,57 + ,79030 + ,1247 + ,361 + ,61 + ,167047 + ,2779 + ,877 + ,87 + ,27997 + ,726 + ,221 + ,24 + ,73019 + ,1048 + ,366 + ,59 + ,241082 + ,2805 + ,846 + ,100 + ,195820 + ,1760 + ,642 + ,72 + ,142001 + ,2266 + ,689 + ,54 + ,145433 + ,1848 + ,576 + ,86 + ,183744 + ,1665 + ,610 + ,32 + ,202357 + ,2084 + ,673 + ,163 + ,199532 + ,1440 + ,361 + ,93 + ,354924 + ,2741 + ,907 + ,118 + ,192399 + ,2112 + ,882 + ,44 + ,182286 + ,1684 + ,490 + ,44 + ,181590 + ,1616 + ,548 + ,45 + ,133801 + ,2227 + ,723 + ,105 + ,233686 + ,3088 + ,918 + ,123 + ,219428 + ,2389 + ,787 + ,53 + ,0 + ,1 + ,0 + ,1 + ,223044 + ,2099 + ,983 + ,63 + ,100129 + ,1669 + ,539 + ,51 + ,145864 + ,2137 + ,515 + ,49 + ,249965 + ,2153 + ,795 + ,64 + ,242379 + ,2390 + ,753 + ,71 + ,145794 + ,1701 + ,635 + ,59 + ,96404 + ,983 + ,361 + ,32 + ,195891 + ,2161 + ,804 + ,78 + ,117156 + ,1276 + ,394 + ,50 + ,157787 + ,1190 + ,320 + ,95 + ,81293 + ,745 + ,212 + ,32 + ,237435 + ,2330 + ,772 + ,101 + ,233155 + ,2289 + ,740 + ,89 + ,160344 + ,2639 + ,938 + ,59 + ,48188 + ,658 + ,205 + ,28 + ,161922 + ,1917 + ,492 + ,69 + ,307432 + ,2557 + ,818 + ,74 + ,235223 + ,2026 + ,680 + ,79 + ,195583 + ,1911 + ,691 + ,59 + ,146061 + ,1716 + ,534 + ,56 + ,208834 + ,1852 + ,487 + ,67 + ,93764 + ,981 + ,301 + ,24 + ,151985 + ,1177 + ,421 + ,66 + ,193222 + ,2833 + ,947 + ,96 + ,148922 + ,1688 + ,492 + ,60 + ,132856 + ,2097 + ,790 + ,80 + ,129561 + ,1331 + ,362 + ,61 + ,112718 + ,1244 + ,430 + ,37 + ,160930 + ,1256 + ,416 + ,35 + ,99184 + ,1294 + ,409 + ,41 + ,192535 + ,2303 + ,498 + ,70 + ,138708 + ,2897 + ,887 + ,65 + ,114408 + ,1103 + ,267 + ,38 + ,31970 + ,340 + ,101 + ,15 + ,225558 + ,2791 + ,1000 + ,112 + ,139220 + ,1338 + ,416 + ,72 + ,113612 + ,1441 + ,480 + ,68 + ,108641 + ,1623 + ,454 + ,71 + ,162203 + ,2650 + ,671 + ,67 + ,100098 + ,1499 + ,413 + ,44 + ,174768 + ,2302 + ,677 + ,60 + ,158459 + ,2540 + ,820 + ,97 + ,80934 + ,1000 + ,316 + ,30 + ,84971 + ,1234 + ,395 + ,71 + ,80545 + ,927 + ,217 + ,68 + ,287191 + ,2176 + ,818 + ,64 + ,62974 + ,957 + ,292 + ,28 + ,134091 + ,1551 + ,513 + ,40 + ,75555 + ,1014 + ,345 + ,46 + ,162154 + ,1771 + ,557 + ,54 + ,226638 + ,2613 + ,645 + ,227 + ,115367 + ,1205 + ,284 + ,112 + ,108749 + ,1337 + ,424 + ,62 + ,155537 + ,1524 + ,614 + ,52 + ,153133 + ,1829 + ,672 + ,41 + ,165618 + ,2229 + ,649 + ,78 + ,151517 + ,1233 + ,415 + ,57 + ,133686 + ,1365 + ,505 + ,58 + ,61342 + ,950 + ,387 + ,40 + ,245196 + ,2319 + ,730 + ,117 + ,195576 + ,1857 + ,563 + ,70 + ,19349 + ,223 + ,67 + ,12 + ,225371 + ,2390 + ,812 + ,105 + ,153213 + ,1985 + ,811 + ,78 + ,59117 + ,700 + ,281 + ,29 + ,91762 + ,1062 + ,338 + ,24 + ,136769 + ,1311 + ,413 + ,54 + ,114798 + ,1157 + ,298 + ,61 + ,85338 + ,823 + ,223 + ,40 + ,27676 + ,596 + ,194 + ,22 + ,153535 + ,1545 + ,371 + ,48 + ,122417 + ,1130 + ,268 + ,37 + ,0 + ,0 + ,0 + ,0 + ,91529 + ,1082 + ,332 + ,32 + ,107205 + ,1135 + ,371 + ,67 + ,144664 + ,1367 + ,465 + ,45 + ,146445 + ,1506 + ,447 + ,63 + ,76656 + ,870 + ,295 + ,60 + ,3616 + ,78 + ,14 + ,5 + ,0 + ,0 + ,0 + ,0 + ,183088 + ,1130 + ,388 + ,44 + ,144677 + ,1582 + ,564 + ,84 + ,159104 + ,2034 + ,562 + ,98 + ,113273 + ,919 + ,288 + ,38 + ,43410 + ,778 + ,292 + ,19 + ,175774 + ,1752 + ,530 + ,73 + ,95401 + ,957 + ,256 + ,42 + ,134837 + ,2098 + ,602 + ,55 + ,60493 + ,731 + ,174 + ,40 + ,19764 + ,285 + ,75 + ,12 + ,164062 + ,1834 + ,565 + ,56 + ,132696 + ,1148 + ,377 + ,33 + ,155367 + ,1646 + ,544 + ,54 + ,11796 + ,256 + ,79 + ,9 + ,10674 + ,98 + ,33 + ,9 + ,142261 + ,1404 + ,479 + ,57 + ,6836 + ,41 + ,11 + ,3 + ,162563 + ,1824 + ,626 + ,63 + ,5118 + ,42 + ,6 + ,3 + ,40248 + ,528 + ,183 + ,16 + ,0 + ,0 + ,0 + ,0 + ,122641 + ,1073 + ,334 + ,47 + ,88837 + ,1305 + ,269 + ,38 + ,7131 + ,81 + ,27 + ,4 + ,9056 + ,261 + ,99 + ,14 + ,76611 + ,934 + ,260 + ,24 + ,132697 + ,1180 + ,290 + ,51 + ,100681 + ,1147 + ,414 + ,19) + ,dim=c(4 + ,144) + ,dimnames=list(c('time_spent_seconds' + ,'page_views' + ,'number_course_compenium_views' + ,'number_logins ') + ,1:144)) > y <- array(NA,dim=c(4,144),dimnames=list(c('time_spent_seconds','page_views','number_course_compenium_views','number_logins '),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 time_spent_seconds page_views number_course_compenium_views number_logins\r 1 159261 1801 586 91 2 189672 1717 520 59 3 7215 192 72 18 4 129098 2295 645 95 5 230632 3450 1163 136 6 515038 6861 1945 263 7 180745 1795 585 56 8 185559 1681 470 59 9 154581 1897 612 44 10 298001 2974 992 96 11 121844 1946 634 75 12 184039 2148 677 69 13 100324 1832 665 98 14 220269 3183 1079 119 15 168265 1476 413 58 16 154647 1567 469 88 17 142018 1756 431 57 18 79030 1247 361 61 19 167047 2779 877 87 20 27997 726 221 24 21 73019 1048 366 59 22 241082 2805 846 100 23 195820 1760 642 72 24 142001 2266 689 54 25 145433 1848 576 86 26 183744 1665 610 32 27 202357 2084 673 163 28 199532 1440 361 93 29 354924 2741 907 118 30 192399 2112 882 44 31 182286 1684 490 44 32 181590 1616 548 45 33 133801 2227 723 105 34 233686 3088 918 123 35 219428 2389 787 53 36 0 1 0 1 37 223044 2099 983 63 38 100129 1669 539 51 39 145864 2137 515 49 40 249965 2153 795 64 41 242379 2390 753 71 42 145794 1701 635 59 43 96404 983 361 32 44 195891 2161 804 78 45 117156 1276 394 50 46 157787 1190 320 95 47 81293 745 212 32 48 237435 2330 772 101 49 233155 2289 740 89 50 160344 2639 938 59 51 48188 658 205 28 52 161922 1917 492 69 53 307432 2557 818 74 54 235223 2026 680 79 55 195583 1911 691 59 56 146061 1716 534 56 57 208834 1852 487 67 58 93764 981 301 24 59 151985 1177 421 66 60 193222 2833 947 96 61 148922 1688 492 60 62 132856 2097 790 80 63 129561 1331 362 61 64 112718 1244 430 37 65 160930 1256 416 35 66 99184 1294 409 41 67 192535 2303 498 70 68 138708 2897 887 65 69 114408 1103 267 38 70 31970 340 101 15 71 225558 2791 1000 112 72 139220 1338 416 72 73 113612 1441 480 68 74 108641 1623 454 71 75 162203 2650 671 67 76 100098 1499 413 44 77 174768 2302 677 60 78 158459 2540 820 97 79 80934 1000 316 30 80 84971 1234 395 71 81 80545 927 217 68 82 287191 2176 818 64 83 62974 957 292 28 84 134091 1551 513 40 85 75555 1014 345 46 86 162154 1771 557 54 87 226638 2613 645 227 88 115367 1205 284 112 89 108749 1337 424 62 90 155537 1524 614 52 91 153133 1829 672 41 92 165618 2229 649 78 93 151517 1233 415 57 94 133686 1365 505 58 95 61342 950 387 40 96 245196 2319 730 117 97 195576 1857 563 70 98 19349 223 67 12 99 225371 2390 812 105 100 153213 1985 811 78 101 59117 700 281 29 102 91762 1062 338 24 103 136769 1311 413 54 104 114798 1157 298 61 105 85338 823 223 40 106 27676 596 194 22 107 153535 1545 371 48 108 122417 1130 268 37 109 0 0 0 0 110 91529 1082 332 32 111 107205 1135 371 67 112 144664 1367 465 45 113 146445 1506 447 63 114 76656 870 295 60 115 3616 78 14 5 116 0 0 0 0 117 183088 1130 388 44 118 144677 1582 564 84 119 159104 2034 562 98 120 113273 919 288 38 121 43410 778 292 19 122 175774 1752 530 73 123 95401 957 256 42 124 134837 2098 602 55 125 60493 731 174 40 126 19764 285 75 12 127 164062 1834 565 56 128 132696 1148 377 33 129 155367 1646 544 54 130 11796 256 79 9 131 10674 98 33 9 132 142261 1404 479 57 133 6836 41 11 3 134 162563 1824 626 63 135 5118 42 6 3 136 40248 528 183 16 137 0 0 0 0 138 122641 1073 334 47 139 88837 1305 269 38 140 7131 81 27 4 141 9056 261 99 14 142 76611 934 260 24 143 132697 1180 290 51 144 100681 1147 414 19 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) page_views 13965.97 41.53 number_course_compenium_views `number_logins\r` 87.63 264.05 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -90451 -18458 -2680 21231 116495 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 13965.97 5912.47 2.362 0.01955 * page_views 41.53 14.60 2.844 0.00512 ** number_course_compenium_views 87.63 39.90 2.196 0.02973 * `number_logins\r` 264.05 139.38 1.894 0.06024 . --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 34570 on 140 degrees of freedom Multiple R-squared: 0.8042, Adjusted R-squared: 0.8 F-statistic: 191.7 on 3 and 140 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.8515334 2.969331e-01 1.484666e-01 [2,] 0.7962132 4.075736e-01 2.037868e-01 [3,] 0.7971976 4.056049e-01 2.028024e-01 [4,] 0.8386788 3.226424e-01 1.613212e-01 [5,] 0.8449080 3.101839e-01 1.550920e-01 [6,] 0.7775601 4.448798e-01 2.224399e-01 [7,] 0.7324774 5.350452e-01 2.675226e-01 [8,] 0.7000365 5.999269e-01 2.999635e-01 [9,] 0.7060099 5.879802e-01 2.939901e-01 [10,] 0.7402041 5.195918e-01 2.597959e-01 [11,] 0.7298821 5.402357e-01 2.701179e-01 [12,] 0.7025329 5.949342e-01 2.974671e-01 [13,] 0.8340037 3.319926e-01 1.659963e-01 [14,] 0.8629758 2.740483e-01 1.370242e-01 [15,] 0.8267141 3.465717e-01 1.732859e-01 [16,] 0.7893545 4.212910e-01 2.106455e-01 [17,] 0.8572202 2.855595e-01 1.427798e-01 [18,] 0.8915379 2.169243e-01 1.084621e-01 [19,] 0.8610681 2.778639e-01 1.389319e-01 [20,] 0.8624429 2.751143e-01 1.375571e-01 [21,] 0.8832901 2.334198e-01 1.167099e-01 [22,] 0.9451170 1.097660e-01 5.488302e-02 [23,] 0.9990579 1.884191e-03 9.420955e-04 [24,] 0.9985520 2.896027e-03 1.448014e-03 [25,] 0.9986693 2.661314e-03 1.330657e-03 [26,] 0.9987133 2.573458e-03 1.286729e-03 [27,] 0.9994235 1.153003e-03 5.765015e-04 [28,] 0.9992138 1.572318e-03 7.861589e-04 [29,] 0.9989175 2.165061e-03 1.082530e-03 [30,] 0.9985125 2.974963e-03 1.487481e-03 [31,] 0.9980664 3.867265e-03 1.933632e-03 [32,] 0.9984506 3.098826e-03 1.549413e-03 [33,] 0.9978516 4.296718e-03 2.148359e-03 [34,] 0.9988983 2.203487e-03 1.101743e-03 [35,] 0.9990602 1.879687e-03 9.398436e-04 [36,] 0.9986094 2.781125e-03 1.390562e-03 [37,] 0.9978975 4.205034e-03 2.102517e-03 [38,] 0.9968641 6.271859e-03 3.135929e-03 [39,] 0.9954063 9.187350e-03 4.593675e-03 [40,] 0.9961357 7.728671e-03 3.864335e-03 [41,] 0.9945064 1.098720e-02 5.493598e-03 [42,] 0.9940975 1.180503e-02 5.902514e-03 [43,] 0.9939984 1.200327e-02 6.001634e-03 [44,] 0.9971604 5.679286e-03 2.839643e-03 [45,] 0.9963266 7.346874e-03 3.673437e-03 [46,] 0.9947485 1.050301e-02 5.251503e-03 [47,] 0.9995641 8.717601e-04 4.358800e-04 [48,] 0.9997907 4.186480e-04 2.093240e-04 [49,] 0.9997490 5.020634e-04 2.510317e-04 [50,] 0.9996073 7.853036e-04 3.926518e-04 [51,] 0.9998202 3.595641e-04 1.797820e-04 [52,] 0.9997217 5.565765e-04 2.782882e-04 [53,] 0.9997233 5.534023e-04 2.767011e-04 [54,] 0.9997992 4.015743e-04 2.007872e-04 [55,] 0.9996885 6.229727e-04 3.114863e-04 [56,] 0.9998722 2.555329e-04 1.277664e-04 [57,] 0.9998082 3.835875e-04 1.917938e-04 [58,] 0.9996989 6.022464e-04 3.011232e-04 [59,] 0.9998206 3.587891e-04 1.793945e-04 [60,] 0.9997447 5.105257e-04 2.552628e-04 [61,] 0.9996903 6.193940e-04 3.096970e-04 [62,] 0.9999885 2.302387e-05 1.151193e-05 [63,] 0.9999849 3.021866e-05 1.510933e-05 [64,] 0.9999758 4.843494e-05 2.421747e-05 [65,] 0.9999735 5.305247e-05 2.652623e-05 [66,] 0.9999596 8.089558e-05 4.044779e-05 [67,] 0.9999467 1.065149e-04 5.325744e-05 [68,] 0.9999461 1.077213e-04 5.386067e-05 [69,] 0.9999669 6.620575e-05 3.310288e-05 [70,] 0.9999624 7.525351e-05 3.762676e-05 [71,] 0.9999512 9.760166e-05 4.880083e-05 [72,] 0.9999957 8.559374e-06 4.279687e-06 [73,] 0.9999929 1.412543e-05 7.062715e-06 [74,] 0.9999937 1.257046e-05 6.285230e-06 [75,] 0.9999891 2.178602e-05 1.089301e-05 [76,] 0.9999999 2.202145e-07 1.101073e-07 [77,] 0.9999999 2.686615e-07 1.343307e-07 [78,] 0.9999997 5.258036e-07 2.629018e-07 [79,] 0.9999996 7.259961e-07 3.629980e-07 [80,] 0.9999993 1.405624e-06 7.028122e-07 [81,] 0.9999994 1.223652e-06 6.118262e-07 [82,] 0.9999991 1.746985e-06 8.734923e-07 [83,] 0.9999988 2.473307e-06 1.236653e-06 [84,] 0.9999981 3.851052e-06 1.925526e-06 [85,] 0.9999963 7.336495e-06 3.668248e-06 [86,] 0.9999975 4.917150e-06 2.458575e-06 [87,] 0.9999981 3.831203e-06 1.915601e-06 [88,] 0.9999964 7.273298e-06 3.636649e-06 [89,] 0.9999966 6.825599e-06 3.412800e-06 [90,] 0.9999957 8.551184e-06 4.275592e-06 [91,] 0.9999955 9.098777e-06 4.549389e-06 [92,] 0.9999915 1.697276e-05 8.486379e-06 [93,] 0.9999841 3.185996e-05 1.592998e-05 [94,] 0.9999901 1.971393e-05 9.856967e-06 [95,] 0.9999835 3.298808e-05 1.649404e-05 [96,] 0.9999686 6.270742e-05 3.135371e-05 [97,] 0.9999482 1.035850e-04 5.179250e-05 [98,] 0.9999064 1.871326e-04 9.356631e-05 [99,] 0.9998369 3.262245e-04 1.631122e-04 [100,] 0.9998490 3.019603e-04 1.509801e-04 [101,] 0.9998307 3.386115e-04 1.693057e-04 [102,] 0.9998547 2.905516e-04 1.452758e-04 [103,] 0.9997379 5.242296e-04 2.621148e-04 [104,] 0.9995309 9.382927e-04 4.691463e-04 [105,] 0.9992286 1.542809e-03 7.714045e-04 [106,] 0.9988565 2.287090e-03 1.143545e-03 [107,] 0.9981201 3.759836e-03 1.879918e-03 [108,] 0.9976753 4.649373e-03 2.324686e-03 [109,] 0.9961860 7.627905e-03 3.813953e-03 [110,] 0.9937484 1.250323e-02 6.251616e-03 [111,] 0.9998784 2.431934e-04 1.215967e-04 [112,] 0.9998729 2.541885e-04 1.270943e-04 [113,] 0.9999822 3.555437e-05 1.777719e-05 [114,] 0.9999809 3.828000e-05 1.914000e-05 [115,] 0.9999833 3.331163e-05 1.665581e-05 [116,] 0.9999582 8.359961e-05 4.179981e-05 [117,] 0.9998986 2.028393e-04 1.014197e-04 [118,] 0.9999844 3.126626e-05 1.563313e-05 [119,] 0.9999726 5.481423e-05 2.740711e-05 [120,] 0.9999269 1.462769e-04 7.313846e-05 [121,] 0.9998019 3.962604e-04 1.981302e-04 [122,] 0.9999555 8.903982e-05 4.451991e-05 [123,] 0.9998567 2.866489e-04 1.433245e-04 [124,] 0.9996576 6.847014e-04 3.423507e-04 [125,] 0.9989691 2.061707e-03 1.030854e-03 [126,] 0.9970077 5.984550e-03 2.992275e-03 [127,] 0.9920126 1.597481e-02 7.987407e-03 [128,] 0.9932401 1.351977e-02 6.759887e-03 [129,] 0.9835567 3.288662e-02 1.644331e-02 [130,] 0.9589008 8.219833e-02 4.109917e-02 [131,] 0.9189557 1.620885e-01 8.104426e-02 > postscript(file="/var/wessaorg/rcomp/tmp/1pr2t1324642855.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/21x9i1324642855.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/3wbbd1324642855.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/4g3qi1324642855.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/57ygz1324642855.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 -4873.9771 43258.5144 -25786.3423 -61777.2093 -64425.1014 -23726.3073 7 8 9 10 11 12 26188.5434 45022.0654 -3408.5652 48257.2888 -48293.7768 3329.1233 13 14 15 16 17 18 -73869.5882 -51850.7571 41499.9440 11274.1963 2312.4006 -34460.9200 19 20 21 22 23 24 -62145.0096 -41820.6269 -32118.3603 10094.2842 33497.1003 -40699.7613 25 26 27 28 29 30 -18457.1146 38732.2667 -165.3551 69577.0265 116495.4586 1820.6289 31 32 33 34 35 36 43832.5814 40613.5983 -63726.2879 -21436.1794 23295.6382 -14271.5442 37 38 39 40 41 42 19137.6415 -43843.8709 -14911.6403 60027.1090 44431.7254 -10032.8095 43 44 45 46 47 48 1533.3128 1135.5173 2473.5063 41278.2952 9362.6801 32392.7669 49 50 51 52 53 54 35788.1563 -60986.6002 -18459.9547 7016.5799 96061.6661 56675.8713 55 56 57 58 59 60 26128.3651 -745.6661 57594.0147 6346.7096 34822.6853 -46723.1195 61 62 63 64 65 66 5902.4210 -58543.0794 12494.2850 -357.7955 49110.8494 -15183.9986 67 68 69 70 71 72 20810.7983 -90451.2825 21207.3799 -8926.3458 -21512.3525 14225.9058 73 74 75 76 77 78 -20211.5267 -31253.9161 -38298.9061 -23925.4546 -9960.3954 -58453.8005 79 80 81 82 83 84 -10171.0640 -33600.0851 -8886.9509 94282.4697 -23714.1783 201.1563 85 86 87 88 89 90 -22897.5590 11575.9699 -12296.9340 -3098.6635 -14264.1330 10748.8760 91 92 93 94 95 96 -6498.6151 -18378.1981 34931.4843 3468.1130 -36549.1785 40066.3219 97 98 99 100 101 102 36676.1685 -12917.1807 13275.7247 -34847.3792 -16199.1543 -2261.2776 103 104 105 106 107 108 17911.8899 10565.2435 7092.3185 -33849.1041 30225.7274 28271.6019 109 110 111 112 113 114 -13965.9690 -4911.3938 -4095.6587 21301.0048 14134.4196 -15131.9210 115 116 117 118 119 120 -16136.0794 -13965.9690 76578.3570 -6587.5779 -14451.6425 25872.8346 121 122 123 124 125 126 -33468.6244 23334.0950 8170.8977 -33527.4597 -9638.3213 -15777.8367 127 128 129 130 131 132 9638.6891 29307.3958 11118.9102 -22099.9715 -12629.8096 12966.1031 133 134 135 136 137 138 -10588.6304 1361.0182 -11909.9937 -15905.0990 -13965.9690 22438.3300 139 140 141 142 143 144 -12927.0853 -13620.8294 -28120.4976 -5261.6485 30850.7066 -2211.7870 > postscript(file="/var/wessaorg/rcomp/tmp/62n6c1324642855.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 -4873.9771 NA 1 43258.5144 -4873.9771 2 -25786.3423 43258.5144 3 -61777.2093 -25786.3423 4 -64425.1014 -61777.2093 5 -23726.3073 -64425.1014 6 26188.5434 -23726.3073 7 45022.0654 26188.5434 8 -3408.5652 45022.0654 9 48257.2888 -3408.5652 10 -48293.7768 48257.2888 11 3329.1233 -48293.7768 12 -73869.5882 3329.1233 13 -51850.7571 -73869.5882 14 41499.9440 -51850.7571 15 11274.1963 41499.9440 16 2312.4006 11274.1963 17 -34460.9200 2312.4006 18 -62145.0096 -34460.9200 19 -41820.6269 -62145.0096 20 -32118.3603 -41820.6269 21 10094.2842 -32118.3603 22 33497.1003 10094.2842 23 -40699.7613 33497.1003 24 -18457.1146 -40699.7613 25 38732.2667 -18457.1146 26 -165.3551 38732.2667 27 69577.0265 -165.3551 28 116495.4586 69577.0265 29 1820.6289 116495.4586 30 43832.5814 1820.6289 31 40613.5983 43832.5814 32 -63726.2879 40613.5983 33 -21436.1794 -63726.2879 34 23295.6382 -21436.1794 35 -14271.5442 23295.6382 36 19137.6415 -14271.5442 37 -43843.8709 19137.6415 38 -14911.6403 -43843.8709 39 60027.1090 -14911.6403 40 44431.7254 60027.1090 41 -10032.8095 44431.7254 42 1533.3128 -10032.8095 43 1135.5173 1533.3128 44 2473.5063 1135.5173 45 41278.2952 2473.5063 46 9362.6801 41278.2952 47 32392.7669 9362.6801 48 35788.1563 32392.7669 49 -60986.6002 35788.1563 50 -18459.9547 -60986.6002 51 7016.5799 -18459.9547 52 96061.6661 7016.5799 53 56675.8713 96061.6661 54 26128.3651 56675.8713 55 -745.6661 26128.3651 56 57594.0147 -745.6661 57 6346.7096 57594.0147 58 34822.6853 6346.7096 59 -46723.1195 34822.6853 60 5902.4210 -46723.1195 61 -58543.0794 5902.4210 62 12494.2850 -58543.0794 63 -357.7955 12494.2850 64 49110.8494 -357.7955 65 -15183.9986 49110.8494 66 20810.7983 -15183.9986 67 -90451.2825 20810.7983 68 21207.3799 -90451.2825 69 -8926.3458 21207.3799 70 -21512.3525 -8926.3458 71 14225.9058 -21512.3525 72 -20211.5267 14225.9058 73 -31253.9161 -20211.5267 74 -38298.9061 -31253.9161 75 -23925.4546 -38298.9061 76 -9960.3954 -23925.4546 77 -58453.8005 -9960.3954 78 -10171.0640 -58453.8005 79 -33600.0851 -10171.0640 80 -8886.9509 -33600.0851 81 94282.4697 -8886.9509 82 -23714.1783 94282.4697 83 201.1563 -23714.1783 84 -22897.5590 201.1563 85 11575.9699 -22897.5590 86 -12296.9340 11575.9699 87 -3098.6635 -12296.9340 88 -14264.1330 -3098.6635 89 10748.8760 -14264.1330 90 -6498.6151 10748.8760 91 -18378.1981 -6498.6151 92 34931.4843 -18378.1981 93 3468.1130 34931.4843 94 -36549.1785 3468.1130 95 40066.3219 -36549.1785 96 36676.1685 40066.3219 97 -12917.1807 36676.1685 98 13275.7247 -12917.1807 99 -34847.3792 13275.7247 100 -16199.1543 -34847.3792 101 -2261.2776 -16199.1543 102 17911.8899 -2261.2776 103 10565.2435 17911.8899 104 7092.3185 10565.2435 105 -33849.1041 7092.3185 106 30225.7274 -33849.1041 107 28271.6019 30225.7274 108 -13965.9690 28271.6019 109 -4911.3938 -13965.9690 110 -4095.6587 -4911.3938 111 21301.0048 -4095.6587 112 14134.4196 21301.0048 113 -15131.9210 14134.4196 114 -16136.0794 -15131.9210 115 -13965.9690 -16136.0794 116 76578.3570 -13965.9690 117 -6587.5779 76578.3570 118 -14451.6425 -6587.5779 119 25872.8346 -14451.6425 120 -33468.6244 25872.8346 121 23334.0950 -33468.6244 122 8170.8977 23334.0950 123 -33527.4597 8170.8977 124 -9638.3213 -33527.4597 125 -15777.8367 -9638.3213 126 9638.6891 -15777.8367 127 29307.3958 9638.6891 128 11118.9102 29307.3958 129 -22099.9715 11118.9102 130 -12629.8096 -22099.9715 131 12966.1031 -12629.8096 132 -10588.6304 12966.1031 133 1361.0182 -10588.6304 134 -11909.9937 1361.0182 135 -15905.0990 -11909.9937 136 -13965.9690 -15905.0990 137 22438.3300 -13965.9690 138 -12927.0853 22438.3300 139 -13620.8294 -12927.0853 140 -28120.4976 -13620.8294 141 -5261.6485 -28120.4976 142 30850.7066 -5261.6485 143 -2211.7870 30850.7066 144 NA -2211.7870 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 43258.5144 -4873.9771 [2,] -25786.3423 43258.5144 [3,] -61777.2093 -25786.3423 [4,] -64425.1014 -61777.2093 [5,] -23726.3073 -64425.1014 [6,] 26188.5434 -23726.3073 [7,] 45022.0654 26188.5434 [8,] -3408.5652 45022.0654 [9,] 48257.2888 -3408.5652 [10,] -48293.7768 48257.2888 [11,] 3329.1233 -48293.7768 [12,] -73869.5882 3329.1233 [13,] -51850.7571 -73869.5882 [14,] 41499.9440 -51850.7571 [15,] 11274.1963 41499.9440 [16,] 2312.4006 11274.1963 [17,] -34460.9200 2312.4006 [18,] -62145.0096 -34460.9200 [19,] -41820.6269 -62145.0096 [20,] -32118.3603 -41820.6269 [21,] 10094.2842 -32118.3603 [22,] 33497.1003 10094.2842 [23,] -40699.7613 33497.1003 [24,] -18457.1146 -40699.7613 [25,] 38732.2667 -18457.1146 [26,] -165.3551 38732.2667 [27,] 69577.0265 -165.3551 [28,] 116495.4586 69577.0265 [29,] 1820.6289 116495.4586 [30,] 43832.5814 1820.6289 [31,] 40613.5983 43832.5814 [32,] -63726.2879 40613.5983 [33,] -21436.1794 -63726.2879 [34,] 23295.6382 -21436.1794 [35,] -14271.5442 23295.6382 [36,] 19137.6415 -14271.5442 [37,] -43843.8709 19137.6415 [38,] -14911.6403 -43843.8709 [39,] 60027.1090 -14911.6403 [40,] 44431.7254 60027.1090 [41,] -10032.8095 44431.7254 [42,] 1533.3128 -10032.8095 [43,] 1135.5173 1533.3128 [44,] 2473.5063 1135.5173 [45,] 41278.2952 2473.5063 [46,] 9362.6801 41278.2952 [47,] 32392.7669 9362.6801 [48,] 35788.1563 32392.7669 [49,] -60986.6002 35788.1563 [50,] -18459.9547 -60986.6002 [51,] 7016.5799 -18459.9547 [52,] 96061.6661 7016.5799 [53,] 56675.8713 96061.6661 [54,] 26128.3651 56675.8713 [55,] -745.6661 26128.3651 [56,] 57594.0147 -745.6661 [57,] 6346.7096 57594.0147 [58,] 34822.6853 6346.7096 [59,] -46723.1195 34822.6853 [60,] 5902.4210 -46723.1195 [61,] -58543.0794 5902.4210 [62,] 12494.2850 -58543.0794 [63,] -357.7955 12494.2850 [64,] 49110.8494 -357.7955 [65,] -15183.9986 49110.8494 [66,] 20810.7983 -15183.9986 [67,] -90451.2825 20810.7983 [68,] 21207.3799 -90451.2825 [69,] -8926.3458 21207.3799 [70,] -21512.3525 -8926.3458 [71,] 14225.9058 -21512.3525 [72,] -20211.5267 14225.9058 [73,] -31253.9161 -20211.5267 [74,] -38298.9061 -31253.9161 [75,] -23925.4546 -38298.9061 [76,] -9960.3954 -23925.4546 [77,] -58453.8005 -9960.3954 [78,] -10171.0640 -58453.8005 [79,] -33600.0851 -10171.0640 [80,] -8886.9509 -33600.0851 [81,] 94282.4697 -8886.9509 [82,] -23714.1783 94282.4697 [83,] 201.1563 -23714.1783 [84,] -22897.5590 201.1563 [85,] 11575.9699 -22897.5590 [86,] -12296.9340 11575.9699 [87,] -3098.6635 -12296.9340 [88,] -14264.1330 -3098.6635 [89,] 10748.8760 -14264.1330 [90,] -6498.6151 10748.8760 [91,] -18378.1981 -6498.6151 [92,] 34931.4843 -18378.1981 [93,] 3468.1130 34931.4843 [94,] -36549.1785 3468.1130 [95,] 40066.3219 -36549.1785 [96,] 36676.1685 40066.3219 [97,] -12917.1807 36676.1685 [98,] 13275.7247 -12917.1807 [99,] -34847.3792 13275.7247 [100,] -16199.1543 -34847.3792 [101,] -2261.2776 -16199.1543 [102,] 17911.8899 -2261.2776 [103,] 10565.2435 17911.8899 [104,] 7092.3185 10565.2435 [105,] -33849.1041 7092.3185 [106,] 30225.7274 -33849.1041 [107,] 28271.6019 30225.7274 [108,] -13965.9690 28271.6019 [109,] -4911.3938 -13965.9690 [110,] -4095.6587 -4911.3938 [111,] 21301.0048 -4095.6587 [112,] 14134.4196 21301.0048 [113,] -15131.9210 14134.4196 [114,] -16136.0794 -15131.9210 [115,] -13965.9690 -16136.0794 [116,] 76578.3570 -13965.9690 [117,] -6587.5779 76578.3570 [118,] -14451.6425 -6587.5779 [119,] 25872.8346 -14451.6425 [120,] -33468.6244 25872.8346 [121,] 23334.0950 -33468.6244 [122,] 8170.8977 23334.0950 [123,] -33527.4597 8170.8977 [124,] -9638.3213 -33527.4597 [125,] -15777.8367 -9638.3213 [126,] 9638.6891 -15777.8367 [127,] 29307.3958 9638.6891 [128,] 11118.9102 29307.3958 [129,] -22099.9715 11118.9102 [130,] -12629.8096 -22099.9715 [131,] 12966.1031 -12629.8096 [132,] -10588.6304 12966.1031 [133,] 1361.0182 -10588.6304 [134,] -11909.9937 1361.0182 [135,] -15905.0990 -11909.9937 [136,] -13965.9690 -15905.0990 [137,] 22438.3300 -13965.9690 [138,] -12927.0853 22438.3300 [139,] -13620.8294 -12927.0853 [140,] -28120.4976 -13620.8294 [141,] -5261.6485 -28120.4976 [142,] 30850.7066 -5261.6485 [143,] -2211.7870 30850.7066 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 43258.5144 -4873.9771 2 -25786.3423 43258.5144 3 -61777.2093 -25786.3423 4 -64425.1014 -61777.2093 5 -23726.3073 -64425.1014 6 26188.5434 -23726.3073 7 45022.0654 26188.5434 8 -3408.5652 45022.0654 9 48257.2888 -3408.5652 10 -48293.7768 48257.2888 11 3329.1233 -48293.7768 12 -73869.5882 3329.1233 13 -51850.7571 -73869.5882 14 41499.9440 -51850.7571 15 11274.1963 41499.9440 16 2312.4006 11274.1963 17 -34460.9200 2312.4006 18 -62145.0096 -34460.9200 19 -41820.6269 -62145.0096 20 -32118.3603 -41820.6269 21 10094.2842 -32118.3603 22 33497.1003 10094.2842 23 -40699.7613 33497.1003 24 -18457.1146 -40699.7613 25 38732.2667 -18457.1146 26 -165.3551 38732.2667 27 69577.0265 -165.3551 28 116495.4586 69577.0265 29 1820.6289 116495.4586 30 43832.5814 1820.6289 31 40613.5983 43832.5814 32 -63726.2879 40613.5983 33 -21436.1794 -63726.2879 34 23295.6382 -21436.1794 35 -14271.5442 23295.6382 36 19137.6415 -14271.5442 37 -43843.8709 19137.6415 38 -14911.6403 -43843.8709 39 60027.1090 -14911.6403 40 44431.7254 60027.1090 41 -10032.8095 44431.7254 42 1533.3128 -10032.8095 43 1135.5173 1533.3128 44 2473.5063 1135.5173 45 41278.2952 2473.5063 46 9362.6801 41278.2952 47 32392.7669 9362.6801 48 35788.1563 32392.7669 49 -60986.6002 35788.1563 50 -18459.9547 -60986.6002 51 7016.5799 -18459.9547 52 96061.6661 7016.5799 53 56675.8713 96061.6661 54 26128.3651 56675.8713 55 -745.6661 26128.3651 56 57594.0147 -745.6661 57 6346.7096 57594.0147 58 34822.6853 6346.7096 59 -46723.1195 34822.6853 60 5902.4210 -46723.1195 61 -58543.0794 5902.4210 62 12494.2850 -58543.0794 63 -357.7955 12494.2850 64 49110.8494 -357.7955 65 -15183.9986 49110.8494 66 20810.7983 -15183.9986 67 -90451.2825 20810.7983 68 21207.3799 -90451.2825 69 -8926.3458 21207.3799 70 -21512.3525 -8926.3458 71 14225.9058 -21512.3525 72 -20211.5267 14225.9058 73 -31253.9161 -20211.5267 74 -38298.9061 -31253.9161 75 -23925.4546 -38298.9061 76 -9960.3954 -23925.4546 77 -58453.8005 -9960.3954 78 -10171.0640 -58453.8005 79 -33600.0851 -10171.0640 80 -8886.9509 -33600.0851 81 94282.4697 -8886.9509 82 -23714.1783 94282.4697 83 201.1563 -23714.1783 84 -22897.5590 201.1563 85 11575.9699 -22897.5590 86 -12296.9340 11575.9699 87 -3098.6635 -12296.9340 88 -14264.1330 -3098.6635 89 10748.8760 -14264.1330 90 -6498.6151 10748.8760 91 -18378.1981 -6498.6151 92 34931.4843 -18378.1981 93 3468.1130 34931.4843 94 -36549.1785 3468.1130 95 40066.3219 -36549.1785 96 36676.1685 40066.3219 97 -12917.1807 36676.1685 98 13275.7247 -12917.1807 99 -34847.3792 13275.7247 100 -16199.1543 -34847.3792 101 -2261.2776 -16199.1543 102 17911.8899 -2261.2776 103 10565.2435 17911.8899 104 7092.3185 10565.2435 105 -33849.1041 7092.3185 106 30225.7274 -33849.1041 107 28271.6019 30225.7274 108 -13965.9690 28271.6019 109 -4911.3938 -13965.9690 110 -4095.6587 -4911.3938 111 21301.0048 -4095.6587 112 14134.4196 21301.0048 113 -15131.9210 14134.4196 114 -16136.0794 -15131.9210 115 -13965.9690 -16136.0794 116 76578.3570 -13965.9690 117 -6587.5779 76578.3570 118 -14451.6425 -6587.5779 119 25872.8346 -14451.6425 120 -33468.6244 25872.8346 121 23334.0950 -33468.6244 122 8170.8977 23334.0950 123 -33527.4597 8170.8977 124 -9638.3213 -33527.4597 125 -15777.8367 -9638.3213 126 9638.6891 -15777.8367 127 29307.3958 9638.6891 128 11118.9102 29307.3958 129 -22099.9715 11118.9102 130 -12629.8096 -22099.9715 131 12966.1031 -12629.8096 132 -10588.6304 12966.1031 133 1361.0182 -10588.6304 134 -11909.9937 1361.0182 135 -15905.0990 -11909.9937 136 -13965.9690 -15905.0990 137 22438.3300 -13965.9690 138 -12927.0853 22438.3300 139 -13620.8294 -12927.0853 140 -28120.4976 -13620.8294 141 -5261.6485 -28120.4976 142 30850.7066 -5261.6485 143 -2211.7870 30850.7066 > 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/7i0e01324642855.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/89r5y1324642855.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/9j8sk1324642855.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/1052321324642855.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/11eegu1324642855.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/12h6do1324642855.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/134to71324642855.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/14huj01324642855.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/15vy041324642855.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/16q5391324642855.tab") + } > > try(system("convert tmp/1pr2t1324642855.ps tmp/1pr2t1324642855.png",intern=TRUE)) character(0) > try(system("convert tmp/21x9i1324642855.ps tmp/21x9i1324642855.png",intern=TRUE)) character(0) > try(system("convert tmp/3wbbd1324642855.ps tmp/3wbbd1324642855.png",intern=TRUE)) character(0) > try(system("convert tmp/4g3qi1324642855.ps tmp/4g3qi1324642855.png",intern=TRUE)) character(0) > try(system("convert tmp/57ygz1324642855.ps tmp/57ygz1324642855.png",intern=TRUE)) character(0) > try(system("convert tmp/62n6c1324642855.ps tmp/62n6c1324642855.png",intern=TRUE)) character(0) > try(system("convert tmp/7i0e01324642855.ps tmp/7i0e01324642855.png",intern=TRUE)) character(0) > try(system("convert tmp/89r5y1324642855.ps tmp/89r5y1324642855.png",intern=TRUE)) character(0) > try(system("convert tmp/9j8sk1324642855.ps tmp/9j8sk1324642855.png",intern=TRUE)) character(0) > try(system("convert tmp/1052321324642855.ps tmp/1052321324642855.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 4.344 0.615 5.010