R version 2.8.0 (2008-10-20) Copyright (C) 2008 The R Foundation for Statistical Computing ISBN 3-900051-07-0 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > x <- array(list(6.392 + ,0 + ,8.686 + ,0 + ,9.245 + ,0 + ,8.183 + ,0 + ,7.451 + ,0 + ,7.989 + ,0 + ,8.244 + ,0 + ,8.843 + ,0 + ,9.093 + ,0 + ,8.247 + ,0 + ,9.312 + ,0 + ,8.341 + ,0 + ,7.117 + ,0 + ,9.636 + ,0 + ,9.815 + ,0 + ,8.611 + ,0 + ,8.298 + ,0 + ,8.715 + ,0 + ,8.920 + ,0 + ,10.086 + ,0 + ,9.512 + ,0 + ,8.991 + ,0 + ,10.311 + ,0 + ,8.895 + ,0 + ,7.450 + ,0 + ,10.084 + ,0 + ,9.859 + ,0 + ,9.100 + ,0 + ,8.921 + ,0 + ,8.503 + ,0 + ,8.600 + ,0 + ,10.394 + ,0 + ,9.290 + ,0 + ,8.742 + ,0 + ,10.217 + ,0 + ,8.639 + ,0 + ,8.140 + ,0 + ,10.779 + ,0 + ,10.428 + ,0 + ,10.349 + ,0 + ,10.036 + ,0 + ,9.492 + ,0 + ,10.639 + ,0 + ,12.055 + ,0 + ,10.325 + ,0 + ,11.817 + ,0 + ,11.009 + ,0 + ,9.997 + ,0 + ,9.420 + ,0 + ,11.959 + ,0 + ,12.595 + ,0 + ,11.891 + ,0 + ,10.872 + ,0 + ,11.836 + ,0 + ,11.542 + ,0 + ,13.094 + ,0 + ,11.180 + ,0 + ,12.036 + ,0 + ,12.112 + ,0 + ,10.875 + ,0 + ,9.897 + ,0 + ,11.672 + ,0 + ,12.386 + ,0 + ,11.406 + ,0 + ,9.831 + ,0 + ,11.025 + ,1 + ,10.854 + ,1 + ,12.253 + ,1 + ,11.839 + ,1 + ,11.669 + ,1 + ,11.601 + ,1 + ,11.178 + ,1 + ,9.516 + ,1 + ,12.103 + ,1 + ,12.989 + ,1 + ,11.610 + ,1 + ,10.206 + ,1 + ,11.356 + ,1 + ,11.307 + ,1 + ,12.649 + ,1 + ,11.947 + ,1 + ,11.714 + ,1 + ,12.193 + ,1 + ,11.269 + ,1 + ,9.097 + ,1 + ,12.640 + ,1 + ,13.040 + ,1 + ,11.687 + ,1 + ,11.192 + ,1 + ,11.392 + ,1 + ,11.793 + ,1 + ,13.933 + ,1 + ,12.778 + ,1 + ,11.810 + ,1 + ,13.698 + ,1 + ,11.957 + ,1 + ,10.724 + ,1 + ,13.939 + ,1 + ,13.980 + ,1 + ,13.807 + ,1 + ,12.974 + ,1 + ,12.510 + ,1 + ,12.934 + ,1 + ,14.908 + ,1 + ,13.772 + ,1 + ,13.013 + ,1 + ,14.050 + ,1 + ,11.817 + ,1 + ,11.593 + ,1 + ,14.466 + ,1 + ,13.616 + ,1 + ,14.734 + ,1 + ,13.881 + ,1 + ,13.528 + ,1 + ,13.584 + ,1 + ,16.170 + ,1 + ,13.261 + ,1 + ,14.742 + ,1 + ,15.487 + ,1 + ,13.155 + ,1 + ,12.621 + ,1) + ,dim=c(2 + ,121) + ,dimnames=list(c('y' + ,'x') + ,1:121)) > y <- array(NA,dim=c(2,121),dimnames=list(c('y','x'),1:121)) > for (i in 1:dim(x)[1]) + { + for (j in 1:dim(x)[2]) + { + y[i,j] <- as.numeric(x[i,j]) + } + } > par3 = 'Linear Trend' > par2 = 'Include Monthly 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.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 y x M1 M2 M3 M4 M5 M6 M7 M8 M9 M10 M11 t 1 6.392 0 1 0 0 0 0 0 0 0 0 0 0 1 2 8.686 0 0 1 0 0 0 0 0 0 0 0 0 2 3 9.245 0 0 0 1 0 0 0 0 0 0 0 0 3 4 8.183 0 0 0 0 1 0 0 0 0 0 0 0 4 5 7.451 0 0 0 0 0 1 0 0 0 0 0 0 5 6 7.989 0 0 0 0 0 0 1 0 0 0 0 0 6 7 8.244 0 0 0 0 0 0 0 1 0 0 0 0 7 8 8.843 0 0 0 0 0 0 0 0 1 0 0 0 8 9 9.093 0 0 0 0 0 0 0 0 0 1 0 0 9 10 8.247 0 0 0 0 0 0 0 0 0 0 1 0 10 11 9.312 0 0 0 0 0 0 0 0 0 0 0 1 11 12 8.341 0 0 0 0 0 0 0 0 0 0 0 0 12 13 7.117 0 1 0 0 0 0 0 0 0 0 0 0 13 14 9.636 0 0 1 0 0 0 0 0 0 0 0 0 14 15 9.815 0 0 0 1 0 0 0 0 0 0 0 0 15 16 8.611 0 0 0 0 1 0 0 0 0 0 0 0 16 17 8.298 0 0 0 0 0 1 0 0 0 0 0 0 17 18 8.715 0 0 0 0 0 0 1 0 0 0 0 0 18 19 8.920 0 0 0 0 0 0 0 1 0 0 0 0 19 20 10.086 0 0 0 0 0 0 0 0 1 0 0 0 20 21 9.512 0 0 0 0 0 0 0 0 0 1 0 0 21 22 8.991 0 0 0 0 0 0 0 0 0 0 1 0 22 23 10.311 0 0 0 0 0 0 0 0 0 0 0 1 23 24 8.895 0 0 0 0 0 0 0 0 0 0 0 0 24 25 7.450 0 1 0 0 0 0 0 0 0 0 0 0 25 26 10.084 0 0 1 0 0 0 0 0 0 0 0 0 26 27 9.859 0 0 0 1 0 0 0 0 0 0 0 0 27 28 9.100 0 0 0 0 1 0 0 0 0 0 0 0 28 29 8.921 0 0 0 0 0 1 0 0 0 0 0 0 29 30 8.503 0 0 0 0 0 0 1 0 0 0 0 0 30 31 8.600 0 0 0 0 0 0 0 1 0 0 0 0 31 32 10.394 0 0 0 0 0 0 0 0 1 0 0 0 32 33 9.290 0 0 0 0 0 0 0 0 0 1 0 0 33 34 8.742 0 0 0 0 0 0 0 0 0 0 1 0 34 35 10.217 0 0 0 0 0 0 0 0 0 0 0 1 35 36 8.639 0 0 0 0 0 0 0 0 0 0 0 0 36 37 8.140 0 1 0 0 0 0 0 0 0 0 0 0 37 38 10.779 0 0 1 0 0 0 0 0 0 0 0 0 38 39 10.428 0 0 0 1 0 0 0 0 0 0 0 0 39 40 10.349 0 0 0 0 1 0 0 0 0 0 0 0 40 41 10.036 0 0 0 0 0 1 0 0 0 0 0 0 41 42 9.492 0 0 0 0 0 0 1 0 0 0 0 0 42 43 10.639 0 0 0 0 0 0 0 1 0 0 0 0 43 44 12.055 0 0 0 0 0 0 0 0 1 0 0 0 44 45 10.325 0 0 0 0 0 0 0 0 0 1 0 0 45 46 11.817 0 0 0 0 0 0 0 0 0 0 1 0 46 47 11.009 0 0 0 0 0 0 0 0 0 0 0 1 47 48 9.997 0 0 0 0 0 0 0 0 0 0 0 0 48 49 9.420 0 1 0 0 0 0 0 0 0 0 0 0 49 50 11.959 0 0 1 0 0 0 0 0 0 0 0 0 50 51 12.595 0 0 0 1 0 0 0 0 0 0 0 0 51 52 11.891 0 0 0 0 1 0 0 0 0 0 0 0 52 53 10.872 0 0 0 0 0 1 0 0 0 0 0 0 53 54 11.836 0 0 0 0 0 0 1 0 0 0 0 0 54 55 11.542 0 0 0 0 0 0 0 1 0 0 0 0 55 56 13.094 0 0 0 0 0 0 0 0 1 0 0 0 56 57 11.180 0 0 0 0 0 0 0 0 0 1 0 0 57 58 12.036 0 0 0 0 0 0 0 0 0 0 1 0 58 59 12.112 0 0 0 0 0 0 0 0 0 0 0 1 59 60 10.875 0 0 0 0 0 0 0 0 0 0 0 0 60 61 9.897 0 1 0 0 0 0 0 0 0 0 0 0 61 62 11.672 0 0 1 0 0 0 0 0 0 0 0 0 62 63 12.386 0 0 0 1 0 0 0 0 0 0 0 0 63 64 11.406 0 0 0 0 1 0 0 0 0 0 0 0 64 65 9.831 0 0 0 0 0 1 0 0 0 0 0 0 65 66 11.025 1 0 0 0 0 0 1 0 0 0 0 0 66 67 10.854 1 0 0 0 0 0 0 1 0 0 0 0 67 68 12.253 1 0 0 0 0 0 0 0 1 0 0 0 68 69 11.839 1 0 0 0 0 0 0 0 0 1 0 0 69 70 11.669 1 0 0 0 0 0 0 0 0 0 1 0 70 71 11.601 1 0 0 0 0 0 0 0 0 0 0 1 71 72 11.178 1 0 0 0 0 0 0 0 0 0 0 0 72 73 9.516 1 1 0 0 0 0 0 0 0 0 0 0 73 74 12.103 1 0 1 0 0 0 0 0 0 0 0 0 74 75 12.989 1 0 0 1 0 0 0 0 0 0 0 0 75 76 11.610 1 0 0 0 1 0 0 0 0 0 0 0 76 77 10.206 1 0 0 0 0 1 0 0 0 0 0 0 77 78 11.356 1 0 0 0 0 0 1 0 0 0 0 0 78 79 11.307 1 0 0 0 0 0 0 1 0 0 0 0 79 80 12.649 1 0 0 0 0 0 0 0 1 0 0 0 80 81 11.947 1 0 0 0 0 0 0 0 0 1 0 0 81 82 11.714 1 0 0 0 0 0 0 0 0 0 1 0 82 83 12.193 1 0 0 0 0 0 0 0 0 0 0 1 83 84 11.269 1 0 0 0 0 0 0 0 0 0 0 0 84 85 9.097 1 1 0 0 0 0 0 0 0 0 0 0 85 86 12.640 1 0 1 0 0 0 0 0 0 0 0 0 86 87 13.040 1 0 0 1 0 0 0 0 0 0 0 0 87 88 11.687 1 0 0 0 1 0 0 0 0 0 0 0 88 89 11.192 1 0 0 0 0 1 0 0 0 0 0 0 89 90 11.392 1 0 0 0 0 0 1 0 0 0 0 0 90 91 11.793 1 0 0 0 0 0 0 1 0 0 0 0 91 92 13.933 1 0 0 0 0 0 0 0 1 0 0 0 92 93 12.778 1 0 0 0 0 0 0 0 0 1 0 0 93 94 11.810 1 0 0 0 0 0 0 0 0 0 1 0 94 95 13.698 1 0 0 0 0 0 0 0 0 0 0 1 95 96 11.957 1 0 0 0 0 0 0 0 0 0 0 0 96 97 10.724 1 1 0 0 0 0 0 0 0 0 0 0 97 98 13.939 1 0 1 0 0 0 0 0 0 0 0 0 98 99 13.980 1 0 0 1 0 0 0 0 0 0 0 0 99 100 13.807 1 0 0 0 1 0 0 0 0 0 0 0 100 101 12.974 1 0 0 0 0 1 0 0 0 0 0 0 101 102 12.510 1 0 0 0 0 0 1 0 0 0 0 0 102 103 12.934 1 0 0 0 0 0 0 1 0 0 0 0 103 104 14.908 1 0 0 0 0 0 0 0 1 0 0 0 104 105 13.772 1 0 0 0 0 0 0 0 0 1 0 0 105 106 13.013 1 0 0 0 0 0 0 0 0 0 1 0 106 107 14.050 1 0 0 0 0 0 0 0 0 0 0 1 107 108 11.817 1 0 0 0 0 0 0 0 0 0 0 0 108 109 11.593 1 1 0 0 0 0 0 0 0 0 0 0 109 110 14.466 1 0 1 0 0 0 0 0 0 0 0 0 110 111 13.616 1 0 0 1 0 0 0 0 0 0 0 0 111 112 14.734 1 0 0 0 1 0 0 0 0 0 0 0 112 113 13.881 1 0 0 0 0 1 0 0 0 0 0 0 113 114 13.528 1 0 0 0 0 0 1 0 0 0 0 0 114 115 13.584 1 0 0 0 0 0 0 1 0 0 0 0 115 116 16.170 1 0 0 0 0 0 0 0 1 0 0 0 116 117 13.261 1 0 0 0 0 0 0 0 0 1 0 0 117 118 14.742 1 0 0 0 0 0 0 0 0 0 1 0 118 119 15.487 1 0 0 0 0 0 0 0 0 0 0 1 119 120 13.155 1 0 0 0 0 0 0 0 0 0 0 0 120 121 12.621 1 1 0 0 0 0 0 0 0 0 0 0 121 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) x M1 M2 M3 M4 7.03122 -0.98365 -1.07873 1.50284 1.64003 0.92082 M5 M6 M7 M8 M9 M10 0.08751 0.39256 0.53795 2.07304 0.87253 0.78922 M11 t 1.44841 0.06171 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -1.29892 -0.32841 0.01266 0.36947 1.15787 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 7.031217 0.199371 35.267 < 2e-16 *** x -0.983645 0.191853 -5.127 1.32e-06 *** M1 -1.078730 0.230709 -4.676 8.59e-06 *** M2 1.502842 0.236456 6.356 5.19e-09 *** M3 1.640032 0.236347 6.939 3.15e-10 *** M4 0.920821 0.236270 3.897 0.000170 *** M5 0.087510 0.236224 0.370 0.711776 M6 0.392564 0.236583 1.659 0.099981 . M7 0.537953 0.236408 2.276 0.024867 * M8 2.073043 0.236266 8.774 2.99e-14 *** M9 0.872532 0.236155 3.695 0.000349 *** M10 0.789221 0.236075 3.343 0.001142 ** M11 1.448411 0.236028 6.137 1.45e-08 *** t 0.061711 0.002737 22.544 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.5277 on 107 degrees of freedom Multiple R-squared: 0.9378, Adjusted R-squared: 0.9302 F-statistic: 124 on 13 and 107 DF, p-value: < 2.2e-16 > if (n > n25) { + kp3 <- k + 3 + nmkm3 <- n - k - 3 + gqarr <- array(NA, dim=c(nmkm3-kp3+1,3)) + numgqtests <- 0 + numsignificant1 <- 0 + numsignificant5 <- 0 + numsignificant10 <- 0 + for (mypoint in kp3:nmkm3) { + j <- 0 + numgqtests <- numgqtests + 1 + for (myalt in c('greater', 'two.sided', 'less')) { + j <- j + 1 + gqarr[mypoint-kp3+1,j] <- gqtest(mylm, point=mypoint, alternative=myalt)$p.value + } + if (gqarr[mypoint-kp3+1,2] < 0.01) numsignificant1 <- numsignificant1 + 1 + if (gqarr[mypoint-kp3+1,2] < 0.05) numsignificant5 <- numsignificant5 + 1 + if (gqarr[mypoint-kp3+1,2] < 0.10) numsignificant10 <- numsignificant10 + 1 + } + gqarr + } [,1] [,2] [,3] [1,] 3.863603e-02 0.0772720550 0.9613640 [2,] 9.737204e-03 0.0194744080 0.9902628 [3,] 2.244402e-03 0.0044888032 0.9977556 [4,] 5.810261e-03 0.0116205229 0.9941897 [5,] 3.696153e-03 0.0073923067 0.9963038 [6,] 1.166064e-03 0.0023321281 0.9988339 [7,] 5.785079e-04 0.0011570158 0.9994215 [8,] 2.439447e-04 0.0004878895 0.9997561 [9,] 2.513103e-04 0.0005026205 0.9997487 [10,] 8.692806e-05 0.0001738561 0.9999131 [11,] 4.376923e-04 0.0008753846 0.9995623 [12,] 2.181279e-04 0.0004362558 0.9997819 [13,] 9.309648e-05 0.0001861930 0.9999069 [14,] 4.821890e-04 0.0009643780 0.9995178 [15,] 1.929740e-03 0.0038594802 0.9980703 [16,] 1.222118e-03 0.0024442361 0.9987779 [17,] 2.952458e-03 0.0059049156 0.9970475 [18,] 5.314308e-03 0.0106286163 0.9946857 [19,] 3.566669e-03 0.0071333385 0.9964333 [20,] 4.752023e-03 0.0095040455 0.9952480 [21,] 3.382115e-03 0.0067642293 0.9966179 [22,] 2.908941e-03 0.0058178823 0.9970911 [23,] 2.079575e-03 0.0041591501 0.9979204 [24,] 4.504518e-03 0.0090090369 0.9954955 [25,] 8.836904e-03 0.0176738090 0.9911631 [26,] 6.829025e-03 0.0136580503 0.9931710 [27,] 1.720637e-02 0.0344127397 0.9827936 [28,] 4.579066e-02 0.0915813183 0.9542093 [29,] 3.544150e-02 0.0708830097 0.9645585 [30,] 2.929273e-01 0.5858546241 0.7070727 [31,] 2.598854e-01 0.5197708192 0.7401146 [32,] 2.133866e-01 0.4267732565 0.7866134 [33,] 2.037566e-01 0.4075131673 0.7962434 [34,] 1.871133e-01 0.3742265343 0.8128867 [35,] 2.603226e-01 0.5206451540 0.7396774 [36,] 3.297545e-01 0.6595090749 0.6702455 [37,] 3.134590e-01 0.6269180094 0.6865410 [38,] 4.934729e-01 0.9869457552 0.5065271 [39,] 5.043852e-01 0.9912295994 0.4956148 [40,] 5.212918e-01 0.9574163065 0.4787082 [41,] 4.725601e-01 0.9451202947 0.5274399 [42,] 5.138972e-01 0.9722056967 0.4861028 [43,] 4.623322e-01 0.9246643681 0.5376678 [44,] 4.403465e-01 0.8806930936 0.5596535 [45,] 4.752013e-01 0.9504025396 0.5247987 [46,] 4.836057e-01 0.9672113946 0.5163943 [47,] 4.752143e-01 0.9504285239 0.5247857 [48,] 4.566261e-01 0.9132522103 0.5433739 [49,] 5.701020e-01 0.8597960797 0.4298980 [50,] 5.603037e-01 0.8793925756 0.4396963 [51,] 5.225507e-01 0.9548985992 0.4774493 [52,] 4.675675e-01 0.9351349550 0.5324325 [53,] 4.924463e-01 0.9848925114 0.5075537 [54,] 5.088348e-01 0.9823303428 0.4911652 [55,] 4.722903e-01 0.9445805347 0.5277097 [56,] 5.742660e-01 0.8514680291 0.4257340 [57,] 5.765913e-01 0.8468174887 0.4234087 [58,] 5.216290e-01 0.9567420812 0.4783710 [59,] 6.433405e-01 0.7133189010 0.3566595 [60,] 5.852526e-01 0.8294947698 0.4147474 [61,] 6.207420e-01 0.7585159843 0.3792580 [62,] 6.189279e-01 0.7621442403 0.3810721 [63,] 5.835385e-01 0.8329230993 0.4164615 [64,] 5.608485e-01 0.8783029236 0.4391515 [65,] 5.324722e-01 0.9350556477 0.4675278 [66,] 4.971109e-01 0.9942218943 0.5028891 [67,] 4.546005e-01 0.9092009863 0.5453995 [68,] 4.979308e-01 0.9958616942 0.5020692 [69,] 5.776649e-01 0.8446702402 0.4223351 [70,] 5.117418e-01 0.9765164087 0.4882582 [71,] 5.020653e-01 0.9958693408 0.4979347 [72,] 6.498199e-01 0.7003601626 0.3501801 [73,] 7.115607e-01 0.5768785638 0.2884393 [74,] 6.778793e-01 0.6442414803 0.3221207 [75,] 6.175543e-01 0.7648914372 0.3824457 [76,] 5.736904e-01 0.8526191773 0.4263096 [77,] 5.357826e-01 0.9284348873 0.4642174 [78,] 6.230292e-01 0.7539416190 0.3769708 [79,] 5.493346e-01 0.9013307961 0.4506654 [80,] 5.553750e-01 0.8892500100 0.4446250 [81,] 4.637527e-01 0.9275054033 0.5362473 [82,] 3.913438e-01 0.7826876914 0.6086562 [83,] 5.900823e-01 0.8198354567 0.4099177 [84,] 5.029206e-01 0.9941588357 0.4970794 [85,] 4.035913e-01 0.8071825663 0.5964087 [86,] 2.869312e-01 0.5738624401 0.7130688 [87,] 1.997650e-01 0.3995299151 0.8002350 [88,] 1.190806e-01 0.2381611995 0.8809194 > postscript(file="/var/www/html/rcomp/tmp/14q531229175079.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(x[,1], type='l', main='Actuals and Interpolation', ylab='value of Actuals and Interpolation (dots)', xlab='time or index') > points(x[,1]-mysum$resid) > grid() > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/26zso1229175079.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(mysum$resid, type='b', pch=19, main='Residuals', ylab='value of Residuals', xlab='time or index') > grid() > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/3jwd11229175079.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > hist(mysum$resid, main='Residual Histogram', xlab='values of Residuals') > grid() > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/4pvgu1229175079.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > densityplot(~mysum$resid,col='black',main='Residual Density Plot', xlab='values of Residuals') > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/5vo751229175079.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > qqnorm(mysum$resid, main='Residual Normal Q-Q Plot') > qqline(mysum$resid) > grid() > dev.off() null device 1 > (myerror <- as.ts(mysum$resid)) Time Series: Start = 1 End = 121 Frequency = 1 1 2 3 4 5 6 0.377803068 0.028519536 0.388619536 -0.015880464 0.023719536 0.194955011 7 8 9 10 11 12 0.242855011 -0.754944989 0.633855011 -0.190544989 0.153555011 0.569255011 13 14 15 16 17 18 0.362274705 0.237991173 0.218091173 -0.328408827 0.130191173 0.180426648 19 20 21 22 23 24 0.178326648 -0.252473352 0.312326648 -0.187073352 0.412026648 0.382726648 25 26 27 28 29 30 -0.045253659 -0.054537190 -0.478437190 -0.579937190 0.012662810 -0.772101715 31 32 33 34 35 36 -0.882201715 -0.685001715 -0.650201715 -1.176601715 -0.422501715 -0.613801715 37 38 39 40 41 42 -0.095782022 -0.100065554 -0.649965554 -0.071465554 0.387134446 -0.523630078 43 44 45 46 47 48 0.416269922 0.235469922 -0.355730078 1.157869922 -0.371030078 0.003669922 49 50 51 52 53 54 0.443689615 0.339406083 0.776506083 0.730006083 0.482606083 1.079841559 55 56 57 58 59 60 0.578741559 0.533941559 -0.241258441 0.636341559 -0.008558441 0.141141559 61 62 63 64 65 66 0.180161252 -0.688122280 -0.173022280 -0.495522280 -1.298922280 0.511958441 67 68 69 70 71 72 0.133858441 -0.063941559 0.660858441 0.512458441 -0.276441559 0.687258441 73 74 75 76 77 78 0.042278135 -0.014005397 0.673094603 -0.048405397 -0.680805397 0.102430078 79 80 81 82 83 84 -0.153669922 -0.408469922 0.028330078 -0.183069922 -0.424969922 0.037730078 85 86 87 88 89 90 -1.117250228 -0.217533760 -0.016433760 -0.711933760 -0.435333760 -0.602098285 91 92 93 94 95 96 -0.408198285 0.135001715 0.118801715 -0.827598285 0.339501715 -0.014798285 97 98 99 100 101 102 -0.230778592 0.340937877 0.183037877 0.667537877 0.606137877 -0.224626648 103 104 105 106 107 108 -0.007726648 0.369473352 0.372273352 -0.365126648 -0.049026648 -0.895326648 109 110 111 112 113 114 -0.102306955 0.127409513 -0.921490487 0.854009513 0.772609513 0.052844989 115 116 117 118 119 120 -0.098255011 0.890944989 -0.879255011 0.623344989 0.647444989 -0.297855011 121 0.185164682 > postscript(file="/var/www/html/rcomp/tmp/66mcv1229175079.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > dum <- cbind(lag(myerror,k=1),myerror) > dum Time Series: Start = 0 End = 121 Frequency = 1 lag(myerror, k = 1) myerror 0 0.377803068 NA 1 0.028519536 0.377803068 2 0.388619536 0.028519536 3 -0.015880464 0.388619536 4 0.023719536 -0.015880464 5 0.194955011 0.023719536 6 0.242855011 0.194955011 7 -0.754944989 0.242855011 8 0.633855011 -0.754944989 9 -0.190544989 0.633855011 10 0.153555011 -0.190544989 11 0.569255011 0.153555011 12 0.362274705 0.569255011 13 0.237991173 0.362274705 14 0.218091173 0.237991173 15 -0.328408827 0.218091173 16 0.130191173 -0.328408827 17 0.180426648 0.130191173 18 0.178326648 0.180426648 19 -0.252473352 0.178326648 20 0.312326648 -0.252473352 21 -0.187073352 0.312326648 22 0.412026648 -0.187073352 23 0.382726648 0.412026648 24 -0.045253659 0.382726648 25 -0.054537190 -0.045253659 26 -0.478437190 -0.054537190 27 -0.579937190 -0.478437190 28 0.012662810 -0.579937190 29 -0.772101715 0.012662810 30 -0.882201715 -0.772101715 31 -0.685001715 -0.882201715 32 -0.650201715 -0.685001715 33 -1.176601715 -0.650201715 34 -0.422501715 -1.176601715 35 -0.613801715 -0.422501715 36 -0.095782022 -0.613801715 37 -0.100065554 -0.095782022 38 -0.649965554 -0.100065554 39 -0.071465554 -0.649965554 40 0.387134446 -0.071465554 41 -0.523630078 0.387134446 42 0.416269922 -0.523630078 43 0.235469922 0.416269922 44 -0.355730078 0.235469922 45 1.157869922 -0.355730078 46 -0.371030078 1.157869922 47 0.003669922 -0.371030078 48 0.443689615 0.003669922 49 0.339406083 0.443689615 50 0.776506083 0.339406083 51 0.730006083 0.776506083 52 0.482606083 0.730006083 53 1.079841559 0.482606083 54 0.578741559 1.079841559 55 0.533941559 0.578741559 56 -0.241258441 0.533941559 57 0.636341559 -0.241258441 58 -0.008558441 0.636341559 59 0.141141559 -0.008558441 60 0.180161252 0.141141559 61 -0.688122280 0.180161252 62 -0.173022280 -0.688122280 63 -0.495522280 -0.173022280 64 -1.298922280 -0.495522280 65 0.511958441 -1.298922280 66 0.133858441 0.511958441 67 -0.063941559 0.133858441 68 0.660858441 -0.063941559 69 0.512458441 0.660858441 70 -0.276441559 0.512458441 71 0.687258441 -0.276441559 72 0.042278135 0.687258441 73 -0.014005397 0.042278135 74 0.673094603 -0.014005397 75 -0.048405397 0.673094603 76 -0.680805397 -0.048405397 77 0.102430078 -0.680805397 78 -0.153669922 0.102430078 79 -0.408469922 -0.153669922 80 0.028330078 -0.408469922 81 -0.183069922 0.028330078 82 -0.424969922 -0.183069922 83 0.037730078 -0.424969922 84 -1.117250228 0.037730078 85 -0.217533760 -1.117250228 86 -0.016433760 -0.217533760 87 -0.711933760 -0.016433760 88 -0.435333760 -0.711933760 89 -0.602098285 -0.435333760 90 -0.408198285 -0.602098285 91 0.135001715 -0.408198285 92 0.118801715 0.135001715 93 -0.827598285 0.118801715 94 0.339501715 -0.827598285 95 -0.014798285 0.339501715 96 -0.230778592 -0.014798285 97 0.340937877 -0.230778592 98 0.183037877 0.340937877 99 0.667537877 0.183037877 100 0.606137877 0.667537877 101 -0.224626648 0.606137877 102 -0.007726648 -0.224626648 103 0.369473352 -0.007726648 104 0.372273352 0.369473352 105 -0.365126648 0.372273352 106 -0.049026648 -0.365126648 107 -0.895326648 -0.049026648 108 -0.102306955 -0.895326648 109 0.127409513 -0.102306955 110 -0.921490487 0.127409513 111 0.854009513 -0.921490487 112 0.772609513 0.854009513 113 0.052844989 0.772609513 114 -0.098255011 0.052844989 115 0.890944989 -0.098255011 116 -0.879255011 0.890944989 117 0.623344989 -0.879255011 118 0.647444989 0.623344989 119 -0.297855011 0.647444989 120 0.185164682 -0.297855011 121 NA 0.185164682 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 0.028519536 0.377803068 [2,] 0.388619536 0.028519536 [3,] -0.015880464 0.388619536 [4,] 0.023719536 -0.015880464 [5,] 0.194955011 0.023719536 [6,] 0.242855011 0.194955011 [7,] -0.754944989 0.242855011 [8,] 0.633855011 -0.754944989 [9,] -0.190544989 0.633855011 [10,] 0.153555011 -0.190544989 [11,] 0.569255011 0.153555011 [12,] 0.362274705 0.569255011 [13,] 0.237991173 0.362274705 [14,] 0.218091173 0.237991173 [15,] -0.328408827 0.218091173 [16,] 0.130191173 -0.328408827 [17,] 0.180426648 0.130191173 [18,] 0.178326648 0.180426648 [19,] -0.252473352 0.178326648 [20,] 0.312326648 -0.252473352 [21,] -0.187073352 0.312326648 [22,] 0.412026648 -0.187073352 [23,] 0.382726648 0.412026648 [24,] -0.045253659 0.382726648 [25,] -0.054537190 -0.045253659 [26,] -0.478437190 -0.054537190 [27,] -0.579937190 -0.478437190 [28,] 0.012662810 -0.579937190 [29,] -0.772101715 0.012662810 [30,] -0.882201715 -0.772101715 [31,] -0.685001715 -0.882201715 [32,] -0.650201715 -0.685001715 [33,] -1.176601715 -0.650201715 [34,] -0.422501715 -1.176601715 [35,] -0.613801715 -0.422501715 [36,] -0.095782022 -0.613801715 [37,] -0.100065554 -0.095782022 [38,] -0.649965554 -0.100065554 [39,] -0.071465554 -0.649965554 [40,] 0.387134446 -0.071465554 [41,] -0.523630078 0.387134446 [42,] 0.416269922 -0.523630078 [43,] 0.235469922 0.416269922 [44,] -0.355730078 0.235469922 [45,] 1.157869922 -0.355730078 [46,] -0.371030078 1.157869922 [47,] 0.003669922 -0.371030078 [48,] 0.443689615 0.003669922 [49,] 0.339406083 0.443689615 [50,] 0.776506083 0.339406083 [51,] 0.730006083 0.776506083 [52,] 0.482606083 0.730006083 [53,] 1.079841559 0.482606083 [54,] 0.578741559 1.079841559 [55,] 0.533941559 0.578741559 [56,] -0.241258441 0.533941559 [57,] 0.636341559 -0.241258441 [58,] -0.008558441 0.636341559 [59,] 0.141141559 -0.008558441 [60,] 0.180161252 0.141141559 [61,] -0.688122280 0.180161252 [62,] -0.173022280 -0.688122280 [63,] -0.495522280 -0.173022280 [64,] -1.298922280 -0.495522280 [65,] 0.511958441 -1.298922280 [66,] 0.133858441 0.511958441 [67,] -0.063941559 0.133858441 [68,] 0.660858441 -0.063941559 [69,] 0.512458441 0.660858441 [70,] -0.276441559 0.512458441 [71,] 0.687258441 -0.276441559 [72,] 0.042278135 0.687258441 [73,] -0.014005397 0.042278135 [74,] 0.673094603 -0.014005397 [75,] -0.048405397 0.673094603 [76,] -0.680805397 -0.048405397 [77,] 0.102430078 -0.680805397 [78,] -0.153669922 0.102430078 [79,] -0.408469922 -0.153669922 [80,] 0.028330078 -0.408469922 [81,] -0.183069922 0.028330078 [82,] -0.424969922 -0.183069922 [83,] 0.037730078 -0.424969922 [84,] -1.117250228 0.037730078 [85,] -0.217533760 -1.117250228 [86,] -0.016433760 -0.217533760 [87,] -0.711933760 -0.016433760 [88,] -0.435333760 -0.711933760 [89,] -0.602098285 -0.435333760 [90,] -0.408198285 -0.602098285 [91,] 0.135001715 -0.408198285 [92,] 0.118801715 0.135001715 [93,] -0.827598285 0.118801715 [94,] 0.339501715 -0.827598285 [95,] -0.014798285 0.339501715 [96,] -0.230778592 -0.014798285 [97,] 0.340937877 -0.230778592 [98,] 0.183037877 0.340937877 [99,] 0.667537877 0.183037877 [100,] 0.606137877 0.667537877 [101,] -0.224626648 0.606137877 [102,] -0.007726648 -0.224626648 [103,] 0.369473352 -0.007726648 [104,] 0.372273352 0.369473352 [105,] -0.365126648 0.372273352 [106,] -0.049026648 -0.365126648 [107,] -0.895326648 -0.049026648 [108,] -0.102306955 -0.895326648 [109,] 0.127409513 -0.102306955 [110,] -0.921490487 0.127409513 [111,] 0.854009513 -0.921490487 [112,] 0.772609513 0.854009513 [113,] 0.052844989 0.772609513 [114,] -0.098255011 0.052844989 [115,] 0.890944989 -0.098255011 [116,] -0.879255011 0.890944989 [117,] 0.623344989 -0.879255011 [118,] 0.647444989 0.623344989 [119,] -0.297855011 0.647444989 [120,] 0.185164682 -0.297855011 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 0.028519536 0.377803068 2 0.388619536 0.028519536 3 -0.015880464 0.388619536 4 0.023719536 -0.015880464 5 0.194955011 0.023719536 6 0.242855011 0.194955011 7 -0.754944989 0.242855011 8 0.633855011 -0.754944989 9 -0.190544989 0.633855011 10 0.153555011 -0.190544989 11 0.569255011 0.153555011 12 0.362274705 0.569255011 13 0.237991173 0.362274705 14 0.218091173 0.237991173 15 -0.328408827 0.218091173 16 0.130191173 -0.328408827 17 0.180426648 0.130191173 18 0.178326648 0.180426648 19 -0.252473352 0.178326648 20 0.312326648 -0.252473352 21 -0.187073352 0.312326648 22 0.412026648 -0.187073352 23 0.382726648 0.412026648 24 -0.045253659 0.382726648 25 -0.054537190 -0.045253659 26 -0.478437190 -0.054537190 27 -0.579937190 -0.478437190 28 0.012662810 -0.579937190 29 -0.772101715 0.012662810 30 -0.882201715 -0.772101715 31 -0.685001715 -0.882201715 32 -0.650201715 -0.685001715 33 -1.176601715 -0.650201715 34 -0.422501715 -1.176601715 35 -0.613801715 -0.422501715 36 -0.095782022 -0.613801715 37 -0.100065554 -0.095782022 38 -0.649965554 -0.100065554 39 -0.071465554 -0.649965554 40 0.387134446 -0.071465554 41 -0.523630078 0.387134446 42 0.416269922 -0.523630078 43 0.235469922 0.416269922 44 -0.355730078 0.235469922 45 1.157869922 -0.355730078 46 -0.371030078 1.157869922 47 0.003669922 -0.371030078 48 0.443689615 0.003669922 49 0.339406083 0.443689615 50 0.776506083 0.339406083 51 0.730006083 0.776506083 52 0.482606083 0.730006083 53 1.079841559 0.482606083 54 0.578741559 1.079841559 55 0.533941559 0.578741559 56 -0.241258441 0.533941559 57 0.636341559 -0.241258441 58 -0.008558441 0.636341559 59 0.141141559 -0.008558441 60 0.180161252 0.141141559 61 -0.688122280 0.180161252 62 -0.173022280 -0.688122280 63 -0.495522280 -0.173022280 64 -1.298922280 -0.495522280 65 0.511958441 -1.298922280 66 0.133858441 0.511958441 67 -0.063941559 0.133858441 68 0.660858441 -0.063941559 69 0.512458441 0.660858441 70 -0.276441559 0.512458441 71 0.687258441 -0.276441559 72 0.042278135 0.687258441 73 -0.014005397 0.042278135 74 0.673094603 -0.014005397 75 -0.048405397 0.673094603 76 -0.680805397 -0.048405397 77 0.102430078 -0.680805397 78 -0.153669922 0.102430078 79 -0.408469922 -0.153669922 80 0.028330078 -0.408469922 81 -0.183069922 0.028330078 82 -0.424969922 -0.183069922 83 0.037730078 -0.424969922 84 -1.117250228 0.037730078 85 -0.217533760 -1.117250228 86 -0.016433760 -0.217533760 87 -0.711933760 -0.016433760 88 -0.435333760 -0.711933760 89 -0.602098285 -0.435333760 90 -0.408198285 -0.602098285 91 0.135001715 -0.408198285 92 0.118801715 0.135001715 93 -0.827598285 0.118801715 94 0.339501715 -0.827598285 95 -0.014798285 0.339501715 96 -0.230778592 -0.014798285 97 0.340937877 -0.230778592 98 0.183037877 0.340937877 99 0.667537877 0.183037877 100 0.606137877 0.667537877 101 -0.224626648 0.606137877 102 -0.007726648 -0.224626648 103 0.369473352 -0.007726648 104 0.372273352 0.369473352 105 -0.365126648 0.372273352 106 -0.049026648 -0.365126648 107 -0.895326648 -0.049026648 108 -0.102306955 -0.895326648 109 0.127409513 -0.102306955 110 -0.921490487 0.127409513 111 0.854009513 -0.921490487 112 0.772609513 0.854009513 113 0.052844989 0.772609513 114 -0.098255011 0.052844989 115 0.890944989 -0.098255011 116 -0.879255011 0.890944989 117 0.623344989 -0.879255011 118 0.647444989 0.623344989 119 -0.297855011 0.647444989 120 0.185164682 -0.297855011 > plot(z,main=paste('Residual Lag plot, lowess, and regression line'), ylab='values of Residuals', xlab='lagged values of Residuals') > lines(lowess(z)) > abline(lm(z)) > grid() > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/7itr11229175079.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > acf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Autocorrelation Function') > grid() > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/8a6i01229175079.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > pacf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Partial Autocorrelation Function') > grid() > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/9epkd1229175079.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > opar <- par(mfrow = c(2,2), oma = c(0, 0, 1.1, 0)) > plot(mylm, las = 1, sub='Residual Diagnostics') > par(opar) > dev.off() null device 1 > if (n > n25) { + postscript(file="/var/www/html/rcomp/tmp/10gz641229175079.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) + plot(kp3:nmkm3,gqarr[,2], main='Goldfeld-Quandt test',ylab='2-sided p-value',xlab='breakpoint') + grid() + dev.off() + } null device 1 > > #Note: the /var/www/html/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/html/rcomp/createtable") > > a<-table.start() > a<-table.row.start(a) > a<-table.element(a, 'Multiple Linear Regression - Estimated Regression Equation', 1, TRUE) > a<-table.row.end(a) > myeq <- colnames(x)[1] > myeq <- paste(myeq, '[t] = ', sep='') > for (i in 1:k){ + if (mysum$coefficients[i,1] > 0) myeq <- paste(myeq, '+', '') + myeq <- paste(myeq, mysum$coefficients[i,1], sep=' ') + if (rownames(mysum$coefficients)[i] != '(Intercept)') { + myeq <- paste(myeq, rownames(mysum$coefficients)[i], sep='') + if (rownames(mysum$coefficients)[i] != 't') myeq <- paste(myeq, '[t]', sep='') + } + } > myeq <- paste(myeq, ' + e[t]') > a<-table.row.start(a) > a<-table.element(a, myeq) > a<-table.row.end(a) > a<-table.end(a) > table.save(a,file="/var/www/html/rcomp/tmp/11o6ya1229175079.tab") > a<-table.start() > a<-table.row.start(a) > a<-table.element(a,hyperlink('http://www.xycoon.com/ols1.htm','Multiple Linear Regression - Ordinary Least Squares',''), 6, TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'Variable',header=TRUE) > a<-table.element(a,'Parameter',header=TRUE) > a<-table.element(a,'S.D.',header=TRUE) > a<-table.element(a,'T-STAT
H0: parameter = 0',header=TRUE) > a<-table.element(a,'2-tail p-value',header=TRUE) > a<-table.element(a,'1-tail p-value',header=TRUE) > a<-table.row.end(a) > for (i in 1:k){ + a<-table.row.start(a) + a<-table.element(a,rownames(mysum$coefficients)[i],header=TRUE) + a<-table.element(a,mysum$coefficients[i,1]) + a<-table.element(a, round(mysum$coefficients[i,2],6)) + a<-table.element(a, round(mysum$coefficients[i,3],4)) + a<-table.element(a, round(mysum$coefficients[i,4],6)) + a<-table.element(a, round(mysum$coefficients[i,4]/2,6)) + a<-table.row.end(a) + } > a<-table.end(a) > table.save(a,file="/var/www/html/rcomp/tmp/12w81a1229175079.tab") > a<-table.start() > a<-table.row.start(a) > a<-table.element(a, 'Multiple Linear Regression - Regression Statistics', 2, TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Multiple R',1,TRUE) > a<-table.element(a, sqrt(mysum$r.squared)) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'R-squared',1,TRUE) > a<-table.element(a, mysum$r.squared) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Adjusted R-squared',1,TRUE) > a<-table.element(a, mysum$adj.r.squared) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'F-TEST (value)',1,TRUE) > a<-table.element(a, mysum$fstatistic[1]) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'F-TEST (DF numerator)',1,TRUE) > a<-table.element(a, mysum$fstatistic[2]) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'F-TEST (DF denominator)',1,TRUE) > a<-table.element(a, mysum$fstatistic[3]) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'p-value',1,TRUE) > a<-table.element(a, 1-pf(mysum$fstatistic[1],mysum$fstatistic[2],mysum$fstatistic[3])) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Multiple Linear Regression - Residual Statistics', 2, TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Residual Standard Deviation',1,TRUE) > a<-table.element(a, mysum$sigma) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Sum Squared Residuals',1,TRUE) > a<-table.element(a, sum(myerror*myerror)) > a<-table.row.end(a) > a<-table.end(a) > table.save(a,file="/var/www/html/rcomp/tmp/13vecj1229175079.tab") > a<-table.start() > a<-table.row.start(a) > a<-table.element(a, 'Multiple Linear Regression - Actuals, Interpolation, and Residuals', 4, TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Time or Index', 1, TRUE) > a<-table.element(a, 'Actuals', 1, TRUE) > a<-table.element(a, 'Interpolation
Forecast', 1, TRUE) > a<-table.element(a, 'Residuals
Prediction Error', 1, TRUE) > a<-table.row.end(a) > for (i in 1:n) { + a<-table.row.start(a) + a<-table.element(a,i, 1, TRUE) + a<-table.element(a,x[i]) + a<-table.element(a,x[i]-mysum$resid[i]) + a<-table.element(a,mysum$resid[i]) + a<-table.row.end(a) + } > a<-table.end(a) > table.save(a,file="/var/www/html/rcomp/tmp/14l0q31229175079.tab") > if (n > n25) { + a<-table.start() + a<-table.row.start(a) + a<-table.element(a,'Goldfeld-Quandt test for Heteroskedasticity',4,TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'p-values',header=TRUE) + a<-table.element(a,'Alternative Hypothesis',3,header=TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'breakpoint index',header=TRUE) + a<-table.element(a,'greater',header=TRUE) + a<-table.element(a,'2-sided',header=TRUE) + a<-table.element(a,'less',header=TRUE) + a<-table.row.end(a) + for (mypoint in kp3:nmkm3) { + a<-table.row.start(a) + a<-table.element(a,mypoint,header=TRUE) + a<-table.element(a,gqarr[mypoint-kp3+1,1]) + a<-table.element(a,gqarr[mypoint-kp3+1,2]) + a<-table.element(a,gqarr[mypoint-kp3+1,3]) + a<-table.row.end(a) + } + a<-table.end(a) + table.save(a,file="/var/www/html/rcomp/tmp/15aakx1229175079.tab") + a<-table.start() + a<-table.row.start(a) + a<-table.element(a,'Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity',4,TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'Description',header=TRUE) + a<-table.element(a,'# significant tests',header=TRUE) + a<-table.element(a,'% significant tests',header=TRUE) + a<-table.element(a,'OK/NOK',header=TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'1% type I error level',header=TRUE) + a<-table.element(a,numsignificant1) + a<-table.element(a,numsignificant1/numgqtests) + if (numsignificant1/numgqtests < 0.01) dum <- 'OK' else dum <- 'NOK' + a<-table.element(a,dum) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'5% type I error level',header=TRUE) + a<-table.element(a,numsignificant5) + a<-table.element(a,numsignificant5/numgqtests) + if (numsignificant5/numgqtests < 0.05) dum <- 'OK' else dum <- 'NOK' + a<-table.element(a,dum) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'10% type I error level',header=TRUE) + a<-table.element(a,numsignificant10) + a<-table.element(a,numsignificant10/numgqtests) + if (numsignificant10/numgqtests < 0.1) dum <- 'OK' else dum <- 'NOK' + a<-table.element(a,dum) + a<-table.row.end(a) + a<-table.end(a) + table.save(a,file="/var/www/html/rcomp/tmp/16e36x1229175079.tab") + } > > system("convert tmp/14q531229175079.ps tmp/14q531229175079.png") > system("convert tmp/26zso1229175079.ps tmp/26zso1229175079.png") > system("convert tmp/3jwd11229175079.ps tmp/3jwd11229175079.png") > system("convert tmp/4pvgu1229175079.ps tmp/4pvgu1229175079.png") > system("convert tmp/5vo751229175079.ps tmp/5vo751229175079.png") > system("convert tmp/66mcv1229175079.ps tmp/66mcv1229175079.png") > system("convert tmp/7itr11229175079.ps tmp/7itr11229175079.png") > system("convert tmp/8a6i01229175079.ps tmp/8a6i01229175079.png") > system("convert tmp/9epkd1229175079.ps tmp/9epkd1229175079.png") > system("convert tmp/10gz641229175079.ps tmp/10gz641229175079.png") > > > proc.time() user system elapsed 3.181 1.684 4.075