R version 2.9.0 (2009-04-17) Copyright (C) 2009 The R Foundation for Statistical Computing ISBN 3-900051-07-0 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(13 + ,14 + ,13 + ,3 + ,12 + ,8 + ,13 + ,5 + ,15 + ,12 + ,16 + ,6 + ,12 + ,7 + ,12 + ,6 + ,10 + ,10 + ,11 + ,5 + ,12 + ,7 + ,12 + ,3 + ,15 + ,16 + ,18 + ,8 + ,9 + ,11 + ,11 + ,4 + ,12 + ,14 + ,14 + ,4 + ,11 + ,6 + ,9 + ,4 + ,11 + ,16 + ,14 + ,6 + ,11 + ,11 + ,12 + ,6 + ,15 + ,16 + ,11 + ,5 + ,7 + ,12 + ,12 + ,4 + ,11 + ,7 + ,13 + ,6 + ,11 + ,13 + ,11 + ,4 + ,10 + ,11 + ,12 + ,6 + ,14 + ,15 + ,16 + ,6 + ,10 + ,7 + ,9 + ,4 + ,6 + ,9 + ,11 + ,4 + ,11 + ,7 + ,13 + ,2 + ,15 + ,14 + ,15 + ,7 + ,11 + ,15 + ,10 + ,5 + ,12 + ,7 + ,11 + ,4 + ,14 + ,15 + ,13 + ,6 + ,15 + ,17 + ,16 + ,6 + ,9 + ,15 + ,15 + ,7 + ,13 + ,14 + ,14 + ,5 + ,13 + ,14 + ,14 + ,6 + ,16 + ,8 + ,14 + ,4 + ,13 + ,8 + ,8 + ,4 + ,12 + ,14 + ,13 + ,7 + ,14 + ,14 + ,15 + ,7 + ,11 + ,8 + ,13 + ,4 + ,9 + ,11 + ,11 + ,4 + ,16 + ,16 + ,15 + ,6 + ,12 + ,10 + ,15 + ,6 + ,10 + ,8 + ,9 + ,5 + ,13 + ,14 + ,13 + ,6 + ,16 + ,16 + ,16 + ,7 + ,14 + ,13 + ,13 + ,6 + ,15 + ,5 + ,11 + ,3 + ,5 + ,8 + ,12 + ,3 + ,8 + ,10 + ,12 + ,4 + ,11 + ,8 + ,12 + ,6 + ,16 + ,13 + ,14 + ,7 + ,17 + ,15 + ,14 + ,5 + ,9 + ,6 + ,8 + ,4 + ,9 + ,12 + ,13 + ,5 + ,13 + ,16 + ,16 + ,6 + ,10 + ,5 + ,13 + ,6 + ,6 + ,15 + ,11 + ,6 + ,12 + ,12 + ,14 + ,5 + ,8 + ,8 + ,13 + ,4 + ,14 + ,13 + ,13 + ,5 + ,12 + ,14 + ,13 + ,5 + ,11 + ,12 + ,12 + ,4 + ,16 + ,16 + ,16 + ,6 + ,8 + ,10 + ,15 + ,2 + ,15 + ,15 + ,15 + ,8 + ,7 + ,8 + ,12 + ,3 + ,16 + ,16 + ,14 + ,6 + ,14 + ,19 + ,12 + ,6 + ,16 + ,14 + ,15 + ,6 + ,9 + ,6 + ,12 + ,5 + ,14 + ,13 + ,13 + ,5 + ,11 + ,15 + ,12 + ,6 + ,13 + ,7 + ,12 + ,5 + ,15 + ,13 + ,13 + ,6 + ,5 + ,4 + ,5 + ,2 + ,15 + ,14 + ,13 + ,5 + ,13 + ,13 + ,13 + ,5 + ,11 + ,11 + ,14 + ,5 + ,11 + ,14 + ,17 + ,6 + ,12 + ,12 + ,13 + ,6 + ,12 + ,15 + ,13 + ,6 + ,12 + ,14 + ,12 + ,5 + ,12 + ,13 + ,13 + ,5 + ,14 + ,8 + ,14 + ,4 + ,6 + ,6 + ,11 + ,2 + ,7 + ,7 + ,12 + ,4 + ,14 + ,13 + ,12 + ,6 + ,14 + ,13 + ,16 + ,6 + ,10 + ,11 + ,12 + ,5 + ,13 + ,5 + ,12 + ,3 + ,12 + ,12 + ,12 + ,6 + ,9 + ,8 + ,10 + ,4 + ,12 + ,11 + ,15 + ,5 + ,16 + ,14 + ,15 + ,8 + ,10 + ,9 + ,12 + ,4 + ,14 + ,10 + ,16 + ,6 + ,10 + ,13 + ,15 + ,6 + ,16 + ,16 + ,16 + ,7 + ,15 + ,16 + ,13 + ,6 + ,12 + ,11 + ,12 + ,5 + ,10 + ,8 + ,11 + ,4 + ,8 + ,4 + ,13 + ,6 + ,8 + ,7 + ,10 + ,3 + ,11 + ,14 + ,15 + ,5 + ,13 + ,11 + ,13 + ,6 + ,16 + ,17 + ,16 + ,7 + ,16 + ,15 + ,15 + ,7 + ,14 + ,17 + ,18 + ,6 + ,11 + ,5 + ,13 + ,3 + ,4 + ,4 + ,10 + ,2 + ,14 + ,10 + ,16 + ,8 + ,9 + ,11 + ,13 + ,3 + ,14 + ,15 + ,15 + ,8 + ,8 + ,10 + ,14 + ,3 + ,8 + ,9 + ,15 + ,4 + ,11 + ,12 + ,14 + ,5 + ,12 + ,15 + ,13 + ,7 + ,11 + ,7 + ,13 + ,6 + ,14 + ,13 + ,15 + ,6 + ,15 + ,12 + ,16 + ,7 + ,16 + ,14 + ,14 + ,6 + ,16 + ,14 + ,14 + ,6 + ,11 + ,8 + ,16 + ,6 + ,14 + ,15 + ,14 + ,6 + ,14 + ,12 + ,12 + ,4 + ,12 + ,12 + ,13 + ,4 + ,14 + ,16 + ,12 + ,5 + ,8 + ,9 + ,12 + ,4 + ,13 + ,15 + ,14 + ,6 + ,16 + ,15 + ,14 + ,6 + ,12 + ,6 + ,14 + ,5 + ,16 + ,14 + ,16 + ,8 + ,12 + ,15 + ,13 + ,6 + ,11 + ,10 + ,14 + ,5 + ,4 + ,6 + ,4 + ,4 + ,16 + ,14 + ,16 + ,8 + ,15 + ,12 + ,13 + ,6 + ,10 + ,8 + ,16 + ,4 + ,13 + ,11 + ,15 + ,6 + ,15 + ,13 + ,14 + ,6 + ,12 + ,9 + ,13 + ,4 + ,14 + ,15 + ,14 + ,6 + ,7 + ,13 + ,12 + ,3 + ,19 + ,15 + ,15 + ,6 + ,12 + ,14 + ,14 + ,5 + ,12 + ,16 + ,13 + ,4 + ,13 + ,14 + ,14 + ,6 + ,15 + ,14 + ,16 + ,4 + ,8 + ,10 + ,6 + ,4 + ,12 + ,10 + ,13 + ,4 + ,10 + ,4 + ,13 + ,6 + ,8 + ,8 + ,14 + ,5 + ,10 + ,15 + ,15 + ,6 + ,15 + ,16 + ,14 + ,6 + ,16 + ,12 + ,15 + ,8 + ,13 + ,12 + ,13 + ,7 + ,16 + ,15 + ,16 + ,7 + ,9 + ,9 + ,12 + ,4 + ,14 + ,12 + ,15 + ,6 + ,14 + ,14 + ,12 + ,6 + ,12 + ,11 + ,14 + ,2) + ,dim=c(4 + ,156) + ,dimnames=list(c('Popularity' + ,'KnowingPeople' + ,'Liked' + ,'Celebrity') + ,1:156)) > y <- array(NA,dim=c(4,156),dimnames=list(c('Popularity','KnowingPeople','Liked','Celebrity'),1:156)) > 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' > #'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 Attaching package: 'zoo' The following object(s) are masked from package:base : as.Date.numeric > 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 Celebrity Popularity KnowingPeople Liked 1 3 13 14 13 2 5 12 8 13 3 6 15 12 16 4 6 12 7 12 5 5 10 10 11 6 3 12 7 12 7 8 15 16 18 8 4 9 11 11 9 4 12 14 14 10 4 11 6 9 11 6 11 16 14 12 6 11 11 12 13 5 15 16 11 14 4 7 12 12 15 6 11 7 13 16 4 11 13 11 17 6 10 11 12 18 6 14 15 16 19 4 10 7 9 20 4 6 9 11 21 2 11 7 13 22 7 15 14 15 23 5 11 15 10 24 4 12 7 11 25 6 14 15 13 26 6 15 17 16 27 7 9 15 15 28 5 13 14 14 29 6 13 14 14 30 4 16 8 14 31 4 13 8 8 32 7 12 14 13 33 7 14 14 15 34 4 11 8 13 35 4 9 11 11 36 6 16 16 15 37 6 12 10 15 38 5 10 8 9 39 6 13 14 13 40 7 16 16 16 41 6 14 13 13 42 3 15 5 11 43 3 5 8 12 44 4 8 10 12 45 6 11 8 12 46 7 16 13 14 47 5 17 15 14 48 4 9 6 8 49 5 9 12 13 50 6 13 16 16 51 6 10 5 13 52 6 6 15 11 53 5 12 12 14 54 4 8 8 13 55 5 14 13 13 56 5 12 14 13 57 4 11 12 12 58 6 16 16 16 59 2 8 10 15 60 8 15 15 15 61 3 7 8 12 62 6 16 16 14 63 6 14 19 12 64 6 16 14 15 65 5 9 6 12 66 5 14 13 13 67 6 11 15 12 68 5 13 7 12 69 6 15 13 13 70 2 5 4 5 71 5 15 14 13 72 5 13 13 13 73 5 11 11 14 74 6 11 14 17 75 6 12 12 13 76 6 12 15 13 77 5 12 14 12 78 5 12 13 13 79 4 14 8 14 80 2 6 6 11 81 4 7 7 12 82 6 14 13 12 83 6 14 13 16 84 5 10 11 12 85 3 13 5 12 86 6 12 12 12 87 4 9 8 10 88 5 12 11 15 89 8 16 14 15 90 4 10 9 12 91 6 14 10 16 92 6 10 13 15 93 7 16 16 16 94 6 15 16 13 95 5 12 11 12 96 4 10 8 11 97 6 8 4 13 98 3 8 7 10 99 5 11 14 15 100 6 13 11 13 101 7 16 17 16 102 7 16 15 15 103 6 14 17 18 104 3 11 5 13 105 2 4 4 10 106 8 14 10 16 107 3 9 11 13 108 8 14 15 15 109 3 8 10 14 110 4 8 9 15 111 5 11 12 14 112 7 12 15 13 113 6 11 7 13 114 6 14 13 15 115 7 15 12 16 116 6 16 14 14 117 6 16 14 14 118 6 11 8 16 119 6 14 15 14 120 4 14 12 12 121 4 12 12 13 122 5 14 16 12 123 4 8 9 12 124 6 13 15 14 125 6 16 15 14 126 5 12 6 14 127 8 16 14 16 128 6 12 15 13 129 5 11 10 14 130 4 4 6 4 131 8 16 14 16 132 6 15 12 13 133 4 10 8 16 134 6 13 11 15 135 6 15 13 14 136 4 12 9 13 137 6 14 15 14 138 3 7 13 12 139 6 19 15 15 140 5 12 14 14 141 4 12 16 13 142 6 13 14 14 143 4 15 14 16 144 4 8 10 6 145 4 12 10 13 146 6 10 4 13 147 5 8 8 14 148 6 10 15 15 149 6 15 16 14 150 8 16 12 15 151 7 13 12 13 152 7 16 15 16 153 4 9 9 12 154 6 14 12 15 155 6 14 14 12 156 2 12 11 14 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) Popularity KnowingPeople Liked 0.2289 0.1529 0.1041 0.1466 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -3.26127 -0.59808 0.01644 0.59069 2.24380 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 0.22887 0.51795 0.442 0.659207 Popularity 0.15295 0.03813 4.011 9.46e-05 *** KnowingPeople 0.10410 0.03071 3.390 0.000891 *** Liked 0.14657 0.04817 3.042 0.002766 ** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.041 on 152 degrees of freedom Multiple R-squared: 0.4583, Adjusted R-squared: 0.4476 F-statistic: 42.87 on 3 and 152 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.822113740 0.35577252 0.17788626 [2,] 0.787696930 0.42460614 0.21230307 [3,] 0.796973040 0.40605392 0.20302696 [4,] 0.844814093 0.31037181 0.15518591 [5,] 0.821251657 0.35749669 0.17874834 [6,] 0.852567642 0.29486472 0.14743236 [7,] 0.882458444 0.23508311 0.11754156 [8,] 0.840396504 0.31920699 0.15960350 [9,] 0.824241714 0.35151657 0.17575829 [10,] 0.770684269 0.45863146 0.22931573 [11,] 0.795431699 0.40913660 0.20456830 [12,] 0.736844629 0.52631074 0.26315537 [13,] 0.672178436 0.65564313 0.32782156 [14,] 0.606695197 0.78660961 0.39330480 [15,] 0.915701753 0.16859649 0.08429825 [16,] 0.911421069 0.17715786 0.08857893 [17,] 0.888156056 0.22368789 0.11184394 [18,] 0.856257379 0.28748524 0.14374262 [19,] 0.822278305 0.35544339 0.17772170 [20,] 0.787012199 0.42597560 0.21298780 [21,] 0.810851813 0.37829637 0.18914819 [22,] 0.782174522 0.43565096 0.21782548 [23,] 0.739420724 0.52115855 0.26057928 [24,] 0.751686823 0.49662635 0.24831318 [25,] 0.715607228 0.56878554 0.28439277 [26,] 0.773495271 0.45300946 0.22650473 [27,] 0.769889329 0.46022134 0.23011067 [28,] 0.743356358 0.51328728 0.25664364 [29,] 0.705747108 0.58850578 0.29425289 [30,] 0.661174618 0.67765076 0.33882538 [31,] 0.625757141 0.74848572 0.37424286 [32,] 0.640219857 0.71956029 0.35978014 [33,] 0.598682897 0.80263421 0.40131710 [34,] 0.554785719 0.89042856 0.44521428 [35,] 0.513201008 0.97359798 0.48679899 [36,] 0.544172284 0.91165543 0.45582772 [37,] 0.545316497 0.90936701 0.45468350 [38,] 0.501442532 0.99711494 0.49855747 [39,] 0.563519266 0.87296147 0.43648073 [40,] 0.563329614 0.87334077 0.43667039 [41,] 0.592084011 0.81583198 0.40791599 [42,] 0.561446884 0.87710623 0.43855312 [43,] 0.513517704 0.97296459 0.48648230 [44,] 0.468267970 0.93653594 0.53173203 [45,] 0.549035378 0.90192924 0.45096462 [46,] 0.604472084 0.79105583 0.39552792 [47,] 0.564648415 0.87070317 0.43535158 [48,] 0.528604646 0.94279071 0.47139535 [49,] 0.494142840 0.98828568 0.50585716 [50,] 0.453997220 0.90799444 0.54600278 [51,] 0.446058488 0.89211698 0.55394151 [52,] 0.413117393 0.82623479 0.58688261 [53,] 0.709056436 0.58188713 0.29094356 [54,] 0.781154934 0.43769013 0.21884507 [55,] 0.772871382 0.45425724 0.22712862 [56,] 0.740114431 0.51977114 0.25988557 [57,] 0.700923786 0.59815243 0.29907621 [58,] 0.662551147 0.67489771 0.33744885 [59,] 0.658407961 0.68318408 0.34159204 [60,] 0.629279568 0.74144086 0.37072043 [61,] 0.609065293 0.78186941 0.39093471 [62,] 0.569083877 0.86183225 0.43091612 [63,] 0.525978221 0.94804356 0.47402178 [64,] 0.482123169 0.96424634 0.51787683 [65,] 0.468412554 0.93682511 0.53158745 [66,] 0.431276220 0.86255244 0.56872378 [67,] 0.386174103 0.77234821 0.61382590 [68,] 0.345128443 0.69025689 0.65487156 [69,] 0.326765897 0.65353179 0.67323410 [70,] 0.295034434 0.59006887 0.70496557 [71,] 0.258551835 0.51710367 0.74144817 [72,] 0.225235833 0.45047167 0.77476417 [73,] 0.246927188 0.49385438 0.75307281 [74,] 0.277457693 0.55491539 0.72254231 [75,] 0.241644397 0.48328879 0.75835560 [76,] 0.214689325 0.42937865 0.78531067 [77,] 0.182388349 0.36477670 0.81761165 [78,] 0.156314335 0.31262867 0.84368566 [79,] 0.213725850 0.42745170 0.78627415 [80,] 0.205826371 0.41165274 0.79417363 [81,] 0.174236332 0.34847266 0.82576367 [82,] 0.149335201 0.29867040 0.85066480 [83,] 0.194498986 0.38899797 0.80550101 [84,] 0.170412247 0.34082449 0.82958775 [85,] 0.145064061 0.29012812 0.85493594 [86,] 0.138757344 0.27751469 0.86124266 [87,] 0.116965449 0.23393090 0.88303455 [88,] 0.095459342 0.19091868 0.90454066 [89,] 0.077041312 0.15408262 0.92295869 [90,] 0.063124940 0.12624988 0.93687506 [91,] 0.124019797 0.24803959 0.87598020 [92,] 0.111749644 0.22349929 0.88825036 [93,] 0.094817626 0.18963525 0.90518237 [94,] 0.082869731 0.16573946 0.91713027 [95,] 0.067184111 0.13436822 0.93281589 [96,] 0.056327557 0.11265511 0.94367244 [97,] 0.047696236 0.09539247 0.95230376 [98,] 0.068743749 0.13748750 0.93125625 [99,] 0.062674025 0.12534805 0.93732597 [100,] 0.122649137 0.24529827 0.87735086 [101,] 0.153270963 0.30654193 0.84672904 [102,] 0.249083425 0.49816685 0.75091658 [103,] 0.279940156 0.55988031 0.72005984 [104,] 0.247537900 0.49507580 0.75246210 [105,] 0.209429375 0.41885875 0.79057063 [106,] 0.275192620 0.55038524 0.72480738 [107,] 0.281740537 0.56348107 0.71825946 [108,] 0.239939353 0.47987871 0.76006065 [109,] 0.226448820 0.45289764 0.77355118 [110,] 0.189528980 0.37905796 0.81047102 [111,] 0.156442047 0.31288409 0.84355795 [112,] 0.145820325 0.29164065 0.85417967 [113,] 0.118534928 0.23706986 0.88146507 [114,] 0.156100701 0.31220140 0.84389930 [115,] 0.166042000 0.33208400 0.83395800 [116,] 0.149392213 0.29878443 0.85060779 [117,] 0.119155445 0.23831089 0.88084456 [118,] 0.096877213 0.19375443 0.90312279 [119,] 0.076480602 0.15296120 0.92351940 [120,] 0.059570158 0.11914032 0.94042984 [121,] 0.082864960 0.16572992 0.91713504 [122,] 0.073152174 0.14630435 0.92684783 [123,] 0.054164431 0.10832886 0.94583557 [124,] 0.062862448 0.12572490 0.93713755 [125,] 0.090838912 0.18167782 0.90916109 [126,] 0.067555936 0.13511187 0.93244406 [127,] 0.058966060 0.11793212 0.94103394 [128,] 0.044387494 0.08877499 0.95561251 [129,] 0.030729524 0.06145905 0.96927048 [130,] 0.032222358 0.06444472 0.96777764 [131,] 0.022881384 0.04576277 0.97711862 [132,] 0.019119415 0.03823883 0.98088058 [133,] 0.015912318 0.03182464 0.98408768 [134,] 0.009942433 0.01988487 0.99005757 [135,] 0.009399832 0.01879966 0.99060017 [136,] 0.005794679 0.01158936 0.99420532 [137,] 0.021166284 0.04233257 0.97883372 [138,] 0.014393926 0.02878785 0.98560607 [139,] 0.015857027 0.03171405 0.98414297 [140,] 0.015334203 0.03066841 0.98466580 [141,] 0.013892184 0.02778437 0.98610782 [142,] 0.056576469 0.11315294 0.94342353 [143,] 0.026547587 0.05309517 0.97345241 > postscript(file="/var/www/html/rcomp/tmp/148js1290425749.ps",horizontal=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/www/html/rcomp/tmp/248js1290425749.ps",horizontal=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/www/html/rcomp/tmp/3x0id1290425749.ps",horizontal=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/www/html/rcomp/tmp/4x0id1290425749.ps",horizontal=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/www/html/rcomp/tmp/5x0id1290425749.ps",horizontal=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 = 156 Frequency = 1 1 2 3 4 5 6 -2.579951007 0.197597472 -0.117344323 1.448262650 0.588425563 -1.551737350 7 8 9 10 11 12 1.173125418 -0.362725619 -1.573567463 0.145007051 0.371181404 1.184811615 13 14 15 16 17 18 -0.800917997 -0.307493256 1.454646194 -0.876823062 1.337760385 -0.276695408 19 20 21 22 23 24 0.193855870 0.304320595 -2.545353806 0.821021000 0.061542262 -0.405172123 25 26 27 28 29 30 0.163000272 -0.637844081 1.634613670 -0.726516233 0.273483767 -1.560762835 31 32 33 34 35 36 -0.222525166 1.572997764 0.973969770 -0.649453758 -0.362725619 -0.540127673 37 38 39 40 41 42 0.696267116 1.089755918 0.420048993 0.313307101 0.371200175 -1.655818531 43 44 45 46 47 48 -0.585195910 -0.252242124 1.497111469 0.918737408 -1.442411265 0.597469818 49 50 51 52 53 54 0.240043977 -0.227846589 1.815794867 1.679720886 -0.365367560 -0.190607447 55 56 57 58 59 60 -0.628799825 -0.427002236 -0.919288337 -0.686692899 -2.691937803 1.716921049 61 62 63 64 65 66 -0.891093451 -0.393562446 -0.106834307 -0.331927770 1.011208912 -0.628799825 67 68 69 70 71 72 0.768411809 0.295313880 0.218251405 -0.142839519 -0.885848547 -0.475851055 73 74 75 76 77 78 -0.108318838 0.139685628 0.781197666 0.468897812 -0.280437010 -0.322902285 79 80 81 82 83 84 -1.254865295 -1.383379551 0.213006501 0.517765401 -0.068495505 0.337760385 85 86 87 88 89 90 -1.496486217 0.927762893 0.096139462 -0.407832835 1.668072230 -0.454039712 91 92 93 94 95 96 0.243804350 0.689864802 0.313307101 -0.094048450 0.031862844 -0.203374535 97 98 99 100 101 102 2.225792358 -0.646811816 -0.567183919 0.732348848 0.209207149 0.563972279 103 104 105 106 107 108 -0.778025763 -1.337153903 -0.722716881 2.243804350 -1.655856072 1.869869819 109 110 111 112 113 114 -1.545372577 -0.587837852 -0.212418790 1.468897812 1.454646194 0.078069722 115 116 117 118 119 120 0.882655677 -0.185362543 -0.185362543 0.910850563 0.016435045 -1.378134647 121 122 123 124 125 126 -1.218802334 -0.794534453 -0.148142172 0.169383816 -0.289462495 0.259232149 127 128 129 130 131 132 1.521507004 0.468897812 -0.004218887 1.948474575 1.521507004 0.322351356 133 134 135 136 137 138 -0.936200667 0.439218395 0.071686178 -0.906502479 0.016435045 -1.411593208 139 140 141 142 143 144 -0.894874032 -0.573567463 -1.635202139 0.273483767 -2.325544226 0.627149235 145 146 147 148 149 150 -1.010602431 1.919894818 0.662827326 0.481664900 -0.240613676 1.876272133 151 152 153 154 155 156 1.628248896 0.417407052 -0.301090942 0.182169673 0.413665450 -3.261267609 > postscript(file="/var/www/html/rcomp/tmp/6qrhg1290425749.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > dum <- cbind(lag(myerror,k=1),myerror) > dum Time Series: Start = 0 End = 156 Frequency = 1 lag(myerror, k = 1) myerror 0 -2.579951007 NA 1 0.197597472 -2.579951007 2 -0.117344323 0.197597472 3 1.448262650 -0.117344323 4 0.588425563 1.448262650 5 -1.551737350 0.588425563 6 1.173125418 -1.551737350 7 -0.362725619 1.173125418 8 -1.573567463 -0.362725619 9 0.145007051 -1.573567463 10 0.371181404 0.145007051 11 1.184811615 0.371181404 12 -0.800917997 1.184811615 13 -0.307493256 -0.800917997 14 1.454646194 -0.307493256 15 -0.876823062 1.454646194 16 1.337760385 -0.876823062 17 -0.276695408 1.337760385 18 0.193855870 -0.276695408 19 0.304320595 0.193855870 20 -2.545353806 0.304320595 21 0.821021000 -2.545353806 22 0.061542262 0.821021000 23 -0.405172123 0.061542262 24 0.163000272 -0.405172123 25 -0.637844081 0.163000272 26 1.634613670 -0.637844081 27 -0.726516233 1.634613670 28 0.273483767 -0.726516233 29 -1.560762835 0.273483767 30 -0.222525166 -1.560762835 31 1.572997764 -0.222525166 32 0.973969770 1.572997764 33 -0.649453758 0.973969770 34 -0.362725619 -0.649453758 35 -0.540127673 -0.362725619 36 0.696267116 -0.540127673 37 1.089755918 0.696267116 38 0.420048993 1.089755918 39 0.313307101 0.420048993 40 0.371200175 0.313307101 41 -1.655818531 0.371200175 42 -0.585195910 -1.655818531 43 -0.252242124 -0.585195910 44 1.497111469 -0.252242124 45 0.918737408 1.497111469 46 -1.442411265 0.918737408 47 0.597469818 -1.442411265 48 0.240043977 0.597469818 49 -0.227846589 0.240043977 50 1.815794867 -0.227846589 51 1.679720886 1.815794867 52 -0.365367560 1.679720886 53 -0.190607447 -0.365367560 54 -0.628799825 -0.190607447 55 -0.427002236 -0.628799825 56 -0.919288337 -0.427002236 57 -0.686692899 -0.919288337 58 -2.691937803 -0.686692899 59 1.716921049 -2.691937803 60 -0.891093451 1.716921049 61 -0.393562446 -0.891093451 62 -0.106834307 -0.393562446 63 -0.331927770 -0.106834307 64 1.011208912 -0.331927770 65 -0.628799825 1.011208912 66 0.768411809 -0.628799825 67 0.295313880 0.768411809 68 0.218251405 0.295313880 69 -0.142839519 0.218251405 70 -0.885848547 -0.142839519 71 -0.475851055 -0.885848547 72 -0.108318838 -0.475851055 73 0.139685628 -0.108318838 74 0.781197666 0.139685628 75 0.468897812 0.781197666 76 -0.280437010 0.468897812 77 -0.322902285 -0.280437010 78 -1.254865295 -0.322902285 79 -1.383379551 -1.254865295 80 0.213006501 -1.383379551 81 0.517765401 0.213006501 82 -0.068495505 0.517765401 83 0.337760385 -0.068495505 84 -1.496486217 0.337760385 85 0.927762893 -1.496486217 86 0.096139462 0.927762893 87 -0.407832835 0.096139462 88 1.668072230 -0.407832835 89 -0.454039712 1.668072230 90 0.243804350 -0.454039712 91 0.689864802 0.243804350 92 0.313307101 0.689864802 93 -0.094048450 0.313307101 94 0.031862844 -0.094048450 95 -0.203374535 0.031862844 96 2.225792358 -0.203374535 97 -0.646811816 2.225792358 98 -0.567183919 -0.646811816 99 0.732348848 -0.567183919 100 0.209207149 0.732348848 101 0.563972279 0.209207149 102 -0.778025763 0.563972279 103 -1.337153903 -0.778025763 104 -0.722716881 -1.337153903 105 2.243804350 -0.722716881 106 -1.655856072 2.243804350 107 1.869869819 -1.655856072 108 -1.545372577 1.869869819 109 -0.587837852 -1.545372577 110 -0.212418790 -0.587837852 111 1.468897812 -0.212418790 112 1.454646194 1.468897812 113 0.078069722 1.454646194 114 0.882655677 0.078069722 115 -0.185362543 0.882655677 116 -0.185362543 -0.185362543 117 0.910850563 -0.185362543 118 0.016435045 0.910850563 119 -1.378134647 0.016435045 120 -1.218802334 -1.378134647 121 -0.794534453 -1.218802334 122 -0.148142172 -0.794534453 123 0.169383816 -0.148142172 124 -0.289462495 0.169383816 125 0.259232149 -0.289462495 126 1.521507004 0.259232149 127 0.468897812 1.521507004 128 -0.004218887 0.468897812 129 1.948474575 -0.004218887 130 1.521507004 1.948474575 131 0.322351356 1.521507004 132 -0.936200667 0.322351356 133 0.439218395 -0.936200667 134 0.071686178 0.439218395 135 -0.906502479 0.071686178 136 0.016435045 -0.906502479 137 -1.411593208 0.016435045 138 -0.894874032 -1.411593208 139 -0.573567463 -0.894874032 140 -1.635202139 -0.573567463 141 0.273483767 -1.635202139 142 -2.325544226 0.273483767 143 0.627149235 -2.325544226 144 -1.010602431 0.627149235 145 1.919894818 -1.010602431 146 0.662827326 1.919894818 147 0.481664900 0.662827326 148 -0.240613676 0.481664900 149 1.876272133 -0.240613676 150 1.628248896 1.876272133 151 0.417407052 1.628248896 152 -0.301090942 0.417407052 153 0.182169673 -0.301090942 154 0.413665450 0.182169673 155 -3.261267609 0.413665450 156 NA -3.261267609 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 0.197597472 -2.579951007 [2,] -0.117344323 0.197597472 [3,] 1.448262650 -0.117344323 [4,] 0.588425563 1.448262650 [5,] -1.551737350 0.588425563 [6,] 1.173125418 -1.551737350 [7,] -0.362725619 1.173125418 [8,] -1.573567463 -0.362725619 [9,] 0.145007051 -1.573567463 [10,] 0.371181404 0.145007051 [11,] 1.184811615 0.371181404 [12,] -0.800917997 1.184811615 [13,] -0.307493256 -0.800917997 [14,] 1.454646194 -0.307493256 [15,] -0.876823062 1.454646194 [16,] 1.337760385 -0.876823062 [17,] -0.276695408 1.337760385 [18,] 0.193855870 -0.276695408 [19,] 0.304320595 0.193855870 [20,] -2.545353806 0.304320595 [21,] 0.821021000 -2.545353806 [22,] 0.061542262 0.821021000 [23,] -0.405172123 0.061542262 [24,] 0.163000272 -0.405172123 [25,] -0.637844081 0.163000272 [26,] 1.634613670 -0.637844081 [27,] -0.726516233 1.634613670 [28,] 0.273483767 -0.726516233 [29,] -1.560762835 0.273483767 [30,] -0.222525166 -1.560762835 [31,] 1.572997764 -0.222525166 [32,] 0.973969770 1.572997764 [33,] -0.649453758 0.973969770 [34,] -0.362725619 -0.649453758 [35,] -0.540127673 -0.362725619 [36,] 0.696267116 -0.540127673 [37,] 1.089755918 0.696267116 [38,] 0.420048993 1.089755918 [39,] 0.313307101 0.420048993 [40,] 0.371200175 0.313307101 [41,] -1.655818531 0.371200175 [42,] -0.585195910 -1.655818531 [43,] -0.252242124 -0.585195910 [44,] 1.497111469 -0.252242124 [45,] 0.918737408 1.497111469 [46,] -1.442411265 0.918737408 [47,] 0.597469818 -1.442411265 [48,] 0.240043977 0.597469818 [49,] -0.227846589 0.240043977 [50,] 1.815794867 -0.227846589 [51,] 1.679720886 1.815794867 [52,] -0.365367560 1.679720886 [53,] -0.190607447 -0.365367560 [54,] -0.628799825 -0.190607447 [55,] -0.427002236 -0.628799825 [56,] -0.919288337 -0.427002236 [57,] -0.686692899 -0.919288337 [58,] -2.691937803 -0.686692899 [59,] 1.716921049 -2.691937803 [60,] -0.891093451 1.716921049 [61,] -0.393562446 -0.891093451 [62,] -0.106834307 -0.393562446 [63,] -0.331927770 -0.106834307 [64,] 1.011208912 -0.331927770 [65,] -0.628799825 1.011208912 [66,] 0.768411809 -0.628799825 [67,] 0.295313880 0.768411809 [68,] 0.218251405 0.295313880 [69,] -0.142839519 0.218251405 [70,] -0.885848547 -0.142839519 [71,] -0.475851055 -0.885848547 [72,] -0.108318838 -0.475851055 [73,] 0.139685628 -0.108318838 [74,] 0.781197666 0.139685628 [75,] 0.468897812 0.781197666 [76,] -0.280437010 0.468897812 [77,] -0.322902285 -0.280437010 [78,] -1.254865295 -0.322902285 [79,] -1.383379551 -1.254865295 [80,] 0.213006501 -1.383379551 [81,] 0.517765401 0.213006501 [82,] -0.068495505 0.517765401 [83,] 0.337760385 -0.068495505 [84,] -1.496486217 0.337760385 [85,] 0.927762893 -1.496486217 [86,] 0.096139462 0.927762893 [87,] -0.407832835 0.096139462 [88,] 1.668072230 -0.407832835 [89,] -0.454039712 1.668072230 [90,] 0.243804350 -0.454039712 [91,] 0.689864802 0.243804350 [92,] 0.313307101 0.689864802 [93,] -0.094048450 0.313307101 [94,] 0.031862844 -0.094048450 [95,] -0.203374535 0.031862844 [96,] 2.225792358 -0.203374535 [97,] -0.646811816 2.225792358 [98,] -0.567183919 -0.646811816 [99,] 0.732348848 -0.567183919 [100,] 0.209207149 0.732348848 [101,] 0.563972279 0.209207149 [102,] -0.778025763 0.563972279 [103,] -1.337153903 -0.778025763 [104,] -0.722716881 -1.337153903 [105,] 2.243804350 -0.722716881 [106,] -1.655856072 2.243804350 [107,] 1.869869819 -1.655856072 [108,] -1.545372577 1.869869819 [109,] -0.587837852 -1.545372577 [110,] -0.212418790 -0.587837852 [111,] 1.468897812 -0.212418790 [112,] 1.454646194 1.468897812 [113,] 0.078069722 1.454646194 [114,] 0.882655677 0.078069722 [115,] -0.185362543 0.882655677 [116,] -0.185362543 -0.185362543 [117,] 0.910850563 -0.185362543 [118,] 0.016435045 0.910850563 [119,] -1.378134647 0.016435045 [120,] -1.218802334 -1.378134647 [121,] -0.794534453 -1.218802334 [122,] -0.148142172 -0.794534453 [123,] 0.169383816 -0.148142172 [124,] -0.289462495 0.169383816 [125,] 0.259232149 -0.289462495 [126,] 1.521507004 0.259232149 [127,] 0.468897812 1.521507004 [128,] -0.004218887 0.468897812 [129,] 1.948474575 -0.004218887 [130,] 1.521507004 1.948474575 [131,] 0.322351356 1.521507004 [132,] -0.936200667 0.322351356 [133,] 0.439218395 -0.936200667 [134,] 0.071686178 0.439218395 [135,] -0.906502479 0.071686178 [136,] 0.016435045 -0.906502479 [137,] -1.411593208 0.016435045 [138,] -0.894874032 -1.411593208 [139,] -0.573567463 -0.894874032 [140,] -1.635202139 -0.573567463 [141,] 0.273483767 -1.635202139 [142,] -2.325544226 0.273483767 [143,] 0.627149235 -2.325544226 [144,] -1.010602431 0.627149235 [145,] 1.919894818 -1.010602431 [146,] 0.662827326 1.919894818 [147,] 0.481664900 0.662827326 [148,] -0.240613676 0.481664900 [149,] 1.876272133 -0.240613676 [150,] 1.628248896 1.876272133 [151,] 0.417407052 1.628248896 [152,] -0.301090942 0.417407052 [153,] 0.182169673 -0.301090942 [154,] 0.413665450 0.182169673 [155,] -3.261267609 0.413665450 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 0.197597472 -2.579951007 2 -0.117344323 0.197597472 3 1.448262650 -0.117344323 4 0.588425563 1.448262650 5 -1.551737350 0.588425563 6 1.173125418 -1.551737350 7 -0.362725619 1.173125418 8 -1.573567463 -0.362725619 9 0.145007051 -1.573567463 10 0.371181404 0.145007051 11 1.184811615 0.371181404 12 -0.800917997 1.184811615 13 -0.307493256 -0.800917997 14 1.454646194 -0.307493256 15 -0.876823062 1.454646194 16 1.337760385 -0.876823062 17 -0.276695408 1.337760385 18 0.193855870 -0.276695408 19 0.304320595 0.193855870 20 -2.545353806 0.304320595 21 0.821021000 -2.545353806 22 0.061542262 0.821021000 23 -0.405172123 0.061542262 24 0.163000272 -0.405172123 25 -0.637844081 0.163000272 26 1.634613670 -0.637844081 27 -0.726516233 1.634613670 28 0.273483767 -0.726516233 29 -1.560762835 0.273483767 30 -0.222525166 -1.560762835 31 1.572997764 -0.222525166 32 0.973969770 1.572997764 33 -0.649453758 0.973969770 34 -0.362725619 -0.649453758 35 -0.540127673 -0.362725619 36 0.696267116 -0.540127673 37 1.089755918 0.696267116 38 0.420048993 1.089755918 39 0.313307101 0.420048993 40 0.371200175 0.313307101 41 -1.655818531 0.371200175 42 -0.585195910 -1.655818531 43 -0.252242124 -0.585195910 44 1.497111469 -0.252242124 45 0.918737408 1.497111469 46 -1.442411265 0.918737408 47 0.597469818 -1.442411265 48 0.240043977 0.597469818 49 -0.227846589 0.240043977 50 1.815794867 -0.227846589 51 1.679720886 1.815794867 52 -0.365367560 1.679720886 53 -0.190607447 -0.365367560 54 -0.628799825 -0.190607447 55 -0.427002236 -0.628799825 56 -0.919288337 -0.427002236 57 -0.686692899 -0.919288337 58 -2.691937803 -0.686692899 59 1.716921049 -2.691937803 60 -0.891093451 1.716921049 61 -0.393562446 -0.891093451 62 -0.106834307 -0.393562446 63 -0.331927770 -0.106834307 64 1.011208912 -0.331927770 65 -0.628799825 1.011208912 66 0.768411809 -0.628799825 67 0.295313880 0.768411809 68 0.218251405 0.295313880 69 -0.142839519 0.218251405 70 -0.885848547 -0.142839519 71 -0.475851055 -0.885848547 72 -0.108318838 -0.475851055 73 0.139685628 -0.108318838 74 0.781197666 0.139685628 75 0.468897812 0.781197666 76 -0.280437010 0.468897812 77 -0.322902285 -0.280437010 78 -1.254865295 -0.322902285 79 -1.383379551 -1.254865295 80 0.213006501 -1.383379551 81 0.517765401 0.213006501 82 -0.068495505 0.517765401 83 0.337760385 -0.068495505 84 -1.496486217 0.337760385 85 0.927762893 -1.496486217 86 0.096139462 0.927762893 87 -0.407832835 0.096139462 88 1.668072230 -0.407832835 89 -0.454039712 1.668072230 90 0.243804350 -0.454039712 91 0.689864802 0.243804350 92 0.313307101 0.689864802 93 -0.094048450 0.313307101 94 0.031862844 -0.094048450 95 -0.203374535 0.031862844 96 2.225792358 -0.203374535 97 -0.646811816 2.225792358 98 -0.567183919 -0.646811816 99 0.732348848 -0.567183919 100 0.209207149 0.732348848 101 0.563972279 0.209207149 102 -0.778025763 0.563972279 103 -1.337153903 -0.778025763 104 -0.722716881 -1.337153903 105 2.243804350 -0.722716881 106 -1.655856072 2.243804350 107 1.869869819 -1.655856072 108 -1.545372577 1.869869819 109 -0.587837852 -1.545372577 110 -0.212418790 -0.587837852 111 1.468897812 -0.212418790 112 1.454646194 1.468897812 113 0.078069722 1.454646194 114 0.882655677 0.078069722 115 -0.185362543 0.882655677 116 -0.185362543 -0.185362543 117 0.910850563 -0.185362543 118 0.016435045 0.910850563 119 -1.378134647 0.016435045 120 -1.218802334 -1.378134647 121 -0.794534453 -1.218802334 122 -0.148142172 -0.794534453 123 0.169383816 -0.148142172 124 -0.289462495 0.169383816 125 0.259232149 -0.289462495 126 1.521507004 0.259232149 127 0.468897812 1.521507004 128 -0.004218887 0.468897812 129 1.948474575 -0.004218887 130 1.521507004 1.948474575 131 0.322351356 1.521507004 132 -0.936200667 0.322351356 133 0.439218395 -0.936200667 134 0.071686178 0.439218395 135 -0.906502479 0.071686178 136 0.016435045 -0.906502479 137 -1.411593208 0.016435045 138 -0.894874032 -1.411593208 139 -0.573567463 -0.894874032 140 -1.635202139 -0.573567463 141 0.273483767 -1.635202139 142 -2.325544226 0.273483767 143 0.627149235 -2.325544226 144 -1.010602431 0.627149235 145 1.919894818 -1.010602431 146 0.662827326 1.919894818 147 0.481664900 0.662827326 148 -0.240613676 0.481664900 149 1.876272133 -0.240613676 150 1.628248896 1.876272133 151 0.417407052 1.628248896 152 -0.301090942 0.417407052 153 0.182169673 -0.301090942 154 0.413665450 0.182169673 155 -3.261267609 0.413665450 > 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/www/html/rcomp/tmp/7qrhg1290425749.ps",horizontal=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/www/html/rcomp/tmp/8jig11290425749.ps",horizontal=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/www/html/rcomp/tmp/9jig11290425749.ps",horizontal=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/www/html/rcomp/tmp/10bag41290425749.ps",horizontal=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/www/html/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/html/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/www/html/rcomp/tmp/11xswa1290425749.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/www/html/rcomp/tmp/120tdg1290425749.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/www/html/rcomp/tmp/13wlap1290425749.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/www/html/rcomp/tmp/14i39v1290425749.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/www/html/rcomp/tmp/15l48i1290425749.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/www/html/rcomp/tmp/1664o61290425749.tab") + } > > try(system("convert tmp/148js1290425749.ps tmp/148js1290425749.png",intern=TRUE)) character(0) > try(system("convert tmp/248js1290425749.ps tmp/248js1290425749.png",intern=TRUE)) character(0) > try(system("convert tmp/3x0id1290425749.ps tmp/3x0id1290425749.png",intern=TRUE)) character(0) > try(system("convert tmp/4x0id1290425749.ps tmp/4x0id1290425749.png",intern=TRUE)) character(0) > try(system("convert tmp/5x0id1290425749.ps tmp/5x0id1290425749.png",intern=TRUE)) character(0) > try(system("convert tmp/6qrhg1290425749.ps tmp/6qrhg1290425749.png",intern=TRUE)) character(0) > try(system("convert tmp/7qrhg1290425749.ps tmp/7qrhg1290425749.png",intern=TRUE)) character(0) > try(system("convert tmp/8jig11290425749.ps tmp/8jig11290425749.png",intern=TRUE)) character(0) > try(system("convert tmp/9jig11290425749.ps tmp/9jig11290425749.png",intern=TRUE)) character(0) > try(system("convert tmp/10bag41290425749.ps tmp/10bag41290425749.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 3.966 1.771 8.673