R version 2.7.0 (2008-04-22) 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(13363 + ,0 + ,12530 + ,0 + ,11420 + ,0 + ,10948 + ,0 + ,10173 + ,0 + ,10602 + ,0 + ,16094 + ,0 + ,19631 + ,0 + ,17140 + ,0 + ,14345 + ,0 + ,12632 + ,0 + ,12894 + ,0 + ,11808 + ,0 + ,10673 + ,0 + ,9939 + ,0 + ,9890 + ,0 + ,9283 + ,0 + ,10131 + ,0 + ,15864 + ,0 + ,19283 + ,0 + ,16203 + ,0 + ,13919 + ,0 + ,11937 + ,0 + ,11795 + ,0 + ,11268 + ,0 + ,10522 + ,0 + ,9929 + ,0 + ,9725 + ,0 + ,9372 + ,0 + ,10068 + ,0 + ,16230 + ,0 + ,19115 + ,0 + ,18351 + ,0 + ,16265 + ,0 + ,14103 + ,0 + ,14115 + ,0 + ,13327 + ,0 + ,12618 + ,0 + ,12129 + ,0 + ,11775 + ,0 + ,11493 + ,0 + ,12470 + ,0 + ,20792 + ,0 + ,22337 + ,0 + ,21325 + ,0 + ,18581 + ,0 + ,16475 + ,0 + ,16581 + ,0 + ,15745 + ,0 + ,14453 + ,0 + ,13712 + ,0 + ,13766 + ,0 + ,13336 + ,0 + ,15346 + ,0 + ,24446 + ,0 + ,26178 + ,0 + ,24628 + ,0 + ,21282 + ,0 + ,18850 + ,0 + ,18822 + ,0 + ,18060 + ,0 + ,17536 + ,0 + ,16417 + ,0 + ,15842 + ,0 + ,15188 + ,0 + ,16905 + ,0 + ,25430 + ,0 + ,27962 + ,0 + ,26607 + ,0 + ,23364 + ,0 + ,20827 + ,0 + ,20506 + ,0 + ,19181 + ,0 + ,18016 + ,0 + ,17354 + ,0 + ,16256 + ,0 + ,15770 + ,0 + ,17538 + ,0 + ,26899 + ,1 + ,28915 + ,1 + ,25247 + ,1 + ,22856 + ,1 + ,19980 + ,1 + ,19856 + ,1 + ,16994 + ,1 + ,16839 + ,1 + ,15618 + ,1 + ,15883 + ,1 + ,15513 + ,1 + ,17106 + ,1 + ,25272 + ,1 + ,26731 + ,1 + ,22891 + ,1 + ,19583 + ,1 + ,16939 + ,1 + ,16757 + ,1 + ,15435 + ,1 + ,14786 + ,1 + ,13680 + ,1 + ,13208 + ,1 + ,12707 + ,1 + ,14277 + ,1 + ,22436 + ,1 + ,23229 + ,1 + ,18241 + ,1 + ,16145 + ,1 + ,13994 + ,1 + ,14780 + ,1 + ,13100 + ,1 + ,12329 + ,1 + ,12463 + ,1 + ,11532 + ,1 + ,10784 + ,1 + ,13106 + ,1 + ,19491 + ,1 + ,20418 + ,1 + ,16094 + ,1 + ,14491 + ,1 + ,13067 + ,1) + ,dim=c(2 + ,119) + ,dimnames=list(c('NWWZpb' + ,'Dummy') + ,1:119)) > y <- array(NA,dim=c(2,119),dimnames=list(c('NWWZpb','Dummy'),1:119)) > 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 NWWZpb Dummy M1 M2 M3 M4 M5 M6 M7 M8 M9 M10 M11 t 1 13363 0 1 0 0 0 0 0 0 0 0 0 0 1 2 12530 0 0 1 0 0 0 0 0 0 0 0 0 2 3 11420 0 0 0 1 0 0 0 0 0 0 0 0 3 4 10948 0 0 0 0 1 0 0 0 0 0 0 0 4 5 10173 0 0 0 0 0 1 0 0 0 0 0 0 5 6 10602 0 0 0 0 0 0 1 0 0 0 0 0 6 7 16094 0 0 0 0 0 0 0 1 0 0 0 0 7 8 19631 0 0 0 0 0 0 0 0 1 0 0 0 8 9 17140 0 0 0 0 0 0 0 0 0 1 0 0 9 10 14345 0 0 0 0 0 0 0 0 0 0 1 0 10 11 12632 0 0 0 0 0 0 0 0 0 0 0 1 11 12 12894 0 0 0 0 0 0 0 0 0 0 0 0 12 13 11808 0 1 0 0 0 0 0 0 0 0 0 0 13 14 10673 0 0 1 0 0 0 0 0 0 0 0 0 14 15 9939 0 0 0 1 0 0 0 0 0 0 0 0 15 16 9890 0 0 0 0 1 0 0 0 0 0 0 0 16 17 9283 0 0 0 0 0 1 0 0 0 0 0 0 17 18 10131 0 0 0 0 0 0 1 0 0 0 0 0 18 19 15864 0 0 0 0 0 0 0 1 0 0 0 0 19 20 19283 0 0 0 0 0 0 0 0 1 0 0 0 20 21 16203 0 0 0 0 0 0 0 0 0 1 0 0 21 22 13919 0 0 0 0 0 0 0 0 0 0 1 0 22 23 11937 0 0 0 0 0 0 0 0 0 0 0 1 23 24 11795 0 0 0 0 0 0 0 0 0 0 0 0 24 25 11268 0 1 0 0 0 0 0 0 0 0 0 0 25 26 10522 0 0 1 0 0 0 0 0 0 0 0 0 26 27 9929 0 0 0 1 0 0 0 0 0 0 0 0 27 28 9725 0 0 0 0 1 0 0 0 0 0 0 0 28 29 9372 0 0 0 0 0 1 0 0 0 0 0 0 29 30 10068 0 0 0 0 0 0 1 0 0 0 0 0 30 31 16230 0 0 0 0 0 0 0 1 0 0 0 0 31 32 19115 0 0 0 0 0 0 0 0 1 0 0 0 32 33 18351 0 0 0 0 0 0 0 0 0 1 0 0 33 34 16265 0 0 0 0 0 0 0 0 0 0 1 0 34 35 14103 0 0 0 0 0 0 0 0 0 0 0 1 35 36 14115 0 0 0 0 0 0 0 0 0 0 0 0 36 37 13327 0 1 0 0 0 0 0 0 0 0 0 0 37 38 12618 0 0 1 0 0 0 0 0 0 0 0 0 38 39 12129 0 0 0 1 0 0 0 0 0 0 0 0 39 40 11775 0 0 0 0 1 0 0 0 0 0 0 0 40 41 11493 0 0 0 0 0 1 0 0 0 0 0 0 41 42 12470 0 0 0 0 0 0 1 0 0 0 0 0 42 43 20792 0 0 0 0 0 0 0 1 0 0 0 0 43 44 22337 0 0 0 0 0 0 0 0 1 0 0 0 44 45 21325 0 0 0 0 0 0 0 0 0 1 0 0 45 46 18581 0 0 0 0 0 0 0 0 0 0 1 0 46 47 16475 0 0 0 0 0 0 0 0 0 0 0 1 47 48 16581 0 0 0 0 0 0 0 0 0 0 0 0 48 49 15745 0 1 0 0 0 0 0 0 0 0 0 0 49 50 14453 0 0 1 0 0 0 0 0 0 0 0 0 50 51 13712 0 0 0 1 0 0 0 0 0 0 0 0 51 52 13766 0 0 0 0 1 0 0 0 0 0 0 0 52 53 13336 0 0 0 0 0 1 0 0 0 0 0 0 53 54 15346 0 0 0 0 0 0 1 0 0 0 0 0 54 55 24446 0 0 0 0 0 0 0 1 0 0 0 0 55 56 26178 0 0 0 0 0 0 0 0 1 0 0 0 56 57 24628 0 0 0 0 0 0 0 0 0 1 0 0 57 58 21282 0 0 0 0 0 0 0 0 0 0 1 0 58 59 18850 0 0 0 0 0 0 0 0 0 0 0 1 59 60 18822 0 0 0 0 0 0 0 0 0 0 0 0 60 61 18060 0 1 0 0 0 0 0 0 0 0 0 0 61 62 17536 0 0 1 0 0 0 0 0 0 0 0 0 62 63 16417 0 0 0 1 0 0 0 0 0 0 0 0 63 64 15842 0 0 0 0 1 0 0 0 0 0 0 0 64 65 15188 0 0 0 0 0 1 0 0 0 0 0 0 65 66 16905 0 0 0 0 0 0 1 0 0 0 0 0 66 67 25430 0 0 0 0 0 0 0 1 0 0 0 0 67 68 27962 0 0 0 0 0 0 0 0 1 0 0 0 68 69 26607 0 0 0 0 0 0 0 0 0 1 0 0 69 70 23364 0 0 0 0 0 0 0 0 0 0 1 0 70 71 20827 0 0 0 0 0 0 0 0 0 0 0 1 71 72 20506 0 0 0 0 0 0 0 0 0 0 0 0 72 73 19181 0 1 0 0 0 0 0 0 0 0 0 0 73 74 18016 0 0 1 0 0 0 0 0 0 0 0 0 74 75 17354 0 0 0 1 0 0 0 0 0 0 0 0 75 76 16256 0 0 0 0 1 0 0 0 0 0 0 0 76 77 15770 0 0 0 0 0 1 0 0 0 0 0 0 77 78 17538 0 0 0 0 0 0 1 0 0 0 0 0 78 79 26899 1 0 0 0 0 0 0 1 0 0 0 0 79 80 28915 1 0 0 0 0 0 0 0 1 0 0 0 80 81 25247 1 0 0 0 0 0 0 0 0 1 0 0 81 82 22856 1 0 0 0 0 0 0 0 0 0 1 0 82 83 19980 1 0 0 0 0 0 0 0 0 0 0 1 83 84 19856 1 0 0 0 0 0 0 0 0 0 0 0 84 85 16994 1 1 0 0 0 0 0 0 0 0 0 0 85 86 16839 1 0 1 0 0 0 0 0 0 0 0 0 86 87 15618 1 0 0 1 0 0 0 0 0 0 0 0 87 88 15883 1 0 0 0 1 0 0 0 0 0 0 0 88 89 15513 1 0 0 0 0 1 0 0 0 0 0 0 89 90 17106 1 0 0 0 0 0 1 0 0 0 0 0 90 91 25272 1 0 0 0 0 0 0 1 0 0 0 0 91 92 26731 1 0 0 0 0 0 0 0 1 0 0 0 92 93 22891 1 0 0 0 0 0 0 0 0 1 0 0 93 94 19583 1 0 0 0 0 0 0 0 0 0 1 0 94 95 16939 1 0 0 0 0 0 0 0 0 0 0 1 95 96 16757 1 0 0 0 0 0 0 0 0 0 0 0 96 97 15435 1 1 0 0 0 0 0 0 0 0 0 0 97 98 14786 1 0 1 0 0 0 0 0 0 0 0 0 98 99 13680 1 0 0 1 0 0 0 0 0 0 0 0 99 100 13208 1 0 0 0 1 0 0 0 0 0 0 0 100 101 12707 1 0 0 0 0 1 0 0 0 0 0 0 101 102 14277 1 0 0 0 0 0 1 0 0 0 0 0 102 103 22436 1 0 0 0 0 0 0 1 0 0 0 0 103 104 23229 1 0 0 0 0 0 0 0 1 0 0 0 104 105 18241 1 0 0 0 0 0 0 0 0 1 0 0 105 106 16145 1 0 0 0 0 0 0 0 0 0 1 0 106 107 13994 1 0 0 0 0 0 0 0 0 0 0 1 107 108 14780 1 0 0 0 0 0 0 0 0 0 0 0 108 109 13100 1 1 0 0 0 0 0 0 0 0 0 0 109 110 12329 1 0 1 0 0 0 0 0 0 0 0 0 110 111 12463 1 0 0 1 0 0 0 0 0 0 0 0 111 112 11532 1 0 0 0 1 0 0 0 0 0 0 0 112 113 10784 1 0 0 0 0 1 0 0 0 0 0 0 113 114 13106 1 0 0 0 0 0 1 0 0 0 0 0 114 115 19491 1 0 0 0 0 0 0 1 0 0 0 0 115 116 20418 1 0 0 0 0 0 0 0 1 0 0 0 116 117 16094 1 0 0 0 0 0 0 0 0 1 0 0 117 118 14491 1 0 0 0 0 0 0 0 0 0 1 0 118 119 13067 1 0 0 0 0 0 0 0 0 0 0 1 119 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) Dummy M1 M2 M3 M4 12483.67 -3857.07 -1114.80 -1996.63 -2844.67 -3312.20 M5 M6 M7 M8 M9 M10 -3916.74 -2607.67 5234.60 7235.17 4444.04 1770.50 M11 t -516.13 83.93 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -6796.9 -1509.6 -218.4 1628.1 6407.0 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 12483.67 1036.11 12.049 < 2e-16 *** Dummy -3857.07 909.36 -4.242 4.79e-05 *** M1 -1114.80 1225.34 -0.910 0.365018 M2 -1996.63 1225.02 -1.630 0.106123 M3 -2844.67 1224.82 -2.323 0.022134 * M4 -3312.20 1224.76 -2.704 0.007985 ** M5 -3916.74 1224.82 -3.198 0.001831 ** M6 -2607.67 1225.01 -2.129 0.035618 * M7 5234.60 1225.69 4.271 4.29e-05 *** M8 7235.17 1225.37 5.904 4.40e-08 *** M9 4444.04 1225.18 3.627 0.000444 *** M10 1770.50 1225.12 1.445 0.151388 M11 -516.13 1225.19 -0.421 0.674421 t 83.93 12.57 6.680 1.17e-09 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2665 on 105 degrees of freedom Multiple R-squared: 0.7102, Adjusted R-squared: 0.6743 F-statistic: 19.8 on 13 and 105 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,] 1.908865e-03 3.817730e-03 9.980911e-01 [2,] 7.471327e-04 1.494265e-03 9.992529e-01 [3,] 3.192400e-04 6.384801e-04 9.996808e-01 [4,] 8.203973e-05 1.640795e-04 9.999180e-01 [5,] 1.233815e-05 2.467629e-05 9.999877e-01 [6,] 2.600734e-06 5.201468e-06 9.999974e-01 [7,] 3.944770e-07 7.889540e-07 9.999996e-01 [8,] 5.941620e-08 1.188324e-07 9.999999e-01 [9,] 8.020926e-09 1.604185e-08 1.000000e+00 [10,] 1.258451e-09 2.516902e-09 1.000000e+00 [11,] 3.391675e-10 6.783350e-10 1.000000e+00 [12,] 8.756245e-11 1.751249e-10 1.000000e+00 [13,] 4.837988e-11 9.675976e-11 1.000000e+00 [14,] 2.564559e-11 5.129118e-11 1.000000e+00 [15,] 8.773127e-11 1.754625e-10 1.000000e+00 [16,] 3.809325e-11 7.618649e-11 1.000000e+00 [17,] 5.266307e-09 1.053261e-08 1.000000e+00 [18,] 1.333837e-07 2.667674e-07 9.999999e-01 [19,] 4.235536e-07 8.471073e-07 9.999996e-01 [20,] 9.048930e-07 1.809786e-06 9.999991e-01 [21,] 8.634401e-07 1.726880e-06 9.999991e-01 [22,] 9.068661e-07 1.813732e-06 9.999991e-01 [23,] 1.148926e-06 2.297853e-06 9.999989e-01 [24,] 1.210179e-06 2.420359e-06 9.999988e-01 [25,] 1.548867e-06 3.097734e-06 9.999985e-01 [26,] 3.348403e-06 6.696805e-06 9.999967e-01 [27,] 1.507123e-04 3.014247e-04 9.998493e-01 [28,] 4.519573e-04 9.039146e-04 9.995480e-01 [29,] 1.518806e-03 3.037613e-03 9.984812e-01 [30,] 3.320671e-03 6.641343e-03 9.966793e-01 [31,] 6.056709e-03 1.211342e-02 9.939433e-01 [32,] 1.186747e-02 2.373494e-02 9.881325e-01 [33,] 1.569766e-02 3.139531e-02 9.843023e-01 [34,] 2.498342e-02 4.996683e-02 9.750166e-01 [35,] 4.488850e-02 8.977700e-02 9.551115e-01 [36,] 7.811187e-02 1.562237e-01 9.218881e-01 [37,] 1.470763e-01 2.941526e-01 8.529237e-01 [38,] 3.338457e-01 6.676913e-01 6.661543e-01 [39,] 7.075067e-01 5.849866e-01 2.924933e-01 [40,] 8.756803e-01 2.486394e-01 1.243197e-01 [41,] 9.223378e-01 1.553245e-01 7.766225e-02 [42,] 9.527201e-01 9.455971e-02 4.727986e-02 [43,] 9.738540e-01 5.229196e-02 2.614598e-02 [44,] 9.881197e-01 2.376063e-02 1.188032e-02 [45,] 9.905421e-01 1.891582e-02 9.457912e-03 [46,] 9.928831e-01 1.423390e-02 7.116948e-03 [47,] 9.963131e-01 7.373833e-03 3.686917e-03 [48,] 9.985929e-01 2.814220e-03 1.407110e-03 [49,] 9.997523e-01 4.953449e-04 2.476724e-04 [50,] 9.999922e-01 1.553388e-05 7.766938e-06 [51,] 9.999997e-01 5.588539e-07 2.794270e-07 [52,] 9.999999e-01 1.717606e-07 8.588029e-08 [53,] 1.000000e+00 6.130673e-08 3.065336e-08 [54,] 1.000000e+00 9.148454e-08 4.574227e-08 [55,] 9.999999e-01 1.832429e-07 9.162143e-08 [56,] 9.999998e-01 4.191384e-07 2.095692e-07 [57,] 9.999997e-01 5.734770e-07 2.867385e-07 [58,] 9.999994e-01 1.248191e-06 6.240956e-07 [59,] 9.999988e-01 2.348197e-06 1.174099e-06 [60,] 9.999974e-01 5.209572e-06 2.604786e-06 [61,] 9.999943e-01 1.147974e-05 5.739869e-06 [62,] 9.999868e-01 2.637148e-05 1.318574e-05 [63,] 9.999759e-01 4.829304e-05 2.414652e-05 [64,] 9.999504e-01 9.921172e-05 4.960586e-05 [65,] 9.999571e-01 8.576539e-05 4.288270e-05 [66,] 9.999625e-01 7.494683e-05 3.747342e-05 [67,] 9.999331e-01 1.338594e-04 6.692970e-05 [68,] 9.998777e-01 2.445646e-04 1.222823e-04 [69,] 9.998897e-01 2.205274e-04 1.102637e-04 [70,] 9.998062e-01 3.876876e-04 1.938438e-04 [71,] 9.998259e-01 3.481078e-04 1.740539e-04 [72,] 9.996368e-01 7.263899e-04 3.631949e-04 [73,] 9.992144e-01 1.571194e-03 7.855968e-04 [74,] 9.984065e-01 3.187020e-03 1.593510e-03 [75,] 9.970095e-01 5.981016e-03 2.990508e-03 [76,] 9.970205e-01 5.959043e-03 2.979522e-03 [77,] 9.998722e-01 2.555525e-04 1.277762e-04 [78,] 9.999376e-01 1.247066e-04 6.235330e-05 [79,] 9.998742e-01 2.515576e-04 1.257788e-04 [80,] 9.996527e-01 6.946816e-04 3.473408e-04 [81,] 9.992037e-01 1.592668e-03 7.963342e-04 [82,] 9.982770e-01 3.445900e-03 1.722950e-03 [83,] 9.963197e-01 7.360540e-03 3.680270e-03 [84,] 9.893555e-01 2.128897e-02 1.064448e-02 [85,] 9.685911e-01 6.281774e-02 3.140887e-02 [86,] 9.347987e-01 1.304026e-01 6.520131e-02 > postscript(file="/var/www/html/rcomp/tmp/1jqm41229095635.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/2f24d1229095635.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/3vrv71229095635.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/48s5j1229095635.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/58mzq1229095635.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 = 119 Frequency = 1 1 2 3 4 5 6 1910.19932 1875.09932 1529.19932 1440.79932 1186.39932 222.39932 7 8 9 10 11 12 -2211.80787 -759.30787 -543.10787 -748.50787 -258.80787 -596.87206 13 14 15 16 17 18 -652.00532 -989.10532 -959.00532 -624.40532 -710.80532 -1255.80532 19 20 21 22 23 24 -3449.01251 -2114.51251 -2487.31251 -2181.71251 -1961.01251 -2703.07671 25 26 27 28 29 30 -2199.20997 -2147.30997 -1976.20997 -1796.60997 -1629.00997 -2326.00997 31 32 33 34 35 36 -4090.21716 -3289.71716 -1346.51716 -842.91716 -802.21716 -1390.28135 37 38 39 40 41 42 -1147.41461 -1058.51461 -783.41461 -753.81461 -515.21461 -931.21461 43 44 45 46 47 48 -535.42180 -1074.92180 620.27820 465.87820 562.57820 68.51400 49 50 51 52 53 54 263.38075 -230.71925 -207.61925 229.98075 320.58075 937.58075 55 56 57 58 59 60 2111.37355 1758.87355 2916.07355 2159.67355 1930.37355 1302.30936 61 62 63 64 65 66 1571.17610 1845.07610 1490.17610 1298.77610 1165.37610 1489.37610 67 68 69 70 71 72 2088.16891 2535.66891 3887.86891 3234.46891 2900.16891 1979.10472 73 74 75 76 77 78 1684.97146 1317.87146 1419.97146 705.57146 740.17146 1115.17146 79 80 81 82 83 84 6407.03618 6338.53618 5377.73618 5576.33618 4903.03618 4178.97199 85 86 87 88 89 90 2347.83873 2990.73873 2533.83873 3182.43873 3333.03873 3533.03873 91 92 93 94 95 96 3772.83154 3147.33154 2014.53154 1296.13154 854.83154 72.76735 97 98 99 100 101 102 -218.36591 -69.46591 -411.36591 -499.76591 -480.16591 -303.16591 103 104 105 106 107 108 -70.37310 -1361.87310 -3642.67310 -3149.07310 -3097.37310 -2911.43730 109 110 111 112 113 114 -3560.57056 -3533.67056 -2635.57056 -3182.97056 -3410.37056 -2481.37056 115 116 117 118 119 -4022.57775 -5180.07775 -6796.87775 -5810.27775 -5031.57775 > postscript(file="/var/www/html/rcomp/tmp/6pgso1229095635.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 = 119 Frequency = 1 lag(myerror, k = 1) myerror 0 1910.19932 NA 1 1875.09932 1910.19932 2 1529.19932 1875.09932 3 1440.79932 1529.19932 4 1186.39932 1440.79932 5 222.39932 1186.39932 6 -2211.80787 222.39932 7 -759.30787 -2211.80787 8 -543.10787 -759.30787 9 -748.50787 -543.10787 10 -258.80787 -748.50787 11 -596.87206 -258.80787 12 -652.00532 -596.87206 13 -989.10532 -652.00532 14 -959.00532 -989.10532 15 -624.40532 -959.00532 16 -710.80532 -624.40532 17 -1255.80532 -710.80532 18 -3449.01251 -1255.80532 19 -2114.51251 -3449.01251 20 -2487.31251 -2114.51251 21 -2181.71251 -2487.31251 22 -1961.01251 -2181.71251 23 -2703.07671 -1961.01251 24 -2199.20997 -2703.07671 25 -2147.30997 -2199.20997 26 -1976.20997 -2147.30997 27 -1796.60997 -1976.20997 28 -1629.00997 -1796.60997 29 -2326.00997 -1629.00997 30 -4090.21716 -2326.00997 31 -3289.71716 -4090.21716 32 -1346.51716 -3289.71716 33 -842.91716 -1346.51716 34 -802.21716 -842.91716 35 -1390.28135 -802.21716 36 -1147.41461 -1390.28135 37 -1058.51461 -1147.41461 38 -783.41461 -1058.51461 39 -753.81461 -783.41461 40 -515.21461 -753.81461 41 -931.21461 -515.21461 42 -535.42180 -931.21461 43 -1074.92180 -535.42180 44 620.27820 -1074.92180 45 465.87820 620.27820 46 562.57820 465.87820 47 68.51400 562.57820 48 263.38075 68.51400 49 -230.71925 263.38075 50 -207.61925 -230.71925 51 229.98075 -207.61925 52 320.58075 229.98075 53 937.58075 320.58075 54 2111.37355 937.58075 55 1758.87355 2111.37355 56 2916.07355 1758.87355 57 2159.67355 2916.07355 58 1930.37355 2159.67355 59 1302.30936 1930.37355 60 1571.17610 1302.30936 61 1845.07610 1571.17610 62 1490.17610 1845.07610 63 1298.77610 1490.17610 64 1165.37610 1298.77610 65 1489.37610 1165.37610 66 2088.16891 1489.37610 67 2535.66891 2088.16891 68 3887.86891 2535.66891 69 3234.46891 3887.86891 70 2900.16891 3234.46891 71 1979.10472 2900.16891 72 1684.97146 1979.10472 73 1317.87146 1684.97146 74 1419.97146 1317.87146 75 705.57146 1419.97146 76 740.17146 705.57146 77 1115.17146 740.17146 78 6407.03618 1115.17146 79 6338.53618 6407.03618 80 5377.73618 6338.53618 81 5576.33618 5377.73618 82 4903.03618 5576.33618 83 4178.97199 4903.03618 84 2347.83873 4178.97199 85 2990.73873 2347.83873 86 2533.83873 2990.73873 87 3182.43873 2533.83873 88 3333.03873 3182.43873 89 3533.03873 3333.03873 90 3772.83154 3533.03873 91 3147.33154 3772.83154 92 2014.53154 3147.33154 93 1296.13154 2014.53154 94 854.83154 1296.13154 95 72.76735 854.83154 96 -218.36591 72.76735 97 -69.46591 -218.36591 98 -411.36591 -69.46591 99 -499.76591 -411.36591 100 -480.16591 -499.76591 101 -303.16591 -480.16591 102 -70.37310 -303.16591 103 -1361.87310 -70.37310 104 -3642.67310 -1361.87310 105 -3149.07310 -3642.67310 106 -3097.37310 -3149.07310 107 -2911.43730 -3097.37310 108 -3560.57056 -2911.43730 109 -3533.67056 -3560.57056 110 -2635.57056 -3533.67056 111 -3182.97056 -2635.57056 112 -3410.37056 -3182.97056 113 -2481.37056 -3410.37056 114 -4022.57775 -2481.37056 115 -5180.07775 -4022.57775 116 -6796.87775 -5180.07775 117 -5810.27775 -6796.87775 118 -5031.57775 -5810.27775 119 NA -5031.57775 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 1875.09932 1910.19932 [2,] 1529.19932 1875.09932 [3,] 1440.79932 1529.19932 [4,] 1186.39932 1440.79932 [5,] 222.39932 1186.39932 [6,] -2211.80787 222.39932 [7,] -759.30787 -2211.80787 [8,] -543.10787 -759.30787 [9,] -748.50787 -543.10787 [10,] -258.80787 -748.50787 [11,] -596.87206 -258.80787 [12,] -652.00532 -596.87206 [13,] -989.10532 -652.00532 [14,] -959.00532 -989.10532 [15,] -624.40532 -959.00532 [16,] -710.80532 -624.40532 [17,] -1255.80532 -710.80532 [18,] -3449.01251 -1255.80532 [19,] -2114.51251 -3449.01251 [20,] -2487.31251 -2114.51251 [21,] -2181.71251 -2487.31251 [22,] -1961.01251 -2181.71251 [23,] -2703.07671 -1961.01251 [24,] -2199.20997 -2703.07671 [25,] -2147.30997 -2199.20997 [26,] -1976.20997 -2147.30997 [27,] -1796.60997 -1976.20997 [28,] -1629.00997 -1796.60997 [29,] -2326.00997 -1629.00997 [30,] -4090.21716 -2326.00997 [31,] -3289.71716 -4090.21716 [32,] -1346.51716 -3289.71716 [33,] -842.91716 -1346.51716 [34,] -802.21716 -842.91716 [35,] -1390.28135 -802.21716 [36,] -1147.41461 -1390.28135 [37,] -1058.51461 -1147.41461 [38,] -783.41461 -1058.51461 [39,] -753.81461 -783.41461 [40,] -515.21461 -753.81461 [41,] -931.21461 -515.21461 [42,] -535.42180 -931.21461 [43,] -1074.92180 -535.42180 [44,] 620.27820 -1074.92180 [45,] 465.87820 620.27820 [46,] 562.57820 465.87820 [47,] 68.51400 562.57820 [48,] 263.38075 68.51400 [49,] -230.71925 263.38075 [50,] -207.61925 -230.71925 [51,] 229.98075 -207.61925 [52,] 320.58075 229.98075 [53,] 937.58075 320.58075 [54,] 2111.37355 937.58075 [55,] 1758.87355 2111.37355 [56,] 2916.07355 1758.87355 [57,] 2159.67355 2916.07355 [58,] 1930.37355 2159.67355 [59,] 1302.30936 1930.37355 [60,] 1571.17610 1302.30936 [61,] 1845.07610 1571.17610 [62,] 1490.17610 1845.07610 [63,] 1298.77610 1490.17610 [64,] 1165.37610 1298.77610 [65,] 1489.37610 1165.37610 [66,] 2088.16891 1489.37610 [67,] 2535.66891 2088.16891 [68,] 3887.86891 2535.66891 [69,] 3234.46891 3887.86891 [70,] 2900.16891 3234.46891 [71,] 1979.10472 2900.16891 [72,] 1684.97146 1979.10472 [73,] 1317.87146 1684.97146 [74,] 1419.97146 1317.87146 [75,] 705.57146 1419.97146 [76,] 740.17146 705.57146 [77,] 1115.17146 740.17146 [78,] 6407.03618 1115.17146 [79,] 6338.53618 6407.03618 [80,] 5377.73618 6338.53618 [81,] 5576.33618 5377.73618 [82,] 4903.03618 5576.33618 [83,] 4178.97199 4903.03618 [84,] 2347.83873 4178.97199 [85,] 2990.73873 2347.83873 [86,] 2533.83873 2990.73873 [87,] 3182.43873 2533.83873 [88,] 3333.03873 3182.43873 [89,] 3533.03873 3333.03873 [90,] 3772.83154 3533.03873 [91,] 3147.33154 3772.83154 [92,] 2014.53154 3147.33154 [93,] 1296.13154 2014.53154 [94,] 854.83154 1296.13154 [95,] 72.76735 854.83154 [96,] -218.36591 72.76735 [97,] -69.46591 -218.36591 [98,] -411.36591 -69.46591 [99,] -499.76591 -411.36591 [100,] -480.16591 -499.76591 [101,] -303.16591 -480.16591 [102,] -70.37310 -303.16591 [103,] -1361.87310 -70.37310 [104,] -3642.67310 -1361.87310 [105,] -3149.07310 -3642.67310 [106,] -3097.37310 -3149.07310 [107,] -2911.43730 -3097.37310 [108,] -3560.57056 -2911.43730 [109,] -3533.67056 -3560.57056 [110,] -2635.57056 -3533.67056 [111,] -3182.97056 -2635.57056 [112,] -3410.37056 -3182.97056 [113,] -2481.37056 -3410.37056 [114,] -4022.57775 -2481.37056 [115,] -5180.07775 -4022.57775 [116,] -6796.87775 -5180.07775 [117,] -5810.27775 -6796.87775 [118,] -5031.57775 -5810.27775 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 1875.09932 1910.19932 2 1529.19932 1875.09932 3 1440.79932 1529.19932 4 1186.39932 1440.79932 5 222.39932 1186.39932 6 -2211.80787 222.39932 7 -759.30787 -2211.80787 8 -543.10787 -759.30787 9 -748.50787 -543.10787 10 -258.80787 -748.50787 11 -596.87206 -258.80787 12 -652.00532 -596.87206 13 -989.10532 -652.00532 14 -959.00532 -989.10532 15 -624.40532 -959.00532 16 -710.80532 -624.40532 17 -1255.80532 -710.80532 18 -3449.01251 -1255.80532 19 -2114.51251 -3449.01251 20 -2487.31251 -2114.51251 21 -2181.71251 -2487.31251 22 -1961.01251 -2181.71251 23 -2703.07671 -1961.01251 24 -2199.20997 -2703.07671 25 -2147.30997 -2199.20997 26 -1976.20997 -2147.30997 27 -1796.60997 -1976.20997 28 -1629.00997 -1796.60997 29 -2326.00997 -1629.00997 30 -4090.21716 -2326.00997 31 -3289.71716 -4090.21716 32 -1346.51716 -3289.71716 33 -842.91716 -1346.51716 34 -802.21716 -842.91716 35 -1390.28135 -802.21716 36 -1147.41461 -1390.28135 37 -1058.51461 -1147.41461 38 -783.41461 -1058.51461 39 -753.81461 -783.41461 40 -515.21461 -753.81461 41 -931.21461 -515.21461 42 -535.42180 -931.21461 43 -1074.92180 -535.42180 44 620.27820 -1074.92180 45 465.87820 620.27820 46 562.57820 465.87820 47 68.51400 562.57820 48 263.38075 68.51400 49 -230.71925 263.38075 50 -207.61925 -230.71925 51 229.98075 -207.61925 52 320.58075 229.98075 53 937.58075 320.58075 54 2111.37355 937.58075 55 1758.87355 2111.37355 56 2916.07355 1758.87355 57 2159.67355 2916.07355 58 1930.37355 2159.67355 59 1302.30936 1930.37355 60 1571.17610 1302.30936 61 1845.07610 1571.17610 62 1490.17610 1845.07610 63 1298.77610 1490.17610 64 1165.37610 1298.77610 65 1489.37610 1165.37610 66 2088.16891 1489.37610 67 2535.66891 2088.16891 68 3887.86891 2535.66891 69 3234.46891 3887.86891 70 2900.16891 3234.46891 71 1979.10472 2900.16891 72 1684.97146 1979.10472 73 1317.87146 1684.97146 74 1419.97146 1317.87146 75 705.57146 1419.97146 76 740.17146 705.57146 77 1115.17146 740.17146 78 6407.03618 1115.17146 79 6338.53618 6407.03618 80 5377.73618 6338.53618 81 5576.33618 5377.73618 82 4903.03618 5576.33618 83 4178.97199 4903.03618 84 2347.83873 4178.97199 85 2990.73873 2347.83873 86 2533.83873 2990.73873 87 3182.43873 2533.83873 88 3333.03873 3182.43873 89 3533.03873 3333.03873 90 3772.83154 3533.03873 91 3147.33154 3772.83154 92 2014.53154 3147.33154 93 1296.13154 2014.53154 94 854.83154 1296.13154 95 72.76735 854.83154 96 -218.36591 72.76735 97 -69.46591 -218.36591 98 -411.36591 -69.46591 99 -499.76591 -411.36591 100 -480.16591 -499.76591 101 -303.16591 -480.16591 102 -70.37310 -303.16591 103 -1361.87310 -70.37310 104 -3642.67310 -1361.87310 105 -3149.07310 -3642.67310 106 -3097.37310 -3149.07310 107 -2911.43730 -3097.37310 108 -3560.57056 -2911.43730 109 -3533.67056 -3560.57056 110 -2635.57056 -3533.67056 111 -3182.97056 -2635.57056 112 -3410.37056 -3182.97056 113 -2481.37056 -3410.37056 114 -4022.57775 -2481.37056 115 -5180.07775 -4022.57775 116 -6796.87775 -5180.07775 117 -5810.27775 -6796.87775 118 -5031.57775 -5810.27775 > 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/7jldp1229095635.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/80ffa1229095635.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/9pxg41229095635.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/10mbn41229095635.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/11imk71229095636.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/128eme1229095636.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/13totm1229095636.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/146cq41229095636.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/15fe7y1229095636.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/16mouy1229095636.tab") + } > > system("convert tmp/1jqm41229095635.ps tmp/1jqm41229095635.png") > system("convert tmp/2f24d1229095635.ps tmp/2f24d1229095635.png") > system("convert tmp/3vrv71229095635.ps tmp/3vrv71229095635.png") > system("convert tmp/48s5j1229095635.ps tmp/48s5j1229095635.png") > system("convert tmp/58mzq1229095635.ps tmp/58mzq1229095635.png") > system("convert tmp/6pgso1229095635.ps tmp/6pgso1229095635.png") > system("convert tmp/7jldp1229095635.ps tmp/7jldp1229095635.png") > system("convert tmp/80ffa1229095635.ps tmp/80ffa1229095635.png") > system("convert tmp/9pxg41229095635.ps tmp/9pxg41229095635.png") > system("convert tmp/10mbn41229095635.ps tmp/10mbn41229095635.png") > > > proc.time() user system elapsed 6.472 2.873 6.899