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(9 + ,68 + ,13 + ,13 + ,20 + ,9 + ,17 + ,26 + ,27 + ,28 + ,9 + ,1 + ,0 + ,0 + ,0 + ,9 + ,114 + ,37 + ,37 + ,40 + ,9 + ,95 + ,47 + ,39 + ,60 + ,9 + ,148 + ,80 + ,99 + ,60 + ,9 + ,56 + ,21 + ,21 + ,44 + ,9 + ,26 + ,36 + ,33 + ,52 + ,9 + ,63 + ,35 + ,36 + ,60 + ,9 + ,96 + ,40 + ,44 + ,52 + ,9 + ,74 + ,35 + ,33 + ,24 + ,9 + ,65 + ,46 + ,47 + ,64 + ,9 + ,40 + ,20 + ,19 + ,26 + ,9 + ,173 + ,24 + ,41 + ,48 + ,9 + ,28 + ,19 + ,22 + ,36 + ,9 + ,55 + ,15 + ,17 + ,40 + ,9 + ,58 + ,48 + ,46 + ,64 + ,9 + ,25 + ,0 + ,0 + ,20 + ,9 + ,103 + ,38 + ,31 + ,79 + ,9 + ,29 + ,12 + ,20 + ,16 + ,9 + ,31 + ,10 + ,10 + ,52 + ,9 + ,43 + ,51 + ,55 + ,52 + ,9 + ,74 + ,4 + ,6 + ,44 + ,9 + ,99 + ,24 + ,17 + ,29 + ,9 + ,25 + ,39 + ,33 + ,40 + ,9 + ,69 + ,19 + ,33 + ,28 + ,9 + ,62 + ,23 + ,32 + ,49 + ,9 + ,25 + ,39 + ,37 + ,60 + ,9 + ,38 + ,37 + ,44 + ,52 + ,9 + ,57 + ,20 + ,22 + ,28 + ,9 + ,52 + ,20 + ,15 + ,56 + ,9 + ,91 + ,41 + ,18 + ,35 + ,9 + ,48 + ,26 + ,25 + ,12 + ,9 + ,52 + ,0 + ,7 + ,32 + ,9 + ,35 + ,31 + ,35 + ,48 + ,9 + ,0 + ,0 + ,0 + ,0 + ,9 + ,31 + ,8 + ,14 + ,48 + ,9 + ,107 + ,35 + ,31 + ,31 + ,9 + ,242 + ,3 + ,9 + ,64 + ,9 + ,41 + ,47 + ,59 + ,72 + ,9 + ,57 + ,42 + ,62 + ,36 + ,9 + ,32 + ,11 + ,12 + ,56 + ,9 + ,17 + ,10 + ,23 + ,28 + ,9 + ,36 + ,26 + ,31 + ,52 + ,9 + ,29 + ,27 + ,57 + ,44 + ,9 + ,22 + ,0 + ,23 + ,44 + ,9 + ,21 + ,15 + ,14 + ,55 + ,9 + ,41 + ,32 + ,31 + ,36 + ,10 + ,64 + ,13 + ,17 + ,48 + ,10 + ,71 + ,24 + ,24 + ,44 + ,10 + ,28 + ,10 + ,11 + ,66 + ,10 + ,36 + ,14 + ,16 + ,40 + ,10 + ,45 + ,24 + ,32 + ,44 + ,10 + ,22 + ,29 + ,36 + ,48 + ,10 + ,27 + ,40 + ,37 + ,68 + ,10 + ,38 + ,22 + ,25 + ,24 + ,10 + ,26 + ,27 + ,30 + ,32 + ,10 + ,41 + ,8 + ,10 + ,44 + ,10 + ,21 + ,27 + ,16 + ,52 + ,10 + ,28 + ,0 + ,3 + ,56 + ,10 + ,36 + ,0 + ,0 + ,68 + ,10 + ,58 + ,17 + ,17 + ,32 + ,10 + ,65 + ,7 + ,9 + ,34 + ,10 + ,29 + ,18 + ,22 + ,36 + ,10 + ,21 + ,7 + ,5 + ,34 + ,10 + ,19 + ,24 + ,23 + ,56 + ,10 + ,55 + ,18 + ,16 + ,64 + ,10 + ,119 + ,39 + ,53 + ,52 + ,10 + ,34 + ,17 + ,23 + ,48 + ,10 + ,25 + ,0 + ,0 + ,40 + ,10 + ,113 + ,39 + ,51 + ,36 + ,10 + ,46 + ,20 + ,25 + ,10 + ,10 + ,28 + ,29 + ,51 + ,48 + ,10 + ,63 + ,27 + ,46 + ,25 + ,10 + ,52 + ,23 + ,16 + ,68 + ,10 + ,35 + ,0 + ,0 + ,36 + ,10 + ,32 + ,31 + ,25 + ,32 + ,10 + ,45 + ,19 + ,34 + ,36 + ,10 + ,42 + ,12 + ,14 + ,43 + ,10 + ,28 + ,23 + ,32 + ,17 + ,10 + ,32 + ,33 + ,24 + ,52 + ,10 + ,32 + ,21 + ,16 + ,56 + ,10 + ,27 + ,17 + ,19 + ,40 + ,10 + ,69 + ,27 + ,27 + ,48 + ,10 + ,30 + ,14 + ,24 + ,40 + ,10 + ,48 + ,12 + ,12 + ,48 + ,10 + ,57 + ,21 + ,43 + ,68 + ,10 + ,36 + ,14 + ,13 + ,44 + ,10 + ,20 + ,14 + ,19 + ,40 + ,10 + ,54 + ,22 + ,24 + ,40 + ,10 + ,26 + ,25 + ,27 + ,28 + ,10 + ,58 + ,36 + ,26 + ,40 + ,10 + ,35 + ,10 + ,14 + ,44 + ,10 + ,28 + ,16 + ,26 + ,20 + ,10 + ,8 + ,12 + ,15 + ,22 + ,10 + ,96 + ,20 + ,30 + ,56 + ,11 + ,50 + ,38 + ,33 + ,52 + ,11 + ,15 + ,13 + ,14 + ,2 + ,11 + ,65 + ,12 + ,11 + ,52 + ,11 + ,33 + ,11 + ,12 + ,30 + ,11 + ,7 + ,8 + ,8 + ,3 + ,11 + ,17 + ,22 + ,22 + ,20 + ,11 + ,55 + ,14 + ,12 + ,48 + ,11 + ,32 + ,7 + ,6 + ,32 + ,11 + ,22 + ,14 + ,10 + ,36 + ,11 + ,41 + ,2 + ,1 + ,45 + ,11 + ,50 + ,35 + ,31 + ,40 + ,11 + ,7 + ,5 + ,5 + ,8 + ,11 + ,0 + ,0 + ,0 + ,0 + ,11 + ,26 + ,34 + ,35 + ,32 + ,11 + ,22 + ,12 + ,15 + ,28 + ,11 + ,26 + ,34 + ,36 + ,44 + ,11 + ,37 + ,30 + ,27 + ,56 + ,11 + ,29 + ,21 + ,36 + ,13 + ,11 + ,0 + ,0 + ,0 + ,0 + ,11 + ,0 + ,0 + ,0 + ,0 + ,11 + ,42 + ,28 + ,29 + ,52 + ,11 + ,51 + ,16 + ,19 + ,51 + ,11 + ,77 + ,12 + ,16 + ,52 + ,11 + ,32 + ,14 + ,15 + ,48 + ,11 + ,63 + ,7 + ,1 + ,3 + ,11 + ,50 + ,41 + ,36 + ,48 + ,11 + ,18 + ,21 + ,22 + ,24 + ,11 + ,37 + ,28 + ,16 + ,37 + ,11 + ,23 + ,1 + ,1 + ,32 + ,11 + ,19 + ,10 + ,10 + ,8 + ,11 + ,39 + ,31 + ,31 + ,44 + ,11 + ,38 + ,7 + ,22 + ,48 + ,11 + ,55 + ,26 + ,22 + ,56 + ,11 + ,22 + ,1 + ,0 + ,8 + ,11 + ,7 + ,0 + ,0 + ,0 + ,11 + ,21 + ,12 + ,10 + ,25 + ,11 + ,5 + ,0 + ,0 + ,4 + ,11 + ,21 + ,17 + ,9 + ,12 + ,11 + ,1 + ,5 + ,0 + ,0 + ,11 + ,22 + ,4 + ,0 + ,6 + ,11 + ,0 + ,0 + ,0 + ,0 + ,11 + ,31 + ,6 + ,7 + ,48 + ,11 + ,25 + ,0 + ,2 + ,52 + ,11 + ,0 + ,0 + ,0 + ,0 + ,11 + ,4 + ,0 + ,0 + ,0 + ,11 + ,20 + ,15 + ,16 + ,12 + ,11 + ,29 + ,0 + ,25 + ,28 + ,11 + ,33 + ,12 + ,6 + ,40) + ,dim=c(5 + ,144) + ,dimnames=list(c('month' + ,'CompendiumViews' + ,'BloggedComputations' + ,'includedhyperlinks' + ,'submittedFeedbackMessages') + ,1:144)) > y <- array(NA,dim=c(5,144),dimnames=list(c('month','CompendiumViews','BloggedComputations','includedhyperlinks','submittedFeedbackMessages'),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 month CompendiumViews BloggedComputations includedhyperlinks 1 9 68 13 13 2 9 17 26 27 3 9 1 0 0 4 9 114 37 37 5 9 95 47 39 6 9 148 80 99 7 9 56 21 21 8 9 26 36 33 9 9 63 35 36 10 9 96 40 44 11 9 74 35 33 12 9 65 46 47 13 9 40 20 19 14 9 173 24 41 15 9 28 19 22 16 9 55 15 17 17 9 58 48 46 18 9 25 0 0 19 9 103 38 31 20 9 29 12 20 21 9 31 10 10 22 9 43 51 55 23 9 74 4 6 24 9 99 24 17 25 9 25 39 33 26 9 69 19 33 27 9 62 23 32 28 9 25 39 37 29 9 38 37 44 30 9 57 20 22 31 9 52 20 15 32 9 91 41 18 33 9 48 26 25 34 9 52 0 7 35 9 35 31 35 36 9 0 0 0 37 9 31 8 14 38 9 107 35 31 39 9 242 3 9 40 9 41 47 59 41 9 57 42 62 42 9 32 11 12 43 9 17 10 23 44 9 36 26 31 45 9 29 27 57 46 9 22 0 23 47 9 21 15 14 48 9 41 32 31 49 10 64 13 17 50 10 71 24 24 51 10 28 10 11 52 10 36 14 16 53 10 45 24 32 54 10 22 29 36 55 10 27 40 37 56 10 38 22 25 57 10 26 27 30 58 10 41 8 10 59 10 21 27 16 60 10 28 0 3 61 10 36 0 0 62 10 58 17 17 63 10 65 7 9 64 10 29 18 22 65 10 21 7 5 66 10 19 24 23 67 10 55 18 16 68 10 119 39 53 69 10 34 17 23 70 10 25 0 0 71 10 113 39 51 72 10 46 20 25 73 10 28 29 51 74 10 63 27 46 75 10 52 23 16 76 10 35 0 0 77 10 32 31 25 78 10 45 19 34 79 10 42 12 14 80 10 28 23 32 81 10 32 33 24 82 10 32 21 16 83 10 27 17 19 84 10 69 27 27 85 10 30 14 24 86 10 48 12 12 87 10 57 21 43 88 10 36 14 13 89 10 20 14 19 90 10 54 22 24 91 10 26 25 27 92 10 58 36 26 93 10 35 10 14 94 10 28 16 26 95 10 8 12 15 96 10 96 20 30 97 11 50 38 33 98 11 15 13 14 99 11 65 12 11 100 11 33 11 12 101 11 7 8 8 102 11 17 22 22 103 11 55 14 12 104 11 32 7 6 105 11 22 14 10 106 11 41 2 1 107 11 50 35 31 108 11 7 5 5 109 11 0 0 0 110 11 26 34 35 111 11 22 12 15 112 11 26 34 36 113 11 37 30 27 114 11 29 21 36 115 11 0 0 0 116 11 0 0 0 117 11 42 28 29 118 11 51 16 19 119 11 77 12 16 120 11 32 14 15 121 11 63 7 1 122 11 50 41 36 123 11 18 21 22 124 11 37 28 16 125 11 23 1 1 126 11 19 10 10 127 11 39 31 31 128 11 38 7 22 129 11 55 26 22 130 11 22 1 0 131 11 7 0 0 132 11 21 12 10 133 11 5 0 0 134 11 21 17 9 135 11 1 5 0 136 11 22 4 0 137 11 0 0 0 138 11 31 6 7 139 11 25 0 2 140 11 0 0 0 141 11 4 0 0 142 11 20 15 16 143 11 29 0 25 144 11 33 12 6 submittedFeedbackMessages 1 20 2 28 3 0 4 40 5 60 6 60 7 44 8 52 9 60 10 52 11 24 12 64 13 26 14 48 15 36 16 40 17 64 18 20 19 79 20 16 21 52 22 52 23 44 24 29 25 40 26 28 27 49 28 60 29 52 30 28 31 56 32 35 33 12 34 32 35 48 36 0 37 48 38 31 39 64 40 72 41 36 42 56 43 28 44 52 45 44 46 44 47 55 48 36 49 48 50 44 51 66 52 40 53 44 54 48 55 68 56 24 57 32 58 44 59 52 60 56 61 68 62 32 63 34 64 36 65 34 66 56 67 64 68 52 69 48 70 40 71 36 72 10 73 48 74 25 75 68 76 36 77 32 78 36 79 43 80 17 81 52 82 56 83 40 84 48 85 40 86 48 87 68 88 44 89 40 90 40 91 28 92 40 93 44 94 20 95 22 96 56 97 52 98 2 99 52 100 30 101 3 102 20 103 48 104 32 105 36 106 45 107 40 108 8 109 0 110 32 111 28 112 44 113 56 114 13 115 0 116 0 117 52 118 51 119 52 120 48 121 3 122 48 123 24 124 37 125 32 126 8 127 44 128 48 129 56 130 8 131 0 132 25 133 4 134 12 135 0 136 6 137 0 138 48 139 52 140 0 141 0 142 12 143 28 144 40 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) CompendiumViews 10.710523 -0.005468 BloggedComputations includedhyperlinks 0.001721 -0.014034 submittedFeedbackMessages -0.005593 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -1.71052 -0.51339 -0.01096 0.56306 1.26606 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 10.710523 0.140435 76.267 <2e-16 *** CompendiumViews -0.005468 0.002130 -2.567 0.0113 * BloggedComputations 0.001721 0.009329 0.184 0.8539 includedhyperlinks -0.014034 0.008191 -1.713 0.0889 . submittedFeedbackMessages -0.005593 0.003847 -1.454 0.1482 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.7307 on 139 degrees of freedom Multiple R-squared: 0.2269, Adjusted R-squared: 0.2046 F-statistic: 10.2 on 4 and 139 DF, p-value: 2.874e-07 > 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,] 6.820032e-45 1.364006e-44 1.000000e+00 [2,] 8.580364e-61 1.716073e-60 1.000000e+00 [3,] 1.389794e-76 2.779588e-76 1.000000e+00 [4,] 4.270006e-91 8.540012e-91 1.000000e+00 [5,] 6.044544e-101 1.208909e-100 1.000000e+00 [6,] 4.253362e-120 8.506725e-120 1.000000e+00 [7,] 6.030514e-130 1.206103e-129 1.000000e+00 [8,] 7.918616e-145 1.583723e-144 1.000000e+00 [9,] 0.000000e+00 0.000000e+00 1.000000e+00 [10,] 3.001405e-174 6.002809e-174 1.000000e+00 [11,] 2.069280e-188 4.138559e-188 1.000000e+00 [12,] 2.875899e-202 5.751799e-202 1.000000e+00 [13,] 9.391962e-231 1.878392e-230 1.000000e+00 [14,] 1.242165e-238 2.484330e-238 1.000000e+00 [15,] 3.462896e-245 6.925791e-245 1.000000e+00 [16,] 1.396386e-261 2.792771e-261 1.000000e+00 [17,] 8.168795e-272 1.633759e-271 1.000000e+00 [18,] 4.291300e-299 8.582599e-299 1.000000e+00 [19,] 9.431664e-318 1.886333e-317 1.000000e+00 [20,] 0.000000e+00 0.000000e+00 1.000000e+00 [21,] 0.000000e+00 0.000000e+00 1.000000e+00 [22,] 0.000000e+00 0.000000e+00 1.000000e+00 [23,] 0.000000e+00 0.000000e+00 1.000000e+00 [24,] 0.000000e+00 0.000000e+00 1.000000e+00 [25,] 0.000000e+00 0.000000e+00 1.000000e+00 [26,] 0.000000e+00 0.000000e+00 1.000000e+00 [27,] 0.000000e+00 0.000000e+00 1.000000e+00 [28,] 0.000000e+00 0.000000e+00 1.000000e+00 [29,] 0.000000e+00 0.000000e+00 1.000000e+00 [30,] 0.000000e+00 0.000000e+00 1.000000e+00 [31,] 0.000000e+00 0.000000e+00 1.000000e+00 [32,] 0.000000e+00 0.000000e+00 1.000000e+00 [33,] 0.000000e+00 0.000000e+00 1.000000e+00 [34,] 0.000000e+00 0.000000e+00 1.000000e+00 [35,] 0.000000e+00 0.000000e+00 1.000000e+00 [36,] 0.000000e+00 0.000000e+00 1.000000e+00 [37,] 0.000000e+00 0.000000e+00 1.000000e+00 [38,] 0.000000e+00 0.000000e+00 1.000000e+00 [39,] 0.000000e+00 0.000000e+00 1.000000e+00 [40,] 0.000000e+00 0.000000e+00 1.000000e+00 [41,] 0.000000e+00 0.000000e+00 1.000000e+00 [42,] 5.917547e-13 1.183509e-12 1.000000e+00 [43,] 4.341781e-08 8.683562e-08 1.000000e+00 [44,] 3.540490e-06 7.080980e-06 9.999965e-01 [45,] 9.933890e-05 1.986778e-04 9.999007e-01 [46,] 9.790959e-04 1.958192e-03 9.990209e-01 [47,] 4.258785e-03 8.517570e-03 9.957412e-01 [48,] 9.482759e-03 1.896552e-02 9.905172e-01 [49,] 3.106903e-02 6.213807e-02 9.689310e-01 [50,] 6.407250e-02 1.281450e-01 9.359275e-01 [51,] 9.549680e-02 1.909936e-01 9.045032e-01 [52,] 1.311636e-01 2.623271e-01 8.688364e-01 [53,] 1.465305e-01 2.930610e-01 8.534695e-01 [54,] 1.474069e-01 2.948138e-01 8.525931e-01 [55,] 2.108836e-01 4.217673e-01 7.891164e-01 [56,] 2.678033e-01 5.356065e-01 7.321967e-01 [57,] 3.212823e-01 6.425646e-01 6.787177e-01 [58,] 3.780117e-01 7.560233e-01 6.219883e-01 [59,] 4.015973e-01 8.031946e-01 5.984027e-01 [60,] 4.132210e-01 8.264421e-01 5.867790e-01 [61,] 4.947944e-01 9.895888e-01 5.052056e-01 [62,] 5.176480e-01 9.647040e-01 4.823520e-01 [63,] 5.685533e-01 8.628934e-01 4.314467e-01 [64,] 6.413332e-01 7.173335e-01 3.586668e-01 [65,] 7.160531e-01 5.678937e-01 2.839469e-01 [66,] 7.146569e-01 5.706863e-01 2.853431e-01 [67,] 7.353096e-01 5.293808e-01 2.646904e-01 [68,] 7.513648e-01 4.972703e-01 2.486352e-01 [69,] 7.991630e-01 4.016740e-01 2.008370e-01 [70,] 8.454634e-01 3.090733e-01 1.545366e-01 [71,] 8.507736e-01 2.984529e-01 1.492264e-01 [72,] 8.746179e-01 2.507642e-01 1.253821e-01 [73,] 8.995165e-01 2.009671e-01 1.004835e-01 [74,] 9.244272e-01 1.511456e-01 7.557278e-02 [75,] 9.457251e-01 1.085497e-01 5.427486e-02 [76,] 9.626449e-01 7.471018e-02 3.735509e-02 [77,] 9.718641e-01 5.627171e-02 2.813585e-02 [78,] 9.785074e-01 4.298520e-02 2.149260e-02 [79,] 9.878379e-01 2.432417e-02 1.216209e-02 [80,] 9.873708e-01 2.525841e-02 1.262920e-02 [81,] 9.949829e-01 1.003425e-02 5.017125e-03 [82,] 9.984391e-01 3.121729e-03 1.560864e-03 [83,] 9.994595e-01 1.081098e-03 5.405490e-04 [84,] 9.999089e-01 1.821252e-04 9.106258e-05 [85,] 9.999953e-01 9.459478e-06 4.729739e-06 [86,] 9.999999e-01 1.816466e-07 9.082332e-08 [87,] 1.000000e+00 1.020958e-09 5.104790e-10 [88,] 1.000000e+00 5.024616e-17 2.512308e-17 [89,] 1.000000e+00 0.000000e+00 0.000000e+00 [90,] 1.000000e+00 0.000000e+00 0.000000e+00 [91,] 1.000000e+00 0.000000e+00 0.000000e+00 [92,] 1.000000e+00 0.000000e+00 0.000000e+00 [93,] 1.000000e+00 0.000000e+00 0.000000e+00 [94,] 1.000000e+00 0.000000e+00 0.000000e+00 [95,] 1.000000e+00 0.000000e+00 0.000000e+00 [96,] 1.000000e+00 0.000000e+00 0.000000e+00 [97,] 1.000000e+00 0.000000e+00 0.000000e+00 [98,] 1.000000e+00 0.000000e+00 0.000000e+00 [99,] 1.000000e+00 0.000000e+00 0.000000e+00 [100,] 1.000000e+00 0.000000e+00 0.000000e+00 [101,] 1.000000e+00 0.000000e+00 0.000000e+00 [102,] 1.000000e+00 0.000000e+00 0.000000e+00 [103,] 1.000000e+00 0.000000e+00 0.000000e+00 [104,] 1.000000e+00 0.000000e+00 0.000000e+00 [105,] 1.000000e+00 0.000000e+00 0.000000e+00 [106,] 1.000000e+00 0.000000e+00 0.000000e+00 [107,] 1.000000e+00 0.000000e+00 0.000000e+00 [108,] 1.000000e+00 0.000000e+00 0.000000e+00 [109,] 1.000000e+00 0.000000e+00 0.000000e+00 [110,] 1.000000e+00 0.000000e+00 0.000000e+00 [111,] 1.000000e+00 3.306975e-309 1.653488e-309 [112,] 1.000000e+00 4.765652e-287 2.382826e-287 [113,] 1.000000e+00 9.913397e-281 4.956699e-281 [114,] 1.000000e+00 5.994543e-270 2.997272e-270 [115,] 1.000000e+00 3.662207e-247 1.831104e-247 [116,] 1.000000e+00 1.715660e-246 8.578300e-247 [117,] 1.000000e+00 2.078970e-229 1.039485e-229 [118,] 1.000000e+00 9.021512e-201 4.510756e-201 [119,] 1.000000e+00 1.870132e-191 9.350661e-192 [120,] 1.000000e+00 4.327947e-176 2.163973e-176 [121,] 1.000000e+00 0.000000e+00 0.000000e+00 [122,] 1.000000e+00 1.972554e-150 9.862770e-151 [123,] 1.000000e+00 4.289463e-130 2.144732e-130 [124,] 1.000000e+00 7.135486e-125 3.567743e-125 [125,] 1.000000e+00 1.278950e-99 6.394751e-100 [126,] 1.000000e+00 4.658893e-90 2.329446e-90 [127,] 1.000000e+00 2.060070e-74 1.030035e-74 [128,] 1.000000e+00 1.451633e-61 7.258163e-62 [129,] 1.000000e+00 3.621999e-44 1.810999e-44 > postscript(file="/var/www/rcomp/tmp/16b301322154884.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/2qfy91322154884.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/3exdw1322154884.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/4dwjd1322154884.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/521kc1322154884.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 -1.066726477 -1.126764677 -1.705054841 -0.407789476 -0.388966560 0.686134122 7 8 9 10 11 12 -0.899601869 -0.876313053 -0.585408055 -0.346024479 -0.768717590 -0.416650995 13 14 15 16 17 18 -1.114125174 0.038110062 -1.079989294 -0.973254782 -0.472407088 -1.461944832 19 20 21 22 23 24 -0.335731283 -1.202408289 -1.127014255 -0.500407357 -0.982427111 -0.809658015 25 26 27 28 29 30 -0.954064716 -0.746148858 -0.687887493 -0.786060483 -0.658033244 -0.967870902 31 32 33 34 35 36 -0.936841653 -0.835070515 -1.074803677 -1.148934667 -0.812795448 -1.710523326 37 38 39 40 41 42 -1.089807437 -0.577173290 0.091969218 -0.336455624 -0.399610361 -1.072824684 43 44 45 46 47 48 -1.155364654 -0.832485959 -0.552336944 -1.021317954 -1.117386877 -0.904963340 49 50 51 52 53 54 0.124150366 0.219365443 -0.051078783 -0.089469339 0.189460554 0.133590949 55 56 57 58 59 60 0.267901919 -0.055484230 -0.014792763 -0.113633722 -0.126751315 -0.202076510 61 62 63 64 65 66 -0.133312200 -0.005038112 -0.050636621 -0.072799691 -0.347387810 -0.011910406 67 68 69 70 71 72 0.141787051 0.907781968 0.037418139 -0.350078457 0.757409031 -0.086600579 73 74 75 76 77 78 0.376918825 0.372939374 0.139149283 -0.317766884 -0.059038647 0.181388521 79 80 81 82 83 84 -0.064505168 -0.052802175 0.035351028 -0.033898002 -0.101745662 0.267741789 85 86 87 88 89 90 -0.010004532 -0.031796595 0.548864483 -0.109199458 -0.134861703 0.107470162 91 92 93 94 95 96 -0.075827196 0.133317384 -0.093749008 -0.108181183 -0.353858880 0.514288645 97 98 99 100 101 102 1.251488346 0.556798557 1.069506457 0.787217514 0.443042799 0.765200921 103 104 105 106 107 108 1.003040564 0.715613350 0.727391812 0.775976122 1.161462946 0.434069352 109 110 111 112 113 114 0.289476674 1.043331736 0.756259820 1.124486025 1.132333473 0.989873128 115 116 117 118 119 120 0.289476674 0.289476674 1.168813786 1.092745597 1.205300597 0.919368807 121 122 123 124 125 126 0.652757813 1.266055112 0.794763799 0.875123543 0.606551370 0.561257904 127 128 129 130 131 132 1.130567358 1.062468790 1.167478347 0.452808771 0.327756067 0.663839056 133 134 135 136 137 138 0.339192373 0.568485861 0.286339571 0.436458781 0.289476674 0.815393547 139 140 141 142 143 144 0.745110296 0.289476674 0.311350613 0.664700862 0.955537269 0.757222797 > postscript(file="/var/www/rcomp/tmp/64pil1322154884.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 -1.066726477 NA 1 -1.126764677 -1.066726477 2 -1.705054841 -1.126764677 3 -0.407789476 -1.705054841 4 -0.388966560 -0.407789476 5 0.686134122 -0.388966560 6 -0.899601869 0.686134122 7 -0.876313053 -0.899601869 8 -0.585408055 -0.876313053 9 -0.346024479 -0.585408055 10 -0.768717590 -0.346024479 11 -0.416650995 -0.768717590 12 -1.114125174 -0.416650995 13 0.038110062 -1.114125174 14 -1.079989294 0.038110062 15 -0.973254782 -1.079989294 16 -0.472407088 -0.973254782 17 -1.461944832 -0.472407088 18 -0.335731283 -1.461944832 19 -1.202408289 -0.335731283 20 -1.127014255 -1.202408289 21 -0.500407357 -1.127014255 22 -0.982427111 -0.500407357 23 -0.809658015 -0.982427111 24 -0.954064716 -0.809658015 25 -0.746148858 -0.954064716 26 -0.687887493 -0.746148858 27 -0.786060483 -0.687887493 28 -0.658033244 -0.786060483 29 -0.967870902 -0.658033244 30 -0.936841653 -0.967870902 31 -0.835070515 -0.936841653 32 -1.074803677 -0.835070515 33 -1.148934667 -1.074803677 34 -0.812795448 -1.148934667 35 -1.710523326 -0.812795448 36 -1.089807437 -1.710523326 37 -0.577173290 -1.089807437 38 0.091969218 -0.577173290 39 -0.336455624 0.091969218 40 -0.399610361 -0.336455624 41 -1.072824684 -0.399610361 42 -1.155364654 -1.072824684 43 -0.832485959 -1.155364654 44 -0.552336944 -0.832485959 45 -1.021317954 -0.552336944 46 -1.117386877 -1.021317954 47 -0.904963340 -1.117386877 48 0.124150366 -0.904963340 49 0.219365443 0.124150366 50 -0.051078783 0.219365443 51 -0.089469339 -0.051078783 52 0.189460554 -0.089469339 53 0.133590949 0.189460554 54 0.267901919 0.133590949 55 -0.055484230 0.267901919 56 -0.014792763 -0.055484230 57 -0.113633722 -0.014792763 58 -0.126751315 -0.113633722 59 -0.202076510 -0.126751315 60 -0.133312200 -0.202076510 61 -0.005038112 -0.133312200 62 -0.050636621 -0.005038112 63 -0.072799691 -0.050636621 64 -0.347387810 -0.072799691 65 -0.011910406 -0.347387810 66 0.141787051 -0.011910406 67 0.907781968 0.141787051 68 0.037418139 0.907781968 69 -0.350078457 0.037418139 70 0.757409031 -0.350078457 71 -0.086600579 0.757409031 72 0.376918825 -0.086600579 73 0.372939374 0.376918825 74 0.139149283 0.372939374 75 -0.317766884 0.139149283 76 -0.059038647 -0.317766884 77 0.181388521 -0.059038647 78 -0.064505168 0.181388521 79 -0.052802175 -0.064505168 80 0.035351028 -0.052802175 81 -0.033898002 0.035351028 82 -0.101745662 -0.033898002 83 0.267741789 -0.101745662 84 -0.010004532 0.267741789 85 -0.031796595 -0.010004532 86 0.548864483 -0.031796595 87 -0.109199458 0.548864483 88 -0.134861703 -0.109199458 89 0.107470162 -0.134861703 90 -0.075827196 0.107470162 91 0.133317384 -0.075827196 92 -0.093749008 0.133317384 93 -0.108181183 -0.093749008 94 -0.353858880 -0.108181183 95 0.514288645 -0.353858880 96 1.251488346 0.514288645 97 0.556798557 1.251488346 98 1.069506457 0.556798557 99 0.787217514 1.069506457 100 0.443042799 0.787217514 101 0.765200921 0.443042799 102 1.003040564 0.765200921 103 0.715613350 1.003040564 104 0.727391812 0.715613350 105 0.775976122 0.727391812 106 1.161462946 0.775976122 107 0.434069352 1.161462946 108 0.289476674 0.434069352 109 1.043331736 0.289476674 110 0.756259820 1.043331736 111 1.124486025 0.756259820 112 1.132333473 1.124486025 113 0.989873128 1.132333473 114 0.289476674 0.989873128 115 0.289476674 0.289476674 116 1.168813786 0.289476674 117 1.092745597 1.168813786 118 1.205300597 1.092745597 119 0.919368807 1.205300597 120 0.652757813 0.919368807 121 1.266055112 0.652757813 122 0.794763799 1.266055112 123 0.875123543 0.794763799 124 0.606551370 0.875123543 125 0.561257904 0.606551370 126 1.130567358 0.561257904 127 1.062468790 1.130567358 128 1.167478347 1.062468790 129 0.452808771 1.167478347 130 0.327756067 0.452808771 131 0.663839056 0.327756067 132 0.339192373 0.663839056 133 0.568485861 0.339192373 134 0.286339571 0.568485861 135 0.436458781 0.286339571 136 0.289476674 0.436458781 137 0.815393547 0.289476674 138 0.745110296 0.815393547 139 0.289476674 0.745110296 140 0.311350613 0.289476674 141 0.664700862 0.311350613 142 0.955537269 0.664700862 143 0.757222797 0.955537269 144 NA 0.757222797 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -1.126764677 -1.066726477 [2,] -1.705054841 -1.126764677 [3,] -0.407789476 -1.705054841 [4,] -0.388966560 -0.407789476 [5,] 0.686134122 -0.388966560 [6,] -0.899601869 0.686134122 [7,] -0.876313053 -0.899601869 [8,] -0.585408055 -0.876313053 [9,] -0.346024479 -0.585408055 [10,] -0.768717590 -0.346024479 [11,] -0.416650995 -0.768717590 [12,] -1.114125174 -0.416650995 [13,] 0.038110062 -1.114125174 [14,] -1.079989294 0.038110062 [15,] -0.973254782 -1.079989294 [16,] -0.472407088 -0.973254782 [17,] -1.461944832 -0.472407088 [18,] -0.335731283 -1.461944832 [19,] -1.202408289 -0.335731283 [20,] -1.127014255 -1.202408289 [21,] -0.500407357 -1.127014255 [22,] -0.982427111 -0.500407357 [23,] -0.809658015 -0.982427111 [24,] -0.954064716 -0.809658015 [25,] -0.746148858 -0.954064716 [26,] -0.687887493 -0.746148858 [27,] -0.786060483 -0.687887493 [28,] -0.658033244 -0.786060483 [29,] -0.967870902 -0.658033244 [30,] -0.936841653 -0.967870902 [31,] -0.835070515 -0.936841653 [32,] -1.074803677 -0.835070515 [33,] -1.148934667 -1.074803677 [34,] -0.812795448 -1.148934667 [35,] -1.710523326 -0.812795448 [36,] -1.089807437 -1.710523326 [37,] -0.577173290 -1.089807437 [38,] 0.091969218 -0.577173290 [39,] -0.336455624 0.091969218 [40,] -0.399610361 -0.336455624 [41,] -1.072824684 -0.399610361 [42,] -1.155364654 -1.072824684 [43,] -0.832485959 -1.155364654 [44,] -0.552336944 -0.832485959 [45,] -1.021317954 -0.552336944 [46,] -1.117386877 -1.021317954 [47,] -0.904963340 -1.117386877 [48,] 0.124150366 -0.904963340 [49,] 0.219365443 0.124150366 [50,] -0.051078783 0.219365443 [51,] -0.089469339 -0.051078783 [52,] 0.189460554 -0.089469339 [53,] 0.133590949 0.189460554 [54,] 0.267901919 0.133590949 [55,] -0.055484230 0.267901919 [56,] -0.014792763 -0.055484230 [57,] -0.113633722 -0.014792763 [58,] -0.126751315 -0.113633722 [59,] -0.202076510 -0.126751315 [60,] -0.133312200 -0.202076510 [61,] -0.005038112 -0.133312200 [62,] -0.050636621 -0.005038112 [63,] -0.072799691 -0.050636621 [64,] -0.347387810 -0.072799691 [65,] -0.011910406 -0.347387810 [66,] 0.141787051 -0.011910406 [67,] 0.907781968 0.141787051 [68,] 0.037418139 0.907781968 [69,] -0.350078457 0.037418139 [70,] 0.757409031 -0.350078457 [71,] -0.086600579 0.757409031 [72,] 0.376918825 -0.086600579 [73,] 0.372939374 0.376918825 [74,] 0.139149283 0.372939374 [75,] -0.317766884 0.139149283 [76,] -0.059038647 -0.317766884 [77,] 0.181388521 -0.059038647 [78,] -0.064505168 0.181388521 [79,] -0.052802175 -0.064505168 [80,] 0.035351028 -0.052802175 [81,] -0.033898002 0.035351028 [82,] -0.101745662 -0.033898002 [83,] 0.267741789 -0.101745662 [84,] -0.010004532 0.267741789 [85,] -0.031796595 -0.010004532 [86,] 0.548864483 -0.031796595 [87,] -0.109199458 0.548864483 [88,] -0.134861703 -0.109199458 [89,] 0.107470162 -0.134861703 [90,] -0.075827196 0.107470162 [91,] 0.133317384 -0.075827196 [92,] -0.093749008 0.133317384 [93,] -0.108181183 -0.093749008 [94,] -0.353858880 -0.108181183 [95,] 0.514288645 -0.353858880 [96,] 1.251488346 0.514288645 [97,] 0.556798557 1.251488346 [98,] 1.069506457 0.556798557 [99,] 0.787217514 1.069506457 [100,] 0.443042799 0.787217514 [101,] 0.765200921 0.443042799 [102,] 1.003040564 0.765200921 [103,] 0.715613350 1.003040564 [104,] 0.727391812 0.715613350 [105,] 0.775976122 0.727391812 [106,] 1.161462946 0.775976122 [107,] 0.434069352 1.161462946 [108,] 0.289476674 0.434069352 [109,] 1.043331736 0.289476674 [110,] 0.756259820 1.043331736 [111,] 1.124486025 0.756259820 [112,] 1.132333473 1.124486025 [113,] 0.989873128 1.132333473 [114,] 0.289476674 0.989873128 [115,] 0.289476674 0.289476674 [116,] 1.168813786 0.289476674 [117,] 1.092745597 1.168813786 [118,] 1.205300597 1.092745597 [119,] 0.919368807 1.205300597 [120,] 0.652757813 0.919368807 [121,] 1.266055112 0.652757813 [122,] 0.794763799 1.266055112 [123,] 0.875123543 0.794763799 [124,] 0.606551370 0.875123543 [125,] 0.561257904 0.606551370 [126,] 1.130567358 0.561257904 [127,] 1.062468790 1.130567358 [128,] 1.167478347 1.062468790 [129,] 0.452808771 1.167478347 [130,] 0.327756067 0.452808771 [131,] 0.663839056 0.327756067 [132,] 0.339192373 0.663839056 [133,] 0.568485861 0.339192373 [134,] 0.286339571 0.568485861 [135,] 0.436458781 0.286339571 [136,] 0.289476674 0.436458781 [137,] 0.815393547 0.289476674 [138,] 0.745110296 0.815393547 [139,] 0.289476674 0.745110296 [140,] 0.311350613 0.289476674 [141,] 0.664700862 0.311350613 [142,] 0.955537269 0.664700862 [143,] 0.757222797 0.955537269 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -1.126764677 -1.066726477 2 -1.705054841 -1.126764677 3 -0.407789476 -1.705054841 4 -0.388966560 -0.407789476 5 0.686134122 -0.388966560 6 -0.899601869 0.686134122 7 -0.876313053 -0.899601869 8 -0.585408055 -0.876313053 9 -0.346024479 -0.585408055 10 -0.768717590 -0.346024479 11 -0.416650995 -0.768717590 12 -1.114125174 -0.416650995 13 0.038110062 -1.114125174 14 -1.079989294 0.038110062 15 -0.973254782 -1.079989294 16 -0.472407088 -0.973254782 17 -1.461944832 -0.472407088 18 -0.335731283 -1.461944832 19 -1.202408289 -0.335731283 20 -1.127014255 -1.202408289 21 -0.500407357 -1.127014255 22 -0.982427111 -0.500407357 23 -0.809658015 -0.982427111 24 -0.954064716 -0.809658015 25 -0.746148858 -0.954064716 26 -0.687887493 -0.746148858 27 -0.786060483 -0.687887493 28 -0.658033244 -0.786060483 29 -0.967870902 -0.658033244 30 -0.936841653 -0.967870902 31 -0.835070515 -0.936841653 32 -1.074803677 -0.835070515 33 -1.148934667 -1.074803677 34 -0.812795448 -1.148934667 35 -1.710523326 -0.812795448 36 -1.089807437 -1.710523326 37 -0.577173290 -1.089807437 38 0.091969218 -0.577173290 39 -0.336455624 0.091969218 40 -0.399610361 -0.336455624 41 -1.072824684 -0.399610361 42 -1.155364654 -1.072824684 43 -0.832485959 -1.155364654 44 -0.552336944 -0.832485959 45 -1.021317954 -0.552336944 46 -1.117386877 -1.021317954 47 -0.904963340 -1.117386877 48 0.124150366 -0.904963340 49 0.219365443 0.124150366 50 -0.051078783 0.219365443 51 -0.089469339 -0.051078783 52 0.189460554 -0.089469339 53 0.133590949 0.189460554 54 0.267901919 0.133590949 55 -0.055484230 0.267901919 56 -0.014792763 -0.055484230 57 -0.113633722 -0.014792763 58 -0.126751315 -0.113633722 59 -0.202076510 -0.126751315 60 -0.133312200 -0.202076510 61 -0.005038112 -0.133312200 62 -0.050636621 -0.005038112 63 -0.072799691 -0.050636621 64 -0.347387810 -0.072799691 65 -0.011910406 -0.347387810 66 0.141787051 -0.011910406 67 0.907781968 0.141787051 68 0.037418139 0.907781968 69 -0.350078457 0.037418139 70 0.757409031 -0.350078457 71 -0.086600579 0.757409031 72 0.376918825 -0.086600579 73 0.372939374 0.376918825 74 0.139149283 0.372939374 75 -0.317766884 0.139149283 76 -0.059038647 -0.317766884 77 0.181388521 -0.059038647 78 -0.064505168 0.181388521 79 -0.052802175 -0.064505168 80 0.035351028 -0.052802175 81 -0.033898002 0.035351028 82 -0.101745662 -0.033898002 83 0.267741789 -0.101745662 84 -0.010004532 0.267741789 85 -0.031796595 -0.010004532 86 0.548864483 -0.031796595 87 -0.109199458 0.548864483 88 -0.134861703 -0.109199458 89 0.107470162 -0.134861703 90 -0.075827196 0.107470162 91 0.133317384 -0.075827196 92 -0.093749008 0.133317384 93 -0.108181183 -0.093749008 94 -0.353858880 -0.108181183 95 0.514288645 -0.353858880 96 1.251488346 0.514288645 97 0.556798557 1.251488346 98 1.069506457 0.556798557 99 0.787217514 1.069506457 100 0.443042799 0.787217514 101 0.765200921 0.443042799 102 1.003040564 0.765200921 103 0.715613350 1.003040564 104 0.727391812 0.715613350 105 0.775976122 0.727391812 106 1.161462946 0.775976122 107 0.434069352 1.161462946 108 0.289476674 0.434069352 109 1.043331736 0.289476674 110 0.756259820 1.043331736 111 1.124486025 0.756259820 112 1.132333473 1.124486025 113 0.989873128 1.132333473 114 0.289476674 0.989873128 115 0.289476674 0.289476674 116 1.168813786 0.289476674 117 1.092745597 1.168813786 118 1.205300597 1.092745597 119 0.919368807 1.205300597 120 0.652757813 0.919368807 121 1.266055112 0.652757813 122 0.794763799 1.266055112 123 0.875123543 0.794763799 124 0.606551370 0.875123543 125 0.561257904 0.606551370 126 1.130567358 0.561257904 127 1.062468790 1.130567358 128 1.167478347 1.062468790 129 0.452808771 1.167478347 130 0.327756067 0.452808771 131 0.663839056 0.327756067 132 0.339192373 0.663839056 133 0.568485861 0.339192373 134 0.286339571 0.568485861 135 0.436458781 0.286339571 136 0.289476674 0.436458781 137 0.815393547 0.289476674 138 0.745110296 0.815393547 139 0.289476674 0.745110296 140 0.311350613 0.289476674 141 0.664700862 0.311350613 142 0.955537269 0.664700862 143 0.757222797 0.955537269 > 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/7e4481322154884.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/81av81322154884.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/9my9d1322154884.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/10e7ms1322154884.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/1140ph1322154884.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/12x8vz1322154884.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/13agce1322154884.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/145vzj1322154884.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/15z4r11322154884.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/16fma11322154884.tab") + } > > try(system("convert tmp/16b301322154884.ps tmp/16b301322154884.png",intern=TRUE)) character(0) > try(system("convert tmp/2qfy91322154884.ps tmp/2qfy91322154884.png",intern=TRUE)) character(0) > try(system("convert tmp/3exdw1322154884.ps tmp/3exdw1322154884.png",intern=TRUE)) character(0) > try(system("convert tmp/4dwjd1322154884.ps tmp/4dwjd1322154884.png",intern=TRUE)) character(0) > try(system("convert tmp/521kc1322154884.ps tmp/521kc1322154884.png",intern=TRUE)) character(0) > try(system("convert tmp/64pil1322154884.ps tmp/64pil1322154884.png",intern=TRUE)) character(0) > try(system("convert tmp/7e4481322154884.ps tmp/7e4481322154884.png",intern=TRUE)) character(0) > try(system("convert tmp/81av81322154884.ps tmp/81av81322154884.png",intern=TRUE)) character(0) > try(system("convert tmp/9my9d1322154884.ps tmp/9my9d1322154884.png",intern=TRUE)) character(0) > try(system("convert tmp/10e7ms1322154884.ps tmp/10e7ms1322154884.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 5.690 0.390 6.112