R version 2.15.2 (2012-10-26) -- "Trick or Treat" Copyright (C) 2012 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i686-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(4 + ,2 + ,1 + ,4 + ,1 + ,1 + ,4 + ,1 + ,1 + ,4 + ,1 + ,1 + ,4 + ,1 + ,1 + ,4 + ,2 + ,2 + ,4 + ,1 + ,1 + ,4 + ,1 + ,1 + ,4 + ,1 + ,1 + ,4 + ,2 + ,1 + ,4 + ,2 + ,1 + ,4 + ,1 + ,1 + ,4 + ,1 + ,2 + ,4 + ,2 + ,1 + ,4 + ,1 + ,2 + ,4 + ,1 + ,2 + ,4 + ,2 + ,2 + ,4 + ,2 + ,1 + ,4 + ,1 + ,1 + ,4 + ,1 + ,2 + ,4 + ,2 + ,2 + ,4 + ,2 + ,2 + ,4 + ,1 + ,2 + ,4 + ,2 + ,2 + ,4 + ,1 + ,1 + ,4 + ,1 + ,2 + ,4 + ,2 + ,1 + ,4 + ,1 + ,1 + ,4 + ,1 + ,1 + ,4 + ,1 + ,2 + ,4 + ,1 + ,1 + ,4 + ,2 + ,1 + ,4 + ,2 + ,2 + ,4 + ,1 + ,1 + ,4 + ,1 + ,1 + ,4 + ,1 + ,1 + ,4 + ,2 + ,2 + ,4 + ,1 + ,1 + ,4 + ,1 + ,2 + ,4 + ,1 + ,2 + ,4 + ,1 + ,2 + ,4 + ,1 + ,1 + ,4 + ,2 + ,2 + ,4 + ,2 + ,1 + ,4 + ,1 + ,2 + ,4 + ,1 + ,2 + ,4 + ,1 + ,1 + ,4 + ,1 + ,1 + ,4 + ,1 + ,2 + ,4 + ,1 + ,1 + ,4 + ,1 + ,1 + ,4 + ,2 + ,2 + ,4 + ,1 + ,1 + ,4 + ,1 + ,1 + ,4 + ,1 + ,1 + ,4 + ,1 + ,1 + ,4 + ,1 + ,2 + ,4 + ,1 + ,1 + ,4 + ,1 + ,1 + ,4 + ,2 + ,2 + ,4 + ,2 + ,1 + ,4 + ,1 + ,2 + ,4 + ,1 + ,1 + ,4 + ,2 + ,1 + ,4 + ,1 + ,1 + ,4 + ,1 + ,1 + ,4 + ,1 + ,2 + ,4 + ,2 + ,1 + ,4 + ,1 + ,1 + ,4 + ,1 + ,1 + ,4 + ,1 + ,1 + ,4 + ,1 + ,1 + ,4 + ,1 + ,1 + ,4 + ,2 + ,1 + ,4 + ,1 + ,1 + ,4 + ,1 + ,2 + ,4 + ,1 + ,1 + ,4 + ,1 + ,2 + ,4 + ,1 + ,1 + ,4 + ,1 + ,2 + ,4 + ,1 + ,1 + ,4 + ,2 + ,1 + ,4 + ,1 + ,1 + ,4 + ,1 + ,1 + ,4 + ,1 + ,2 + ,4 + ,2 + ,1 + ,2 + ,2 + ,1 + ,2 + ,2 + ,1 + ,2 + ,1 + ,1 + ,2 + ,1 + ,1 + ,2 + ,1 + ,2 + ,2 + ,2 + ,1 + ,2 + ,2 + ,2 + ,2 + ,1 + ,1 + ,2 + ,1 + ,1 + ,2 + ,1 + ,1 + ,2 + ,2 + ,1 + ,2 + ,1 + ,1 + ,2 + ,2 + ,1 + ,2 + ,1 + ,1 + ,2 + ,2 + ,1 + ,2 + ,1 + ,1 + ,2 + ,1 + ,1 + ,2 + ,1 + ,1 + ,2 + ,1 + ,1 + ,2 + ,1 + ,1 + ,2 + ,1 + ,1 + ,2 + ,2 + ,1 + ,2 + ,1 + ,1 + ,2 + ,2 + ,1 + ,2 + ,2 + ,2 + ,2 + ,1 + ,1 + ,2 + ,1 + ,1 + ,2 + ,2 + ,1 + ,2 + ,2 + ,1 + ,2 + ,1 + ,1 + ,2 + ,2 + ,1 + ,2 + ,2 + ,1 + ,2 + ,1 + ,1 + ,2 + ,1 + ,1 + ,2 + ,2 + ,1 + ,2 + ,1 + ,1 + ,2 + ,2 + ,1 + ,2 + ,1 + ,2 + ,2 + ,1 + ,1 + ,2 + ,1 + ,1 + ,2 + ,1 + ,2 + ,2 + ,1 + ,1 + ,2 + ,1 + ,1 + ,2 + ,1 + ,1 + ,2 + ,2 + ,1 + ,2 + ,2 + ,1 + ,2 + ,2 + ,1 + ,2 + ,1 + ,1 + ,2 + ,1 + ,1 + ,2 + ,1 + ,1 + ,2 + ,2 + ,2 + ,2 + ,2 + ,2 + ,2 + ,1 + ,1 + ,2 + ,1 + ,1 + ,2 + ,1 + ,1 + ,2 + ,1 + ,1 + ,2 + ,2 + ,1 + ,2 + ,1 + ,2 + ,2 + ,1 + ,2 + ,2 + ,1 + ,1 + ,2 + ,1 + ,1 + ,2 + ,1 + ,1 + ,2 + ,2 + ,1 + ,2 + ,1 + ,2 + ,2 + ,1 + ,1 + ,2 + ,2 + ,1 + ,2 + ,2 + ,2 + ,2 + ,2 + ,1) + ,dim=c(3 + ,154) + ,dimnames=list(c('Weeks' + ,'Limit' + ,'Usefull') + ,1:154)) > y <- array(NA,dim=c(3,154),dimnames=list(c('Weeks','Limit','Usefull'),1:154)) > 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' > 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 Attaching package: 'zoo' The following object(s) are masked from 'package:base': as.Date, 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 Weeks Limit Usefull 1 4 2 1 2 4 1 1 3 4 1 1 4 4 1 1 5 4 1 1 6 4 2 2 7 4 1 1 8 4 1 1 9 4 1 1 10 4 2 1 11 4 2 1 12 4 1 1 13 4 1 2 14 4 2 1 15 4 1 2 16 4 1 2 17 4 2 2 18 4 2 1 19 4 1 1 20 4 1 2 21 4 2 2 22 4 2 2 23 4 1 2 24 4 2 2 25 4 1 1 26 4 1 2 27 4 2 1 28 4 1 1 29 4 1 1 30 4 1 2 31 4 1 1 32 4 2 1 33 4 2 2 34 4 1 1 35 4 1 1 36 4 1 1 37 4 2 2 38 4 1 1 39 4 1 2 40 4 1 2 41 4 1 2 42 4 1 1 43 4 2 2 44 4 2 1 45 4 1 2 46 4 1 2 47 4 1 1 48 4 1 1 49 4 1 2 50 4 1 1 51 4 1 1 52 4 2 2 53 4 1 1 54 4 1 1 55 4 1 1 56 4 1 1 57 4 1 2 58 4 1 1 59 4 1 1 60 4 2 2 61 4 2 1 62 4 1 2 63 4 1 1 64 4 2 1 65 4 1 1 66 4 1 1 67 4 1 2 68 4 2 1 69 4 1 1 70 4 1 1 71 4 1 1 72 4 1 1 73 4 1 1 74 4 2 1 75 4 1 1 76 4 1 2 77 4 1 1 78 4 1 2 79 4 1 1 80 4 1 2 81 4 1 1 82 4 2 1 83 4 1 1 84 4 1 1 85 4 1 2 86 4 2 1 87 2 2 1 88 2 2 1 89 2 1 1 90 2 1 1 91 2 1 2 92 2 2 1 93 2 2 2 94 2 1 1 95 2 1 1 96 2 1 1 97 2 2 1 98 2 1 1 99 2 2 1 100 2 1 1 101 2 2 1 102 2 1 1 103 2 1 1 104 2 1 1 105 2 1 1 106 2 1 1 107 2 1 1 108 2 2 1 109 2 1 1 110 2 2 1 111 2 2 2 112 2 1 1 113 2 1 1 114 2 2 1 115 2 2 1 116 2 1 1 117 2 2 1 118 2 2 1 119 2 1 1 120 2 1 1 121 2 2 1 122 2 1 1 123 2 2 1 124 2 1 2 125 2 1 1 126 2 1 1 127 2 1 2 128 2 1 1 129 2 1 1 130 2 1 1 131 2 2 1 132 2 2 1 133 2 2 1 134 2 1 1 135 2 1 1 136 2 1 1 137 2 2 2 138 2 2 2 139 2 1 1 140 2 1 1 141 2 1 1 142 2 1 1 143 2 2 1 144 2 1 2 145 2 1 2 146 2 1 1 147 2 1 1 148 2 1 1 149 2 2 1 150 2 1 2 151 2 1 1 152 2 2 1 153 2 2 2 154 2 2 1 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) Limit Usefull 2.8406 -0.2566 0.4867 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -1.5573 -1.0706 0.4427 0.9294 1.1860 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 2.8406 0.3175 8.947 1.23e-15 *** Limit -0.2566 0.1677 -1.530 0.1280 Usefull 0.4867 0.1777 2.739 0.0069 ** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.973 on 151 degrees of freedom Multiple R-squared: 0.05877, Adjusted R-squared: 0.04631 F-statistic: 4.715 on 2 and 151 DF, p-value: 0.01032 > 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,] 3.422243e-95 6.844486e-95 1.000000e+00 [2,] 6.507383e-125 1.301477e-124 1.000000e+00 [3,] 3.601170e-154 7.202341e-154 1.000000e+00 [4,] 5.268825e-192 1.053765e-191 1.000000e+00 [5,] 6.815000e-110 1.363000e-109 1.000000e+00 [6,] 6.252539e-131 1.250508e-130 1.000000e+00 [7,] 1.454496e-137 2.908991e-137 1.000000e+00 [8,] 2.259184e-173 4.518368e-173 1.000000e+00 [9,] 2.080828e-166 4.161657e-166 1.000000e+00 [10,] 1.152937e-181 2.305875e-181 1.000000e+00 [11,] 0.000000e+00 0.000000e+00 1.000000e+00 [12,] 3.688828e-228 7.377656e-228 1.000000e+00 [13,] 5.240837e-229 1.048167e-228 1.000000e+00 [14,] 1.339414e-242 2.678829e-242 1.000000e+00 [15,] 2.830617e-270 5.661235e-270 1.000000e+00 [16,] 4.222919e-309 8.445837e-309 1.000000e+00 [17,] 5.403635e-292 1.080727e-291 1.000000e+00 [18,] 2.713969e-302 5.427939e-302 1.000000e+00 [19,] 2.485150e-321 4.970300e-321 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,] 0.000000e+00 0.000000e+00 1.000000e+00 [43,] 0.000000e+00 0.000000e+00 1.000000e+00 [44,] 0.000000e+00 0.000000e+00 1.000000e+00 [45,] 0.000000e+00 0.000000e+00 1.000000e+00 [46,] 0.000000e+00 0.000000e+00 1.000000e+00 [47,] 0.000000e+00 0.000000e+00 1.000000e+00 [48,] 0.000000e+00 0.000000e+00 1.000000e+00 [49,] 0.000000e+00 0.000000e+00 1.000000e+00 [50,] 0.000000e+00 0.000000e+00 1.000000e+00 [51,] 0.000000e+00 0.000000e+00 1.000000e+00 [52,] 0.000000e+00 0.000000e+00 1.000000e+00 [53,] 0.000000e+00 0.000000e+00 1.000000e+00 [54,] 0.000000e+00 0.000000e+00 1.000000e+00 [55,] 0.000000e+00 0.000000e+00 1.000000e+00 [56,] 0.000000e+00 0.000000e+00 1.000000e+00 [57,] 0.000000e+00 0.000000e+00 1.000000e+00 [58,] 0.000000e+00 0.000000e+00 1.000000e+00 [59,] 0.000000e+00 0.000000e+00 1.000000e+00 [60,] 0.000000e+00 0.000000e+00 1.000000e+00 [61,] 0.000000e+00 0.000000e+00 1.000000e+00 [62,] 0.000000e+00 0.000000e+00 1.000000e+00 [63,] 0.000000e+00 0.000000e+00 1.000000e+00 [64,] 0.000000e+00 0.000000e+00 1.000000e+00 [65,] 0.000000e+00 0.000000e+00 1.000000e+00 [66,] 0.000000e+00 0.000000e+00 1.000000e+00 [67,] 0.000000e+00 0.000000e+00 1.000000e+00 [68,] 0.000000e+00 0.000000e+00 1.000000e+00 [69,] 0.000000e+00 0.000000e+00 1.000000e+00 [70,] 0.000000e+00 0.000000e+00 1.000000e+00 [71,] 0.000000e+00 0.000000e+00 1.000000e+00 [72,] 0.000000e+00 0.000000e+00 1.000000e+00 [73,] 0.000000e+00 0.000000e+00 1.000000e+00 [74,] 0.000000e+00 0.000000e+00 1.000000e+00 [75,] 0.000000e+00 0.000000e+00 1.000000e+00 [76,] 0.000000e+00 0.000000e+00 1.000000e+00 [77,] 0.000000e+00 0.000000e+00 1.000000e+00 [78,] 0.000000e+00 0.000000e+00 1.000000e+00 [79,] 0.000000e+00 0.000000e+00 1.000000e+00 [80,] 0.000000e+00 0.000000e+00 1.000000e+00 [81,] 1.000000e+00 5.927687e-20 2.963843e-20 [82,] 1.000000e+00 0.000000e+00 0.000000e+00 [83,] 1.000000e+00 0.000000e+00 0.000000e+00 [84,] 1.000000e+00 0.000000e+00 0.000000e+00 [85,] 1.000000e+00 0.000000e+00 0.000000e+00 [86,] 1.000000e+00 0.000000e+00 0.000000e+00 [87,] 1.000000e+00 0.000000e+00 0.000000e+00 [88,] 1.000000e+00 0.000000e+00 0.000000e+00 [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 0.000000e+00 0.000000e+00 [112,] 1.000000e+00 0.000000e+00 0.000000e+00 [113,] 1.000000e+00 0.000000e+00 0.000000e+00 [114,] 1.000000e+00 0.000000e+00 0.000000e+00 [115,] 1.000000e+00 0.000000e+00 0.000000e+00 [116,] 1.000000e+00 0.000000e+00 0.000000e+00 [117,] 1.000000e+00 0.000000e+00 0.000000e+00 [118,] 1.000000e+00 0.000000e+00 0.000000e+00 [119,] 1.000000e+00 0.000000e+00 0.000000e+00 [120,] 1.000000e+00 0.000000e+00 0.000000e+00 [121,] 1.000000e+00 0.000000e+00 0.000000e+00 [122,] 1.000000e+00 0.000000e+00 0.000000e+00 [123,] 1.000000e+00 0.000000e+00 0.000000e+00 [124,] 1.000000e+00 0.000000e+00 0.000000e+00 [125,] 1.000000e+00 0.000000e+00 0.000000e+00 [126,] 1.000000e+00 1.827648e-307 9.138238e-308 [127,] 1.000000e+00 5.235328e-297 2.617664e-297 [128,] 1.000000e+00 1.739584e-313 8.697920e-314 [129,] 1.000000e+00 1.994676e-274 9.973378e-275 [130,] 1.000000e+00 1.501113e-246 7.505564e-247 [131,] 1.000000e+00 3.367367e-233 1.683683e-233 [132,] 1.000000e+00 3.211868e-232 1.605934e-232 [133,] 1.000000e+00 0.000000e+00 0.000000e+00 [134,] 1.000000e+00 1.454064e-184 7.270319e-185 [135,] 1.000000e+00 4.256583e-169 2.128291e-169 [136,] 1.000000e+00 1.149971e-175 5.749854e-176 [137,] 1.000000e+00 1.400438e-139 7.002191e-140 [138,] 1.000000e+00 8.007022e-133 4.003511e-133 [139,] 1.000000e+00 2.511797e-111 1.255898e-111 [140,] 1.000000e+00 3.455327e-95 1.727663e-95 [141,] 1.000000e+00 1.532580e-77 7.662899e-78 [142,] 1.000000e+00 1.435939e-62 7.179695e-63 [143,] 1.000000e+00 2.635337e-47 1.317669e-47 > postscript(file="/var/fisher/rcomp/tmp/1oui81356102862.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/fisher/rcomp/tmp/2hbwe1356102862.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/fisher/rcomp/tmp/3lldo1356102862.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/fisher/rcomp/tmp/4i6ac1356102862.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/fisher/rcomp/tmp/5v6lf1356102862.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 = 154 Frequency = 1 1 2 3 4 5 6 7 1.1860000 0.9293590 0.9293590 0.9293590 0.9293590 0.6993333 0.9293590 8 9 10 11 12 13 14 0.9293590 0.9293590 1.1860000 1.1860000 0.9293590 0.4426923 1.1860000 15 16 17 18 19 20 21 0.4426923 0.4426923 0.6993333 1.1860000 0.9293590 0.4426923 0.6993333 22 23 24 25 26 27 28 0.6993333 0.4426923 0.6993333 0.9293590 0.4426923 1.1860000 0.9293590 29 30 31 32 33 34 35 0.9293590 0.4426923 0.9293590 1.1860000 0.6993333 0.9293590 0.9293590 36 37 38 39 40 41 42 0.9293590 0.6993333 0.9293590 0.4426923 0.4426923 0.4426923 0.9293590 43 44 45 46 47 48 49 0.6993333 1.1860000 0.4426923 0.4426923 0.9293590 0.9293590 0.4426923 50 51 52 53 54 55 56 0.9293590 0.9293590 0.6993333 0.9293590 0.9293590 0.9293590 0.9293590 57 58 59 60 61 62 63 0.4426923 0.9293590 0.9293590 0.6993333 1.1860000 0.4426923 0.9293590 64 65 66 67 68 69 70 1.1860000 0.9293590 0.9293590 0.4426923 1.1860000 0.9293590 0.9293590 71 72 73 74 75 76 77 0.9293590 0.9293590 0.9293590 1.1860000 0.9293590 0.4426923 0.9293590 78 79 80 81 82 83 84 0.4426923 0.9293590 0.4426923 0.9293590 1.1860000 0.9293590 0.9293590 85 86 87 88 89 90 91 0.4426923 1.1860000 -0.8140000 -0.8140000 -1.0706410 -1.0706410 -1.5573077 92 93 94 95 96 97 98 -0.8140000 -1.3006667 -1.0706410 -1.0706410 -1.0706410 -0.8140000 -1.0706410 99 100 101 102 103 104 105 -0.8140000 -1.0706410 -0.8140000 -1.0706410 -1.0706410 -1.0706410 -1.0706410 106 107 108 109 110 111 112 -1.0706410 -1.0706410 -0.8140000 -1.0706410 -0.8140000 -1.3006667 -1.0706410 113 114 115 116 117 118 119 -1.0706410 -0.8140000 -0.8140000 -1.0706410 -0.8140000 -0.8140000 -1.0706410 120 121 122 123 124 125 126 -1.0706410 -0.8140000 -1.0706410 -0.8140000 -1.5573077 -1.0706410 -1.0706410 127 128 129 130 131 132 133 -1.5573077 -1.0706410 -1.0706410 -1.0706410 -0.8140000 -0.8140000 -0.8140000 134 135 136 137 138 139 140 -1.0706410 -1.0706410 -1.0706410 -1.3006667 -1.3006667 -1.0706410 -1.0706410 141 142 143 144 145 146 147 -1.0706410 -1.0706410 -0.8140000 -1.5573077 -1.5573077 -1.0706410 -1.0706410 148 149 150 151 152 153 154 -1.0706410 -0.8140000 -1.5573077 -1.0706410 -0.8140000 -1.3006667 -0.8140000 > postscript(file="/var/fisher/rcomp/tmp/67zd11356102863.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 = 154 Frequency = 1 lag(myerror, k = 1) myerror 0 1.1860000 NA 1 0.9293590 1.1860000 2 0.9293590 0.9293590 3 0.9293590 0.9293590 4 0.9293590 0.9293590 5 0.6993333 0.9293590 6 0.9293590 0.6993333 7 0.9293590 0.9293590 8 0.9293590 0.9293590 9 1.1860000 0.9293590 10 1.1860000 1.1860000 11 0.9293590 1.1860000 12 0.4426923 0.9293590 13 1.1860000 0.4426923 14 0.4426923 1.1860000 15 0.4426923 0.4426923 16 0.6993333 0.4426923 17 1.1860000 0.6993333 18 0.9293590 1.1860000 19 0.4426923 0.9293590 20 0.6993333 0.4426923 21 0.6993333 0.6993333 22 0.4426923 0.6993333 23 0.6993333 0.4426923 24 0.9293590 0.6993333 25 0.4426923 0.9293590 26 1.1860000 0.4426923 27 0.9293590 1.1860000 28 0.9293590 0.9293590 29 0.4426923 0.9293590 30 0.9293590 0.4426923 31 1.1860000 0.9293590 32 0.6993333 1.1860000 33 0.9293590 0.6993333 34 0.9293590 0.9293590 35 0.9293590 0.9293590 36 0.6993333 0.9293590 37 0.9293590 0.6993333 38 0.4426923 0.9293590 39 0.4426923 0.4426923 40 0.4426923 0.4426923 41 0.9293590 0.4426923 42 0.6993333 0.9293590 43 1.1860000 0.6993333 44 0.4426923 1.1860000 45 0.4426923 0.4426923 46 0.9293590 0.4426923 47 0.9293590 0.9293590 48 0.4426923 0.9293590 49 0.9293590 0.4426923 50 0.9293590 0.9293590 51 0.6993333 0.9293590 52 0.9293590 0.6993333 53 0.9293590 0.9293590 54 0.9293590 0.9293590 55 0.9293590 0.9293590 56 0.4426923 0.9293590 57 0.9293590 0.4426923 58 0.9293590 0.9293590 59 0.6993333 0.9293590 60 1.1860000 0.6993333 61 0.4426923 1.1860000 62 0.9293590 0.4426923 63 1.1860000 0.9293590 64 0.9293590 1.1860000 65 0.9293590 0.9293590 66 0.4426923 0.9293590 67 1.1860000 0.4426923 68 0.9293590 1.1860000 69 0.9293590 0.9293590 70 0.9293590 0.9293590 71 0.9293590 0.9293590 72 0.9293590 0.9293590 73 1.1860000 0.9293590 74 0.9293590 1.1860000 75 0.4426923 0.9293590 76 0.9293590 0.4426923 77 0.4426923 0.9293590 78 0.9293590 0.4426923 79 0.4426923 0.9293590 80 0.9293590 0.4426923 81 1.1860000 0.9293590 82 0.9293590 1.1860000 83 0.9293590 0.9293590 84 0.4426923 0.9293590 85 1.1860000 0.4426923 86 -0.8140000 1.1860000 87 -0.8140000 -0.8140000 88 -1.0706410 -0.8140000 89 -1.0706410 -1.0706410 90 -1.5573077 -1.0706410 91 -0.8140000 -1.5573077 92 -1.3006667 -0.8140000 93 -1.0706410 -1.3006667 94 -1.0706410 -1.0706410 95 -1.0706410 -1.0706410 96 -0.8140000 -1.0706410 97 -1.0706410 -0.8140000 98 -0.8140000 -1.0706410 99 -1.0706410 -0.8140000 100 -0.8140000 -1.0706410 101 -1.0706410 -0.8140000 102 -1.0706410 -1.0706410 103 -1.0706410 -1.0706410 104 -1.0706410 -1.0706410 105 -1.0706410 -1.0706410 106 -1.0706410 -1.0706410 107 -0.8140000 -1.0706410 108 -1.0706410 -0.8140000 109 -0.8140000 -1.0706410 110 -1.3006667 -0.8140000 111 -1.0706410 -1.3006667 112 -1.0706410 -1.0706410 113 -0.8140000 -1.0706410 114 -0.8140000 -0.8140000 115 -1.0706410 -0.8140000 116 -0.8140000 -1.0706410 117 -0.8140000 -0.8140000 118 -1.0706410 -0.8140000 119 -1.0706410 -1.0706410 120 -0.8140000 -1.0706410 121 -1.0706410 -0.8140000 122 -0.8140000 -1.0706410 123 -1.5573077 -0.8140000 124 -1.0706410 -1.5573077 125 -1.0706410 -1.0706410 126 -1.5573077 -1.0706410 127 -1.0706410 -1.5573077 128 -1.0706410 -1.0706410 129 -1.0706410 -1.0706410 130 -0.8140000 -1.0706410 131 -0.8140000 -0.8140000 132 -0.8140000 -0.8140000 133 -1.0706410 -0.8140000 134 -1.0706410 -1.0706410 135 -1.0706410 -1.0706410 136 -1.3006667 -1.0706410 137 -1.3006667 -1.3006667 138 -1.0706410 -1.3006667 139 -1.0706410 -1.0706410 140 -1.0706410 -1.0706410 141 -1.0706410 -1.0706410 142 -0.8140000 -1.0706410 143 -1.5573077 -0.8140000 144 -1.5573077 -1.5573077 145 -1.0706410 -1.5573077 146 -1.0706410 -1.0706410 147 -1.0706410 -1.0706410 148 -0.8140000 -1.0706410 149 -1.5573077 -0.8140000 150 -1.0706410 -1.5573077 151 -0.8140000 -1.0706410 152 -1.3006667 -0.8140000 153 -0.8140000 -1.3006667 154 NA -0.8140000 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 0.9293590 1.1860000 [2,] 0.9293590 0.9293590 [3,] 0.9293590 0.9293590 [4,] 0.9293590 0.9293590 [5,] 0.6993333 0.9293590 [6,] 0.9293590 0.6993333 [7,] 0.9293590 0.9293590 [8,] 0.9293590 0.9293590 [9,] 1.1860000 0.9293590 [10,] 1.1860000 1.1860000 [11,] 0.9293590 1.1860000 [12,] 0.4426923 0.9293590 [13,] 1.1860000 0.4426923 [14,] 0.4426923 1.1860000 [15,] 0.4426923 0.4426923 [16,] 0.6993333 0.4426923 [17,] 1.1860000 0.6993333 [18,] 0.9293590 1.1860000 [19,] 0.4426923 0.9293590 [20,] 0.6993333 0.4426923 [21,] 0.6993333 0.6993333 [22,] 0.4426923 0.6993333 [23,] 0.6993333 0.4426923 [24,] 0.9293590 0.6993333 [25,] 0.4426923 0.9293590 [26,] 1.1860000 0.4426923 [27,] 0.9293590 1.1860000 [28,] 0.9293590 0.9293590 [29,] 0.4426923 0.9293590 [30,] 0.9293590 0.4426923 [31,] 1.1860000 0.9293590 [32,] 0.6993333 1.1860000 [33,] 0.9293590 0.6993333 [34,] 0.9293590 0.9293590 [35,] 0.9293590 0.9293590 [36,] 0.6993333 0.9293590 [37,] 0.9293590 0.6993333 [38,] 0.4426923 0.9293590 [39,] 0.4426923 0.4426923 [40,] 0.4426923 0.4426923 [41,] 0.9293590 0.4426923 [42,] 0.6993333 0.9293590 [43,] 1.1860000 0.6993333 [44,] 0.4426923 1.1860000 [45,] 0.4426923 0.4426923 [46,] 0.9293590 0.4426923 [47,] 0.9293590 0.9293590 [48,] 0.4426923 0.9293590 [49,] 0.9293590 0.4426923 [50,] 0.9293590 0.9293590 [51,] 0.6993333 0.9293590 [52,] 0.9293590 0.6993333 [53,] 0.9293590 0.9293590 [54,] 0.9293590 0.9293590 [55,] 0.9293590 0.9293590 [56,] 0.4426923 0.9293590 [57,] 0.9293590 0.4426923 [58,] 0.9293590 0.9293590 [59,] 0.6993333 0.9293590 [60,] 1.1860000 0.6993333 [61,] 0.4426923 1.1860000 [62,] 0.9293590 0.4426923 [63,] 1.1860000 0.9293590 [64,] 0.9293590 1.1860000 [65,] 0.9293590 0.9293590 [66,] 0.4426923 0.9293590 [67,] 1.1860000 0.4426923 [68,] 0.9293590 1.1860000 [69,] 0.9293590 0.9293590 [70,] 0.9293590 0.9293590 [71,] 0.9293590 0.9293590 [72,] 0.9293590 0.9293590 [73,] 1.1860000 0.9293590 [74,] 0.9293590 1.1860000 [75,] 0.4426923 0.9293590 [76,] 0.9293590 0.4426923 [77,] 0.4426923 0.9293590 [78,] 0.9293590 0.4426923 [79,] 0.4426923 0.9293590 [80,] 0.9293590 0.4426923 [81,] 1.1860000 0.9293590 [82,] 0.9293590 1.1860000 [83,] 0.9293590 0.9293590 [84,] 0.4426923 0.9293590 [85,] 1.1860000 0.4426923 [86,] -0.8140000 1.1860000 [87,] -0.8140000 -0.8140000 [88,] -1.0706410 -0.8140000 [89,] -1.0706410 -1.0706410 [90,] -1.5573077 -1.0706410 [91,] -0.8140000 -1.5573077 [92,] -1.3006667 -0.8140000 [93,] -1.0706410 -1.3006667 [94,] -1.0706410 -1.0706410 [95,] -1.0706410 -1.0706410 [96,] -0.8140000 -1.0706410 [97,] -1.0706410 -0.8140000 [98,] -0.8140000 -1.0706410 [99,] -1.0706410 -0.8140000 [100,] -0.8140000 -1.0706410 [101,] -1.0706410 -0.8140000 [102,] -1.0706410 -1.0706410 [103,] -1.0706410 -1.0706410 [104,] -1.0706410 -1.0706410 [105,] -1.0706410 -1.0706410 [106,] -1.0706410 -1.0706410 [107,] -0.8140000 -1.0706410 [108,] -1.0706410 -0.8140000 [109,] -0.8140000 -1.0706410 [110,] -1.3006667 -0.8140000 [111,] -1.0706410 -1.3006667 [112,] -1.0706410 -1.0706410 [113,] -0.8140000 -1.0706410 [114,] -0.8140000 -0.8140000 [115,] -1.0706410 -0.8140000 [116,] -0.8140000 -1.0706410 [117,] -0.8140000 -0.8140000 [118,] -1.0706410 -0.8140000 [119,] -1.0706410 -1.0706410 [120,] -0.8140000 -1.0706410 [121,] -1.0706410 -0.8140000 [122,] -0.8140000 -1.0706410 [123,] -1.5573077 -0.8140000 [124,] -1.0706410 -1.5573077 [125,] -1.0706410 -1.0706410 [126,] -1.5573077 -1.0706410 [127,] -1.0706410 -1.5573077 [128,] -1.0706410 -1.0706410 [129,] -1.0706410 -1.0706410 [130,] -0.8140000 -1.0706410 [131,] -0.8140000 -0.8140000 [132,] -0.8140000 -0.8140000 [133,] -1.0706410 -0.8140000 [134,] -1.0706410 -1.0706410 [135,] -1.0706410 -1.0706410 [136,] -1.3006667 -1.0706410 [137,] -1.3006667 -1.3006667 [138,] -1.0706410 -1.3006667 [139,] -1.0706410 -1.0706410 [140,] -1.0706410 -1.0706410 [141,] -1.0706410 -1.0706410 [142,] -0.8140000 -1.0706410 [143,] -1.5573077 -0.8140000 [144,] -1.5573077 -1.5573077 [145,] -1.0706410 -1.5573077 [146,] -1.0706410 -1.0706410 [147,] -1.0706410 -1.0706410 [148,] -0.8140000 -1.0706410 [149,] -1.5573077 -0.8140000 [150,] -1.0706410 -1.5573077 [151,] -0.8140000 -1.0706410 [152,] -1.3006667 -0.8140000 [153,] -0.8140000 -1.3006667 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 0.9293590 1.1860000 2 0.9293590 0.9293590 3 0.9293590 0.9293590 4 0.9293590 0.9293590 5 0.6993333 0.9293590 6 0.9293590 0.6993333 7 0.9293590 0.9293590 8 0.9293590 0.9293590 9 1.1860000 0.9293590 10 1.1860000 1.1860000 11 0.9293590 1.1860000 12 0.4426923 0.9293590 13 1.1860000 0.4426923 14 0.4426923 1.1860000 15 0.4426923 0.4426923 16 0.6993333 0.4426923 17 1.1860000 0.6993333 18 0.9293590 1.1860000 19 0.4426923 0.9293590 20 0.6993333 0.4426923 21 0.6993333 0.6993333 22 0.4426923 0.6993333 23 0.6993333 0.4426923 24 0.9293590 0.6993333 25 0.4426923 0.9293590 26 1.1860000 0.4426923 27 0.9293590 1.1860000 28 0.9293590 0.9293590 29 0.4426923 0.9293590 30 0.9293590 0.4426923 31 1.1860000 0.9293590 32 0.6993333 1.1860000 33 0.9293590 0.6993333 34 0.9293590 0.9293590 35 0.9293590 0.9293590 36 0.6993333 0.9293590 37 0.9293590 0.6993333 38 0.4426923 0.9293590 39 0.4426923 0.4426923 40 0.4426923 0.4426923 41 0.9293590 0.4426923 42 0.6993333 0.9293590 43 1.1860000 0.6993333 44 0.4426923 1.1860000 45 0.4426923 0.4426923 46 0.9293590 0.4426923 47 0.9293590 0.9293590 48 0.4426923 0.9293590 49 0.9293590 0.4426923 50 0.9293590 0.9293590 51 0.6993333 0.9293590 52 0.9293590 0.6993333 53 0.9293590 0.9293590 54 0.9293590 0.9293590 55 0.9293590 0.9293590 56 0.4426923 0.9293590 57 0.9293590 0.4426923 58 0.9293590 0.9293590 59 0.6993333 0.9293590 60 1.1860000 0.6993333 61 0.4426923 1.1860000 62 0.9293590 0.4426923 63 1.1860000 0.9293590 64 0.9293590 1.1860000 65 0.9293590 0.9293590 66 0.4426923 0.9293590 67 1.1860000 0.4426923 68 0.9293590 1.1860000 69 0.9293590 0.9293590 70 0.9293590 0.9293590 71 0.9293590 0.9293590 72 0.9293590 0.9293590 73 1.1860000 0.9293590 74 0.9293590 1.1860000 75 0.4426923 0.9293590 76 0.9293590 0.4426923 77 0.4426923 0.9293590 78 0.9293590 0.4426923 79 0.4426923 0.9293590 80 0.9293590 0.4426923 81 1.1860000 0.9293590 82 0.9293590 1.1860000 83 0.9293590 0.9293590 84 0.4426923 0.9293590 85 1.1860000 0.4426923 86 -0.8140000 1.1860000 87 -0.8140000 -0.8140000 88 -1.0706410 -0.8140000 89 -1.0706410 -1.0706410 90 -1.5573077 -1.0706410 91 -0.8140000 -1.5573077 92 -1.3006667 -0.8140000 93 -1.0706410 -1.3006667 94 -1.0706410 -1.0706410 95 -1.0706410 -1.0706410 96 -0.8140000 -1.0706410 97 -1.0706410 -0.8140000 98 -0.8140000 -1.0706410 99 -1.0706410 -0.8140000 100 -0.8140000 -1.0706410 101 -1.0706410 -0.8140000 102 -1.0706410 -1.0706410 103 -1.0706410 -1.0706410 104 -1.0706410 -1.0706410 105 -1.0706410 -1.0706410 106 -1.0706410 -1.0706410 107 -0.8140000 -1.0706410 108 -1.0706410 -0.8140000 109 -0.8140000 -1.0706410 110 -1.3006667 -0.8140000 111 -1.0706410 -1.3006667 112 -1.0706410 -1.0706410 113 -0.8140000 -1.0706410 114 -0.8140000 -0.8140000 115 -1.0706410 -0.8140000 116 -0.8140000 -1.0706410 117 -0.8140000 -0.8140000 118 -1.0706410 -0.8140000 119 -1.0706410 -1.0706410 120 -0.8140000 -1.0706410 121 -1.0706410 -0.8140000 122 -0.8140000 -1.0706410 123 -1.5573077 -0.8140000 124 -1.0706410 -1.5573077 125 -1.0706410 -1.0706410 126 -1.5573077 -1.0706410 127 -1.0706410 -1.5573077 128 -1.0706410 -1.0706410 129 -1.0706410 -1.0706410 130 -0.8140000 -1.0706410 131 -0.8140000 -0.8140000 132 -0.8140000 -0.8140000 133 -1.0706410 -0.8140000 134 -1.0706410 -1.0706410 135 -1.0706410 -1.0706410 136 -1.3006667 -1.0706410 137 -1.3006667 -1.3006667 138 -1.0706410 -1.3006667 139 -1.0706410 -1.0706410 140 -1.0706410 -1.0706410 141 -1.0706410 -1.0706410 142 -0.8140000 -1.0706410 143 -1.5573077 -0.8140000 144 -1.5573077 -1.5573077 145 -1.0706410 -1.5573077 146 -1.0706410 -1.0706410 147 -1.0706410 -1.0706410 148 -0.8140000 -1.0706410 149 -1.5573077 -0.8140000 150 -1.0706410 -1.5573077 151 -0.8140000 -1.0706410 152 -1.3006667 -0.8140000 153 -0.8140000 -1.3006667 > 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/fisher/rcomp/tmp/77x761356102863.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/fisher/rcomp/tmp/8wm1n1356102863.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/fisher/rcomp/tmp/9h1qs1356102863.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/fisher/rcomp/tmp/10q2jw1356102863.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/fisher/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/fisher/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/fisher/rcomp/tmp/11i4vv1356102863.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/fisher/rcomp/tmp/12wj2k1356102863.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/fisher/rcomp/tmp/13cq6a1356102863.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/fisher/rcomp/tmp/14k8871356102863.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/fisher/rcomp/tmp/15ohqq1356102863.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/fisher/rcomp/tmp/16dhtz1356102863.tab") + } > > try(system("convert tmp/1oui81356102862.ps tmp/1oui81356102862.png",intern=TRUE)) character(0) > try(system("convert tmp/2hbwe1356102862.ps tmp/2hbwe1356102862.png",intern=TRUE)) character(0) > try(system("convert tmp/3lldo1356102862.ps tmp/3lldo1356102862.png",intern=TRUE)) character(0) > try(system("convert tmp/4i6ac1356102862.ps tmp/4i6ac1356102862.png",intern=TRUE)) character(0) > try(system("convert tmp/5v6lf1356102862.ps tmp/5v6lf1356102862.png",intern=TRUE)) character(0) > try(system("convert tmp/67zd11356102863.ps tmp/67zd11356102863.png",intern=TRUE)) character(0) > try(system("convert tmp/77x761356102863.ps tmp/77x761356102863.png",intern=TRUE)) character(0) > try(system("convert tmp/8wm1n1356102863.ps tmp/8wm1n1356102863.png",intern=TRUE)) character(0) > try(system("convert tmp/9h1qs1356102863.ps tmp/9h1qs1356102863.png",intern=TRUE)) character(0) > try(system("convert tmp/10q2jw1356102863.ps tmp/10q2jw1356102863.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 7.293 1.740 9.037