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. Natural language support but running in an English locale 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(24 + ,11 + ,12 + ,26 + ,14 + ,25 + ,7 + ,8 + ,23 + ,11 + ,17 + ,17 + ,8 + ,25 + ,6 + ,18 + ,10 + ,8 + ,23 + ,12 + ,18 + ,12 + ,9 + ,19 + ,8 + ,16 + ,12 + ,7 + ,29 + ,10 + ,20 + ,11 + ,4 + ,25 + ,10 + ,16 + ,11 + ,11 + ,21 + ,11 + ,18 + ,12 + ,7 + ,22 + ,16 + ,17 + ,13 + ,7 + ,25 + ,11 + ,23 + ,14 + ,12 + ,24 + ,13 + ,30 + ,16 + ,10 + ,18 + ,12 + ,23 + ,11 + ,10 + ,22 + ,8 + ,18 + ,10 + ,8 + ,15 + ,12 + ,15 + ,11 + ,8 + ,22 + ,11 + ,12 + ,15 + ,4 + ,28 + ,4 + ,21 + ,9 + ,9 + ,20 + ,9 + ,15 + ,11 + ,8 + ,12 + ,8 + ,20 + ,17 + ,7 + ,24 + ,8 + ,31 + ,17 + ,11 + ,20 + ,14 + ,27 + ,11 + ,9 + ,21 + ,15 + ,34 + ,18 + ,11 + ,20 + ,16 + ,21 + ,14 + ,13 + ,21 + ,9 + ,31 + ,10 + ,8 + ,23 + ,14 + ,19 + ,11 + ,8 + ,28 + ,11 + ,16 + ,15 + ,9 + ,24 + ,8 + ,20 + ,15 + ,6 + ,24 + ,9 + ,21 + ,13 + ,9 + ,24 + ,9 + ,22 + ,16 + ,9 + ,23 + ,9 + ,17 + ,13 + ,6 + ,23 + ,9 + ,24 + ,9 + ,6 + ,29 + ,10 + ,25 + ,18 + ,16 + ,24 + ,16 + ,26 + ,18 + ,5 + ,18 + ,11 + ,25 + ,12 + ,7 + ,25 + ,8 + ,17 + ,17 + ,9 + ,21 + ,9 + ,32 + ,9 + ,6 + ,26 + ,16 + ,33 + ,9 + ,6 + ,22 + ,11 + ,13 + ,12 + ,5 + ,22 + ,16 + ,32 + ,18 + ,12 + ,22 + ,12 + ,25 + ,12 + ,7 + ,23 + ,12 + ,29 + ,18 + ,10 + ,30 + ,14 + ,22 + ,14 + ,9 + ,23 + ,9 + ,18 + ,15 + ,8 + ,17 + ,10 + ,17 + ,16 + ,5 + ,23 + ,9 + ,20 + ,10 + ,8 + ,23 + ,10 + ,15 + ,11 + ,8 + ,25 + ,12 + ,20 + ,14 + ,10 + ,24 + ,14 + ,33 + ,9 + ,6 + ,24 + ,14 + ,29 + ,12 + ,8 + ,23 + ,10 + ,23 + ,17 + ,7 + ,21 + ,14 + ,26 + ,5 + ,4 + ,24 + ,16 + ,18 + ,12 + ,8 + ,24 + ,9 + ,20 + ,12 + ,8 + ,28 + ,10 + ,11 + ,6 + ,4 + ,16 + ,6 + ,28 + ,24 + ,20 + ,20 + ,8 + ,26 + ,12 + ,8 + ,29 + ,13 + ,22 + ,12 + ,8 + ,27 + ,10 + ,17 + ,14 + ,6 + ,22 + ,8 + ,12 + ,7 + ,4 + ,28 + ,7 + ,14 + ,13 + ,8 + ,16 + ,15 + ,17 + ,12 + ,9 + ,25 + ,9 + ,21 + ,13 + ,6 + ,24 + ,10 + ,19 + ,14 + ,7 + ,28 + ,12 + ,18 + ,8 + ,9 + ,24 + ,13 + ,10 + ,11 + ,5 + ,23 + ,10 + ,29 + ,9 + ,5 + ,30 + ,11 + ,31 + ,11 + ,8 + ,24 + ,8 + ,19 + ,13 + ,8 + ,21 + ,9 + ,9 + ,10 + ,6 + ,25 + ,13 + ,20 + ,11 + ,8 + ,25 + ,11 + ,28 + ,12 + ,7 + ,22 + ,8 + ,19 + ,9 + ,7 + ,23 + ,9 + ,30 + ,15 + ,9 + ,26 + ,9 + ,29 + ,18 + ,11 + ,23 + ,15 + ,26 + ,15 + ,6 + ,25 + ,9 + ,23 + ,12 + ,8 + ,21 + ,10 + ,13 + ,13 + ,6 + ,25 + ,14 + ,21 + ,14 + ,9 + ,24 + ,12 + ,19 + ,10 + ,8 + ,29 + ,12 + ,28 + ,13 + ,6 + ,22 + ,11 + ,23 + ,13 + ,10 + ,27 + ,14 + ,18 + ,11 + ,8 + ,26 + ,6 + ,21 + ,13 + ,8 + ,22 + ,12 + ,20 + ,16 + ,10 + ,24 + ,8 + ,23 + ,8 + ,5 + ,27 + ,14 + ,21 + ,16 + ,7 + ,24 + ,11 + ,21 + ,11 + ,5 + ,24 + ,10 + ,15 + ,9 + ,8 + ,29 + ,14 + ,28 + ,16 + ,14 + ,22 + ,12 + ,19 + ,12 + ,7 + ,21 + ,10 + ,26 + ,14 + ,8 + ,24 + ,14 + ,10 + ,8 + ,6 + ,24 + ,5 + ,16 + ,9 + ,5 + ,23 + ,11 + ,22 + ,15 + ,6 + ,20 + ,10 + ,19 + ,11 + ,10 + ,27 + ,9 + ,31 + ,21 + ,12 + ,26 + ,10 + ,31 + ,14 + ,9 + ,25 + ,16 + ,29 + ,18 + ,12 + ,21 + ,13 + ,19 + ,12 + ,7 + ,21 + ,9 + ,22 + ,13 + ,8 + ,19 + ,10 + ,23 + ,15 + ,10 + ,21 + ,10 + ,15 + ,12 + ,6 + ,21 + ,7 + ,20 + ,19 + ,10 + ,16 + ,9 + ,18 + ,15 + ,10 + ,22 + ,8 + ,23 + ,11 + ,10 + ,29 + ,14 + ,25 + ,11 + ,5 + ,15 + ,14 + ,21 + ,10 + ,7 + ,17 + ,8 + ,24 + ,13 + ,10 + ,15 + ,9 + ,25 + ,15 + ,11 + ,21 + ,14 + ,17 + ,12 + ,6 + ,21 + ,14 + ,13 + ,12 + ,7 + ,19 + ,8 + ,28 + ,16 + ,12 + ,24 + ,8 + ,21 + ,9 + ,11 + ,20 + ,8 + ,25 + ,18 + ,11 + ,17 + ,7 + ,9 + ,8 + ,11 + ,23 + ,6 + ,16 + ,13 + ,5 + ,24 + ,8 + ,19 + ,17 + ,8 + ,14 + ,6 + ,17 + ,9 + ,6 + ,19 + ,11 + ,25 + ,15 + ,9 + ,24 + ,14 + ,20 + ,8 + ,4 + ,13 + ,11 + ,29 + ,7 + ,4 + ,22 + ,11 + ,14 + ,12 + ,7 + ,16 + ,11 + ,22 + ,14 + ,11 + ,19 + ,14 + ,15 + ,6 + ,6 + ,25 + ,8 + ,19 + ,8 + ,7 + ,25 + ,20 + ,20 + ,17 + ,8 + ,23 + ,11 + ,15 + ,10 + ,4 + ,24 + ,8 + ,20 + ,11 + ,8 + ,26 + ,11 + ,18 + ,14 + ,9 + ,26 + ,10 + ,33 + ,11 + ,8 + ,25 + ,14 + ,22 + ,13 + ,11 + ,18 + ,11 + ,16 + ,12 + ,8 + ,21 + ,9 + ,17 + ,11 + ,5 + ,26 + ,9 + ,16 + ,9 + ,4 + ,23 + ,8 + ,21 + ,12 + ,8 + ,23 + ,10 + ,26 + ,20 + ,10 + ,22 + ,13 + ,18 + ,12 + ,6 + ,20 + ,13 + ,18 + ,13 + ,9 + ,13 + ,12 + ,17 + ,12 + ,9 + ,24 + ,8 + ,22 + ,12 + ,13 + ,15 + ,13 + ,30 + ,9 + ,9 + ,14 + ,14 + ,30 + ,15 + ,10 + ,22 + ,12 + ,24 + ,24 + ,20 + ,10 + ,14 + ,21 + ,7 + ,5 + ,24 + ,15 + ,21 + ,17 + ,11 + ,22 + ,13 + ,29 + ,11 + ,6 + ,24 + ,16 + ,31 + ,17 + ,9 + ,19 + ,9 + ,20 + ,11 + ,7 + ,20 + ,9 + ,16 + ,12 + ,9 + ,13 + ,9 + ,22 + ,14 + ,10 + ,20 + ,8 + ,20 + ,11 + ,9 + ,22 + ,7 + ,28 + ,16 + ,8 + ,24 + ,16 + ,38 + ,21 + ,7 + ,29 + ,11 + ,22 + ,14 + ,6 + ,12 + ,9 + ,20 + ,20 + ,13 + ,20 + ,11 + ,17 + ,13 + ,6 + ,21 + ,9 + ,28 + ,11 + ,8 + ,24 + ,14 + ,22 + ,15 + ,10 + ,22 + ,13 + ,31 + ,19 + ,16 + ,20 + ,16) + ,dim=c(5 + ,159) + ,dimnames=list(c('CM' + ,'PE' + ,'PC' + ,'O' + ,'D') + ,1:159)) > y <- array(NA,dim=c(5,159),dimnames=list(c('CM','PE','PC','O','D'),1:159)) > for (i in 1:dim(x)[1]) + { + for (j in 1:dim(x)[2]) + { + y[i,j] <- as.numeric(x[i,j]) + } + } > par3 = 'No Linear Trend' > par2 = 'Do not include Seasonal Dummies' > par1 = '5' > #'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 D CM PE PC O 1 14 24 11 12 26 2 11 25 7 8 23 3 6 17 17 8 25 4 12 18 10 8 23 5 8 18 12 9 19 6 10 16 12 7 29 7 10 20 11 4 25 8 11 16 11 11 21 9 16 18 12 7 22 10 11 17 13 7 25 11 13 23 14 12 24 12 12 30 16 10 18 13 8 23 11 10 22 14 12 18 10 8 15 15 11 15 11 8 22 16 4 12 15 4 28 17 9 21 9 9 20 18 8 15 11 8 12 19 8 20 17 7 24 20 14 31 17 11 20 21 15 27 11 9 21 22 16 34 18 11 20 23 9 21 14 13 21 24 14 31 10 8 23 25 11 19 11 8 28 26 8 16 15 9 24 27 9 20 15 6 24 28 9 21 13 9 24 29 9 22 16 9 23 30 9 17 13 6 23 31 10 24 9 6 29 32 16 25 18 16 24 33 11 26 18 5 18 34 8 25 12 7 25 35 9 17 17 9 21 36 16 32 9 6 26 37 11 33 9 6 22 38 16 13 12 5 22 39 12 32 18 12 22 40 12 25 12 7 23 41 14 29 18 10 30 42 9 22 14 9 23 43 10 18 15 8 17 44 9 17 16 5 23 45 10 20 10 8 23 46 12 15 11 8 25 47 14 20 14 10 24 48 14 33 9 6 24 49 10 29 12 8 23 50 14 23 17 7 21 51 16 26 5 4 24 52 9 18 12 8 24 53 10 20 12 8 28 54 6 11 6 4 16 55 8 28 24 20 20 56 13 26 12 8 29 57 10 22 12 8 27 58 8 17 14 6 22 59 7 12 7 4 28 60 15 14 13 8 16 61 9 17 12 9 25 62 10 21 13 6 24 63 12 19 14 7 28 64 13 18 8 9 24 65 10 10 11 5 23 66 11 29 9 5 30 67 8 31 11 8 24 68 9 19 13 8 21 69 13 9 10 6 25 70 11 20 11 8 25 71 8 28 12 7 22 72 9 19 9 7 23 73 9 30 15 9 26 74 15 29 18 11 23 75 9 26 15 6 25 76 10 23 12 8 21 77 14 13 13 6 25 78 12 21 14 9 24 79 12 19 10 8 29 80 11 28 13 6 22 81 14 23 13 10 27 82 6 18 11 8 26 83 12 21 13 8 22 84 8 20 16 10 24 85 14 23 8 5 27 86 11 21 16 7 24 87 10 21 11 5 24 88 14 15 9 8 29 89 12 28 16 14 22 90 10 19 12 7 21 91 14 26 14 8 24 92 5 10 8 6 24 93 11 16 9 5 23 94 10 22 15 6 20 95 9 19 11 10 27 96 10 31 21 12 26 97 16 31 14 9 25 98 13 29 18 12 21 99 9 19 12 7 21 100 10 22 13 8 19 101 10 23 15 10 21 102 7 15 12 6 21 103 9 20 19 10 16 104 8 18 15 10 22 105 14 23 11 10 29 106 14 25 11 5 15 107 8 21 10 7 17 108 9 24 13 10 15 109 14 25 15 11 21 110 14 17 12 6 21 111 8 13 12 7 19 112 8 28 16 12 24 113 8 21 9 11 20 114 7 25 18 11 17 115 6 9 8 11 23 116 8 16 13 5 24 117 6 19 17 8 14 118 11 17 9 6 19 119 14 25 15 9 24 120 11 20 8 4 13 121 11 29 7 4 22 122 11 14 12 7 16 123 14 22 14 11 19 124 8 15 6 6 25 125 20 19 8 7 25 126 11 20 17 8 23 127 8 15 10 4 24 128 11 20 11 8 26 129 10 18 14 9 26 130 14 33 11 8 25 131 11 22 13 11 18 132 9 16 12 8 21 133 9 17 11 5 26 134 8 16 9 4 23 135 10 21 12 8 23 136 13 26 20 10 22 137 13 18 12 6 20 138 12 18 13 9 13 139 8 17 12 9 24 140 13 22 12 13 15 141 14 30 9 9 14 142 12 30 15 10 22 143 14 24 24 20 10 144 15 21 7 5 24 145 13 21 17 11 22 146 16 29 11 6 24 147 9 31 17 9 19 148 9 20 11 7 20 149 9 16 12 9 13 150 8 22 14 10 20 151 7 20 11 9 22 152 16 28 16 8 24 153 11 38 21 7 29 154 9 22 14 6 12 155 11 20 20 13 20 156 9 17 13 6 21 157 14 28 11 8 24 158 13 22 15 10 22 159 16 31 19 16 20 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) CM PE PC O 6.49443 0.19971 -0.15244 0.15375 0.03505 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -5.080 -1.807 -0.303 1.734 8.978 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 6.49443 1.60818 4.038 8.46e-05 *** CM 0.19971 0.03856 5.179 6.88e-07 *** PE -0.15244 0.07509 -2.030 0.0441 * PC 0.15375 0.09596 1.602 0.1111 O 0.03505 0.05392 0.650 0.5167 --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 Residual standard error: 2.565 on 154 degrees of freedom Multiple R-squared: 0.1826, Adjusted R-squared: 0.1613 F-statistic: 8.598 on 4 and 154 DF, p-value: 2.736e-06 > 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,] 0.2669435 0.5338869 0.7330565 [2,] 0.9019544 0.1960912 0.0980456 [3,] 0.8412087 0.3175825 0.1587913 [4,] 0.7954734 0.4090532 0.2045266 [5,] 0.7131607 0.5736785 0.2868393 [6,] 0.7930321 0.4139357 0.2069679 [7,] 0.7302362 0.5395276 0.2697638 [8,] 0.6491306 0.7017388 0.3508694 [9,] 0.7033721 0.5932559 0.2966279 [10,] 0.7218337 0.5563326 0.2781663 [11,] 0.6751081 0.6497838 0.3248919 [12,] 0.6050400 0.7899200 0.3949600 [13,] 0.5685995 0.8628010 0.4314005 [14,] 0.5494091 0.9011819 0.4505909 [15,] 0.5298331 0.9403338 0.4701669 [16,] 0.5161461 0.9677078 0.4838539 [17,] 0.4528916 0.9057832 0.5471084 [18,] 0.3858372 0.7716744 0.6141628 [19,] 0.3285941 0.6571882 0.6714059 [20,] 0.2723304 0.5446607 0.7276696 [21,] 0.2451951 0.4903902 0.7548049 [22,] 0.2080081 0.4160161 0.7919919 [23,] 0.1651980 0.3303960 0.8348020 [24,] 0.1542896 0.3085792 0.8457104 [25,] 0.1906218 0.3812436 0.8093782 [26,] 0.1569680 0.3139359 0.8430320 [27,] 0.1955458 0.3910916 0.8044542 [28,] 0.1570148 0.3140297 0.8429852 [29,] 0.1554460 0.3108920 0.8445540 [30,] 0.1680072 0.3360144 0.8319928 [31,] 0.6172093 0.7655813 0.3827907 [32,] 0.5735402 0.8529196 0.4264598 [33,] 0.5211332 0.9577335 0.4788668 [34,] 0.4966106 0.9932212 0.5033894 [35,] 0.4732746 0.9465493 0.5267254 [36,] 0.4208455 0.8416910 0.5791545 [37,] 0.3706632 0.7413263 0.6293368 [38,] 0.3271925 0.6543850 0.6728075 [39,] 0.3173419 0.6346838 0.6826581 [40,] 0.3417084 0.6834167 0.6582916 [41,] 0.2975835 0.5951671 0.7024165 [42,] 0.2964128 0.5928255 0.7035872 [43,] 0.3415938 0.6831876 0.6584062 [44,] 0.3961996 0.7923992 0.6038004 [45,] 0.3609591 0.7219183 0.6390409 [46,] 0.3191609 0.6383219 0.6808391 [47,] 0.3256008 0.6512015 0.6743992 [48,] 0.4096888 0.8193775 0.5903112 [49,] 0.3668574 0.7337148 0.6331426 [50,] 0.3319738 0.6639476 0.6680262 [51,] 0.3011674 0.6023348 0.6988326 [52,] 0.2924357 0.5848713 0.7075643 [53,] 0.4855912 0.9711824 0.5144088 [54,] 0.4482319 0.8964637 0.5517681 [55,] 0.4027766 0.8055532 0.5972234 [56,] 0.3822802 0.7645603 0.6177198 [57,] 0.3630370 0.7260740 0.6369630 [58,] 0.3357710 0.6715421 0.6642290 [59,] 0.3111284 0.6222567 0.6888716 [60,] 0.4381830 0.8763659 0.5618170 [61,] 0.4040185 0.8080370 0.5959815 [62,] 0.4910176 0.9820352 0.5089824 [63,] 0.4443145 0.8886290 0.5556855 [64,] 0.5147665 0.9704670 0.4852335 [65,] 0.4919462 0.9838923 0.5080538 [66,] 0.5293544 0.9412911 0.4706456 [67,] 0.5459894 0.9080213 0.4540106 [68,] 0.5328910 0.9342180 0.4671090 [69,] 0.4979594 0.9959187 0.5020406 [70,] 0.6367510 0.7264979 0.3632490 [71,] 0.6025792 0.7948415 0.3974208 [72,] 0.5636926 0.8726148 0.4363074 [73,] 0.5247086 0.9505828 0.4752914 [74,] 0.5177227 0.9645545 0.4822773 [75,] 0.6139895 0.7720210 0.3860105 [76,] 0.5798067 0.8403866 0.4201933 [77,] 0.5725900 0.8548199 0.4274100 [78,] 0.5628986 0.8742028 0.4371014 [79,] 0.5224891 0.9550218 0.4775109 [80,] 0.4787678 0.9575355 0.5212322 [81,] 0.5278789 0.9442422 0.4721211 [82,] 0.4856246 0.9712491 0.5143754 [83,] 0.4395422 0.8790844 0.5604578 [84,] 0.4310678 0.8621355 0.5689322 [85,] 0.4884975 0.9769950 0.5115025 [86,] 0.4518038 0.9036077 0.5481962 [87,] 0.4054944 0.8109887 0.5945056 [88,] 0.3895746 0.7791493 0.6104254 [89,] 0.3845566 0.7691132 0.6154434 [90,] 0.3972333 0.7944667 0.6027667 [91,] 0.3556968 0.7113936 0.6443032 [92,] 0.3215117 0.6430233 0.6784883 [93,] 0.2837171 0.5674341 0.7162829 [94,] 0.2516149 0.5032297 0.7483851 [95,] 0.2398160 0.4796320 0.7601840 [96,] 0.2055099 0.4110197 0.7944901 [97,] 0.1931255 0.3862510 0.8068745 [98,] 0.1763854 0.3527707 0.8236146 [99,] 0.1825324 0.3650648 0.8174676 [100,] 0.1866757 0.3733514 0.8133243 [101,] 0.1823248 0.3646496 0.8176752 [102,] 0.1727281 0.3454562 0.8272719 [103,] 0.2344217 0.4688435 0.7655783 [104,] 0.2005430 0.4010860 0.7994570 [105,] 0.2890126 0.5780252 0.7109874 [106,] 0.3645711 0.7291421 0.6354289 [107,] 0.4520552 0.9041104 0.5479448 [108,] 0.5434120 0.9131761 0.4565880 [109,] 0.4986325 0.9972651 0.5013675 [110,] 0.5200105 0.9599790 0.4799895 [111,] 0.4713005 0.9426011 0.5286995 [112,] 0.4555952 0.9111903 0.5444048 [113,] 0.4096494 0.8192988 0.5903506 [114,] 0.3817009 0.7634018 0.6182991 [115,] 0.3651317 0.7302634 0.6348683 [116,] 0.3550213 0.7100427 0.6449787 [117,] 0.3714592 0.7429183 0.6285408 [118,] 0.8879528 0.2240943 0.1120472 [119,] 0.8642019 0.2715961 0.1357981 [120,] 0.8315738 0.3368523 0.1684262 [121,] 0.7888014 0.4223971 0.2111986 [122,] 0.7403578 0.5192845 0.2596422 [123,] 0.6871873 0.6256253 0.3128127 [124,] 0.6358321 0.7283357 0.3641679 [125,] 0.5780304 0.8439392 0.4219696 [126,] 0.5148788 0.9702425 0.4851212 [127,] 0.4670790 0.9341580 0.5329210 [128,] 0.4163713 0.8327427 0.5836287 [129,] 0.3812882 0.7625764 0.6187118 [130,] 0.4300106 0.8600213 0.5699894 [131,] 0.4166673 0.8333346 0.5833327 [132,] 0.4336840 0.8673679 0.5663160 [133,] 0.3619304 0.7238608 0.6380696 [134,] 0.2913488 0.5826976 0.7086512 [135,] 0.2448634 0.4897268 0.7551366 [136,] 0.2303895 0.4607790 0.7696105 [137,] 0.2435469 0.4870937 0.7564531 [138,] 0.2142421 0.4284843 0.7857579 [139,] 0.2884901 0.5769801 0.7115099 [140,] 0.3205216 0.6410431 0.6794784 [141,] 0.2307917 0.4615835 0.7692083 [142,] 0.1495431 0.2990861 0.8504569 [143,] 0.1649303 0.3298606 0.8350697 [144,] 0.4968480 0.9936960 0.5031520 > postscript(file="/var/www/html/freestat/rcomp/tmp/16ii61290544173.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/freestat/rcomp/tmp/26ii61290544173.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/freestat/rcomp/tmp/3zs0r1290544173.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/freestat/rcomp/tmp/4zs0r1290544173.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/freestat/rcomp/tmp/5zs0r1290544173.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 = 159 Frequency = 1 1 2 3 4 5 6 1.63306064 -1.45623452 -3.40428257 1.39904173 -2.30964604 0.04680171 7 8 9 10 11 12 -0.30301509 0.55972858 5.89271980 1.13972230 1.36017839 -0.21511203 13 14 15 16 17 18 -3.71952815 1.67942604 1.18565458 -4.20073634 -2.40113395 -1.46386503 19 20 21 22 23 24 -1.81460684 1.51376534 2.67043849 3.06707559 -2.28901428 0.80282349 25 26 27 28 29 30 0.17652996 -1.62815547 -0.96572691 -1.93157600 -1.63892448 -0.63642664 31 32 33 34 35 36 -1.85442864 3.95549038 0.65737432 -3.61038798 -0.41784540 2.65304271 37 38 39 40 41 42 -2.40647422 7.19877524 -0.75735728 0.45970809 1.86889565 -1.94379953 43 44 45 46 47 48 0.37151759 -0.02535908 -1.00037646 2.08051046 3.26681564 0.52342970 49 50 51 52 53 54 -2.49288327 3.69140999 3.61915322 -1.33113126 -0.87074161 -2.95238851 55 56 57 58 59 60 -4.20383952 0.89595578 -1.23511176 -1.44894107 -2.42023655 5.90052696 61 62 63 64 65 66 -1.32022519 -0.47031106 1.78759752 1.90536365 1.61041696 -1.73426718 67 68 69 70 71 72 -5.07978702 -1.27325871 4.43383747 0.08196498 -4.10437115 -1.79934991 73 74 75 76 77 78 -3.49417889 2.96047694 -2.19902952 -1.22453262 5.09231367 1.22086152 79 80 81 82 83 84 0.98904440 -0.79817864 2.41010671 -4.55366487 1.29227506 -2.42830931 85 86 87 88 89 90 2.41669399 0.83324654 -0.62143113 3.63544325 -0.57090592 -0.27194126 91 92 93 94 95 96 2.37607103 -4.03569864 1.10728734 -0.22495294 -2.09593196 -2.24052777 97 98 99 100 101 102 3.18872253 0.87681804 -1.27194126 -0.80228992 -1.07473000 -2.31934989 103 104 105 106 107 108 -0.69061242 -2.11123257 2.03513558 2.89516485 -2.83604234 -2.36902591 109 110 111 112 113 114 2.37209682 4.28123192 -1.00359061 -4.33349204 -3.70864391 -4.03039844 115 116 117 118 119 120 -3.56971641 -1.31801060 -3.41817233 0.89401542 2.57446267 0.66024881 121 122 123 124 125 126 -1.60500293 1.90184442 2.88888266 -2.37416721 8.97811648 1.06668622 127 128 129 130 131 132 -1.42185910 0.04691694 -0.25010727 0.48574675 -0.22850682 -0.82656895 133 134 135 136 137 138 -0.89269082 -1.73895768 -0.89521051 2.05328230 3.11657086 2.05307972 139 140 141 142 143 144 -2.28517715 1.41668981 1.01177243 -0.50774171 2.94547725 3.76881877 145 146 147 148 149 150 2.44076022 3.62714113 -3.14367665 -1.58903984 -0.69993962 -2.99241039 151 152 153 154 155 156 -3.96664588 4.28152789 -1.97486065 -1.09700615 0.86036801 -0.56633056 157 158 159 1.51934026 2.08993105 3.04986549 > postscript(file="/var/www/html/freestat/rcomp/tmp/6sjzu1290544173.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 = 159 Frequency = 1 lag(myerror, k = 1) myerror 0 1.63306064 NA 1 -1.45623452 1.63306064 2 -3.40428257 -1.45623452 3 1.39904173 -3.40428257 4 -2.30964604 1.39904173 5 0.04680171 -2.30964604 6 -0.30301509 0.04680171 7 0.55972858 -0.30301509 8 5.89271980 0.55972858 9 1.13972230 5.89271980 10 1.36017839 1.13972230 11 -0.21511203 1.36017839 12 -3.71952815 -0.21511203 13 1.67942604 -3.71952815 14 1.18565458 1.67942604 15 -4.20073634 1.18565458 16 -2.40113395 -4.20073634 17 -1.46386503 -2.40113395 18 -1.81460684 -1.46386503 19 1.51376534 -1.81460684 20 2.67043849 1.51376534 21 3.06707559 2.67043849 22 -2.28901428 3.06707559 23 0.80282349 -2.28901428 24 0.17652996 0.80282349 25 -1.62815547 0.17652996 26 -0.96572691 -1.62815547 27 -1.93157600 -0.96572691 28 -1.63892448 -1.93157600 29 -0.63642664 -1.63892448 30 -1.85442864 -0.63642664 31 3.95549038 -1.85442864 32 0.65737432 3.95549038 33 -3.61038798 0.65737432 34 -0.41784540 -3.61038798 35 2.65304271 -0.41784540 36 -2.40647422 2.65304271 37 7.19877524 -2.40647422 38 -0.75735728 7.19877524 39 0.45970809 -0.75735728 40 1.86889565 0.45970809 41 -1.94379953 1.86889565 42 0.37151759 -1.94379953 43 -0.02535908 0.37151759 44 -1.00037646 -0.02535908 45 2.08051046 -1.00037646 46 3.26681564 2.08051046 47 0.52342970 3.26681564 48 -2.49288327 0.52342970 49 3.69140999 -2.49288327 50 3.61915322 3.69140999 51 -1.33113126 3.61915322 52 -0.87074161 -1.33113126 53 -2.95238851 -0.87074161 54 -4.20383952 -2.95238851 55 0.89595578 -4.20383952 56 -1.23511176 0.89595578 57 -1.44894107 -1.23511176 58 -2.42023655 -1.44894107 59 5.90052696 -2.42023655 60 -1.32022519 5.90052696 61 -0.47031106 -1.32022519 62 1.78759752 -0.47031106 63 1.90536365 1.78759752 64 1.61041696 1.90536365 65 -1.73426718 1.61041696 66 -5.07978702 -1.73426718 67 -1.27325871 -5.07978702 68 4.43383747 -1.27325871 69 0.08196498 4.43383747 70 -4.10437115 0.08196498 71 -1.79934991 -4.10437115 72 -3.49417889 -1.79934991 73 2.96047694 -3.49417889 74 -2.19902952 2.96047694 75 -1.22453262 -2.19902952 76 5.09231367 -1.22453262 77 1.22086152 5.09231367 78 0.98904440 1.22086152 79 -0.79817864 0.98904440 80 2.41010671 -0.79817864 81 -4.55366487 2.41010671 82 1.29227506 -4.55366487 83 -2.42830931 1.29227506 84 2.41669399 -2.42830931 85 0.83324654 2.41669399 86 -0.62143113 0.83324654 87 3.63544325 -0.62143113 88 -0.57090592 3.63544325 89 -0.27194126 -0.57090592 90 2.37607103 -0.27194126 91 -4.03569864 2.37607103 92 1.10728734 -4.03569864 93 -0.22495294 1.10728734 94 -2.09593196 -0.22495294 95 -2.24052777 -2.09593196 96 3.18872253 -2.24052777 97 0.87681804 3.18872253 98 -1.27194126 0.87681804 99 -0.80228992 -1.27194126 100 -1.07473000 -0.80228992 101 -2.31934989 -1.07473000 102 -0.69061242 -2.31934989 103 -2.11123257 -0.69061242 104 2.03513558 -2.11123257 105 2.89516485 2.03513558 106 -2.83604234 2.89516485 107 -2.36902591 -2.83604234 108 2.37209682 -2.36902591 109 4.28123192 2.37209682 110 -1.00359061 4.28123192 111 -4.33349204 -1.00359061 112 -3.70864391 -4.33349204 113 -4.03039844 -3.70864391 114 -3.56971641 -4.03039844 115 -1.31801060 -3.56971641 116 -3.41817233 -1.31801060 117 0.89401542 -3.41817233 118 2.57446267 0.89401542 119 0.66024881 2.57446267 120 -1.60500293 0.66024881 121 1.90184442 -1.60500293 122 2.88888266 1.90184442 123 -2.37416721 2.88888266 124 8.97811648 -2.37416721 125 1.06668622 8.97811648 126 -1.42185910 1.06668622 127 0.04691694 -1.42185910 128 -0.25010727 0.04691694 129 0.48574675 -0.25010727 130 -0.22850682 0.48574675 131 -0.82656895 -0.22850682 132 -0.89269082 -0.82656895 133 -1.73895768 -0.89269082 134 -0.89521051 -1.73895768 135 2.05328230 -0.89521051 136 3.11657086 2.05328230 137 2.05307972 3.11657086 138 -2.28517715 2.05307972 139 1.41668981 -2.28517715 140 1.01177243 1.41668981 141 -0.50774171 1.01177243 142 2.94547725 -0.50774171 143 3.76881877 2.94547725 144 2.44076022 3.76881877 145 3.62714113 2.44076022 146 -3.14367665 3.62714113 147 -1.58903984 -3.14367665 148 -0.69993962 -1.58903984 149 -2.99241039 -0.69993962 150 -3.96664588 -2.99241039 151 4.28152789 -3.96664588 152 -1.97486065 4.28152789 153 -1.09700615 -1.97486065 154 0.86036801 -1.09700615 155 -0.56633056 0.86036801 156 1.51934026 -0.56633056 157 2.08993105 1.51934026 158 3.04986549 2.08993105 159 NA 3.04986549 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -1.45623452 1.63306064 [2,] -3.40428257 -1.45623452 [3,] 1.39904173 -3.40428257 [4,] -2.30964604 1.39904173 [5,] 0.04680171 -2.30964604 [6,] -0.30301509 0.04680171 [7,] 0.55972858 -0.30301509 [8,] 5.89271980 0.55972858 [9,] 1.13972230 5.89271980 [10,] 1.36017839 1.13972230 [11,] -0.21511203 1.36017839 [12,] -3.71952815 -0.21511203 [13,] 1.67942604 -3.71952815 [14,] 1.18565458 1.67942604 [15,] -4.20073634 1.18565458 [16,] -2.40113395 -4.20073634 [17,] -1.46386503 -2.40113395 [18,] -1.81460684 -1.46386503 [19,] 1.51376534 -1.81460684 [20,] 2.67043849 1.51376534 [21,] 3.06707559 2.67043849 [22,] -2.28901428 3.06707559 [23,] 0.80282349 -2.28901428 [24,] 0.17652996 0.80282349 [25,] -1.62815547 0.17652996 [26,] -0.96572691 -1.62815547 [27,] -1.93157600 -0.96572691 [28,] -1.63892448 -1.93157600 [29,] -0.63642664 -1.63892448 [30,] -1.85442864 -0.63642664 [31,] 3.95549038 -1.85442864 [32,] 0.65737432 3.95549038 [33,] -3.61038798 0.65737432 [34,] -0.41784540 -3.61038798 [35,] 2.65304271 -0.41784540 [36,] -2.40647422 2.65304271 [37,] 7.19877524 -2.40647422 [38,] -0.75735728 7.19877524 [39,] 0.45970809 -0.75735728 [40,] 1.86889565 0.45970809 [41,] -1.94379953 1.86889565 [42,] 0.37151759 -1.94379953 [43,] -0.02535908 0.37151759 [44,] -1.00037646 -0.02535908 [45,] 2.08051046 -1.00037646 [46,] 3.26681564 2.08051046 [47,] 0.52342970 3.26681564 [48,] -2.49288327 0.52342970 [49,] 3.69140999 -2.49288327 [50,] 3.61915322 3.69140999 [51,] -1.33113126 3.61915322 [52,] -0.87074161 -1.33113126 [53,] -2.95238851 -0.87074161 [54,] -4.20383952 -2.95238851 [55,] 0.89595578 -4.20383952 [56,] -1.23511176 0.89595578 [57,] -1.44894107 -1.23511176 [58,] -2.42023655 -1.44894107 [59,] 5.90052696 -2.42023655 [60,] -1.32022519 5.90052696 [61,] -0.47031106 -1.32022519 [62,] 1.78759752 -0.47031106 [63,] 1.90536365 1.78759752 [64,] 1.61041696 1.90536365 [65,] -1.73426718 1.61041696 [66,] -5.07978702 -1.73426718 [67,] -1.27325871 -5.07978702 [68,] 4.43383747 -1.27325871 [69,] 0.08196498 4.43383747 [70,] -4.10437115 0.08196498 [71,] -1.79934991 -4.10437115 [72,] -3.49417889 -1.79934991 [73,] 2.96047694 -3.49417889 [74,] -2.19902952 2.96047694 [75,] -1.22453262 -2.19902952 [76,] 5.09231367 -1.22453262 [77,] 1.22086152 5.09231367 [78,] 0.98904440 1.22086152 [79,] -0.79817864 0.98904440 [80,] 2.41010671 -0.79817864 [81,] -4.55366487 2.41010671 [82,] 1.29227506 -4.55366487 [83,] -2.42830931 1.29227506 [84,] 2.41669399 -2.42830931 [85,] 0.83324654 2.41669399 [86,] -0.62143113 0.83324654 [87,] 3.63544325 -0.62143113 [88,] -0.57090592 3.63544325 [89,] -0.27194126 -0.57090592 [90,] 2.37607103 -0.27194126 [91,] -4.03569864 2.37607103 [92,] 1.10728734 -4.03569864 [93,] -0.22495294 1.10728734 [94,] -2.09593196 -0.22495294 [95,] -2.24052777 -2.09593196 [96,] 3.18872253 -2.24052777 [97,] 0.87681804 3.18872253 [98,] -1.27194126 0.87681804 [99,] -0.80228992 -1.27194126 [100,] -1.07473000 -0.80228992 [101,] -2.31934989 -1.07473000 [102,] -0.69061242 -2.31934989 [103,] -2.11123257 -0.69061242 [104,] 2.03513558 -2.11123257 [105,] 2.89516485 2.03513558 [106,] -2.83604234 2.89516485 [107,] -2.36902591 -2.83604234 [108,] 2.37209682 -2.36902591 [109,] 4.28123192 2.37209682 [110,] -1.00359061 4.28123192 [111,] -4.33349204 -1.00359061 [112,] -3.70864391 -4.33349204 [113,] -4.03039844 -3.70864391 [114,] -3.56971641 -4.03039844 [115,] -1.31801060 -3.56971641 [116,] -3.41817233 -1.31801060 [117,] 0.89401542 -3.41817233 [118,] 2.57446267 0.89401542 [119,] 0.66024881 2.57446267 [120,] -1.60500293 0.66024881 [121,] 1.90184442 -1.60500293 [122,] 2.88888266 1.90184442 [123,] -2.37416721 2.88888266 [124,] 8.97811648 -2.37416721 [125,] 1.06668622 8.97811648 [126,] -1.42185910 1.06668622 [127,] 0.04691694 -1.42185910 [128,] -0.25010727 0.04691694 [129,] 0.48574675 -0.25010727 [130,] -0.22850682 0.48574675 [131,] -0.82656895 -0.22850682 [132,] -0.89269082 -0.82656895 [133,] -1.73895768 -0.89269082 [134,] -0.89521051 -1.73895768 [135,] 2.05328230 -0.89521051 [136,] 3.11657086 2.05328230 [137,] 2.05307972 3.11657086 [138,] -2.28517715 2.05307972 [139,] 1.41668981 -2.28517715 [140,] 1.01177243 1.41668981 [141,] -0.50774171 1.01177243 [142,] 2.94547725 -0.50774171 [143,] 3.76881877 2.94547725 [144,] 2.44076022 3.76881877 [145,] 3.62714113 2.44076022 [146,] -3.14367665 3.62714113 [147,] -1.58903984 -3.14367665 [148,] -0.69993962 -1.58903984 [149,] -2.99241039 -0.69993962 [150,] -3.96664588 -2.99241039 [151,] 4.28152789 -3.96664588 [152,] -1.97486065 4.28152789 [153,] -1.09700615 -1.97486065 [154,] 0.86036801 -1.09700615 [155,] -0.56633056 0.86036801 [156,] 1.51934026 -0.56633056 [157,] 2.08993105 1.51934026 [158,] 3.04986549 2.08993105 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -1.45623452 1.63306064 2 -3.40428257 -1.45623452 3 1.39904173 -3.40428257 4 -2.30964604 1.39904173 5 0.04680171 -2.30964604 6 -0.30301509 0.04680171 7 0.55972858 -0.30301509 8 5.89271980 0.55972858 9 1.13972230 5.89271980 10 1.36017839 1.13972230 11 -0.21511203 1.36017839 12 -3.71952815 -0.21511203 13 1.67942604 -3.71952815 14 1.18565458 1.67942604 15 -4.20073634 1.18565458 16 -2.40113395 -4.20073634 17 -1.46386503 -2.40113395 18 -1.81460684 -1.46386503 19 1.51376534 -1.81460684 20 2.67043849 1.51376534 21 3.06707559 2.67043849 22 -2.28901428 3.06707559 23 0.80282349 -2.28901428 24 0.17652996 0.80282349 25 -1.62815547 0.17652996 26 -0.96572691 -1.62815547 27 -1.93157600 -0.96572691 28 -1.63892448 -1.93157600 29 -0.63642664 -1.63892448 30 -1.85442864 -0.63642664 31 3.95549038 -1.85442864 32 0.65737432 3.95549038 33 -3.61038798 0.65737432 34 -0.41784540 -3.61038798 35 2.65304271 -0.41784540 36 -2.40647422 2.65304271 37 7.19877524 -2.40647422 38 -0.75735728 7.19877524 39 0.45970809 -0.75735728 40 1.86889565 0.45970809 41 -1.94379953 1.86889565 42 0.37151759 -1.94379953 43 -0.02535908 0.37151759 44 -1.00037646 -0.02535908 45 2.08051046 -1.00037646 46 3.26681564 2.08051046 47 0.52342970 3.26681564 48 -2.49288327 0.52342970 49 3.69140999 -2.49288327 50 3.61915322 3.69140999 51 -1.33113126 3.61915322 52 -0.87074161 -1.33113126 53 -2.95238851 -0.87074161 54 -4.20383952 -2.95238851 55 0.89595578 -4.20383952 56 -1.23511176 0.89595578 57 -1.44894107 -1.23511176 58 -2.42023655 -1.44894107 59 5.90052696 -2.42023655 60 -1.32022519 5.90052696 61 -0.47031106 -1.32022519 62 1.78759752 -0.47031106 63 1.90536365 1.78759752 64 1.61041696 1.90536365 65 -1.73426718 1.61041696 66 -5.07978702 -1.73426718 67 -1.27325871 -5.07978702 68 4.43383747 -1.27325871 69 0.08196498 4.43383747 70 -4.10437115 0.08196498 71 -1.79934991 -4.10437115 72 -3.49417889 -1.79934991 73 2.96047694 -3.49417889 74 -2.19902952 2.96047694 75 -1.22453262 -2.19902952 76 5.09231367 -1.22453262 77 1.22086152 5.09231367 78 0.98904440 1.22086152 79 -0.79817864 0.98904440 80 2.41010671 -0.79817864 81 -4.55366487 2.41010671 82 1.29227506 -4.55366487 83 -2.42830931 1.29227506 84 2.41669399 -2.42830931 85 0.83324654 2.41669399 86 -0.62143113 0.83324654 87 3.63544325 -0.62143113 88 -0.57090592 3.63544325 89 -0.27194126 -0.57090592 90 2.37607103 -0.27194126 91 -4.03569864 2.37607103 92 1.10728734 -4.03569864 93 -0.22495294 1.10728734 94 -2.09593196 -0.22495294 95 -2.24052777 -2.09593196 96 3.18872253 -2.24052777 97 0.87681804 3.18872253 98 -1.27194126 0.87681804 99 -0.80228992 -1.27194126 100 -1.07473000 -0.80228992 101 -2.31934989 -1.07473000 102 -0.69061242 -2.31934989 103 -2.11123257 -0.69061242 104 2.03513558 -2.11123257 105 2.89516485 2.03513558 106 -2.83604234 2.89516485 107 -2.36902591 -2.83604234 108 2.37209682 -2.36902591 109 4.28123192 2.37209682 110 -1.00359061 4.28123192 111 -4.33349204 -1.00359061 112 -3.70864391 -4.33349204 113 -4.03039844 -3.70864391 114 -3.56971641 -4.03039844 115 -1.31801060 -3.56971641 116 -3.41817233 -1.31801060 117 0.89401542 -3.41817233 118 2.57446267 0.89401542 119 0.66024881 2.57446267 120 -1.60500293 0.66024881 121 1.90184442 -1.60500293 122 2.88888266 1.90184442 123 -2.37416721 2.88888266 124 8.97811648 -2.37416721 125 1.06668622 8.97811648 126 -1.42185910 1.06668622 127 0.04691694 -1.42185910 128 -0.25010727 0.04691694 129 0.48574675 -0.25010727 130 -0.22850682 0.48574675 131 -0.82656895 -0.22850682 132 -0.89269082 -0.82656895 133 -1.73895768 -0.89269082 134 -0.89521051 -1.73895768 135 2.05328230 -0.89521051 136 3.11657086 2.05328230 137 2.05307972 3.11657086 138 -2.28517715 2.05307972 139 1.41668981 -2.28517715 140 1.01177243 1.41668981 141 -0.50774171 1.01177243 142 2.94547725 -0.50774171 143 3.76881877 2.94547725 144 2.44076022 3.76881877 145 3.62714113 2.44076022 146 -3.14367665 3.62714113 147 -1.58903984 -3.14367665 148 -0.69993962 -1.58903984 149 -2.99241039 -0.69993962 150 -3.96664588 -2.99241039 151 4.28152789 -3.96664588 152 -1.97486065 4.28152789 153 -1.09700615 -1.97486065 154 0.86036801 -1.09700615 155 -0.56633056 0.86036801 156 1.51934026 -0.56633056 157 2.08993105 1.51934026 158 3.04986549 2.08993105 > 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/freestat/rcomp/tmp/72sgx1290544173.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/freestat/rcomp/tmp/82sgx1290544173.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/freestat/rcomp/tmp/92sgx1290544173.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/freestat/rcomp/tmp/10d2yi1290544173.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/freestat/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/html/freestat/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/freestat/rcomp/tmp/11g2w51290544173.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/freestat/rcomp/tmp/1222cb1290544173.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/freestat/rcomp/tmp/1383951290544173.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/freestat/rcomp/tmp/146gge1290544173.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/freestat/rcomp/tmp/15mvpe1290544173.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/freestat/rcomp/tmp/1615nn1290544173.tab") + } > > try(system("convert tmp/16ii61290544173.ps tmp/16ii61290544173.png",intern=TRUE)) character(0) > try(system("convert tmp/26ii61290544173.ps tmp/26ii61290544173.png",intern=TRUE)) character(0) > try(system("convert tmp/3zs0r1290544173.ps tmp/3zs0r1290544173.png",intern=TRUE)) character(0) > try(system("convert tmp/4zs0r1290544173.ps tmp/4zs0r1290544173.png",intern=TRUE)) character(0) > try(system("convert tmp/5zs0r1290544173.ps tmp/5zs0r1290544173.png",intern=TRUE)) character(0) > try(system("convert tmp/6sjzu1290544173.ps tmp/6sjzu1290544173.png",intern=TRUE)) character(0) > try(system("convert tmp/72sgx1290544173.ps tmp/72sgx1290544173.png",intern=TRUE)) character(0) > try(system("convert tmp/82sgx1290544173.ps tmp/82sgx1290544173.png",intern=TRUE)) character(0) > try(system("convert tmp/92sgx1290544173.ps tmp/92sgx1290544173.png",intern=TRUE)) character(0) > try(system("convert tmp/10d2yi1290544173.ps tmp/10d2yi1290544173.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 5.704 2.766 7.586