R version 2.12.0 (2010-10-15) Copyright (C) 2010 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(68 + ,13 + ,13 + ,20 + ,17 + ,26 + ,27 + ,28 + ,1 + ,0 + ,0 + ,0 + ,114 + ,37 + ,37 + ,40 + ,95 + ,47 + ,39 + ,60 + ,148 + ,80 + ,99 + ,60 + ,56 + ,21 + ,21 + ,44 + ,26 + ,36 + ,33 + ,52 + ,63 + ,35 + ,36 + ,60 + ,96 + ,40 + ,44 + ,52 + ,74 + ,35 + ,33 + ,24 + ,65 + ,46 + ,47 + ,64 + ,40 + ,20 + ,19 + ,26 + ,173 + ,24 + ,41 + ,48 + ,28 + ,19 + ,22 + ,36 + ,55 + ,15 + ,17 + ,40 + ,58 + ,48 + ,46 + ,64 + ,25 + ,0 + ,0 + ,20 + ,103 + ,38 + ,31 + ,79 + ,29 + ,12 + ,20 + ,16 + ,31 + ,10 + ,10 + ,52 + ,43 + ,51 + ,55 + ,52 + ,74 + ,4 + ,6 + ,44 + ,99 + ,24 + ,17 + ,29 + ,25 + ,39 + ,33 + ,40 + ,69 + ,19 + ,33 + ,28 + ,62 + ,23 + ,32 + ,49 + ,25 + ,39 + ,37 + ,60 + ,38 + ,37 + ,44 + ,52 + ,57 + ,20 + ,22 + ,28 + ,52 + ,20 + ,15 + ,56 + ,91 + ,41 + ,18 + ,35 + ,48 + ,26 + ,25 + ,12 + ,52 + ,0 + ,7 + ,32 + ,35 + ,31 + ,35 + ,48 + ,0 + ,0 + ,0 + ,0 + ,31 + ,8 + ,14 + ,48 + ,107 + ,35 + ,31 + ,31 + ,242 + ,3 + ,9 + ,64 + ,41 + ,47 + ,59 + ,72 + ,57 + ,42 + ,62 + ,36 + ,32 + ,11 + ,12 + ,56 + ,17 + ,10 + ,23 + ,28 + ,36 + ,26 + ,31 + ,52 + ,29 + ,27 + ,57 + ,44 + ,22 + ,0 + ,23 + ,44 + ,21 + ,15 + ,14 + ,55 + ,41 + ,32 + ,31 + ,36 + ,64 + ,13 + ,17 + ,48 + ,71 + ,24 + ,24 + ,44 + ,28 + ,10 + ,11 + ,66 + ,36 + ,14 + ,16 + ,40 + ,45 + ,24 + ,32 + ,44 + ,22 + ,29 + ,36 + ,48 + ,27 + ,40 + ,37 + ,68 + ,38 + ,22 + ,25 + ,24 + ,26 + ,27 + ,30 + ,32 + ,41 + ,8 + ,10 + ,44 + ,21 + ,27 + ,16 + ,52 + ,28 + ,0 + ,3 + ,56 + ,36 + ,0 + ,0 + ,68 + ,58 + ,17 + ,17 + ,32 + ,65 + ,7 + ,9 + ,34 + ,29 + ,18 + ,22 + ,36 + ,21 + ,7 + ,5 + ,34 + ,19 + ,24 + ,23 + ,56 + ,55 + ,18 + ,16 + ,64 + ,119 + ,39 + ,53 + ,52 + ,34 + ,17 + ,23 + ,48 + ,25 + ,0 + ,0 + ,40 + ,113 + ,39 + ,51 + ,36 + ,46 + ,20 + ,25 + ,10 + ,28 + ,29 + ,51 + ,48 + ,63 + ,27 + ,46 + ,25 + ,52 + ,23 + ,16 + ,68 + ,35 + ,0 + ,0 + ,36 + ,32 + ,31 + ,25 + ,32 + ,45 + ,19 + ,34 + ,36 + ,42 + ,12 + ,14 + ,43 + ,28 + ,23 + ,32 + ,17 + ,32 + ,33 + ,24 + ,52 + ,32 + ,21 + ,16 + ,56 + ,27 + ,17 + ,19 + ,40 + ,69 + ,27 + ,27 + ,48 + ,30 + ,14 + ,24 + ,40 + ,48 + ,12 + ,12 + ,48 + ,57 + ,21 + ,43 + ,68 + ,36 + ,14 + ,13 + ,44 + ,20 + ,14 + ,19 + ,40 + ,54 + ,22 + ,24 + ,40 + ,26 + ,25 + ,27 + ,28 + ,58 + ,36 + ,26 + ,40 + ,35 + ,10 + ,14 + ,44 + ,28 + ,16 + ,26 + ,20 + ,8 + ,12 + ,15 + ,22 + ,96 + ,20 + ,30 + ,56 + ,50 + ,38 + ,33 + ,52 + ,15 + ,13 + ,14 + ,2 + ,65 + ,12 + ,11 + ,52 + ,33 + ,11 + ,12 + ,30 + ,7 + ,8 + ,8 + ,3 + ,17 + ,22 + ,22 + ,20 + ,55 + ,14 + ,12 + ,48 + ,32 + ,7 + ,6 + ,32 + ,22 + ,14 + ,10 + ,36 + ,41 + ,2 + ,1 + ,45 + ,50 + ,35 + ,31 + ,40 + ,7 + ,5 + ,5 + ,8 + ,0 + ,0 + ,0 + ,0 + ,26 + ,34 + ,35 + ,32 + ,22 + ,12 + ,15 + ,28 + ,26 + ,34 + ,36 + ,44 + ,37 + ,30 + ,27 + ,56 + ,29 + ,21 + ,36 + ,13 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,42 + ,28 + ,29 + ,52 + ,51 + ,16 + ,19 + ,51 + ,77 + ,12 + ,16 + ,52 + ,32 + ,14 + ,15 + ,48 + ,63 + ,7 + ,1 + ,3 + ,50 + ,41 + ,36 + ,48 + ,18 + ,21 + ,22 + ,24 + ,37 + ,28 + ,16 + ,37 + ,23 + ,1 + ,1 + ,32 + ,19 + ,10 + ,10 + ,8 + ,39 + ,31 + ,31 + ,44 + ,38 + ,7 + ,22 + ,48 + ,55 + ,26 + ,22 + ,56 + ,22 + ,1 + ,0 + ,8 + ,7 + ,0 + ,0 + ,0 + ,21 + ,12 + ,10 + ,25 + ,5 + ,0 + ,0 + ,4 + ,21 + ,17 + ,9 + ,12 + ,1 + ,5 + ,0 + ,0 + ,22 + ,4 + ,0 + ,6 + ,0 + ,0 + ,0 + ,0 + ,31 + ,6 + ,7 + ,48 + ,25 + ,0 + ,2 + ,52 + ,0 + ,0 + ,0 + ,0 + ,4 + ,0 + ,0 + ,0 + ,20 + ,15 + ,16 + ,12 + ,29 + ,0 + ,25 + ,28 + ,33 + ,12 + ,6 + ,40) + ,dim=c(4 + ,144) + ,dimnames=list(c('CompendiumViews' + ,'BloggedComputations' + ,'Hyperlinks' + ,'submittedfeedback') + ,1:144)) > y <- array(NA,dim=c(4,144),dimnames=list(c('CompendiumViews','BloggedComputations','Hyperlinks','submittedfeedback'),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' > 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 CompendiumViews BloggedComputations Hyperlinks submittedfeedback 1 68 13 13 20 2 17 26 27 28 3 1 0 0 0 4 114 37 37 40 5 95 47 39 60 6 148 80 99 60 7 56 21 21 44 8 26 36 33 52 9 63 35 36 60 10 96 40 44 52 11 74 35 33 24 12 65 46 47 64 13 40 20 19 26 14 173 24 41 48 15 28 19 22 36 16 55 15 17 40 17 58 48 46 64 18 25 0 0 20 19 103 38 31 79 20 29 12 20 16 21 31 10 10 52 22 43 51 55 52 23 74 4 6 44 24 99 24 17 29 25 25 39 33 40 26 69 19 33 28 27 62 23 32 49 28 25 39 37 60 29 38 37 44 52 30 57 20 22 28 31 52 20 15 56 32 91 41 18 35 33 48 26 25 12 34 52 0 7 32 35 35 31 35 48 36 0 0 0 0 37 31 8 14 48 38 107 35 31 31 39 242 3 9 64 40 41 47 59 72 41 57 42 62 36 42 32 11 12 56 43 17 10 23 28 44 36 26 31 52 45 29 27 57 44 46 22 0 23 44 47 21 15 14 55 48 41 32 31 36 49 64 13 17 48 50 71 24 24 44 51 28 10 11 66 52 36 14 16 40 53 45 24 32 44 54 22 29 36 48 55 27 40 37 68 56 38 22 25 24 57 26 27 30 32 58 41 8 10 44 59 21 27 16 52 60 28 0 3 56 61 36 0 0 68 62 58 17 17 32 63 65 7 9 34 64 29 18 22 36 65 21 7 5 34 66 19 24 23 56 67 55 18 16 64 68 119 39 53 52 69 34 17 23 48 70 25 0 0 40 71 113 39 51 36 72 46 20 25 10 73 28 29 51 48 74 63 27 46 25 75 52 23 16 68 76 35 0 0 36 77 32 31 25 32 78 45 19 34 36 79 42 12 14 43 80 28 23 32 17 81 32 33 24 52 82 32 21 16 56 83 27 17 19 40 84 69 27 27 48 85 30 14 24 40 86 48 12 12 48 87 57 21 43 68 88 36 14 13 44 89 20 14 19 40 90 54 22 24 40 91 26 25 27 28 92 58 36 26 40 93 35 10 14 44 94 28 16 26 20 95 8 12 15 22 96 96 20 30 56 97 50 38 33 52 98 15 13 14 2 99 65 12 11 52 100 33 11 12 30 101 7 8 8 3 102 17 22 22 20 103 55 14 12 48 104 32 7 6 32 105 22 14 10 36 106 41 2 1 45 107 50 35 31 40 108 7 5 5 8 109 0 0 0 0 110 26 34 35 32 111 22 12 15 28 112 26 34 36 44 113 37 30 27 56 114 29 21 36 13 115 0 0 0 0 116 0 0 0 0 117 42 28 29 52 118 51 16 19 51 119 77 12 16 52 120 32 14 15 48 121 63 7 1 3 122 50 41 36 48 123 18 21 22 24 124 37 28 16 37 125 23 1 1 32 126 19 10 10 8 127 39 31 31 44 128 38 7 22 48 129 55 26 22 56 130 22 1 0 8 131 7 0 0 0 132 21 12 10 25 133 5 0 0 4 134 21 17 9 12 135 1 5 0 0 136 22 4 0 6 137 0 0 0 0 138 31 6 7 48 139 25 0 2 52 140 0 0 0 0 141 4 0 0 0 142 20 15 16 12 143 29 0 25 28 144 33 12 6 40 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) BloggedComputations Hyperlinks 9.6344 0.1596 0.4719 submittedfeedback 0.5390 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -43.132 -14.108 -7.260 7.912 193.142 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 9.6344 5.5126 1.748 0.082704 . BloggedComputations 0.1596 0.3699 0.431 0.666823 Hyperlinks 0.4719 0.3226 1.463 0.145720 submittedfeedback 0.5390 0.1457 3.700 0.000309 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 28.99 on 140 degrees of freedom Multiple R-squared: 0.2576, Adjusted R-squared: 0.2417 F-statistic: 16.2 on 3 and 140 DF, p-value: 4.307e-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,] 0.8197104 3.605792e-01 1.802896e-01 [2,] 0.9055827 1.888345e-01 9.441727e-02 [3,] 0.8382517 3.234966e-01 1.617483e-01 [4,] 0.7861822 4.276356e-01 2.138178e-01 [5,] 0.7031481 5.937038e-01 2.968519e-01 [6,] 0.6461138 7.077723e-01 3.538862e-01 [7,] 0.5505933 8.988133e-01 4.494067e-01 [8,] 0.9142066 1.715868e-01 8.579341e-02 [9,] 0.9266207 1.467586e-01 7.337929e-02 [10,] 0.8952500 2.095000e-01 1.047500e-01 [11,] 0.8685801 2.628398e-01 1.314199e-01 [12,] 0.8246366 3.507268e-01 1.753634e-01 [13,] 0.8437559 3.124882e-01 1.562441e-01 [14,] 0.8334321 3.331359e-01 1.665679e-01 [15,] 0.8230219 3.539562e-01 1.769781e-01 [16,] 0.8745342 2.509315e-01 1.254658e-01 [17,] 0.8577086 2.845827e-01 1.422914e-01 [18,] 0.9601449 7.971013e-02 3.985507e-02 [19,] 0.9553441 8.931173e-02 4.465587e-02 [20,] 0.9453581 1.092837e-01 5.464186e-02 [21,] 0.9352075 1.295850e-01 6.479248e-02 [22,] 0.9545452 9.090966e-02 4.545483e-02 [23,] 0.9645604 7.087915e-02 3.543958e-02 [24,] 0.9539548 9.209041e-02 4.604520e-02 [25,] 0.9378677 1.242647e-01 6.213233e-02 [26,] 0.9739071 5.218588e-02 2.609294e-02 [27,] 0.9659964 6.800724e-02 3.400362e-02 [28,] 0.9563785 8.724304e-02 4.362152e-02 [29,] 0.9557597 8.848065e-02 4.424032e-02 [30,] 0.9487093 1.025814e-01 5.129070e-02 [31,] 0.9388504 1.222992e-01 6.114960e-02 [32,] 0.9716301 5.673975e-02 2.836988e-02 [33,] 1.0000000 6.128100e-13 3.064050e-13 [34,] 1.0000000 1.123345e-13 5.616727e-14 [35,] 1.0000000 2.590054e-13 1.295027e-13 [36,] 1.0000000 3.082446e-13 1.541223e-13 [37,] 1.0000000 3.444720e-13 1.722360e-13 [38,] 1.0000000 4.551101e-13 2.275550e-13 [39,] 1.0000000 2.264464e-13 1.132232e-13 [40,] 1.0000000 2.389448e-13 1.194724e-13 [41,] 1.0000000 1.926596e-13 9.632978e-14 [42,] 1.0000000 4.447090e-13 2.223545e-13 [43,] 1.0000000 6.323718e-13 3.161859e-13 [44,] 1.0000000 6.386502e-13 3.193251e-13 [45,] 1.0000000 6.814686e-13 3.407343e-13 [46,] 1.0000000 1.549784e-12 7.748918e-13 [47,] 1.0000000 3.526541e-12 1.763271e-12 [48,] 1.0000000 1.924162e-12 9.620812e-13 [49,] 1.0000000 5.262637e-13 2.631318e-13 [50,] 1.0000000 1.269399e-12 6.346996e-13 [51,] 1.0000000 1.907759e-12 9.538793e-13 [52,] 1.0000000 4.362459e-12 2.181229e-12 [53,] 1.0000000 3.976403e-12 1.988201e-12 [54,] 1.0000000 7.693862e-12 3.846931e-12 [55,] 1.0000000 1.642253e-11 8.211263e-12 [56,] 1.0000000 1.952471e-11 9.762354e-12 [57,] 1.0000000 9.164095e-12 4.582048e-12 [58,] 1.0000000 1.752883e-11 8.764413e-12 [59,] 1.0000000 3.598770e-11 1.799385e-11 [60,] 1.0000000 1.737455e-11 8.687274e-12 [61,] 1.0000000 4.011863e-11 2.005932e-11 [62,] 1.0000000 1.188051e-12 5.940253e-13 [63,] 1.0000000 2.291308e-12 1.145654e-12 [64,] 1.0000000 5.382467e-12 2.691233e-12 [65,] 1.0000000 9.496078e-15 4.748039e-15 [66,] 1.0000000 7.550661e-15 3.775331e-15 [67,] 1.0000000 4.061627e-15 2.030813e-15 [68,] 1.0000000 2.339400e-15 1.169700e-15 [69,] 1.0000000 6.336442e-15 3.168221e-15 [70,] 1.0000000 1.743417e-14 8.717087e-15 [71,] 1.0000000 4.390323e-14 2.195162e-14 [72,] 1.0000000 1.071276e-13 5.356381e-14 [73,] 1.0000000 2.871833e-13 1.435916e-13 [74,] 1.0000000 7.013956e-13 3.506978e-13 [75,] 1.0000000 8.654069e-13 4.327034e-13 [76,] 1.0000000 1.025577e-12 5.127883e-13 [77,] 1.0000000 1.895663e-12 9.478314e-13 [78,] 1.0000000 1.732602e-12 8.663008e-13 [79,] 1.0000000 3.830779e-12 1.915389e-12 [80,] 1.0000000 9.708885e-12 4.854442e-12 [81,] 1.0000000 2.460812e-11 1.230406e-11 [82,] 1.0000000 6.012596e-11 3.006298e-11 [83,] 1.0000000 6.858647e-11 3.429323e-11 [84,] 1.0000000 1.192050e-10 5.960249e-11 [85,] 1.0000000 2.612666e-10 1.306333e-10 [86,] 1.0000000 3.796615e-10 1.898307e-10 [87,] 1.0000000 8.847655e-10 4.423828e-10 [88,] 1.0000000 2.098691e-09 1.049345e-09 [89,] 1.0000000 2.593195e-09 1.296597e-09 [90,] 1.0000000 4.203962e-11 2.101981e-11 [91,] 1.0000000 1.143650e-10 5.718250e-11 [92,] 1.0000000 2.907585e-10 1.453793e-10 [93,] 1.0000000 2.379783e-10 1.189891e-10 [94,] 1.0000000 6.208647e-10 3.104324e-10 [95,] 1.0000000 1.563099e-09 7.815497e-10 [96,] 1.0000000 3.396984e-09 1.698492e-09 [97,] 1.0000000 5.154602e-09 2.577301e-09 [98,] 1.0000000 1.319126e-08 6.595628e-09 [99,] 1.0000000 2.511005e-08 1.255502e-08 [100,] 1.0000000 5.932991e-08 2.966496e-08 [101,] 0.9999999 1.182248e-07 5.911240e-08 [102,] 0.9999999 2.604688e-07 1.302344e-07 [103,] 0.9999997 5.355398e-07 2.677699e-07 [104,] 0.9999995 1.036165e-06 5.180826e-07 [105,] 0.9999989 2.296572e-06 1.148286e-06 [106,] 0.9999987 2.562298e-06 1.281149e-06 [107,] 0.9999980 3.959417e-06 1.979709e-06 [108,] 0.9999955 8.971340e-06 4.485670e-06 [109,] 0.9999909 1.810047e-05 9.050237e-06 [110,] 0.9999824 3.520668e-05 1.760334e-05 [111,] 0.9999633 7.334829e-05 3.667415e-05 [112,] 0.9999262 1.475868e-04 7.379342e-05 [113,] 0.9999923 1.535004e-05 7.675022e-06 [114,] 0.9999816 3.676787e-05 1.838394e-05 [115,] 1.0000000 1.771239e-10 8.856193e-11 [116,] 1.0000000 9.066494e-10 4.533247e-10 [117,] 1.0000000 8.721642e-10 4.360821e-10 [118,] 1.0000000 4.655193e-09 2.327596e-09 [119,] 1.0000000 2.366033e-08 1.183016e-08 [120,] 0.9999999 1.054826e-07 5.274128e-08 [121,] 0.9999999 1.869443e-07 9.347213e-08 [122,] 0.9999995 9.452881e-07 4.726440e-07 [123,] 0.9999983 3.497098e-06 1.748549e-06 [124,] 0.9999991 1.802226e-06 9.011129e-07 [125,] 0.9999956 8.757431e-06 4.378716e-06 [126,] 0.9999804 3.921693e-05 1.960847e-05 [127,] 0.9998947 2.105914e-04 1.052957e-04 [128,] 0.9994706 1.058834e-03 5.294168e-04 [129,] 0.9981637 3.672550e-03 1.836275e-03 [130,] 0.9997821 4.357292e-04 2.178646e-04 [131,] 0.9978839 4.232135e-03 2.116067e-03 > postscript(file="/var/www/rcomp/tmp/117qj1322147561.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/www/rcomp/tmp/2zvag1322147561.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/www/rcomp/tmp/31iuz1322147561.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/www/rcomp/tmp/472sy1322147561.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/www/rcomp/tmp/59lgi1322147561.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 39.3757925 -24.6175700 -8.6344354 59.4397048 27.1194580 46.5396309 7 8 9 10 11 12 9.3873386 -32.9814526 -1.5497032 31.1894232 30.2708322 -8.6521169 13 14 15 16 17 18 4.1931473 114.3147551 -14.4531523 13.3885671 -15.4994300 4.5850746 19 20 21 22 23 24 30.0894572 -0.6117019 -12.9785419 -28.7568924 37.1787847 61.8814476 25 26 27 28 29 30 -27.9919549 25.6683147 7.1822895 -40.6599828 -26.3317804 18.6994449 31 32 33 34 35 36 1.9099501 47.4622369 15.9505909 21.8135894 -21.9711296 -9.6344354 37 38 39 40 41 42 -12.3907841 60.4414296 193.1422400 -42.7865251 -7.9993025 -15.2380076 43 44 45 46 47 48 -20.1764517 -20.4416959 -35.5580946 -22.2048560 -27.2811471 -7.7748966 49 50 51 52 53 54 18.3955686 22.4928889 -23.9967694 -4.9799497 -7.2821868 -35.1238165 55 56 57 58 59 60 -43.1317776 0.1206920 -19.3489202 1.6528517 -28.5230278 -13.2354609 61 62 63 64 65 66 -10.2881015 20.3815655 31.6745800 -13.2935535 -10.4378822 -35.5035207 67 68 69 70 71 72 0.4450671 50.1020619 -15.0741332 -6.1954155 53.6702228 15.9862326 73 74 75 76 77 78 -36.2020834 13.8741000 -5.5090248 5.9606825 -11.6278930 -3.1157658 79 80 81 82 83 84 0.6659433 -9.5689265 -22.2556962 -18.7215332 -15.8743994 16.4423411 85 86 87 88 89 90 -14.7550253 4.9145897 -12.9307076 -5.7203943 -22.3956031 7.9681844 91 92 93 94 95 96 -15.4579713 8.7900326 -6.5538837 -7.2375018 -22.4864266 38.8316832 97 98 99 100 101 102 -9.3006502 -4.3936509 20.2303761 -0.2233705 -9.3033748 -17.3075566 103 104 105 106 107 108 11.5953921 1.1682824 -13.9925449 6.3183800 -1.4097909 -10.1040476 109 110 111 112 113 114 -9.6344354 -22.8255339 -11.7205736 -29.7657124 -20.3486512 -7.9811687 115 116 117 118 119 120 -9.6344354 -9.6344354 -13.8171246 2.3559299 29.8709538 -12.8202613 121 122 123 124 125 126 50.1594152 -9.0390019 -18.3040558 -4.5972591 -4.5147027 -1.2614637 127 128 129 130 131 132 -13.9274938 -9.0062610 0.6491662 7.8937698 -2.6344354 -8.7440778 133 134 135 136 137 138 -6.7905334 -2.0628688 -9.4324293 8.4930225 -9.6344354 -8.7683954 139 140 141 142 143 144 -13.6074784 -9.6344354 -5.6344354 -6.0468624 -7.5242329 -2.9419076 > postscript(file="/var/www/rcomp/tmp/62ic31322147561.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 39.3757925 NA 1 -24.6175700 39.3757925 2 -8.6344354 -24.6175700 3 59.4397048 -8.6344354 4 27.1194580 59.4397048 5 46.5396309 27.1194580 6 9.3873386 46.5396309 7 -32.9814526 9.3873386 8 -1.5497032 -32.9814526 9 31.1894232 -1.5497032 10 30.2708322 31.1894232 11 -8.6521169 30.2708322 12 4.1931473 -8.6521169 13 114.3147551 4.1931473 14 -14.4531523 114.3147551 15 13.3885671 -14.4531523 16 -15.4994300 13.3885671 17 4.5850746 -15.4994300 18 30.0894572 4.5850746 19 -0.6117019 30.0894572 20 -12.9785419 -0.6117019 21 -28.7568924 -12.9785419 22 37.1787847 -28.7568924 23 61.8814476 37.1787847 24 -27.9919549 61.8814476 25 25.6683147 -27.9919549 26 7.1822895 25.6683147 27 -40.6599828 7.1822895 28 -26.3317804 -40.6599828 29 18.6994449 -26.3317804 30 1.9099501 18.6994449 31 47.4622369 1.9099501 32 15.9505909 47.4622369 33 21.8135894 15.9505909 34 -21.9711296 21.8135894 35 -9.6344354 -21.9711296 36 -12.3907841 -9.6344354 37 60.4414296 -12.3907841 38 193.1422400 60.4414296 39 -42.7865251 193.1422400 40 -7.9993025 -42.7865251 41 -15.2380076 -7.9993025 42 -20.1764517 -15.2380076 43 -20.4416959 -20.1764517 44 -35.5580946 -20.4416959 45 -22.2048560 -35.5580946 46 -27.2811471 -22.2048560 47 -7.7748966 -27.2811471 48 18.3955686 -7.7748966 49 22.4928889 18.3955686 50 -23.9967694 22.4928889 51 -4.9799497 -23.9967694 52 -7.2821868 -4.9799497 53 -35.1238165 -7.2821868 54 -43.1317776 -35.1238165 55 0.1206920 -43.1317776 56 -19.3489202 0.1206920 57 1.6528517 -19.3489202 58 -28.5230278 1.6528517 59 -13.2354609 -28.5230278 60 -10.2881015 -13.2354609 61 20.3815655 -10.2881015 62 31.6745800 20.3815655 63 -13.2935535 31.6745800 64 -10.4378822 -13.2935535 65 -35.5035207 -10.4378822 66 0.4450671 -35.5035207 67 50.1020619 0.4450671 68 -15.0741332 50.1020619 69 -6.1954155 -15.0741332 70 53.6702228 -6.1954155 71 15.9862326 53.6702228 72 -36.2020834 15.9862326 73 13.8741000 -36.2020834 74 -5.5090248 13.8741000 75 5.9606825 -5.5090248 76 -11.6278930 5.9606825 77 -3.1157658 -11.6278930 78 0.6659433 -3.1157658 79 -9.5689265 0.6659433 80 -22.2556962 -9.5689265 81 -18.7215332 -22.2556962 82 -15.8743994 -18.7215332 83 16.4423411 -15.8743994 84 -14.7550253 16.4423411 85 4.9145897 -14.7550253 86 -12.9307076 4.9145897 87 -5.7203943 -12.9307076 88 -22.3956031 -5.7203943 89 7.9681844 -22.3956031 90 -15.4579713 7.9681844 91 8.7900326 -15.4579713 92 -6.5538837 8.7900326 93 -7.2375018 -6.5538837 94 -22.4864266 -7.2375018 95 38.8316832 -22.4864266 96 -9.3006502 38.8316832 97 -4.3936509 -9.3006502 98 20.2303761 -4.3936509 99 -0.2233705 20.2303761 100 -9.3033748 -0.2233705 101 -17.3075566 -9.3033748 102 11.5953921 -17.3075566 103 1.1682824 11.5953921 104 -13.9925449 1.1682824 105 6.3183800 -13.9925449 106 -1.4097909 6.3183800 107 -10.1040476 -1.4097909 108 -9.6344354 -10.1040476 109 -22.8255339 -9.6344354 110 -11.7205736 -22.8255339 111 -29.7657124 -11.7205736 112 -20.3486512 -29.7657124 113 -7.9811687 -20.3486512 114 -9.6344354 -7.9811687 115 -9.6344354 -9.6344354 116 -13.8171246 -9.6344354 117 2.3559299 -13.8171246 118 29.8709538 2.3559299 119 -12.8202613 29.8709538 120 50.1594152 -12.8202613 121 -9.0390019 50.1594152 122 -18.3040558 -9.0390019 123 -4.5972591 -18.3040558 124 -4.5147027 -4.5972591 125 -1.2614637 -4.5147027 126 -13.9274938 -1.2614637 127 -9.0062610 -13.9274938 128 0.6491662 -9.0062610 129 7.8937698 0.6491662 130 -2.6344354 7.8937698 131 -8.7440778 -2.6344354 132 -6.7905334 -8.7440778 133 -2.0628688 -6.7905334 134 -9.4324293 -2.0628688 135 8.4930225 -9.4324293 136 -9.6344354 8.4930225 137 -8.7683954 -9.6344354 138 -13.6074784 -8.7683954 139 -9.6344354 -13.6074784 140 -5.6344354 -9.6344354 141 -6.0468624 -5.6344354 142 -7.5242329 -6.0468624 143 -2.9419076 -7.5242329 144 NA -2.9419076 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -24.6175700 39.3757925 [2,] -8.6344354 -24.6175700 [3,] 59.4397048 -8.6344354 [4,] 27.1194580 59.4397048 [5,] 46.5396309 27.1194580 [6,] 9.3873386 46.5396309 [7,] -32.9814526 9.3873386 [8,] -1.5497032 -32.9814526 [9,] 31.1894232 -1.5497032 [10,] 30.2708322 31.1894232 [11,] -8.6521169 30.2708322 [12,] 4.1931473 -8.6521169 [13,] 114.3147551 4.1931473 [14,] -14.4531523 114.3147551 [15,] 13.3885671 -14.4531523 [16,] -15.4994300 13.3885671 [17,] 4.5850746 -15.4994300 [18,] 30.0894572 4.5850746 [19,] -0.6117019 30.0894572 [20,] -12.9785419 -0.6117019 [21,] -28.7568924 -12.9785419 [22,] 37.1787847 -28.7568924 [23,] 61.8814476 37.1787847 [24,] -27.9919549 61.8814476 [25,] 25.6683147 -27.9919549 [26,] 7.1822895 25.6683147 [27,] -40.6599828 7.1822895 [28,] -26.3317804 -40.6599828 [29,] 18.6994449 -26.3317804 [30,] 1.9099501 18.6994449 [31,] 47.4622369 1.9099501 [32,] 15.9505909 47.4622369 [33,] 21.8135894 15.9505909 [34,] -21.9711296 21.8135894 [35,] -9.6344354 -21.9711296 [36,] -12.3907841 -9.6344354 [37,] 60.4414296 -12.3907841 [38,] 193.1422400 60.4414296 [39,] -42.7865251 193.1422400 [40,] -7.9993025 -42.7865251 [41,] -15.2380076 -7.9993025 [42,] -20.1764517 -15.2380076 [43,] -20.4416959 -20.1764517 [44,] -35.5580946 -20.4416959 [45,] -22.2048560 -35.5580946 [46,] -27.2811471 -22.2048560 [47,] -7.7748966 -27.2811471 [48,] 18.3955686 -7.7748966 [49,] 22.4928889 18.3955686 [50,] -23.9967694 22.4928889 [51,] -4.9799497 -23.9967694 [52,] -7.2821868 -4.9799497 [53,] -35.1238165 -7.2821868 [54,] -43.1317776 -35.1238165 [55,] 0.1206920 -43.1317776 [56,] -19.3489202 0.1206920 [57,] 1.6528517 -19.3489202 [58,] -28.5230278 1.6528517 [59,] -13.2354609 -28.5230278 [60,] -10.2881015 -13.2354609 [61,] 20.3815655 -10.2881015 [62,] 31.6745800 20.3815655 [63,] -13.2935535 31.6745800 [64,] -10.4378822 -13.2935535 [65,] -35.5035207 -10.4378822 [66,] 0.4450671 -35.5035207 [67,] 50.1020619 0.4450671 [68,] -15.0741332 50.1020619 [69,] -6.1954155 -15.0741332 [70,] 53.6702228 -6.1954155 [71,] 15.9862326 53.6702228 [72,] -36.2020834 15.9862326 [73,] 13.8741000 -36.2020834 [74,] -5.5090248 13.8741000 [75,] 5.9606825 -5.5090248 [76,] -11.6278930 5.9606825 [77,] -3.1157658 -11.6278930 [78,] 0.6659433 -3.1157658 [79,] -9.5689265 0.6659433 [80,] -22.2556962 -9.5689265 [81,] -18.7215332 -22.2556962 [82,] -15.8743994 -18.7215332 [83,] 16.4423411 -15.8743994 [84,] -14.7550253 16.4423411 [85,] 4.9145897 -14.7550253 [86,] -12.9307076 4.9145897 [87,] -5.7203943 -12.9307076 [88,] -22.3956031 -5.7203943 [89,] 7.9681844 -22.3956031 [90,] -15.4579713 7.9681844 [91,] 8.7900326 -15.4579713 [92,] -6.5538837 8.7900326 [93,] -7.2375018 -6.5538837 [94,] -22.4864266 -7.2375018 [95,] 38.8316832 -22.4864266 [96,] -9.3006502 38.8316832 [97,] -4.3936509 -9.3006502 [98,] 20.2303761 -4.3936509 [99,] -0.2233705 20.2303761 [100,] -9.3033748 -0.2233705 [101,] -17.3075566 -9.3033748 [102,] 11.5953921 -17.3075566 [103,] 1.1682824 11.5953921 [104,] -13.9925449 1.1682824 [105,] 6.3183800 -13.9925449 [106,] -1.4097909 6.3183800 [107,] -10.1040476 -1.4097909 [108,] -9.6344354 -10.1040476 [109,] -22.8255339 -9.6344354 [110,] -11.7205736 -22.8255339 [111,] -29.7657124 -11.7205736 [112,] -20.3486512 -29.7657124 [113,] -7.9811687 -20.3486512 [114,] -9.6344354 -7.9811687 [115,] -9.6344354 -9.6344354 [116,] -13.8171246 -9.6344354 [117,] 2.3559299 -13.8171246 [118,] 29.8709538 2.3559299 [119,] -12.8202613 29.8709538 [120,] 50.1594152 -12.8202613 [121,] -9.0390019 50.1594152 [122,] -18.3040558 -9.0390019 [123,] -4.5972591 -18.3040558 [124,] -4.5147027 -4.5972591 [125,] -1.2614637 -4.5147027 [126,] -13.9274938 -1.2614637 [127,] -9.0062610 -13.9274938 [128,] 0.6491662 -9.0062610 [129,] 7.8937698 0.6491662 [130,] -2.6344354 7.8937698 [131,] -8.7440778 -2.6344354 [132,] -6.7905334 -8.7440778 [133,] -2.0628688 -6.7905334 [134,] -9.4324293 -2.0628688 [135,] 8.4930225 -9.4324293 [136,] -9.6344354 8.4930225 [137,] -8.7683954 -9.6344354 [138,] -13.6074784 -8.7683954 [139,] -9.6344354 -13.6074784 [140,] -5.6344354 -9.6344354 [141,] -6.0468624 -5.6344354 [142,] -7.5242329 -6.0468624 [143,] -2.9419076 -7.5242329 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -24.6175700 39.3757925 2 -8.6344354 -24.6175700 3 59.4397048 -8.6344354 4 27.1194580 59.4397048 5 46.5396309 27.1194580 6 9.3873386 46.5396309 7 -32.9814526 9.3873386 8 -1.5497032 -32.9814526 9 31.1894232 -1.5497032 10 30.2708322 31.1894232 11 -8.6521169 30.2708322 12 4.1931473 -8.6521169 13 114.3147551 4.1931473 14 -14.4531523 114.3147551 15 13.3885671 -14.4531523 16 -15.4994300 13.3885671 17 4.5850746 -15.4994300 18 30.0894572 4.5850746 19 -0.6117019 30.0894572 20 -12.9785419 -0.6117019 21 -28.7568924 -12.9785419 22 37.1787847 -28.7568924 23 61.8814476 37.1787847 24 -27.9919549 61.8814476 25 25.6683147 -27.9919549 26 7.1822895 25.6683147 27 -40.6599828 7.1822895 28 -26.3317804 -40.6599828 29 18.6994449 -26.3317804 30 1.9099501 18.6994449 31 47.4622369 1.9099501 32 15.9505909 47.4622369 33 21.8135894 15.9505909 34 -21.9711296 21.8135894 35 -9.6344354 -21.9711296 36 -12.3907841 -9.6344354 37 60.4414296 -12.3907841 38 193.1422400 60.4414296 39 -42.7865251 193.1422400 40 -7.9993025 -42.7865251 41 -15.2380076 -7.9993025 42 -20.1764517 -15.2380076 43 -20.4416959 -20.1764517 44 -35.5580946 -20.4416959 45 -22.2048560 -35.5580946 46 -27.2811471 -22.2048560 47 -7.7748966 -27.2811471 48 18.3955686 -7.7748966 49 22.4928889 18.3955686 50 -23.9967694 22.4928889 51 -4.9799497 -23.9967694 52 -7.2821868 -4.9799497 53 -35.1238165 -7.2821868 54 -43.1317776 -35.1238165 55 0.1206920 -43.1317776 56 -19.3489202 0.1206920 57 1.6528517 -19.3489202 58 -28.5230278 1.6528517 59 -13.2354609 -28.5230278 60 -10.2881015 -13.2354609 61 20.3815655 -10.2881015 62 31.6745800 20.3815655 63 -13.2935535 31.6745800 64 -10.4378822 -13.2935535 65 -35.5035207 -10.4378822 66 0.4450671 -35.5035207 67 50.1020619 0.4450671 68 -15.0741332 50.1020619 69 -6.1954155 -15.0741332 70 53.6702228 -6.1954155 71 15.9862326 53.6702228 72 -36.2020834 15.9862326 73 13.8741000 -36.2020834 74 -5.5090248 13.8741000 75 5.9606825 -5.5090248 76 -11.6278930 5.9606825 77 -3.1157658 -11.6278930 78 0.6659433 -3.1157658 79 -9.5689265 0.6659433 80 -22.2556962 -9.5689265 81 -18.7215332 -22.2556962 82 -15.8743994 -18.7215332 83 16.4423411 -15.8743994 84 -14.7550253 16.4423411 85 4.9145897 -14.7550253 86 -12.9307076 4.9145897 87 -5.7203943 -12.9307076 88 -22.3956031 -5.7203943 89 7.9681844 -22.3956031 90 -15.4579713 7.9681844 91 8.7900326 -15.4579713 92 -6.5538837 8.7900326 93 -7.2375018 -6.5538837 94 -22.4864266 -7.2375018 95 38.8316832 -22.4864266 96 -9.3006502 38.8316832 97 -4.3936509 -9.3006502 98 20.2303761 -4.3936509 99 -0.2233705 20.2303761 100 -9.3033748 -0.2233705 101 -17.3075566 -9.3033748 102 11.5953921 -17.3075566 103 1.1682824 11.5953921 104 -13.9925449 1.1682824 105 6.3183800 -13.9925449 106 -1.4097909 6.3183800 107 -10.1040476 -1.4097909 108 -9.6344354 -10.1040476 109 -22.8255339 -9.6344354 110 -11.7205736 -22.8255339 111 -29.7657124 -11.7205736 112 -20.3486512 -29.7657124 113 -7.9811687 -20.3486512 114 -9.6344354 -7.9811687 115 -9.6344354 -9.6344354 116 -13.8171246 -9.6344354 117 2.3559299 -13.8171246 118 29.8709538 2.3559299 119 -12.8202613 29.8709538 120 50.1594152 -12.8202613 121 -9.0390019 50.1594152 122 -18.3040558 -9.0390019 123 -4.5972591 -18.3040558 124 -4.5147027 -4.5972591 125 -1.2614637 -4.5147027 126 -13.9274938 -1.2614637 127 -9.0062610 -13.9274938 128 0.6491662 -9.0062610 129 7.8937698 0.6491662 130 -2.6344354 7.8937698 131 -8.7440778 -2.6344354 132 -6.7905334 -8.7440778 133 -2.0628688 -6.7905334 134 -9.4324293 -2.0628688 135 8.4930225 -9.4324293 136 -9.6344354 8.4930225 137 -8.7683954 -9.6344354 138 -13.6074784 -8.7683954 139 -9.6344354 -13.6074784 140 -5.6344354 -9.6344354 141 -6.0468624 -5.6344354 142 -7.5242329 -6.0468624 143 -2.9419076 -7.5242329 > 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/rcomp/tmp/74a8b1322147561.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/www/rcomp/tmp/8fyzg1322147561.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/www/rcomp/tmp/96qz51322147561.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/www/rcomp/tmp/10maln1322147561.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/www/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/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/rcomp/tmp/11sgn01322147561.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/rcomp/tmp/12ifzs1322147561.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/rcomp/tmp/130fa21322147561.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/rcomp/tmp/14yn621322147561.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/rcomp/tmp/15yfdd1322147562.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/rcomp/tmp/16ddtj1322147562.tab") + } > > try(system("convert tmp/117qj1322147561.ps tmp/117qj1322147561.png",intern=TRUE)) character(0) > try(system("convert tmp/2zvag1322147561.ps tmp/2zvag1322147561.png",intern=TRUE)) character(0) > try(system("convert tmp/31iuz1322147561.ps tmp/31iuz1322147561.png",intern=TRUE)) character(0) > try(system("convert tmp/472sy1322147561.ps tmp/472sy1322147561.png",intern=TRUE)) character(0) > try(system("convert tmp/59lgi1322147561.ps tmp/59lgi1322147561.png",intern=TRUE)) character(0) > try(system("convert tmp/62ic31322147561.ps tmp/62ic31322147561.png",intern=TRUE)) character(0) > try(system("convert tmp/74a8b1322147561.ps tmp/74a8b1322147561.png",intern=TRUE)) character(0) > try(system("convert tmp/8fyzg1322147561.ps tmp/8fyzg1322147561.png",intern=TRUE)) character(0) > try(system("convert tmp/96qz51322147561.ps tmp/96qz51322147561.png",intern=TRUE)) character(0) > try(system("convert tmp/10maln1322147561.ps tmp/10maln1322147561.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 5.260 0.310 5.561