R version 2.9.0 (2009-04-17) Copyright (C) 2009 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(8715.1 + ,0 + ,8919.9 + ,0 + ,10085.8 + ,0 + ,9511.7 + ,0 + ,8991.3 + ,0 + ,10311.2 + ,0 + ,8895.4 + ,0 + ,7449.8 + ,0 + ,10084.0 + ,0 + ,9859.4 + ,0 + ,9100.1 + ,0 + ,8920.8 + ,0 + ,8502.7 + ,0 + ,8599.6 + ,0 + ,10394.4 + ,0 + ,9290.4 + ,0 + ,8742.2 + ,0 + ,10217.3 + ,0 + ,8639.0 + ,0 + ,8139.6 + ,0 + ,10779.1 + ,0 + ,10427.7 + ,0 + ,10349.1 + ,0 + ,10036.4 + ,0 + ,9492.1 + ,0 + ,10638.8 + ,0 + ,12054.5 + ,0 + ,10324.7 + ,0 + ,11817.3 + ,0 + ,11008.9 + ,0 + ,9996.6 + ,0 + ,9419.5 + ,0 + ,11958.8 + ,0 + ,12594.6 + ,0 + ,11890.6 + ,0 + ,10871.7 + ,0 + ,11835.7 + ,0 + ,11542.2 + ,0 + ,13093.7 + ,0 + ,11180.2 + ,0 + ,12035.7 + ,0 + ,12112.0 + ,0 + ,10875.2 + ,0 + ,9897.3 + ,0 + ,11672.1 + ,1 + ,12385.7 + ,1 + ,11405.6 + ,1 + ,9830.9 + ,1 + ,11025.1 + ,1 + ,10853.8 + ,1 + ,12252.6 + ,1 + ,11839.4 + ,1 + ,11669.1 + ,1 + ,11601.4 + ,1 + ,11178.4 + ,1 + ,9516.4 + ,1 + ,12102.8 + ,1 + ,12989.0 + ,1 + ,11610.2 + ,1 + ,10205.5 + ,1 + ,11356.2 + ,1 + ,11307.1 + ,1 + ,12648.6 + ,1 + ,11947.2 + ,1 + ,11714.1 + ,1 + ,12192.5 + ,1 + ,11268.8 + ,1 + ,9097.4 + ,1 + ,12639.8 + ,1 + ,13040.1 + ,1 + ,11687.3 + ,1 + ,11191.7 + ,1 + ,11391.9 + ,1 + ,11793.1 + ,1 + ,13933.2 + ,1 + ,12778.1 + ,1 + ,11810.3 + ,1 + ,13698.4 + ,1 + ,11956.6 + ,1 + ,10723.8 + ,1 + ,13938.9 + ,1 + ,13979.8 + ,1 + ,13807.4 + ,1 + ,12973.9 + ,1 + ,12509.8 + ,1 + ,12934.1 + ,1 + ,14908.3 + ,1 + ,13772.1 + ,1 + ,13012.6 + ,1 + ,14049.9 + ,1 + ,11816.5 + ,1 + ,11593.2 + ,1 + ,14466.2 + ,1 + ,13615.9 + ,1 + ,14733.9 + ,1 + ,13880.7 + ,1 + ,13527.5 + ,1 + ,13584.0 + ,1 + ,16170.2 + ,1 + ,13260.6 + ,1 + ,14741.9 + ,1 + ,15486.5 + ,1 + ,13154.5 + ,1 + ,12621.2 + ,1 + ,15031.6 + ,1 + ,15452.4 + ,1 + ,15428.0 + ,1 + ,13105.9 + ,1 + ,14716.8 + ,1 + ,14180.0 + ,1 + ,16202.2 + ,1 + ,14392.4 + ,1 + ,15140.6 + ,1 + ,15960.1 + ,1 + ,14351.3 + ,1 + ,13230.2 + ,1 + ,15202.1 + ,1 + ,17056.0 + ,1 + ,16077.7 + ,1 + ,13348.2 + ,1 + ,16402.4 + ,1 + ,16559.1 + ,1 + ,16579.0 + ,1 + ,17561.2 + ,1 + ,16129.6 + ,1 + ,18484.3 + ,1 + ,16402.6 + ,1 + ,14032.3 + ,1 + ,17109.1 + ,1 + ,17157.2 + ,1 + ,13879.8 + ,1 + ,12362.4 + ,1) + ,dim=c(2 + ,132) + ,dimnames=list(c('Uitvoer' + ,'Dummie') + ,1:132)) > y <- array(NA,dim=c(2,132),dimnames=list(c('Uitvoer','Dummie'),1:132)) > 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 Uitvoer Dummie M1 M2 M3 M4 M5 M6 M7 M8 M9 M10 M11 t 1 8715.1 0 1 0 0 0 0 0 0 0 0 0 0 1 2 8919.9 0 0 1 0 0 0 0 0 0 0 0 0 2 3 10085.8 0 0 0 1 0 0 0 0 0 0 0 0 3 4 9511.7 0 0 0 0 1 0 0 0 0 0 0 0 4 5 8991.3 0 0 0 0 0 1 0 0 0 0 0 0 5 6 10311.2 0 0 0 0 0 0 1 0 0 0 0 0 6 7 8895.4 0 0 0 0 0 0 0 1 0 0 0 0 7 8 7449.8 0 0 0 0 0 0 0 0 1 0 0 0 8 9 10084.0 0 0 0 0 0 0 0 0 0 1 0 0 9 10 9859.4 0 0 0 0 0 0 0 0 0 0 1 0 10 11 9100.1 0 0 0 0 0 0 0 0 0 0 0 1 11 12 8920.8 0 0 0 0 0 0 0 0 0 0 0 0 12 13 8502.7 0 1 0 0 0 0 0 0 0 0 0 0 13 14 8599.6 0 0 1 0 0 0 0 0 0 0 0 0 14 15 10394.4 0 0 0 1 0 0 0 0 0 0 0 0 15 16 9290.4 0 0 0 0 1 0 0 0 0 0 0 0 16 17 8742.2 0 0 0 0 0 1 0 0 0 0 0 0 17 18 10217.3 0 0 0 0 0 0 1 0 0 0 0 0 18 19 8639.0 0 0 0 0 0 0 0 1 0 0 0 0 19 20 8139.6 0 0 0 0 0 0 0 0 1 0 0 0 20 21 10779.1 0 0 0 0 0 0 0 0 0 1 0 0 21 22 10427.7 0 0 0 0 0 0 0 0 0 0 1 0 22 23 10349.1 0 0 0 0 0 0 0 0 0 0 0 1 23 24 10036.4 0 0 0 0 0 0 0 0 0 0 0 0 24 25 9492.1 0 1 0 0 0 0 0 0 0 0 0 0 25 26 10638.8 0 0 1 0 0 0 0 0 0 0 0 0 26 27 12054.5 0 0 0 1 0 0 0 0 0 0 0 0 27 28 10324.7 0 0 0 0 1 0 0 0 0 0 0 0 28 29 11817.3 0 0 0 0 0 1 0 0 0 0 0 0 29 30 11008.9 0 0 0 0 0 0 1 0 0 0 0 0 30 31 9996.6 0 0 0 0 0 0 0 1 0 0 0 0 31 32 9419.5 0 0 0 0 0 0 0 0 1 0 0 0 32 33 11958.8 0 0 0 0 0 0 0 0 0 1 0 0 33 34 12594.6 0 0 0 0 0 0 0 0 0 0 1 0 34 35 11890.6 0 0 0 0 0 0 0 0 0 0 0 1 35 36 10871.7 0 0 0 0 0 0 0 0 0 0 0 0 36 37 11835.7 0 1 0 0 0 0 0 0 0 0 0 0 37 38 11542.2 0 0 1 0 0 0 0 0 0 0 0 0 38 39 13093.7 0 0 0 1 0 0 0 0 0 0 0 0 39 40 11180.2 0 0 0 0 1 0 0 0 0 0 0 0 40 41 12035.7 0 0 0 0 0 1 0 0 0 0 0 0 41 42 12112.0 0 0 0 0 0 0 1 0 0 0 0 0 42 43 10875.2 0 0 0 0 0 0 0 1 0 0 0 0 43 44 9897.3 0 0 0 0 0 0 0 0 1 0 0 0 44 45 11672.1 1 0 0 0 0 0 0 0 0 1 0 0 45 46 12385.7 1 0 0 0 0 0 0 0 0 0 1 0 46 47 11405.6 1 0 0 0 0 0 0 0 0 0 0 1 47 48 9830.9 1 0 0 0 0 0 0 0 0 0 0 0 48 49 11025.1 1 1 0 0 0 0 0 0 0 0 0 0 49 50 10853.8 1 0 1 0 0 0 0 0 0 0 0 0 50 51 12252.6 1 0 0 1 0 0 0 0 0 0 0 0 51 52 11839.4 1 0 0 0 1 0 0 0 0 0 0 0 52 53 11669.1 1 0 0 0 0 1 0 0 0 0 0 0 53 54 11601.4 1 0 0 0 0 0 1 0 0 0 0 0 54 55 11178.4 1 0 0 0 0 0 0 1 0 0 0 0 55 56 9516.4 1 0 0 0 0 0 0 0 1 0 0 0 56 57 12102.8 1 0 0 0 0 0 0 0 0 1 0 0 57 58 12989.0 1 0 0 0 0 0 0 0 0 0 1 0 58 59 11610.2 1 0 0 0 0 0 0 0 0 0 0 1 59 60 10205.5 1 0 0 0 0 0 0 0 0 0 0 0 60 61 11356.2 1 1 0 0 0 0 0 0 0 0 0 0 61 62 11307.1 1 0 1 0 0 0 0 0 0 0 0 0 62 63 12648.6 1 0 0 1 0 0 0 0 0 0 0 0 63 64 11947.2 1 0 0 0 1 0 0 0 0 0 0 0 64 65 11714.1 1 0 0 0 0 1 0 0 0 0 0 0 65 66 12192.5 1 0 0 0 0 0 1 0 0 0 0 0 66 67 11268.8 1 0 0 0 0 0 0 1 0 0 0 0 67 68 9097.4 1 0 0 0 0 0 0 0 1 0 0 0 68 69 12639.8 1 0 0 0 0 0 0 0 0 1 0 0 69 70 13040.1 1 0 0 0 0 0 0 0 0 0 1 0 70 71 11687.3 1 0 0 0 0 0 0 0 0 0 0 1 71 72 11191.7 1 0 0 0 0 0 0 0 0 0 0 0 72 73 11391.9 1 1 0 0 0 0 0 0 0 0 0 0 73 74 11793.1 1 0 1 0 0 0 0 0 0 0 0 0 74 75 13933.2 1 0 0 1 0 0 0 0 0 0 0 0 75 76 12778.1 1 0 0 0 1 0 0 0 0 0 0 0 76 77 11810.3 1 0 0 0 0 1 0 0 0 0 0 0 77 78 13698.4 1 0 0 0 0 0 1 0 0 0 0 0 78 79 11956.6 1 0 0 0 0 0 0 1 0 0 0 0 79 80 10723.8 1 0 0 0 0 0 0 0 1 0 0 0 80 81 13938.9 1 0 0 0 0 0 0 0 0 1 0 0 81 82 13979.8 1 0 0 0 0 0 0 0 0 0 1 0 82 83 13807.4 1 0 0 0 0 0 0 0 0 0 0 1 83 84 12973.9 1 0 0 0 0 0 0 0 0 0 0 0 84 85 12509.8 1 1 0 0 0 0 0 0 0 0 0 0 85 86 12934.1 1 0 1 0 0 0 0 0 0 0 0 0 86 87 14908.3 1 0 0 1 0 0 0 0 0 0 0 0 87 88 13772.1 1 0 0 0 1 0 0 0 0 0 0 0 88 89 13012.6 1 0 0 0 0 1 0 0 0 0 0 0 89 90 14049.9 1 0 0 0 0 0 1 0 0 0 0 0 90 91 11816.5 1 0 0 0 0 0 0 1 0 0 0 0 91 92 11593.2 1 0 0 0 0 0 0 0 1 0 0 0 92 93 14466.2 1 0 0 0 0 0 0 0 0 1 0 0 93 94 13615.9 1 0 0 0 0 0 0 0 0 0 1 0 94 95 14733.9 1 0 0 0 0 0 0 0 0 0 0 1 95 96 13880.7 1 0 0 0 0 0 0 0 0 0 0 0 96 97 13527.5 1 1 0 0 0 0 0 0 0 0 0 0 97 98 13584.0 1 0 1 0 0 0 0 0 0 0 0 0 98 99 16170.2 1 0 0 1 0 0 0 0 0 0 0 0 99 100 13260.6 1 0 0 0 1 0 0 0 0 0 0 0 100 101 14741.9 1 0 0 0 0 1 0 0 0 0 0 0 101 102 15486.5 1 0 0 0 0 0 1 0 0 0 0 0 102 103 13154.5 1 0 0 0 0 0 0 1 0 0 0 0 103 104 12621.2 1 0 0 0 0 0 0 0 1 0 0 0 104 105 15031.6 1 0 0 0 0 0 0 0 0 1 0 0 105 106 15452.4 1 0 0 0 0 0 0 0 0 0 1 0 106 107 15428.0 1 0 0 0 0 0 0 0 0 0 0 1 107 108 13105.9 1 0 0 0 0 0 0 0 0 0 0 0 108 109 14716.8 1 1 0 0 0 0 0 0 0 0 0 0 109 110 14180.0 1 0 1 0 0 0 0 0 0 0 0 0 110 111 16202.2 1 0 0 1 0 0 0 0 0 0 0 0 111 112 14392.4 1 0 0 0 1 0 0 0 0 0 0 0 112 113 15140.6 1 0 0 0 0 1 0 0 0 0 0 0 113 114 15960.1 1 0 0 0 0 0 1 0 0 0 0 0 114 115 14351.3 1 0 0 0 0 0 0 1 0 0 0 0 115 116 13230.2 1 0 0 0 0 0 0 0 1 0 0 0 116 117 15202.1 1 0 0 0 0 0 0 0 0 1 0 0 117 118 17056.0 1 0 0 0 0 0 0 0 0 0 1 0 118 119 16077.7 1 0 0 0 0 0 0 0 0 0 0 1 119 120 13348.2 1 0 0 0 0 0 0 0 0 0 0 0 120 121 16402.4 1 1 0 0 0 0 0 0 0 0 0 0 121 122 16559.1 1 0 1 0 0 0 0 0 0 0 0 0 122 123 16579.0 1 0 0 1 0 0 0 0 0 0 0 0 123 124 17561.2 1 0 0 0 1 0 0 0 0 0 0 0 124 125 16129.6 1 0 0 0 0 1 0 0 0 0 0 0 125 126 18484.3 1 0 0 0 0 0 1 0 0 0 0 0 126 127 16402.6 1 0 0 0 0 0 0 1 0 0 0 0 127 128 14032.3 1 0 0 0 0 0 0 0 1 0 0 0 128 129 17109.1 1 0 0 0 0 0 0 0 0 1 0 0 129 130 17157.2 1 0 0 0 0 0 0 0 0 0 1 0 130 131 13879.8 1 0 0 0 0 0 0 0 0 0 0 1 131 132 12362.4 1 0 0 0 0 0 0 0 0 0 0 0 132 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) Dummie M1 M2 M3 M4 7642.02 -1159.29 865.75 930.75 2447.97 1249.25 M5 M6 M7 M8 M9 M10 1178.82 1960.31 386.77 -843.74 1856.42 2115.68 M11 t 1269.36 65.58 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -2777.028 -405.397 6.324 388.239 1778.044 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 7642.023 238.458 32.048 < 2e-16 *** Dummie -1159.290 222.751 -5.204 8.32e-07 *** M1 865.747 296.322 2.922 0.004174 ** M2 930.747 296.207 3.142 0.002120 ** M3 2447.966 296.117 8.267 2.34e-13 *** M4 1249.249 296.053 4.220 4.83e-05 *** M5 1178.823 296.015 3.982 0.000118 *** M6 1960.314 296.002 6.623 1.10e-09 *** M7 386.770 296.015 1.307 0.193893 M8 -843.739 296.053 -2.850 0.005162 ** M9 1856.416 295.886 6.274 6.02e-09 *** M10 2115.680 295.822 7.152 7.76e-11 *** M11 1269.363 295.784 4.292 3.66e-05 *** t 65.581 2.756 23.798 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 693.6 on 118 degrees of freedom Multiple R-squared: 0.9214, Adjusted R-squared: 0.9127 F-statistic: 106.4 on 13 and 118 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.227208e-02 6.454415e-02 0.9677279 [2,] 7.799574e-03 1.559915e-02 0.9922004 [3,] 1.933877e-03 3.867753e-03 0.9980661 [4,] 1.067075e-02 2.134150e-02 0.9893293 [5,] 1.365146e-02 2.730291e-02 0.9863485 [6,] 1.020280e-02 2.040561e-02 0.9897972 [7,] 3.086613e-02 6.173227e-02 0.9691339 [8,] 3.844652e-02 7.689303e-02 0.9615535 [9,] 2.880970e-02 5.761939e-02 0.9711903 [10,] 8.443906e-02 1.688781e-01 0.9155609 [11,] 1.123995e-01 2.247990e-01 0.8876005 [12,] 7.823321e-02 1.564664e-01 0.9217668 [13,] 3.290025e-01 6.580051e-01 0.6709975 [14,] 2.845113e-01 5.690227e-01 0.7154887 [15,] 2.252593e-01 4.505185e-01 0.7747407 [16,] 1.892441e-01 3.784882e-01 0.8107559 [17,] 1.498266e-01 2.996533e-01 0.8501734 [18,] 1.973569e-01 3.947139e-01 0.8026431 [19,] 1.964616e-01 3.929233e-01 0.8035384 [20,] 1.603744e-01 3.207487e-01 0.8396256 [21,] 1.969503e-01 3.939006e-01 0.8030497 [22,] 1.579485e-01 3.158970e-01 0.8420515 [23,] 1.263638e-01 2.527275e-01 0.8736362 [24,] 1.063587e-01 2.127174e-01 0.8936413 [25,] 8.343406e-02 1.668681e-01 0.9165659 [26,] 6.535920e-02 1.307184e-01 0.9346408 [27,] 4.826948e-02 9.653896e-02 0.9517305 [28,] 3.593296e-02 7.186593e-02 0.9640670 [29,] 2.549154e-02 5.098308e-02 0.9745085 [30,] 2.158845e-02 4.317691e-02 0.9784115 [31,] 1.569999e-02 3.139998e-02 0.9843000 [32,] 1.950600e-02 3.901201e-02 0.9804940 [33,] 1.393499e-02 2.786999e-02 0.9860650 [34,] 9.938609e-03 1.987722e-02 0.9900614 [35,] 7.003818e-03 1.400764e-02 0.9929962 [36,] 6.197767e-03 1.239553e-02 0.9938022 [37,] 4.462824e-03 8.925647e-03 0.9955372 [38,] 3.636338e-03 7.272677e-03 0.9963637 [39,] 2.989221e-03 5.978442e-03 0.9970108 [40,] 2.236331e-03 4.472662e-03 0.9977637 [41,] 1.667358e-03 3.334716e-03 0.9983326 [42,] 1.265766e-03 2.531531e-03 0.9987342 [43,] 9.643496e-04 1.928699e-03 0.9990357 [44,] 1.474662e-03 2.949324e-03 0.9985253 [45,] 9.893251e-04 1.978650e-03 0.9990107 [46,] 7.482631e-04 1.496526e-03 0.9992517 [47,] 6.296791e-04 1.259358e-03 0.9993703 [48,] 3.869670e-04 7.739341e-04 0.9996130 [49,] 3.012477e-04 6.024954e-04 0.9996988 [50,] 2.582191e-04 5.164382e-04 0.9997418 [51,] 1.615372e-04 3.230744e-04 0.9998385 [52,] 4.520598e-04 9.041197e-04 0.9995479 [53,] 3.152639e-04 6.305278e-04 0.9996847 [54,] 2.066741e-04 4.133482e-04 0.9997933 [55,] 2.482945e-04 4.965889e-04 0.9997517 [56,] 1.860466e-04 3.720931e-04 0.9998140 [57,] 2.048818e-04 4.097636e-04 0.9997951 [58,] 1.535108e-04 3.070216e-04 0.9998465 [59,] 9.089036e-05 1.817807e-04 0.9999091 [60,] 5.183041e-05 1.036608e-04 0.9999482 [61,] 7.777381e-05 1.555476e-04 0.9999222 [62,] 5.429836e-05 1.085967e-04 0.9999457 [63,] 3.062618e-05 6.125237e-05 0.9999694 [64,] 1.729710e-05 3.459419e-05 0.9999827 [65,] 1.021787e-05 2.043575e-05 0.9999898 [66,] 5.391752e-06 1.078350e-05 0.9999946 [67,] 4.597502e-06 9.195003e-06 0.9999954 [68,] 1.225903e-05 2.451806e-05 0.9999877 [69,] 8.407196e-06 1.681439e-05 0.9999916 [70,] 4.431603e-06 8.863207e-06 0.9999956 [71,] 2.503166e-06 5.006332e-06 0.9999975 [72,] 1.397331e-06 2.794661e-06 0.9999986 [73,] 9.760360e-07 1.952072e-06 0.9999990 [74,] 7.152316e-07 1.430463e-06 0.9999993 [75,] 1.717939e-06 3.435878e-06 0.9999983 [76,] 8.480555e-07 1.696111e-06 0.9999992 [77,] 4.055799e-07 8.111598e-07 0.9999996 [78,] 1.548981e-06 3.097961e-06 0.9999985 [79,] 1.746719e-06 3.493438e-06 0.9999983 [80,] 3.147890e-05 6.295781e-05 0.9999685 [81,] 2.086874e-05 4.173748e-05 0.9999791 [82,] 1.222964e-05 2.445928e-05 0.9999878 [83,] 1.513393e-05 3.026786e-05 0.9999849 [84,] 3.941806e-05 7.883613e-05 0.9999606 [85,] 2.437666e-05 4.875332e-05 0.9999756 [86,] 1.673491e-05 3.346982e-05 0.9999833 [87,] 1.684956e-05 3.369912e-05 0.9999832 [88,] 7.884998e-06 1.577000e-05 0.9999921 [89,] 3.646015e-06 7.292030e-06 0.9999964 [90,] 1.996895e-06 3.993790e-06 0.9999980 [91,] 4.132230e-06 8.264460e-06 0.9999959 [92,] 1.669711e-05 3.339423e-05 0.9999833 [93,] 9.080187e-06 1.816037e-05 0.9999909 [94,] 1.127964e-05 2.255928e-05 0.9999887 [95,] 4.922550e-06 9.845099e-06 0.9999951 [96,] 5.462022e-05 1.092404e-04 0.9999454 [97,] 2.122218e-05 4.244436e-05 0.9999788 [98,] 1.239387e-04 2.478774e-04 0.9998761 [99,] 5.967598e-04 1.193520e-03 0.9994032 > postscript(file="/var/www/html/rcomp/tmp/1c4de1260867555.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/2zsf11260867555.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/36uov1260867555.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/419ve1260867555.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/5m1dv1260867555.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 = 132 Frequency = 1 1 2 3 4 5 6 141.749545 215.967727 -200.932273 358.104091 -157.450455 315.376818 7 8 9 10 11 12 407.540455 126.867727 -4.667727 -554.113182 -532.676818 491.805000 13 14 15 16 17 18 -857.622727 -891.304545 -679.304545 -650.168182 -1193.522727 -565.495455 19 20 21 22 23 24 -635.831818 29.695455 -96.540000 -772.785455 -70.649091 820.432727 25 26 27 28 29 30 -655.195000 360.923182 193.823182 -402.840455 1094.605000 -560.867727 31 32 33 34 35 36 -65.204091 522.623182 296.187727 607.142273 683.878636 868.760455 37 38 39 40 41 42 901.432727 477.350909 446.050909 -334.312727 526.032727 -244.740000 43 44 45 46 47 48 26.423636 213.450909 381.805455 770.560000 571.196364 200.278182 49 50 51 52 53 54 463.150455 161.268636 -22.731364 697.205000 531.750455 -383.022273 55 56 57 58 59 60 701.941364 204.868636 25.533182 586.887727 -11.175909 -212.094091 61 62 63 64 65 66 7.278182 -172.403636 -413.703636 18.032727 -210.221818 -578.894545 67 68 69 70 71 72 5.369091 -1001.103636 -224.439091 -148.984545 -721.048182 -12.866364 73 74 75 76 77 78 -743.994091 -473.375909 83.924091 61.960455 -900.994091 140.033182 79 80 81 82 83 84 -93.803182 -161.675909 287.688636 3.743182 612.079545 982.361364 85 86 87 88 89 90 -413.066364 -119.348182 272.051818 268.988182 -485.666364 -295.439091 91 92 93 94 95 96 -1020.875455 -79.248182 28.016364 -1147.129091 751.607273 1102.189091 97 98 99 100 101 102 -182.338636 -256.420455 746.979545 -1029.484091 456.661364 354.188636 103 104 105 106 107 108 -469.847727 161.779545 -193.555909 -97.601364 658.735000 -459.583182 109 110 111 112 113 114 219.989091 -447.392727 -7.992727 -684.656364 68.389091 40.816364 115 116 117 118 119 120 -60.020000 -16.192727 -810.028182 719.026364 521.462727 -1004.255455 121 122 123 124 125 126 1118.616818 1144.735000 -418.165000 1697.171364 270.416818 1778.044091 127 128 129 130 131 132 1204.307727 -1.065000 309.999545 33.254091 -2463.409545 -2777.027727 > postscript(file="/var/www/html/rcomp/tmp/6yp2c1260867555.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 = 132 Frequency = 1 lag(myerror, k = 1) myerror 0 141.749545 NA 1 215.967727 141.749545 2 -200.932273 215.967727 3 358.104091 -200.932273 4 -157.450455 358.104091 5 315.376818 -157.450455 6 407.540455 315.376818 7 126.867727 407.540455 8 -4.667727 126.867727 9 -554.113182 -4.667727 10 -532.676818 -554.113182 11 491.805000 -532.676818 12 -857.622727 491.805000 13 -891.304545 -857.622727 14 -679.304545 -891.304545 15 -650.168182 -679.304545 16 -1193.522727 -650.168182 17 -565.495455 -1193.522727 18 -635.831818 -565.495455 19 29.695455 -635.831818 20 -96.540000 29.695455 21 -772.785455 -96.540000 22 -70.649091 -772.785455 23 820.432727 -70.649091 24 -655.195000 820.432727 25 360.923182 -655.195000 26 193.823182 360.923182 27 -402.840455 193.823182 28 1094.605000 -402.840455 29 -560.867727 1094.605000 30 -65.204091 -560.867727 31 522.623182 -65.204091 32 296.187727 522.623182 33 607.142273 296.187727 34 683.878636 607.142273 35 868.760455 683.878636 36 901.432727 868.760455 37 477.350909 901.432727 38 446.050909 477.350909 39 -334.312727 446.050909 40 526.032727 -334.312727 41 -244.740000 526.032727 42 26.423636 -244.740000 43 213.450909 26.423636 44 381.805455 213.450909 45 770.560000 381.805455 46 571.196364 770.560000 47 200.278182 571.196364 48 463.150455 200.278182 49 161.268636 463.150455 50 -22.731364 161.268636 51 697.205000 -22.731364 52 531.750455 697.205000 53 -383.022273 531.750455 54 701.941364 -383.022273 55 204.868636 701.941364 56 25.533182 204.868636 57 586.887727 25.533182 58 -11.175909 586.887727 59 -212.094091 -11.175909 60 7.278182 -212.094091 61 -172.403636 7.278182 62 -413.703636 -172.403636 63 18.032727 -413.703636 64 -210.221818 18.032727 65 -578.894545 -210.221818 66 5.369091 -578.894545 67 -1001.103636 5.369091 68 -224.439091 -1001.103636 69 -148.984545 -224.439091 70 -721.048182 -148.984545 71 -12.866364 -721.048182 72 -743.994091 -12.866364 73 -473.375909 -743.994091 74 83.924091 -473.375909 75 61.960455 83.924091 76 -900.994091 61.960455 77 140.033182 -900.994091 78 -93.803182 140.033182 79 -161.675909 -93.803182 80 287.688636 -161.675909 81 3.743182 287.688636 82 612.079545 3.743182 83 982.361364 612.079545 84 -413.066364 982.361364 85 -119.348182 -413.066364 86 272.051818 -119.348182 87 268.988182 272.051818 88 -485.666364 268.988182 89 -295.439091 -485.666364 90 -1020.875455 -295.439091 91 -79.248182 -1020.875455 92 28.016364 -79.248182 93 -1147.129091 28.016364 94 751.607273 -1147.129091 95 1102.189091 751.607273 96 -182.338636 1102.189091 97 -256.420455 -182.338636 98 746.979545 -256.420455 99 -1029.484091 746.979545 100 456.661364 -1029.484091 101 354.188636 456.661364 102 -469.847727 354.188636 103 161.779545 -469.847727 104 -193.555909 161.779545 105 -97.601364 -193.555909 106 658.735000 -97.601364 107 -459.583182 658.735000 108 219.989091 -459.583182 109 -447.392727 219.989091 110 -7.992727 -447.392727 111 -684.656364 -7.992727 112 68.389091 -684.656364 113 40.816364 68.389091 114 -60.020000 40.816364 115 -16.192727 -60.020000 116 -810.028182 -16.192727 117 719.026364 -810.028182 118 521.462727 719.026364 119 -1004.255455 521.462727 120 1118.616818 -1004.255455 121 1144.735000 1118.616818 122 -418.165000 1144.735000 123 1697.171364 -418.165000 124 270.416818 1697.171364 125 1778.044091 270.416818 126 1204.307727 1778.044091 127 -1.065000 1204.307727 128 309.999545 -1.065000 129 33.254091 309.999545 130 -2463.409545 33.254091 131 -2777.027727 -2463.409545 132 NA -2777.027727 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 215.967727 141.749545 [2,] -200.932273 215.967727 [3,] 358.104091 -200.932273 [4,] -157.450455 358.104091 [5,] 315.376818 -157.450455 [6,] 407.540455 315.376818 [7,] 126.867727 407.540455 [8,] -4.667727 126.867727 [9,] -554.113182 -4.667727 [10,] -532.676818 -554.113182 [11,] 491.805000 -532.676818 [12,] -857.622727 491.805000 [13,] -891.304545 -857.622727 [14,] -679.304545 -891.304545 [15,] -650.168182 -679.304545 [16,] -1193.522727 -650.168182 [17,] -565.495455 -1193.522727 [18,] -635.831818 -565.495455 [19,] 29.695455 -635.831818 [20,] -96.540000 29.695455 [21,] -772.785455 -96.540000 [22,] -70.649091 -772.785455 [23,] 820.432727 -70.649091 [24,] -655.195000 820.432727 [25,] 360.923182 -655.195000 [26,] 193.823182 360.923182 [27,] -402.840455 193.823182 [28,] 1094.605000 -402.840455 [29,] -560.867727 1094.605000 [30,] -65.204091 -560.867727 [31,] 522.623182 -65.204091 [32,] 296.187727 522.623182 [33,] 607.142273 296.187727 [34,] 683.878636 607.142273 [35,] 868.760455 683.878636 [36,] 901.432727 868.760455 [37,] 477.350909 901.432727 [38,] 446.050909 477.350909 [39,] -334.312727 446.050909 [40,] 526.032727 -334.312727 [41,] -244.740000 526.032727 [42,] 26.423636 -244.740000 [43,] 213.450909 26.423636 [44,] 381.805455 213.450909 [45,] 770.560000 381.805455 [46,] 571.196364 770.560000 [47,] 200.278182 571.196364 [48,] 463.150455 200.278182 [49,] 161.268636 463.150455 [50,] -22.731364 161.268636 [51,] 697.205000 -22.731364 [52,] 531.750455 697.205000 [53,] -383.022273 531.750455 [54,] 701.941364 -383.022273 [55,] 204.868636 701.941364 [56,] 25.533182 204.868636 [57,] 586.887727 25.533182 [58,] -11.175909 586.887727 [59,] -212.094091 -11.175909 [60,] 7.278182 -212.094091 [61,] -172.403636 7.278182 [62,] -413.703636 -172.403636 [63,] 18.032727 -413.703636 [64,] -210.221818 18.032727 [65,] -578.894545 -210.221818 [66,] 5.369091 -578.894545 [67,] -1001.103636 5.369091 [68,] -224.439091 -1001.103636 [69,] -148.984545 -224.439091 [70,] -721.048182 -148.984545 [71,] -12.866364 -721.048182 [72,] -743.994091 -12.866364 [73,] -473.375909 -743.994091 [74,] 83.924091 -473.375909 [75,] 61.960455 83.924091 [76,] -900.994091 61.960455 [77,] 140.033182 -900.994091 [78,] -93.803182 140.033182 [79,] -161.675909 -93.803182 [80,] 287.688636 -161.675909 [81,] 3.743182 287.688636 [82,] 612.079545 3.743182 [83,] 982.361364 612.079545 [84,] -413.066364 982.361364 [85,] -119.348182 -413.066364 [86,] 272.051818 -119.348182 [87,] 268.988182 272.051818 [88,] -485.666364 268.988182 [89,] -295.439091 -485.666364 [90,] -1020.875455 -295.439091 [91,] -79.248182 -1020.875455 [92,] 28.016364 -79.248182 [93,] -1147.129091 28.016364 [94,] 751.607273 -1147.129091 [95,] 1102.189091 751.607273 [96,] -182.338636 1102.189091 [97,] -256.420455 -182.338636 [98,] 746.979545 -256.420455 [99,] -1029.484091 746.979545 [100,] 456.661364 -1029.484091 [101,] 354.188636 456.661364 [102,] -469.847727 354.188636 [103,] 161.779545 -469.847727 [104,] -193.555909 161.779545 [105,] -97.601364 -193.555909 [106,] 658.735000 -97.601364 [107,] -459.583182 658.735000 [108,] 219.989091 -459.583182 [109,] -447.392727 219.989091 [110,] -7.992727 -447.392727 [111,] -684.656364 -7.992727 [112,] 68.389091 -684.656364 [113,] 40.816364 68.389091 [114,] -60.020000 40.816364 [115,] -16.192727 -60.020000 [116,] -810.028182 -16.192727 [117,] 719.026364 -810.028182 [118,] 521.462727 719.026364 [119,] -1004.255455 521.462727 [120,] 1118.616818 -1004.255455 [121,] 1144.735000 1118.616818 [122,] -418.165000 1144.735000 [123,] 1697.171364 -418.165000 [124,] 270.416818 1697.171364 [125,] 1778.044091 270.416818 [126,] 1204.307727 1778.044091 [127,] -1.065000 1204.307727 [128,] 309.999545 -1.065000 [129,] 33.254091 309.999545 [130,] -2463.409545 33.254091 [131,] -2777.027727 -2463.409545 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 215.967727 141.749545 2 -200.932273 215.967727 3 358.104091 -200.932273 4 -157.450455 358.104091 5 315.376818 -157.450455 6 407.540455 315.376818 7 126.867727 407.540455 8 -4.667727 126.867727 9 -554.113182 -4.667727 10 -532.676818 -554.113182 11 491.805000 -532.676818 12 -857.622727 491.805000 13 -891.304545 -857.622727 14 -679.304545 -891.304545 15 -650.168182 -679.304545 16 -1193.522727 -650.168182 17 -565.495455 -1193.522727 18 -635.831818 -565.495455 19 29.695455 -635.831818 20 -96.540000 29.695455 21 -772.785455 -96.540000 22 -70.649091 -772.785455 23 820.432727 -70.649091 24 -655.195000 820.432727 25 360.923182 -655.195000 26 193.823182 360.923182 27 -402.840455 193.823182 28 1094.605000 -402.840455 29 -560.867727 1094.605000 30 -65.204091 -560.867727 31 522.623182 -65.204091 32 296.187727 522.623182 33 607.142273 296.187727 34 683.878636 607.142273 35 868.760455 683.878636 36 901.432727 868.760455 37 477.350909 901.432727 38 446.050909 477.350909 39 -334.312727 446.050909 40 526.032727 -334.312727 41 -244.740000 526.032727 42 26.423636 -244.740000 43 213.450909 26.423636 44 381.805455 213.450909 45 770.560000 381.805455 46 571.196364 770.560000 47 200.278182 571.196364 48 463.150455 200.278182 49 161.268636 463.150455 50 -22.731364 161.268636 51 697.205000 -22.731364 52 531.750455 697.205000 53 -383.022273 531.750455 54 701.941364 -383.022273 55 204.868636 701.941364 56 25.533182 204.868636 57 586.887727 25.533182 58 -11.175909 586.887727 59 -212.094091 -11.175909 60 7.278182 -212.094091 61 -172.403636 7.278182 62 -413.703636 -172.403636 63 18.032727 -413.703636 64 -210.221818 18.032727 65 -578.894545 -210.221818 66 5.369091 -578.894545 67 -1001.103636 5.369091 68 -224.439091 -1001.103636 69 -148.984545 -224.439091 70 -721.048182 -148.984545 71 -12.866364 -721.048182 72 -743.994091 -12.866364 73 -473.375909 -743.994091 74 83.924091 -473.375909 75 61.960455 83.924091 76 -900.994091 61.960455 77 140.033182 -900.994091 78 -93.803182 140.033182 79 -161.675909 -93.803182 80 287.688636 -161.675909 81 3.743182 287.688636 82 612.079545 3.743182 83 982.361364 612.079545 84 -413.066364 982.361364 85 -119.348182 -413.066364 86 272.051818 -119.348182 87 268.988182 272.051818 88 -485.666364 268.988182 89 -295.439091 -485.666364 90 -1020.875455 -295.439091 91 -79.248182 -1020.875455 92 28.016364 -79.248182 93 -1147.129091 28.016364 94 751.607273 -1147.129091 95 1102.189091 751.607273 96 -182.338636 1102.189091 97 -256.420455 -182.338636 98 746.979545 -256.420455 99 -1029.484091 746.979545 100 456.661364 -1029.484091 101 354.188636 456.661364 102 -469.847727 354.188636 103 161.779545 -469.847727 104 -193.555909 161.779545 105 -97.601364 -193.555909 106 658.735000 -97.601364 107 -459.583182 658.735000 108 219.989091 -459.583182 109 -447.392727 219.989091 110 -7.992727 -447.392727 111 -684.656364 -7.992727 112 68.389091 -684.656364 113 40.816364 68.389091 114 -60.020000 40.816364 115 -16.192727 -60.020000 116 -810.028182 -16.192727 117 719.026364 -810.028182 118 521.462727 719.026364 119 -1004.255455 521.462727 120 1118.616818 -1004.255455 121 1144.735000 1118.616818 122 -418.165000 1144.735000 123 1697.171364 -418.165000 124 270.416818 1697.171364 125 1778.044091 270.416818 126 1204.307727 1778.044091 127 -1.065000 1204.307727 128 309.999545 -1.065000 129 33.254091 309.999545 130 -2463.409545 33.254091 131 -2777.027727 -2463.409545 > 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/7m17p1260867555.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/83yqd1260867555.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/9b6cy1260867555.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/10u0711260867555.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/11vcb61260867555.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/12wy1t1260867555.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/13sufd1260867555.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/14xznf1260867555.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/154vlc1260867555.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/166n681260867556.tab") + } > > try(system("convert tmp/1c4de1260867555.ps tmp/1c4de1260867555.png",intern=TRUE)) character(0) > try(system("convert tmp/2zsf11260867555.ps tmp/2zsf11260867555.png",intern=TRUE)) character(0) > try(system("convert tmp/36uov1260867555.ps tmp/36uov1260867555.png",intern=TRUE)) character(0) > try(system("convert tmp/419ve1260867555.ps tmp/419ve1260867555.png",intern=TRUE)) character(0) > try(system("convert tmp/5m1dv1260867555.ps tmp/5m1dv1260867555.png",intern=TRUE)) character(0) > try(system("convert tmp/6yp2c1260867555.ps tmp/6yp2c1260867555.png",intern=TRUE)) character(0) > try(system("convert tmp/7m17p1260867555.ps tmp/7m17p1260867555.png",intern=TRUE)) character(0) > try(system("convert tmp/83yqd1260867555.ps tmp/83yqd1260867555.png",intern=TRUE)) character(0) > try(system("convert tmp/9b6cy1260867555.ps tmp/9b6cy1260867555.png",intern=TRUE)) character(0) > try(system("convert tmp/10u0711260867555.ps tmp/10u0711260867555.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 3.367 1.716 4.864