R version 2.12.0 (2010-10-15) Copyright (C) 2010 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i486-pc-linux-gnu (32-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > x <- array(list(13 + ,26 + ,9 + ,15 + ,25 + ,25 + ,16 + ,20 + ,9 + ,15 + ,25 + ,24 + ,19 + ,21 + ,9 + ,14 + ,19 + ,21 + ,15 + ,31 + ,14 + ,10 + ,18 + ,23 + ,14 + ,21 + ,8 + ,10 + ,18 + ,17 + ,13 + ,18 + ,8 + ,12 + ,22 + ,19 + ,19 + ,26 + ,11 + ,18 + ,29 + ,18 + ,15 + ,22 + ,10 + ,12 + ,26 + ,27 + ,14 + ,22 + ,9 + ,14 + ,25 + ,23 + ,15 + ,29 + ,15 + ,18 + ,23 + ,23 + ,16 + ,15 + ,14 + ,9 + ,23 + ,29 + ,16 + ,16 + ,11 + ,11 + ,23 + ,21 + ,16 + ,24 + ,14 + ,11 + ,24 + ,26 + ,17 + ,17 + ,6 + ,17 + ,30 + ,25 + ,15 + ,19 + ,20 + ,8 + ,19 + ,25 + ,15 + ,22 + ,9 + ,16 + ,24 + ,23 + ,20 + ,31 + ,10 + ,21 + ,32 + ,26 + ,18 + ,28 + ,8 + ,24 + ,30 + ,20 + ,16 + ,38 + ,11 + ,21 + ,29 + ,29 + ,16 + ,26 + ,14 + ,14 + ,17 + ,24 + ,19 + ,25 + ,11 + ,7 + ,25 + ,23 + ,16 + ,25 + ,16 + ,18 + ,26 + ,24 + ,17 + ,29 + ,14 + ,18 + ,26 + ,30 + ,17 + ,28 + ,11 + ,13 + ,25 + ,22 + ,16 + ,15 + ,11 + ,11 + ,23 + ,22 + ,15 + ,18 + ,12 + ,13 + ,21 + ,13 + ,14 + ,21 + ,9 + ,13 + ,19 + ,24 + ,15 + ,25 + ,7 + ,18 + ,35 + ,17 + ,12 + ,23 + ,13 + ,14 + ,19 + ,24 + ,14 + ,23 + ,10 + ,12 + ,20 + ,21 + ,16 + ,19 + ,9 + ,9 + ,21 + ,23 + ,14 + ,18 + ,9 + ,12 + ,21 + ,24 + ,7 + ,18 + ,13 + ,8 + ,24 + ,24 + ,10 + ,26 + ,16 + ,5 + ,23 + ,24 + ,14 + ,18 + ,12 + ,10 + ,19 + ,23 + ,16 + ,18 + ,6 + ,11 + ,17 + ,26 + ,16 + ,28 + ,14 + ,11 + ,24 + ,24 + ,16 + ,17 + ,14 + ,12 + ,15 + ,21 + ,14 + ,29 + ,10 + ,12 + ,25 + ,23 + ,20 + ,12 + ,4 + ,15 + ,27 + ,28 + ,14 + ,25 + ,12 + ,12 + ,29 + ,23 + ,14 + ,28 + ,12 + ,16 + ,27 + ,22 + ,11 + ,20 + ,14 + ,14 + ,18 + ,24 + ,15 + ,17 + ,9 + ,17 + ,25 + ,21 + ,16 + ,17 + ,9 + ,13 + ,22 + ,23 + ,14 + ,20 + ,10 + ,10 + ,26 + ,23 + ,16 + ,31 + ,14 + ,17 + ,23 + ,20 + ,14 + ,21 + ,10 + ,12 + ,16 + ,23 + ,12 + ,19 + ,9 + ,13 + ,27 + ,21 + ,16 + ,23 + ,14 + ,13 + ,25 + ,27 + ,9 + ,15 + ,8 + ,11 + ,14 + ,12 + ,14 + ,24 + ,9 + ,13 + ,19 + ,15 + ,16 + ,28 + ,8 + ,12 + ,20 + ,22 + ,16 + ,16 + ,9 + ,12 + ,16 + ,21 + ,15 + ,19 + ,9 + ,12 + ,18 + ,21 + ,16 + ,21 + ,9 + ,9 + ,22 + ,20 + ,12 + ,21 + ,15 + ,7 + ,21 + ,24 + ,16 + ,20 + ,8 + ,17 + ,22 + ,24 + ,16 + ,16 + ,10 + ,12 + ,22 + ,29 + ,14 + ,25 + ,8 + ,12 + ,32 + ,25 + ,16 + ,30 + ,14 + ,9 + ,23 + ,14 + ,17 + ,29 + ,11 + ,9 + ,31 + ,30 + ,18 + ,22 + ,10 + ,13 + ,18 + ,19 + ,18 + ,19 + ,12 + ,10 + ,23 + ,29 + ,12 + ,33 + ,14 + ,11 + ,26 + ,25 + ,16 + ,17 + ,9 + ,12 + ,24 + ,25 + ,10 + ,9 + ,13 + ,10 + ,19 + ,25 + ,14 + ,14 + ,15 + ,13 + ,14 + ,16 + ,18 + ,15 + ,8 + ,6 + ,20 + ,25 + ,18 + ,12 + ,7 + ,7 + ,22 + ,28 + ,16 + ,21 + ,10 + ,13 + ,24 + ,24 + ,16 + ,20 + ,10 + ,11 + ,25 + ,25 + ,16 + ,29 + ,13 + ,18 + ,21 + ,21 + ,13 + ,33 + ,11 + ,9 + ,28 + ,22 + ,16 + ,21 + ,8 + ,9 + ,24 + ,20 + ,16 + ,15 + ,12 + ,11 + ,20 + ,25 + ,20 + ,19 + ,9 + ,11 + ,21 + ,27 + ,16 + ,23 + ,10 + ,15 + ,23 + ,21 + ,15 + ,20 + ,11 + ,8 + ,13 + ,13 + ,15 + ,20 + ,11 + ,11 + ,24 + ,26 + ,16 + ,18 + ,10 + ,14 + ,21 + ,26 + ,14 + ,31 + ,16 + ,14 + ,21 + ,25 + ,15 + ,18 + ,16 + ,12 + ,17 + ,22 + ,12 + ,13 + ,8 + ,12 + ,14 + ,19 + ,17 + ,9 + ,6 + ,8 + ,29 + ,23 + ,16 + ,20 + ,11 + ,11 + ,25 + ,25 + ,15 + ,18 + ,12 + ,10 + ,16 + ,15 + ,13 + ,23 + ,14 + ,17 + ,25 + ,21 + ,16 + ,17 + ,9 + ,16 + ,25 + ,23 + ,16 + ,17 + ,11 + ,13 + ,21 + ,25 + ,16 + ,16 + ,8 + ,15 + ,23 + ,24 + ,16 + ,31 + ,8 + ,11 + ,22 + ,24 + ,14 + ,15 + ,7 + ,12 + ,19 + ,21 + ,16 + ,28 + ,16 + ,16 + ,24 + ,24 + ,16 + ,26 + ,13 + ,20 + ,26 + ,22 + ,20 + ,20 + ,8 + ,16 + ,25 + ,24 + ,15 + ,19 + ,11 + ,11 + ,20 + ,28 + ,16 + ,25 + ,14 + ,15 + ,22 + ,21 + ,13 + ,18 + ,10 + ,15 + ,14 + ,17 + ,17 + ,20 + ,10 + ,12 + ,20 + ,28 + ,16 + ,33 + ,14 + ,9 + ,32 + ,24 + ,12 + ,24 + ,14 + ,24 + ,21 + ,10 + ,16 + ,22 + ,10 + ,15 + ,22 + ,20 + ,16 + ,32 + ,12 + ,18 + ,28 + ,22 + ,17 + ,31 + ,9 + ,17 + ,25 + ,19 + ,13 + ,13 + ,16 + ,12 + ,17 + ,22 + ,12 + ,18 + ,8 + ,15 + ,21 + ,22 + ,18 + ,17 + ,9 + ,11 + ,23 + ,26 + ,14 + ,29 + ,16 + ,11 + ,27 + ,24 + ,14 + ,22 + ,13 + ,15 + ,22 + ,22 + ,13 + ,18 + ,13 + ,12 + ,19 + ,20 + ,16 + ,22 + ,8 + ,14 + ,20 + ,20 + ,13 + ,25 + ,14 + ,11 + ,17 + ,15 + ,16 + ,20 + ,11 + ,20 + ,24 + ,20 + ,13 + ,20 + ,9 + ,11 + ,21 + ,20 + ,16 + ,17 + ,8 + ,12 + ,21 + ,24 + ,15 + ,21 + ,13 + ,17 + ,23 + ,22 + ,16 + ,26 + ,13 + ,12 + ,24 + ,29 + ,15 + ,10 + ,10 + ,11 + ,19 + ,23 + ,17 + ,15 + ,8 + ,10 + ,22 + ,24 + ,15 + ,20 + ,7 + ,11 + ,26 + ,22 + ,12 + ,14 + ,11 + ,12 + ,17 + ,16 + ,16 + ,16 + ,11 + ,9 + ,17 + ,23 + ,10 + ,23 + ,14 + ,8 + ,19 + ,27 + ,16 + ,11 + ,6 + ,6 + ,15 + ,16 + ,14 + ,19 + ,10 + ,12 + ,17 + ,21 + ,15 + ,30 + ,9 + ,15 + ,27 + ,26 + ,13 + ,21 + ,12 + ,13 + ,19 + ,22 + ,15 + ,20 + ,11 + ,17 + ,21 + ,23 + ,11 + ,22 + ,14 + ,14 + ,25 + ,19 + ,12 + ,30 + ,12 + ,16 + ,19 + ,18 + ,8 + ,25 + ,14 + ,15 + ,22 + ,24 + ,16 + ,28 + ,8 + ,16 + ,18 + ,24 + ,15 + ,23 + ,14 + ,11 + ,20 + ,29 + ,17 + ,23 + ,8 + ,11 + ,15 + ,22 + ,16 + ,21 + ,11 + ,16 + ,20 + ,24 + ,10 + ,30 + ,12 + ,15 + ,29 + ,22 + ,18 + ,22 + ,9 + ,14 + ,19 + ,12 + ,13 + ,32 + ,16 + ,9 + ,29 + ,26 + ,15 + ,22 + ,11 + ,13 + ,24 + ,18 + ,16 + ,15 + ,11 + ,11 + ,23 + ,22 + ,16 + ,21 + ,12 + ,14 + ,22 + ,24 + ,14 + ,27 + ,15 + ,11 + ,23 + ,21 + ,10 + ,22 + ,13 + ,12 + ,22 + ,15 + ,17 + ,9 + ,6 + ,8 + ,29 + ,23 + ,13 + ,29 + ,11 + ,7 + ,26 + ,22 + ,15 + ,20 + ,7 + ,11 + ,26 + ,22 + ,16 + ,16 + ,8 + ,13 + ,21 + ,24 + ,12 + ,16 + ,8 + ,9 + ,18 + ,23 + ,13 + ,16 + ,9 + ,12 + ,10 + ,13) + ,dim=c(6 + ,150) + ,dimnames=list(c('Learning' + ,'Concern' + ,'Doubts' + ,'Expectations' + ,'Standards' + ,'Organization') + ,1:150)) > y <- array(NA,dim=c(6,150),dimnames=list(c('Learning','Concern','Doubts','Expectations','Standards','Organization'),1:150)) > 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 = 'Do not include Seasonal Dummies' > par1 = '1' > #'GNU S' R Code compiled by R2WASP v. 1.0.44 () > #Author: Prof. Dr. P. Wessa > #To cite this work: AUTHOR(S), (YEAR), YOUR SOFTWARE TITLE (vNUMBER) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_YOURPAGE.wasp/ > #Source of accompanying publication: Office for Research, Development, and Education > #Technical description: Write here your technical program description (don't use hard returns!) > library(lattice) > library(lmtest) Loading required package: zoo > 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 Learning Concern Doubts Expectations Standards Organization t 1 13 26 9 15 25 25 1 2 16 20 9 15 25 24 2 3 19 21 9 14 19 21 3 4 15 31 14 10 18 23 4 5 14 21 8 10 18 17 5 6 13 18 8 12 22 19 6 7 19 26 11 18 29 18 7 8 15 22 10 12 26 27 8 9 14 22 9 14 25 23 9 10 15 29 15 18 23 23 10 11 16 15 14 9 23 29 11 12 16 16 11 11 23 21 12 13 16 24 14 11 24 26 13 14 17 17 6 17 30 25 14 15 15 19 20 8 19 25 15 16 15 22 9 16 24 23 16 17 20 31 10 21 32 26 17 18 18 28 8 24 30 20 18 19 16 38 11 21 29 29 19 20 16 26 14 14 17 24 20 21 19 25 11 7 25 23 21 22 16 25 16 18 26 24 22 23 17 29 14 18 26 30 23 24 17 28 11 13 25 22 24 25 16 15 11 11 23 22 25 26 15 18 12 13 21 13 26 27 14 21 9 13 19 24 27 28 15 25 7 18 35 17 28 29 12 23 13 14 19 24 29 30 14 23 10 12 20 21 30 31 16 19 9 9 21 23 31 32 14 18 9 12 21 24 32 33 7 18 13 8 24 24 33 34 10 26 16 5 23 24 34 35 14 18 12 10 19 23 35 36 16 18 6 11 17 26 36 37 16 28 14 11 24 24 37 38 16 17 14 12 15 21 38 39 14 29 10 12 25 23 39 40 20 12 4 15 27 28 40 41 14 25 12 12 29 23 41 42 14 28 12 16 27 22 42 43 11 20 14 14 18 24 43 44 15 17 9 17 25 21 44 45 16 17 9 13 22 23 45 46 14 20 10 10 26 23 46 47 16 31 14 17 23 20 47 48 14 21 10 12 16 23 48 49 12 19 9 13 27 21 49 50 16 23 14 13 25 27 50 51 9 15 8 11 14 12 51 52 14 24 9 13 19 15 52 53 16 28 8 12 20 22 53 54 16 16 9 12 16 21 54 55 15 19 9 12 18 21 55 56 16 21 9 9 22 20 56 57 12 21 15 7 21 24 57 58 16 20 8 17 22 24 58 59 16 16 10 12 22 29 59 60 14 25 8 12 32 25 60 61 16 30 14 9 23 14 61 62 17 29 11 9 31 30 62 63 18 22 10 13 18 19 63 64 18 19 12 10 23 29 64 65 12 33 14 11 26 25 65 66 16 17 9 12 24 25 66 67 10 9 13 10 19 25 67 68 14 14 15 13 14 16 68 69 18 15 8 6 20 25 69 70 18 12 7 7 22 28 70 71 16 21 10 13 24 24 71 72 16 20 10 11 25 25 72 73 16 29 13 18 21 21 73 74 13 33 11 9 28 22 74 75 16 21 8 9 24 20 75 76 16 15 12 11 20 25 76 77 20 19 9 11 21 27 77 78 16 23 10 15 23 21 78 79 15 20 11 8 13 13 79 80 15 20 11 11 24 26 80 81 16 18 10 14 21 26 81 82 14 31 16 14 21 25 82 83 15 18 16 12 17 22 83 84 12 13 8 12 14 19 84 85 17 9 6 8 29 23 85 86 16 20 11 11 25 25 86 87 15 18 12 10 16 15 87 88 13 23 14 17 25 21 88 89 16 17 9 16 25 23 89 90 16 17 11 13 21 25 90 91 16 16 8 15 23 24 91 92 16 31 8 11 22 24 92 93 14 15 7 12 19 21 93 94 16 28 16 16 24 24 94 95 16 26 13 20 26 22 95 96 20 20 8 16 25 24 96 97 15 19 11 11 20 28 97 98 16 25 14 15 22 21 98 99 13 18 10 15 14 17 99 100 17 20 10 12 20 28 100 101 16 33 14 9 32 24 101 102 12 24 14 24 21 10 102 103 16 22 10 15 22 20 103 104 16 32 12 18 28 22 104 105 17 31 9 17 25 19 105 106 13 13 16 12 17 22 106 107 12 18 8 15 21 22 107 108 18 17 9 11 23 26 108 109 14 29 16 11 27 24 109 110 14 22 13 15 22 22 110 111 13 18 13 12 19 20 111 112 16 22 8 14 20 20 112 113 13 25 14 11 17 15 113 114 16 20 11 20 24 20 114 115 13 20 9 11 21 20 115 116 16 17 8 12 21 24 116 117 15 21 13 17 23 22 117 118 16 26 13 12 24 29 118 119 15 10 10 11 19 23 119 120 17 15 8 10 22 24 120 121 15 20 7 11 26 22 121 122 12 14 11 12 17 16 122 123 16 16 11 9 17 23 123 124 10 23 14 8 19 27 124 125 16 11 6 6 15 16 125 126 14 19 10 12 17 21 126 127 15 30 9 15 27 26 127 128 13 21 12 13 19 22 128 129 15 20 11 17 21 23 129 130 11 22 14 14 25 19 130 131 12 30 12 16 19 18 131 132 8 25 14 15 22 24 132 133 16 28 8 16 18 24 133 134 15 23 14 11 20 29 134 135 17 23 8 11 15 22 135 136 16 21 11 16 20 24 136 137 10 30 12 15 29 22 137 138 18 22 9 14 19 12 138 139 13 32 16 9 29 26 139 140 15 22 11 13 24 18 140 141 16 15 11 11 23 22 141 142 16 21 12 14 22 24 142 143 14 27 15 11 23 21 143 144 10 22 13 12 22 15 144 145 17 9 6 8 29 23 145 146 13 29 11 7 26 22 146 147 15 20 7 11 26 22 147 148 16 16 8 13 21 24 148 149 12 16 8 9 18 23 149 150 13 16 9 12 10 13 150 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) Concern Doubts Expectations Standards 13.191792 0.005070 -0.278495 0.102340 0.021824 Organization t 0.149072 -0.005812 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -7.3910 -1.2394 0.2616 1.2648 4.3689 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 13.191792 1.538649 8.574 1.49e-14 *** Concern 0.005070 0.037499 0.135 0.89263 Doubts -0.278495 0.068266 -4.080 7.47e-05 *** Expectations 0.102340 0.054077 1.892 0.06045 . Standards 0.021824 0.048563 0.449 0.65382 Organization 0.149072 0.048734 3.059 0.00265 ** t -0.005812 0.003953 -1.470 0.14371 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.05 on 143 degrees of freedom Multiple R-squared: 0.219, Adjusted R-squared: 0.1862 F-statistic: 6.682 on 6 and 143 DF, p-value: 2.984e-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.90986621 0.18026758 0.09013379 [2,] 0.83352448 0.33295105 0.16647552 [3,] 0.73681285 0.52637430 0.26318715 [4,] 0.67342158 0.65315685 0.32657842 [5,] 0.65525574 0.68948853 0.34474426 [6,] 0.60154410 0.79691179 0.39845590 [7,] 0.50963267 0.98073465 0.49036733 [8,] 0.58392024 0.83215952 0.41607976 [9,] 0.50309794 0.99380412 0.49690206 [10,] 0.42833033 0.85666065 0.57166967 [11,] 0.35700409 0.71400817 0.64299591 [12,] 0.45430970 0.90861939 0.54569030 [13,] 0.42395599 0.84791198 0.57604401 [14,] 0.35440524 0.70881048 0.64559476 [15,] 0.29854982 0.59709964 0.70145018 [16,] 0.24677159 0.49354319 0.75322841 [17,] 0.24220081 0.48440163 0.75779919 [18,] 0.20666577 0.41333154 0.79333423 [19,] 0.29488897 0.58977795 0.70511103 [20,] 0.37032888 0.74065776 0.62967112 [21,] 0.31459694 0.62919388 0.68540306 [22,] 0.28252232 0.56504464 0.71747768 [23,] 0.23955462 0.47910924 0.76044538 [24,] 0.88924327 0.22151346 0.11075673 [25,] 0.91691534 0.16616932 0.08308466 [26,] 0.89662249 0.20675502 0.10337751 [27,] 0.89589215 0.20821570 0.10410785 [28,] 0.89146322 0.21707356 0.10853678 [29,] 0.89031931 0.21936137 0.10968069 [30,] 0.86799722 0.26400556 0.13200278 [31,] 0.90489917 0.19020166 0.09510083 [32,] 0.88216040 0.23567919 0.11783960 [33,] 0.86167362 0.27665277 0.13832638 [34,] 0.90624488 0.18751023 0.09375512 [35,] 0.88430021 0.23139957 0.11569979 [36,] 0.86384081 0.27231838 0.13615919 [37,] 0.83923425 0.32153150 0.16076575 [38,] 0.82586223 0.34827555 0.17413777 [39,] 0.79836163 0.40327674 0.20163837 [40,] 0.83919869 0.32160261 0.16080131 [41,] 0.82281895 0.35436209 0.17718105 [42,] 0.92039986 0.15920028 0.07960014 [43,] 0.90967330 0.18065341 0.09032670 [44,] 0.90294643 0.19410714 0.09705357 [45,] 0.89676484 0.20647031 0.10323516 [46,] 0.88046980 0.23906040 0.11953020 [47,] 0.87899491 0.24201019 0.12100509 [48,] 0.86817800 0.26364399 0.13182200 [49,] 0.84551934 0.30896132 0.15448066 [50,] 0.82017587 0.35964825 0.17982413 [51,] 0.83640549 0.32718902 0.16359451 [52,] 0.87791550 0.24416900 0.12208450 [53,] 0.86369539 0.27260923 0.13630461 [54,] 0.89685520 0.20628960 0.10314480 [55,] 0.90988121 0.18023758 0.09011879 [56,] 0.92803915 0.14392170 0.07196085 [57,] 0.91292137 0.17415726 0.08707863 [58,] 0.96863315 0.06273370 0.03136685 [59,] 0.96126090 0.07747820 0.03873910 [60,] 0.96855029 0.06289941 0.03144971 [61,] 0.96693641 0.06612718 0.03306359 [62,] 0.95770061 0.08459878 0.04229939 [63,] 0.94680327 0.10639346 0.05319673 [64,] 0.93475225 0.13049550 0.06524775 [65,] 0.94053741 0.11892518 0.05946259 [66,] 0.92894807 0.14210385 0.07105193 [67,] 0.91421840 0.17156319 0.08578160 [68,] 0.94605978 0.10788044 0.05394022 [69,] 0.93145698 0.13708604 0.06854302 [70,] 0.92448416 0.15103167 0.07551584 [71,] 0.90927380 0.18145240 0.09072620 [72,] 0.88802941 0.22394118 0.11197059 [73,] 0.86526203 0.26947593 0.13473797 [74,] 0.85276809 0.29446381 0.14723191 [75,] 0.90063918 0.19872164 0.09936082 [76,] 0.88491473 0.23017054 0.11508527 [77,] 0.85968590 0.28062820 0.14031410 [78,] 0.84299272 0.31401456 0.15700728 [79,] 0.83624475 0.32751049 0.16375525 [80,] 0.80768162 0.38463675 0.19231838 [81,] 0.77212842 0.45574316 0.22787158 [82,] 0.74282641 0.51434718 0.25717359 [83,] 0.70467746 0.59064509 0.29532254 [84,] 0.73532823 0.52934354 0.26467177 [85,] 0.72522279 0.54955443 0.27477721 [86,] 0.68548710 0.62902580 0.31451290 [87,] 0.73178276 0.53643449 0.26821724 [88,] 0.69688803 0.60622395 0.30311197 [89,] 0.68929467 0.62141066 0.31070533 [90,] 0.67977453 0.64045094 0.32022547 [91,] 0.63739063 0.72521875 0.36260937 [92,] 0.61976280 0.76047440 0.38023720 [93,] 0.59164659 0.81670681 0.40835341 [94,] 0.54410708 0.91178583 0.45589292 [95,] 0.50773296 0.98453408 0.49226704 [96,] 0.49223281 0.98446562 0.50776719 [97,] 0.43984584 0.87969168 0.56015416 [98,] 0.61834185 0.76331631 0.38165815 [99,] 0.60697947 0.78604106 0.39302053 [100,] 0.59260304 0.81479392 0.40739696 [101,] 0.54042055 0.91915890 0.45957945 [102,] 0.48853312 0.97706625 0.51146688 [103,] 0.43281997 0.86563994 0.56718003 [104,] 0.39773027 0.79546055 0.60226973 [105,] 0.35856876 0.71713752 0.64143124 [106,] 0.34627844 0.69255689 0.65372156 [107,] 0.29299233 0.58598466 0.70700767 [108,] 0.26331169 0.52662339 0.73668831 [109,] 0.26578081 0.53156162 0.73421919 [110,] 0.21719076 0.43438152 0.78280924 [111,] 0.19140631 0.38281262 0.80859369 [112,] 0.15504289 0.31008578 0.84495711 [113,] 0.13931993 0.27863986 0.86068007 [114,] 0.13217586 0.26435171 0.86782414 [115,] 0.17685034 0.35370068 0.82314966 [116,] 0.14370897 0.28741794 0.85629103 [117,] 0.11632419 0.23264838 0.88367581 [118,] 0.08791315 0.17582630 0.91208685 [119,] 0.07271716 0.14543431 0.92728284 [120,] 0.05081116 0.10162231 0.94918884 [121,] 0.05119745 0.10239489 0.94880255 [122,] 0.04255166 0.08510331 0.95744834 [123,] 0.43363291 0.86726581 0.56636709 [124,] 0.34766006 0.69532011 0.65233994 [125,] 0.28522727 0.57045453 0.71477273 [126,] 0.23040076 0.46080153 0.76959924 [127,] 0.17563898 0.35127796 0.82436102 [128,] 0.73371304 0.53257393 0.26628696 [129,] 0.65798004 0.68403992 0.34201996 [130,] 0.54006800 0.91986399 0.45993200 [131,] 0.38492767 0.76985534 0.61507233 > postscript(file="/var/www/rcomp/tmp/17gy61292443905.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(x[,1], type='l', main='Actuals and Interpolation', ylab='value of Actuals and Interpolation (dots)', xlab='time or index') > points(x[,1]-mysum$resid) > grid() > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/27gy61292443905.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(mysum$resid, type='b', pch=19, main='Residuals', ylab='value of Residuals', xlab='time or index') > grid() > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/37gy61292443905.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > hist(mysum$resid, main='Residual Histogram', xlab='values of Residuals') > grid() > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/4z7f91292443905.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > densityplot(~mysum$resid,col='black',main='Residual Density Plot', xlab='values of Residuals') > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/5z7f91292443905.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > qqnorm(mysum$resid, main='Residual Normal Q-Q Plot') > qqline(mysum$resid) > grid() > dev.off() null device 1 > (myerror <- as.ts(mysum$resid)) Time Series: Start = 1 End = 150 Frequency = 1 1 2 3 4 5 6 -3.61884617 -0.43353997 3.24770196 0.72832605 -0.99169890 -2.56079533 7 8 9 10 11 12 3.62220599 -1.29233414 -2.15158454 0.12399752 0.94892333 1.10207561 13 14 15 16 17 18 1.13562704 -0.64694191 2.40878679 -1.29375503 2.81141256 0.90650633 19 20 21 22 23 24 -1.31570400 1.31006491 4.17631724 1.27797501 0.81208283 1.71357696 25 26 27 28 29 30 1.03363101 1.48334450 -1.95768453 -1.34652431 -2.94455895 -1.14416211 31 32 33 34 35 36 0.59048659 -1.85472170 -7.39104193 -3.26146357 -0.60439982 -0.77546766 37 38 39 40 41 42 1.55297955 2.15585890 -1.52954004 1.79546857 -1.02794003 -1.25397711 43 44 45 46 47 48 -3.54765923 -0.93168470 0.25081401 -1.26036724 1.59996393 -1.24025153 49 50 51 52 53 54 -3.54705491 0.98016910 -4.96360424 -0.48594560 0.25810112 0.83962129 55 56 57 58 59 60 -0.21342590 1.15103977 -1.54196032 -0.52576574 -0.17634350 -2.39510853 61 62 63 64 65 66 3.39955200 1.01520334 3.29215953 2.57735174 -2.50235419 0.13341506 67 68 69 70 71 72 -4.39242864 1.28877231 2.58383047 1.73315440 0.46742189 0.51208737 73 74 75 76 77 78 1.27495993 -1.67728481 0.93932566 1.22679885 4.05687513 0.76232669 79 80 81 82 83 84 2.18903935 -0.29016845 0.20574250 -0.03431547 1.77660279 -2.90750846 85 86 87 88 89 90 1.04730291 0.87195192 1.95587665 -1.31389817 0.13405449 0.79302858 91 92 93 94 95 96 -0.13083063 0.23010855 -1.55110040 1.92956108 0.95516507 3.73196056 97 98 99 100 101 102 -0.39714031 2.00423340 -1.29756290 1.23439058 1.92968721 -1.22688803 103 104 105 106 107 108 1.08359516 0.85958718 1.65001123 -0.06436760 -3.70618585 2.35261411 109 110 111 112 113 114 0.45789750 -0.33837800 -0.64164946 0.72490081 0.50432543 0.88081808 115 116 117 118 119 120 -1.68383219 0.36006796 0.48087365 0.90770375 0.26504732 1.57631203 121 122 123 124 125 126 -0.61321509 -1.47448981 1.78469630 -3.94709444 1.82336603 -0.50044868 127 128 129 130 131 132 -1.09952570 -1.23703416 -0.10672567 -2.45955772 -1.97596184 -6.24537187 133 134 135 136 137 138 0.05921344 0.48403952 1.97150357 0.90398022 -4.65327884 4.36891042 139 140 141 142 143 144 -0.52006422 1.03631248 1.70783231 1.37837907 0.92166592 -2.79024456 145 146 147 148 149 150 1.39602772 -0.99020626 -0.46210100 0.44878530 -2.92150000 -0.27889839 > postscript(file="/var/www/rcomp/tmp/6sgec1292443905.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > dum <- cbind(lag(myerror,k=1),myerror) > dum Time Series: Start = 0 End = 150 Frequency = 1 lag(myerror, k = 1) myerror 0 -3.61884617 NA 1 -0.43353997 -3.61884617 2 3.24770196 -0.43353997 3 0.72832605 3.24770196 4 -0.99169890 0.72832605 5 -2.56079533 -0.99169890 6 3.62220599 -2.56079533 7 -1.29233414 3.62220599 8 -2.15158454 -1.29233414 9 0.12399752 -2.15158454 10 0.94892333 0.12399752 11 1.10207561 0.94892333 12 1.13562704 1.10207561 13 -0.64694191 1.13562704 14 2.40878679 -0.64694191 15 -1.29375503 2.40878679 16 2.81141256 -1.29375503 17 0.90650633 2.81141256 18 -1.31570400 0.90650633 19 1.31006491 -1.31570400 20 4.17631724 1.31006491 21 1.27797501 4.17631724 22 0.81208283 1.27797501 23 1.71357696 0.81208283 24 1.03363101 1.71357696 25 1.48334450 1.03363101 26 -1.95768453 1.48334450 27 -1.34652431 -1.95768453 28 -2.94455895 -1.34652431 29 -1.14416211 -2.94455895 30 0.59048659 -1.14416211 31 -1.85472170 0.59048659 32 -7.39104193 -1.85472170 33 -3.26146357 -7.39104193 34 -0.60439982 -3.26146357 35 -0.77546766 -0.60439982 36 1.55297955 -0.77546766 37 2.15585890 1.55297955 38 -1.52954004 2.15585890 39 1.79546857 -1.52954004 40 -1.02794003 1.79546857 41 -1.25397711 -1.02794003 42 -3.54765923 -1.25397711 43 -0.93168470 -3.54765923 44 0.25081401 -0.93168470 45 -1.26036724 0.25081401 46 1.59996393 -1.26036724 47 -1.24025153 1.59996393 48 -3.54705491 -1.24025153 49 0.98016910 -3.54705491 50 -4.96360424 0.98016910 51 -0.48594560 -4.96360424 52 0.25810112 -0.48594560 53 0.83962129 0.25810112 54 -0.21342590 0.83962129 55 1.15103977 -0.21342590 56 -1.54196032 1.15103977 57 -0.52576574 -1.54196032 58 -0.17634350 -0.52576574 59 -2.39510853 -0.17634350 60 3.39955200 -2.39510853 61 1.01520334 3.39955200 62 3.29215953 1.01520334 63 2.57735174 3.29215953 64 -2.50235419 2.57735174 65 0.13341506 -2.50235419 66 -4.39242864 0.13341506 67 1.28877231 -4.39242864 68 2.58383047 1.28877231 69 1.73315440 2.58383047 70 0.46742189 1.73315440 71 0.51208737 0.46742189 72 1.27495993 0.51208737 73 -1.67728481 1.27495993 74 0.93932566 -1.67728481 75 1.22679885 0.93932566 76 4.05687513 1.22679885 77 0.76232669 4.05687513 78 2.18903935 0.76232669 79 -0.29016845 2.18903935 80 0.20574250 -0.29016845 81 -0.03431547 0.20574250 82 1.77660279 -0.03431547 83 -2.90750846 1.77660279 84 1.04730291 -2.90750846 85 0.87195192 1.04730291 86 1.95587665 0.87195192 87 -1.31389817 1.95587665 88 0.13405449 -1.31389817 89 0.79302858 0.13405449 90 -0.13083063 0.79302858 91 0.23010855 -0.13083063 92 -1.55110040 0.23010855 93 1.92956108 -1.55110040 94 0.95516507 1.92956108 95 3.73196056 0.95516507 96 -0.39714031 3.73196056 97 2.00423340 -0.39714031 98 -1.29756290 2.00423340 99 1.23439058 -1.29756290 100 1.92968721 1.23439058 101 -1.22688803 1.92968721 102 1.08359516 -1.22688803 103 0.85958718 1.08359516 104 1.65001123 0.85958718 105 -0.06436760 1.65001123 106 -3.70618585 -0.06436760 107 2.35261411 -3.70618585 108 0.45789750 2.35261411 109 -0.33837800 0.45789750 110 -0.64164946 -0.33837800 111 0.72490081 -0.64164946 112 0.50432543 0.72490081 113 0.88081808 0.50432543 114 -1.68383219 0.88081808 115 0.36006796 -1.68383219 116 0.48087365 0.36006796 117 0.90770375 0.48087365 118 0.26504732 0.90770375 119 1.57631203 0.26504732 120 -0.61321509 1.57631203 121 -1.47448981 -0.61321509 122 1.78469630 -1.47448981 123 -3.94709444 1.78469630 124 1.82336603 -3.94709444 125 -0.50044868 1.82336603 126 -1.09952570 -0.50044868 127 -1.23703416 -1.09952570 128 -0.10672567 -1.23703416 129 -2.45955772 -0.10672567 130 -1.97596184 -2.45955772 131 -6.24537187 -1.97596184 132 0.05921344 -6.24537187 133 0.48403952 0.05921344 134 1.97150357 0.48403952 135 0.90398022 1.97150357 136 -4.65327884 0.90398022 137 4.36891042 -4.65327884 138 -0.52006422 4.36891042 139 1.03631248 -0.52006422 140 1.70783231 1.03631248 141 1.37837907 1.70783231 142 0.92166592 1.37837907 143 -2.79024456 0.92166592 144 1.39602772 -2.79024456 145 -0.99020626 1.39602772 146 -0.46210100 -0.99020626 147 0.44878530 -0.46210100 148 -2.92150000 0.44878530 149 -0.27889839 -2.92150000 150 NA -0.27889839 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -0.43353997 -3.61884617 [2,] 3.24770196 -0.43353997 [3,] 0.72832605 3.24770196 [4,] -0.99169890 0.72832605 [5,] -2.56079533 -0.99169890 [6,] 3.62220599 -2.56079533 [7,] -1.29233414 3.62220599 [8,] -2.15158454 -1.29233414 [9,] 0.12399752 -2.15158454 [10,] 0.94892333 0.12399752 [11,] 1.10207561 0.94892333 [12,] 1.13562704 1.10207561 [13,] -0.64694191 1.13562704 [14,] 2.40878679 -0.64694191 [15,] -1.29375503 2.40878679 [16,] 2.81141256 -1.29375503 [17,] 0.90650633 2.81141256 [18,] -1.31570400 0.90650633 [19,] 1.31006491 -1.31570400 [20,] 4.17631724 1.31006491 [21,] 1.27797501 4.17631724 [22,] 0.81208283 1.27797501 [23,] 1.71357696 0.81208283 [24,] 1.03363101 1.71357696 [25,] 1.48334450 1.03363101 [26,] -1.95768453 1.48334450 [27,] -1.34652431 -1.95768453 [28,] -2.94455895 -1.34652431 [29,] -1.14416211 -2.94455895 [30,] 0.59048659 -1.14416211 [31,] -1.85472170 0.59048659 [32,] -7.39104193 -1.85472170 [33,] -3.26146357 -7.39104193 [34,] -0.60439982 -3.26146357 [35,] -0.77546766 -0.60439982 [36,] 1.55297955 -0.77546766 [37,] 2.15585890 1.55297955 [38,] -1.52954004 2.15585890 [39,] 1.79546857 -1.52954004 [40,] -1.02794003 1.79546857 [41,] -1.25397711 -1.02794003 [42,] -3.54765923 -1.25397711 [43,] -0.93168470 -3.54765923 [44,] 0.25081401 -0.93168470 [45,] -1.26036724 0.25081401 [46,] 1.59996393 -1.26036724 [47,] -1.24025153 1.59996393 [48,] -3.54705491 -1.24025153 [49,] 0.98016910 -3.54705491 [50,] -4.96360424 0.98016910 [51,] -0.48594560 -4.96360424 [52,] 0.25810112 -0.48594560 [53,] 0.83962129 0.25810112 [54,] -0.21342590 0.83962129 [55,] 1.15103977 -0.21342590 [56,] -1.54196032 1.15103977 [57,] -0.52576574 -1.54196032 [58,] -0.17634350 -0.52576574 [59,] -2.39510853 -0.17634350 [60,] 3.39955200 -2.39510853 [61,] 1.01520334 3.39955200 [62,] 3.29215953 1.01520334 [63,] 2.57735174 3.29215953 [64,] -2.50235419 2.57735174 [65,] 0.13341506 -2.50235419 [66,] -4.39242864 0.13341506 [67,] 1.28877231 -4.39242864 [68,] 2.58383047 1.28877231 [69,] 1.73315440 2.58383047 [70,] 0.46742189 1.73315440 [71,] 0.51208737 0.46742189 [72,] 1.27495993 0.51208737 [73,] -1.67728481 1.27495993 [74,] 0.93932566 -1.67728481 [75,] 1.22679885 0.93932566 [76,] 4.05687513 1.22679885 [77,] 0.76232669 4.05687513 [78,] 2.18903935 0.76232669 [79,] -0.29016845 2.18903935 [80,] 0.20574250 -0.29016845 [81,] -0.03431547 0.20574250 [82,] 1.77660279 -0.03431547 [83,] -2.90750846 1.77660279 [84,] 1.04730291 -2.90750846 [85,] 0.87195192 1.04730291 [86,] 1.95587665 0.87195192 [87,] -1.31389817 1.95587665 [88,] 0.13405449 -1.31389817 [89,] 0.79302858 0.13405449 [90,] -0.13083063 0.79302858 [91,] 0.23010855 -0.13083063 [92,] -1.55110040 0.23010855 [93,] 1.92956108 -1.55110040 [94,] 0.95516507 1.92956108 [95,] 3.73196056 0.95516507 [96,] -0.39714031 3.73196056 [97,] 2.00423340 -0.39714031 [98,] -1.29756290 2.00423340 [99,] 1.23439058 -1.29756290 [100,] 1.92968721 1.23439058 [101,] -1.22688803 1.92968721 [102,] 1.08359516 -1.22688803 [103,] 0.85958718 1.08359516 [104,] 1.65001123 0.85958718 [105,] -0.06436760 1.65001123 [106,] -3.70618585 -0.06436760 [107,] 2.35261411 -3.70618585 [108,] 0.45789750 2.35261411 [109,] -0.33837800 0.45789750 [110,] -0.64164946 -0.33837800 [111,] 0.72490081 -0.64164946 [112,] 0.50432543 0.72490081 [113,] 0.88081808 0.50432543 [114,] -1.68383219 0.88081808 [115,] 0.36006796 -1.68383219 [116,] 0.48087365 0.36006796 [117,] 0.90770375 0.48087365 [118,] 0.26504732 0.90770375 [119,] 1.57631203 0.26504732 [120,] -0.61321509 1.57631203 [121,] -1.47448981 -0.61321509 [122,] 1.78469630 -1.47448981 [123,] -3.94709444 1.78469630 [124,] 1.82336603 -3.94709444 [125,] -0.50044868 1.82336603 [126,] -1.09952570 -0.50044868 [127,] -1.23703416 -1.09952570 [128,] -0.10672567 -1.23703416 [129,] -2.45955772 -0.10672567 [130,] -1.97596184 -2.45955772 [131,] -6.24537187 -1.97596184 [132,] 0.05921344 -6.24537187 [133,] 0.48403952 0.05921344 [134,] 1.97150357 0.48403952 [135,] 0.90398022 1.97150357 [136,] -4.65327884 0.90398022 [137,] 4.36891042 -4.65327884 [138,] -0.52006422 4.36891042 [139,] 1.03631248 -0.52006422 [140,] 1.70783231 1.03631248 [141,] 1.37837907 1.70783231 [142,] 0.92166592 1.37837907 [143,] -2.79024456 0.92166592 [144,] 1.39602772 -2.79024456 [145,] -0.99020626 1.39602772 [146,] -0.46210100 -0.99020626 [147,] 0.44878530 -0.46210100 [148,] -2.92150000 0.44878530 [149,] -0.27889839 -2.92150000 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -0.43353997 -3.61884617 2 3.24770196 -0.43353997 3 0.72832605 3.24770196 4 -0.99169890 0.72832605 5 -2.56079533 -0.99169890 6 3.62220599 -2.56079533 7 -1.29233414 3.62220599 8 -2.15158454 -1.29233414 9 0.12399752 -2.15158454 10 0.94892333 0.12399752 11 1.10207561 0.94892333 12 1.13562704 1.10207561 13 -0.64694191 1.13562704 14 2.40878679 -0.64694191 15 -1.29375503 2.40878679 16 2.81141256 -1.29375503 17 0.90650633 2.81141256 18 -1.31570400 0.90650633 19 1.31006491 -1.31570400 20 4.17631724 1.31006491 21 1.27797501 4.17631724 22 0.81208283 1.27797501 23 1.71357696 0.81208283 24 1.03363101 1.71357696 25 1.48334450 1.03363101 26 -1.95768453 1.48334450 27 -1.34652431 -1.95768453 28 -2.94455895 -1.34652431 29 -1.14416211 -2.94455895 30 0.59048659 -1.14416211 31 -1.85472170 0.59048659 32 -7.39104193 -1.85472170 33 -3.26146357 -7.39104193 34 -0.60439982 -3.26146357 35 -0.77546766 -0.60439982 36 1.55297955 -0.77546766 37 2.15585890 1.55297955 38 -1.52954004 2.15585890 39 1.79546857 -1.52954004 40 -1.02794003 1.79546857 41 -1.25397711 -1.02794003 42 -3.54765923 -1.25397711 43 -0.93168470 -3.54765923 44 0.25081401 -0.93168470 45 -1.26036724 0.25081401 46 1.59996393 -1.26036724 47 -1.24025153 1.59996393 48 -3.54705491 -1.24025153 49 0.98016910 -3.54705491 50 -4.96360424 0.98016910 51 -0.48594560 -4.96360424 52 0.25810112 -0.48594560 53 0.83962129 0.25810112 54 -0.21342590 0.83962129 55 1.15103977 -0.21342590 56 -1.54196032 1.15103977 57 -0.52576574 -1.54196032 58 -0.17634350 -0.52576574 59 -2.39510853 -0.17634350 60 3.39955200 -2.39510853 61 1.01520334 3.39955200 62 3.29215953 1.01520334 63 2.57735174 3.29215953 64 -2.50235419 2.57735174 65 0.13341506 -2.50235419 66 -4.39242864 0.13341506 67 1.28877231 -4.39242864 68 2.58383047 1.28877231 69 1.73315440 2.58383047 70 0.46742189 1.73315440 71 0.51208737 0.46742189 72 1.27495993 0.51208737 73 -1.67728481 1.27495993 74 0.93932566 -1.67728481 75 1.22679885 0.93932566 76 4.05687513 1.22679885 77 0.76232669 4.05687513 78 2.18903935 0.76232669 79 -0.29016845 2.18903935 80 0.20574250 -0.29016845 81 -0.03431547 0.20574250 82 1.77660279 -0.03431547 83 -2.90750846 1.77660279 84 1.04730291 -2.90750846 85 0.87195192 1.04730291 86 1.95587665 0.87195192 87 -1.31389817 1.95587665 88 0.13405449 -1.31389817 89 0.79302858 0.13405449 90 -0.13083063 0.79302858 91 0.23010855 -0.13083063 92 -1.55110040 0.23010855 93 1.92956108 -1.55110040 94 0.95516507 1.92956108 95 3.73196056 0.95516507 96 -0.39714031 3.73196056 97 2.00423340 -0.39714031 98 -1.29756290 2.00423340 99 1.23439058 -1.29756290 100 1.92968721 1.23439058 101 -1.22688803 1.92968721 102 1.08359516 -1.22688803 103 0.85958718 1.08359516 104 1.65001123 0.85958718 105 -0.06436760 1.65001123 106 -3.70618585 -0.06436760 107 2.35261411 -3.70618585 108 0.45789750 2.35261411 109 -0.33837800 0.45789750 110 -0.64164946 -0.33837800 111 0.72490081 -0.64164946 112 0.50432543 0.72490081 113 0.88081808 0.50432543 114 -1.68383219 0.88081808 115 0.36006796 -1.68383219 116 0.48087365 0.36006796 117 0.90770375 0.48087365 118 0.26504732 0.90770375 119 1.57631203 0.26504732 120 -0.61321509 1.57631203 121 -1.47448981 -0.61321509 122 1.78469630 -1.47448981 123 -3.94709444 1.78469630 124 1.82336603 -3.94709444 125 -0.50044868 1.82336603 126 -1.09952570 -0.50044868 127 -1.23703416 -1.09952570 128 -0.10672567 -1.23703416 129 -2.45955772 -0.10672567 130 -1.97596184 -2.45955772 131 -6.24537187 -1.97596184 132 0.05921344 -6.24537187 133 0.48403952 0.05921344 134 1.97150357 0.48403952 135 0.90398022 1.97150357 136 -4.65327884 0.90398022 137 4.36891042 -4.65327884 138 -0.52006422 4.36891042 139 1.03631248 -0.52006422 140 1.70783231 1.03631248 141 1.37837907 1.70783231 142 0.92166592 1.37837907 143 -2.79024456 0.92166592 144 1.39602772 -2.79024456 145 -0.99020626 1.39602772 146 -0.46210100 -0.99020626 147 0.44878530 -0.46210100 148 -2.92150000 0.44878530 149 -0.27889839 -2.92150000 > 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/rcomp/tmp/7sgec1292443905.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > acf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Autocorrelation Function') > grid() > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/837vx1292443905.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > pacf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Partial Autocorrelation Function') > grid() > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/937vx1292443905.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > opar <- par(mfrow = c(2,2), oma = c(0, 0, 1.1, 0)) > plot(mylm, las = 1, sub='Residual Diagnostics') > par(opar) > dev.off() null device 1 > if (n > n25) { + postscript(file="/var/www/rcomp/tmp/10ezd01292443905.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) + plot(kp3:nmkm3,gqarr[,2], main='Goldfeld-Quandt test',ylab='2-sided p-value',xlab='breakpoint') + grid() + dev.off() + } null device 1 > > #Note: the /var/www/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/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/rcomp/tmp/11zzb61292443905.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/rcomp/tmp/1220sb1292443905.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/rcomp/tmp/13gr7k1292443905.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/rcomp/tmp/14ks6q1292443905.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/rcomp/tmp/15ntne1292443905.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/rcomp/tmp/16rbl21292443905.tab") + } > > try(system("convert tmp/17gy61292443905.ps tmp/17gy61292443905.png",intern=TRUE)) character(0) > try(system("convert tmp/27gy61292443905.ps tmp/27gy61292443905.png",intern=TRUE)) character(0) > try(system("convert tmp/37gy61292443905.ps tmp/37gy61292443905.png",intern=TRUE)) character(0) > try(system("convert tmp/4z7f91292443905.ps tmp/4z7f91292443905.png",intern=TRUE)) character(0) > try(system("convert tmp/5z7f91292443905.ps tmp/5z7f91292443905.png",intern=TRUE)) character(0) > try(system("convert tmp/6sgec1292443905.ps tmp/6sgec1292443905.png",intern=TRUE)) character(0) > try(system("convert tmp/7sgec1292443905.ps tmp/7sgec1292443905.png",intern=TRUE)) character(0) > try(system("convert tmp/837vx1292443905.ps tmp/837vx1292443905.png",intern=TRUE)) character(0) > try(system("convert tmp/937vx1292443905.ps tmp/937vx1292443905.png",intern=TRUE)) character(0) > try(system("convert tmp/10ezd01292443905.ps tmp/10ezd01292443905.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 4.46 1.76 6.20