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(69 + ,26 + ,9 + ,15 + ,25 + ,25 + ,53 + ,20 + ,9 + ,15 + ,25 + ,24 + ,43 + ,21 + ,9 + ,14 + ,19 + ,21 + ,60 + ,31 + ,14 + ,10 + ,18 + ,23 + ,49 + ,21 + ,8 + ,10 + ,18 + ,17 + ,62 + ,18 + ,8 + ,12 + ,22 + ,19 + ,45 + ,26 + ,11 + ,18 + ,29 + ,18 + ,50 + ,22 + ,10 + ,12 + ,26 + ,27 + ,75 + ,22 + ,9 + ,14 + ,25 + ,23 + ,82 + ,29 + ,15 + ,18 + ,23 + ,23 + ,60 + ,15 + ,14 + ,9 + ,23 + ,29 + ,59 + ,16 + ,11 + ,11 + ,23 + ,21 + ,21 + ,24 + ,14 + ,11 + ,24 + ,26 + ,62 + ,17 + ,6 + ,17 + ,30 + ,25 + ,54 + ,19 + ,20 + ,8 + ,19 + ,25 + ,47 + ,22 + ,9 + ,16 + ,24 + ,23 + ,59 + ,31 + ,10 + ,21 + ,32 + ,26 + ,37 + ,28 + ,8 + ,24 + ,30 + ,20 + ,43 + ,38 + ,11 + ,21 + ,29 + ,29 + ,48 + ,26 + ,14 + ,14 + ,17 + ,24 + ,79 + ,25 + ,11 + ,7 + ,25 + ,23 + ,62 + ,25 + ,16 + ,18 + ,26 + ,24 + ,16 + ,29 + ,14 + ,18 + ,26 + ,30 + ,38 + ,28 + ,11 + ,13 + ,25 + ,22 + ,58 + ,15 + ,11 + ,11 + ,23 + ,22 + ,60 + ,18 + ,12 + ,13 + ,21 + ,13 + ,67 + ,21 + ,9 + ,13 + ,19 + ,24 + ,55 + ,25 + ,7 + ,18 + ,35 + ,17 + ,47 + ,23 + ,13 + ,14 + ,19 + ,24 + ,59 + ,23 + ,10 + ,12 + ,20 + ,21 + ,49 + ,19 + ,9 + ,9 + ,21 + ,23 + ,47 + ,18 + ,9 + ,12 + ,21 + ,24 + ,57 + ,18 + ,13 + ,8 + ,24 + ,24 + ,39 + ,26 + ,16 + ,5 + ,23 + ,24 + ,49 + ,18 + ,12 + ,10 + ,19 + ,23 + ,26 + ,18 + ,6 + ,11 + ,17 + ,26 + ,53 + ,28 + ,14 + ,11 + ,24 + ,24 + ,75 + ,17 + ,14 + ,12 + ,15 + ,21 + ,65 + ,29 + ,10 + ,12 + ,25 + ,23 + ,49 + ,12 + ,4 + ,15 + ,27 + ,28 + ,48 + ,25 + ,12 + ,12 + ,29 + ,23 + ,45 + ,28 + ,12 + ,16 + ,27 + ,22 + ,31 + ,20 + ,14 + ,14 + ,18 + ,24 + ,61 + ,17 + ,9 + ,17 + ,25 + ,21 + ,49 + ,17 + ,9 + ,13 + ,22 + ,23 + ,69 + ,20 + ,10 + ,10 + ,26 + ,23 + ,54 + ,31 + ,14 + ,17 + ,23 + ,20 + ,80 + ,21 + ,10 + ,12 + ,16 + ,23 + ,57 + ,19 + ,9 + ,13 + ,27 + ,21 + ,34 + ,23 + ,14 + ,13 + ,25 + ,27 + ,69 + ,15 + ,8 + ,11 + ,14 + ,12 + ,44 + ,24 + ,9 + ,13 + ,19 + ,15 + ,70 + ,28 + ,8 + ,12 + ,20 + ,22 + ,51 + ,16 + ,9 + ,12 + ,16 + ,21 + ,66 + ,19 + ,9 + ,12 + ,18 + ,21 + ,18 + ,21 + ,9 + ,9 + ,22 + ,20 + ,74 + ,21 + ,15 + ,7 + ,21 + ,24 + ,59 + ,20 + ,8 + ,17 + ,22 + ,24 + ,48 + ,16 + ,10 + ,12 + ,22 + ,29 + ,55 + ,25 + ,8 + ,12 + ,32 + ,25 + ,44 + ,30 + ,14 + ,9 + ,23 + ,14 + ,56 + ,29 + ,11 + ,9 + ,31 + ,30 + ,65 + ,22 + ,10 + ,13 + ,18 + ,19 + ,77 + ,19 + ,12 + ,10 + ,23 + ,29 + ,46 + ,33 + ,14 + ,11 + ,26 + ,25 + ,70 + ,17 + ,9 + ,12 + ,24 + ,25 + ,39 + ,9 + ,13 + ,10 + ,19 + ,25 + ,55 + ,14 + ,15 + ,13 + ,14 + ,16 + ,44 + ,15 + ,8 + ,6 + ,20 + ,25 + ,45 + ,12 + ,7 + ,7 + ,22 + ,28 + ,45 + ,21 + ,10 + ,13 + ,24 + ,24 + ,49 + ,20 + ,10 + ,11 + ,25 + ,25 + ,65 + ,29 + ,13 + ,18 + ,21 + ,21 + ,45 + ,33 + ,11 + ,9 + ,28 + ,22 + ,71 + ,21 + ,8 + ,9 + ,24 + ,20 + ,48 + ,15 + ,12 + ,11 + ,20 + ,25 + ,41 + ,19 + ,9 + ,11 + ,21 + ,27 + ,40 + ,23 + ,10 + ,15 + ,23 + ,21 + ,64 + ,20 + ,11 + ,8 + ,13 + ,13 + ,56 + ,20 + ,11 + ,11 + ,24 + ,26 + ,52 + ,18 + ,10 + ,14 + ,21 + ,26 + ,41 + ,31 + ,16 + ,14 + ,21 + ,25 + ,42 + ,18 + ,16 + ,12 + ,17 + ,22 + ,54 + ,13 + ,8 + ,12 + ,14 + ,19 + ,40 + ,9 + ,6 + ,8 + ,29 + ,23 + ,40 + ,20 + ,11 + ,11 + ,25 + ,25 + ,51 + ,18 + ,12 + ,10 + ,16 + ,15 + ,48 + ,23 + ,14 + ,17 + ,25 + ,21 + ,80 + ,17 + ,9 + ,16 + ,25 + ,23 + ,38 + ,17 + ,11 + ,13 + ,21 + ,25 + ,57 + ,16 + ,8 + ,15 + ,23 + ,24 + ,28 + ,31 + ,8 + ,11 + ,22 + ,24 + ,51 + ,15 + ,7 + ,12 + ,19 + ,21 + ,46 + ,28 + ,16 + ,16 + ,24 + ,24 + ,58 + ,26 + ,13 + ,20 + ,26 + ,22 + ,67 + ,20 + ,8 + ,16 + ,25 + ,24 + ,72 + ,19 + ,11 + ,11 + ,20 + ,28 + ,26 + ,25 + ,14 + ,15 + ,22 + ,21 + ,54 + ,18 + ,10 + ,15 + ,14 + ,17 + ,53 + ,20 + ,10 + ,12 + ,20 + ,28 + ,64 + ,33 + ,14 + ,9 + ,32 + ,24 + ,47 + ,24 + ,14 + ,24 + ,21 + ,10 + ,43 + ,22 + ,10 + ,15 + ,22 + ,20 + ,66 + ,32 + ,12 + ,18 + ,28 + ,22 + ,54 + ,31 + ,9 + ,17 + ,25 + ,19 + ,62 + ,13 + ,16 + ,12 + ,17 + ,22 + ,52 + ,18 + ,8 + ,15 + ,21 + ,22 + ,64 + ,17 + ,9 + ,11 + ,23 + ,26 + ,55 + ,29 + ,16 + ,11 + ,27 + ,24 + ,57 + ,22 + ,13 + ,15 + ,22 + ,22 + ,74 + ,18 + ,13 + ,12 + ,19 + ,20 + ,32 + ,22 + ,8 + ,14 + ,20 + ,20 + ,38 + ,25 + ,14 + ,11 + ,17 + ,15 + ,66 + ,20 + ,11 + ,20 + ,24 + ,20 + ,37 + ,20 + ,9 + ,11 + ,21 + ,20 + ,26 + ,17 + ,8 + ,12 + ,21 + ,24 + ,64 + ,21 + ,13 + ,17 + ,23 + ,22 + ,28 + ,26 + ,13 + ,12 + ,24 + ,29 + ,66 + ,10 + ,10 + ,11 + ,19 + ,23 + ,65 + ,15 + ,8 + ,10 + ,22 + ,24 + ,48 + ,20 + ,7 + ,11 + ,26 + ,22 + ,44 + ,14 + ,11 + ,12 + ,17 + ,16 + ,64 + ,16 + ,11 + ,9 + ,17 + ,23 + ,39 + ,23 + ,14 + ,8 + ,19 + ,27 + ,50 + ,11 + ,6 + ,6 + ,15 + ,16 + ,66 + ,19 + ,10 + ,12 + ,17 + ,21 + ,48 + ,30 + ,9 + ,15 + ,27 + ,26 + ,70 + ,21 + ,12 + ,13 + ,19 + ,22 + ,66 + ,20 + ,11 + ,17 + ,21 + ,23 + ,61 + ,22 + ,14 + ,14 + ,25 + ,19 + ,31 + ,30 + ,12 + ,16 + ,19 + ,18 + ,61 + ,25 + ,14 + ,15 + ,22 + ,24 + ,54 + ,28 + ,8 + ,16 + ,18 + ,24 + ,34 + ,23 + ,14 + ,11 + ,20 + ,29 + ,62 + ,23 + ,8 + ,11 + ,15 + ,22 + ,47 + ,21 + ,11 + ,16 + ,20 + ,24 + ,52 + ,30 + ,12 + ,15 + ,29 + ,22 + ,37 + ,22 + ,9 + ,14 + ,19 + ,12 + ,46 + ,32 + ,16 + ,9 + ,29 + ,26 + ,38 + ,22 + ,11 + ,13 + ,24 + ,18 + ,63 + ,15 + ,11 + ,11 + ,23 + ,22 + ,34 + ,21 + ,12 + ,14 + ,22 + ,24 + ,46 + ,27 + ,15 + ,11 + ,23 + ,21 + ,40 + ,22 + ,13 + ,12 + ,22 + ,15 + ,30 + ,9 + ,6 + ,8 + ,29 + ,23 + ,35 + ,29 + ,11 + ,7 + ,26 + ,22 + ,51 + ,20 + ,7 + ,11 + ,26 + ,22 + ,56 + ,16 + ,8 + ,13 + ,21 + ,24 + ,68 + ,16 + ,8 + ,9 + ,18 + ,23 + ,39 + ,16 + ,9 + ,12 + ,10 + ,13 + ,44 + ,18 + ,12 + ,10 + ,19 + ,23 + ,58 + ,16 + ,9 + ,12 + ,10 + ,13) + ,dim=c(6 + ,152) + ,dimnames=list(c('Anxiety' + ,'Concern' + ,'Doubts' + ,'Pexpectations' + ,'Standards' + ,'Organization') + ,1:152)) > y <- array(NA,dim=c(6,152),dimnames=list(c('Anxiety','Concern','Doubts','Pexpectations','Standards','Organization'),1:152)) > 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 = '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 Anxiety Concern Doubts Pexpectations Standards Organization 1 69 26 9 15 25 25 2 53 20 9 15 25 24 3 43 21 9 14 19 21 4 60 31 14 10 18 23 5 49 21 8 10 18 17 6 62 18 8 12 22 19 7 45 26 11 18 29 18 8 50 22 10 12 26 27 9 75 22 9 14 25 23 10 82 29 15 18 23 23 11 60 15 14 9 23 29 12 59 16 11 11 23 21 13 21 24 14 11 24 26 14 62 17 6 17 30 25 15 54 19 20 8 19 25 16 47 22 9 16 24 23 17 59 31 10 21 32 26 18 37 28 8 24 30 20 19 43 38 11 21 29 29 20 48 26 14 14 17 24 21 79 25 11 7 25 23 22 62 25 16 18 26 24 23 16 29 14 18 26 30 24 38 28 11 13 25 22 25 58 15 11 11 23 22 26 60 18 12 13 21 13 27 67 21 9 13 19 24 28 55 25 7 18 35 17 29 47 23 13 14 19 24 30 59 23 10 12 20 21 31 49 19 9 9 21 23 32 47 18 9 12 21 24 33 57 18 13 8 24 24 34 39 26 16 5 23 24 35 49 18 12 10 19 23 36 26 18 6 11 17 26 37 53 28 14 11 24 24 38 75 17 14 12 15 21 39 65 29 10 12 25 23 40 49 12 4 15 27 28 41 48 25 12 12 29 23 42 45 28 12 16 27 22 43 31 20 14 14 18 24 44 61 17 9 17 25 21 45 49 17 9 13 22 23 46 69 20 10 10 26 23 47 54 31 14 17 23 20 48 80 21 10 12 16 23 49 57 19 9 13 27 21 50 34 23 14 13 25 27 51 69 15 8 11 14 12 52 44 24 9 13 19 15 53 70 28 8 12 20 22 54 51 16 9 12 16 21 55 66 19 9 12 18 21 56 18 21 9 9 22 20 57 74 21 15 7 21 24 58 59 20 8 17 22 24 59 48 16 10 12 22 29 60 55 25 8 12 32 25 61 44 30 14 9 23 14 62 56 29 11 9 31 30 63 65 22 10 13 18 19 64 77 19 12 10 23 29 65 46 33 14 11 26 25 66 70 17 9 12 24 25 67 39 9 13 10 19 25 68 55 14 15 13 14 16 69 44 15 8 6 20 25 70 45 12 7 7 22 28 71 45 21 10 13 24 24 72 49 20 10 11 25 25 73 65 29 13 18 21 21 74 45 33 11 9 28 22 75 71 21 8 9 24 20 76 48 15 12 11 20 25 77 41 19 9 11 21 27 78 40 23 10 15 23 21 79 64 20 11 8 13 13 80 56 20 11 11 24 26 81 52 18 10 14 21 26 82 41 31 16 14 21 25 83 42 18 16 12 17 22 84 54 13 8 12 14 19 85 40 9 6 8 29 23 86 40 20 11 11 25 25 87 51 18 12 10 16 15 88 48 23 14 17 25 21 89 80 17 9 16 25 23 90 38 17 11 13 21 25 91 57 16 8 15 23 24 92 28 31 8 11 22 24 93 51 15 7 12 19 21 94 46 28 16 16 24 24 95 58 26 13 20 26 22 96 67 20 8 16 25 24 97 72 19 11 11 20 28 98 26 25 14 15 22 21 99 54 18 10 15 14 17 100 53 20 10 12 20 28 101 64 33 14 9 32 24 102 47 24 14 24 21 10 103 43 22 10 15 22 20 104 66 32 12 18 28 22 105 54 31 9 17 25 19 106 62 13 16 12 17 22 107 52 18 8 15 21 22 108 64 17 9 11 23 26 109 55 29 16 11 27 24 110 57 22 13 15 22 22 111 74 18 13 12 19 20 112 32 22 8 14 20 20 113 38 25 14 11 17 15 114 66 20 11 20 24 20 115 37 20 9 11 21 20 116 26 17 8 12 21 24 117 64 21 13 17 23 22 118 28 26 13 12 24 29 119 66 10 10 11 19 23 120 65 15 8 10 22 24 121 48 20 7 11 26 22 122 44 14 11 12 17 16 123 64 16 11 9 17 23 124 39 23 14 8 19 27 125 50 11 6 6 15 16 126 66 19 10 12 17 21 127 48 30 9 15 27 26 128 70 21 12 13 19 22 129 66 20 11 17 21 23 130 61 22 14 14 25 19 131 31 30 12 16 19 18 132 61 25 14 15 22 24 133 54 28 8 16 18 24 134 34 23 14 11 20 29 135 62 23 8 11 15 22 136 47 21 11 16 20 24 137 52 30 12 15 29 22 138 37 22 9 14 19 12 139 46 32 16 9 29 26 140 38 22 11 13 24 18 141 63 15 11 11 23 22 142 34 21 12 14 22 24 143 46 27 15 11 23 21 144 40 22 13 12 22 15 145 30 9 6 8 29 23 146 35 29 11 7 26 22 147 51 20 7 11 26 22 148 56 16 8 13 21 24 149 68 16 8 9 18 23 150 39 16 9 12 10 13 151 44 18 12 10 19 23 152 58 16 9 12 10 13 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) Concern Doubts Pexpectations Standards 56.071094 -0.342981 0.077428 0.306566 0.004335 Organization -0.065349 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -34.879 -8.438 -1.064 9.225 30.599 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 56.071094 9.180962 6.107 8.73e-09 *** Concern -0.342981 0.247037 -1.388 0.167 Doubts 0.077428 0.448984 0.172 0.863 Pexpectations 0.306566 0.355773 0.862 0.390 Standards 0.004335 0.314703 0.014 0.989 Organization -0.065349 0.317583 -0.206 0.837 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 13.52 on 146 degrees of freedom Multiple R-squared: 0.01918, Adjusted R-squared: -0.01441 F-statistic: 0.5709 on 5 and 146 DF, p-value: 0.7222 > 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.6788305 0.64233893 0.32116947 [2,] 0.8228854 0.35422912 0.17711456 [3,] 0.7220371 0.55592579 0.27796289 [4,] 0.6301743 0.73965149 0.36982575 [5,] 0.9321368 0.13572630 0.06786315 [6,] 0.8937679 0.21246419 0.10623210 [7,] 0.8450014 0.30999717 0.15499859 [8,] 0.8472663 0.30546738 0.15273369 [9,] 0.7934435 0.41311304 0.20655652 [10,] 0.8622127 0.27557451 0.13778725 [11,] 0.8444334 0.31113326 0.15556663 [12,] 0.8118904 0.37621911 0.18810956 [13,] 0.8665344 0.26693124 0.13346562 [14,] 0.8437746 0.31245077 0.15622538 [15,] 0.9526787 0.09464267 0.04732134 [16,] 0.9607773 0.07844538 0.03922269 [17,] 0.9447486 0.11050275 0.05525137 [18,] 0.9253758 0.14924837 0.07462419 [19,] 0.9256547 0.14869059 0.07434530 [20,] 0.9017948 0.19641035 0.09820518 [21,] 0.8752328 0.24953450 0.12476725 [22,] 0.8438457 0.31230868 0.15615434 [23,] 0.8194628 0.36107438 0.18053719 [24,] 0.7886992 0.42260160 0.21130080 [25,] 0.7452939 0.50941230 0.25470615 [26,] 0.7513105 0.49737896 0.24868948 [27,] 0.7101616 0.57967675 0.28983838 [28,] 0.8063018 0.38739631 0.19369816 [29,] 0.7655265 0.46894698 0.23447349 [30,] 0.8093821 0.38123578 0.19061789 [31,] 0.8119147 0.37617052 0.18808526 [32,] 0.7765824 0.44683513 0.22341756 [33,] 0.7408701 0.51825972 0.25912986 [34,] 0.7088773 0.58224531 0.29112266 [35,] 0.7686136 0.46277283 0.23138642 [36,] 0.7338292 0.53234167 0.26617084 [37,] 0.6931217 0.61375657 0.30687829 [38,] 0.7041191 0.59176184 0.29588092 [39,] 0.6582302 0.68353954 0.34176977 [40,] 0.7902325 0.41953508 0.20976754 [41,] 0.7533089 0.49338214 0.24669107 [42,] 0.7681547 0.46369066 0.23184533 [43,] 0.7570998 0.48580035 0.24290017 [44,] 0.7593925 0.48121503 0.24060751 [45,] 0.7903190 0.41936209 0.20968104 [46,] 0.7562595 0.48748107 0.24374054 [47,] 0.7475343 0.50493146 0.25246573 [48,] 0.9179444 0.16411119 0.08205560 [49,] 0.9456871 0.10862587 0.05431293 [50,] 0.9336296 0.13274072 0.06637036 [51,] 0.9187256 0.16254876 0.08127438 [52,] 0.9008772 0.19824558 0.09912279 [53,] 0.8923960 0.21520791 0.10760396 [54,] 0.8776247 0.24475064 0.12237532 [55,] 0.8726412 0.25471764 0.12735882 [56,] 0.9235943 0.15281150 0.07640575 [57,] 0.9057521 0.18849587 0.09424793 [58,] 0.9143541 0.17129175 0.08564587 [59,] 0.9243538 0.15129236 0.07564618 [60,] 0.9058317 0.18833654 0.09416827 [61,] 0.8947620 0.21047603 0.10523802 [62,] 0.8799562 0.24008767 0.12004384 [63,] 0.8619735 0.27605302 0.13802651 [64,] 0.8351536 0.32969276 0.16484638 [65,] 0.8339994 0.33200119 0.16600060 [66,] 0.8082474 0.38350522 0.19175261 [67,] 0.8522085 0.29558294 0.14779147 [68,] 0.8288961 0.34220776 0.17110388 [69,] 0.8183628 0.36327430 0.18163715 [70,] 0.8133689 0.37326218 0.18663109 [71,] 0.8306733 0.33865335 0.16932668 [72,] 0.8018947 0.39621061 0.19810530 [73,] 0.7688932 0.46221360 0.23110680 [74,] 0.7451356 0.50972874 0.25486437 [75,] 0.7372990 0.52540197 0.26270099 [76,] 0.6974047 0.60519060 0.30259530 [77,] 0.7026383 0.59472333 0.29736167 [78,] 0.6950736 0.60985274 0.30492637 [79,] 0.6598496 0.68030082 0.34015041 [80,] 0.6246296 0.75074086 0.37537043 [81,] 0.7228828 0.55423436 0.27711718 [82,] 0.7496069 0.50078614 0.25039307 [83,] 0.7100162 0.57996750 0.28998375 [84,] 0.7431819 0.51363613 0.25681807 [85,] 0.7035523 0.59289542 0.29644771 [86,] 0.6699694 0.66006111 0.33003056 [87,] 0.6265295 0.74694109 0.37347054 [88,] 0.6203441 0.75931182 0.37965591 [89,] 0.6628446 0.67431071 0.33715535 [90,] 0.7822170 0.43556598 0.21778299 [91,] 0.7435697 0.51286068 0.25643034 [92,] 0.7010044 0.59799130 0.29899565 [93,] 0.7657024 0.46859528 0.23429764 [94,] 0.7536015 0.49279700 0.24639850 [95,] 0.7334914 0.53301712 0.26650856 [96,] 0.7577523 0.48449542 0.24224771 [97,] 0.7383810 0.52323792 0.26161896 [98,] 0.6997227 0.60055453 0.30027727 [99,] 0.6525822 0.69483570 0.34741785 [100,] 0.6385858 0.72282848 0.36141424 [101,] 0.6152963 0.76940731 0.38470366 [102,] 0.5649286 0.87014279 0.43507140 [103,] 0.6397163 0.72056741 0.36028371 [104,] 0.6872637 0.62547253 0.31273626 [105,] 0.6581231 0.68375390 0.34187695 [106,] 0.6270162 0.74596770 0.37298385 [107,] 0.6157542 0.76849153 0.38424577 [108,] 0.7873596 0.42528080 0.21264040 [109,] 0.7661922 0.46761559 0.23380780 [110,] 0.8514040 0.29719209 0.14859605 [111,] 0.8281394 0.34372115 0.17186057 [112,] 0.8213530 0.35729397 0.17864698 [113,] 0.7777354 0.44452925 0.22226462 [114,] 0.7465324 0.50693524 0.25346762 [115,] 0.7339595 0.53208101 0.26604051 [116,] 0.7185345 0.56293091 0.28146546 [117,] 0.6617991 0.67640185 0.33820093 [118,] 0.6645662 0.67086759 0.33543379 [119,] 0.5977121 0.80457585 0.40228792 [120,] 0.6621474 0.67570511 0.33785255 [121,] 0.6558112 0.68837765 0.34418882 [122,] 0.7196119 0.56077617 0.28038809 [123,] 0.7619479 0.47610411 0.23805205 [124,] 0.7767635 0.44647298 0.22323649 [125,] 0.7146183 0.57076337 0.28538168 [126,] 0.8025212 0.39495765 0.19747883 [127,] 0.7388278 0.52234435 0.26117217 [128,] 0.6889264 0.62214722 0.31107361 [129,] 0.6584113 0.68317734 0.34158867 [130,] 0.5659630 0.86807407 0.43403703 [131,] 0.4673066 0.93461320 0.53269340 [132,] 0.3597190 0.71943794 0.64028103 [133,] 0.4911522 0.98230446 0.50884777 [134,] 0.5960794 0.80784121 0.40392061 [135,] 0.4348553 0.86971054 0.56514473 > postscript(file="/var/www/html/rcomp/tmp/1v1y71292686405.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/html/rcomp/tmp/2v1y71292686405.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/html/rcomp/tmp/36bga1292686405.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/html/rcomp/tmp/46bga1292686405.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/html/rcomp/tmp/56bga1292686405.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 = 152 Frequency = 1 1 2 3 4 5 6 18.07638721 -0.04684491 -9.56733261 11.83663065 -2.52069781 8.95058404 7 8 9 10 11 12 -7.47294856 -1.32690213 22.88033417 30.59903429 7.02592295 5.46526682 13 14 15 16 17 18 -29.70076523 7.58703762 1.99578952 -5.72846351 7.90946611 -16.26773959 19 20 21 22 23 24 -5.55804679 -3.03485432 29.90038464 9.20202688 -34.87910331 -11.97542059 25 26 27 28 29 30 4.18763476 5.94654912 14.93527940 2.40242390 -4.99503829 7.64999815 31 32 33 34 35 36 -2.59843496 -5.79576628 5.10778148 -9.45662369 -3.47159604 -26.10887787 37 38 39 40 41 42 3.54046010 21.30407782 15.81690308 -6.15082528 -2.72721613 -5.98121824 43 44 45 46 47 48 -22.09707306 6.11503487 -4.51499697 17.33887537 3.47294443 28.11207460 49 50 51 52 53 54 4.01859144 -17.59586527 14.80545011 -7.62391559 20.58510591 -2.65609734 55 56 57 58 59 60 13.36417417 -33.11285451 23.30143889 5.43045582 -5.23674808 4.70018796 61 62 63 64 65 66 -4.80959604 8.09060305 12.87842437 25.24613517 -1.68795867 16.91359622 67 68 69 70 71 72 -16.50515248 -0.43126602 -7.83819779 -7.90890258 -7.16382445 -2.83265883 73 74 75 76 77 78 13.63186375 -2.04725737 19.95590332 -5.68074233 -10.95017367 -12.28270653 79 80 81 82 83 84 12.27745167 4.15959673 -1.35563016 -8.42679962 -11.45111957 -0.72963779 85 86 87 88 89 90 -14.52407135 -11.91008695 -1.98137885 -5.21422212 25.55229835 -15.53482099 91 92 93 94 95 96 2.66733111 -19.95735911 -2.85722714 -5.14722821 5.03346193 13.72401680 97 98 99 100 101 102 19.96465377 -25.90212266 -0.21998734 1.07849607 16.83381476 -8.71869969 103 104 105 106 107 108 -9.68670051 15.77323618 3.78606619 6.83397743 -1.76873447 11.28984631 109 110 111 112 113 114 5.71557903 4.21171220 20.64179742 -20.21660757 -13.04627245 11.00840781 115 116 117 118 119 120 -15.06463279 -27.06131876 10.25126362 -22.04789674 10.63284900 11.86151773 121 122 123 124 125 126 -3.80075522 -10.82799257 11.23510759 -11.03702232 -3.62172500 13.29108119 127 128 129 130 131 132 -1.49501215 17.57229798 12.13715808 8.23179946 -19.52197000 9.29392294 133 134 135 136 137 138 3.49820760 -16.83035965 11.19844506 -6.14361123 2.00263908 -15.81248879 139 140 141 142 143 144 -1.52031958 -14.29036315 9.18763476 -18.61657681 -4.07165906 -12.32602828 145 146 147 148 149 150 -24.52407135 -12.79737664 -0.80075522 2.28913423 15.46305680 -15.15287471 151 152 -8.47159604 3.84712529 > postscript(file="/var/www/html/rcomp/tmp/6h2fv1292686405.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 = 152 Frequency = 1 lag(myerror, k = 1) myerror 0 18.07638721 NA 1 -0.04684491 18.07638721 2 -9.56733261 -0.04684491 3 11.83663065 -9.56733261 4 -2.52069781 11.83663065 5 8.95058404 -2.52069781 6 -7.47294856 8.95058404 7 -1.32690213 -7.47294856 8 22.88033417 -1.32690213 9 30.59903429 22.88033417 10 7.02592295 30.59903429 11 5.46526682 7.02592295 12 -29.70076523 5.46526682 13 7.58703762 -29.70076523 14 1.99578952 7.58703762 15 -5.72846351 1.99578952 16 7.90946611 -5.72846351 17 -16.26773959 7.90946611 18 -5.55804679 -16.26773959 19 -3.03485432 -5.55804679 20 29.90038464 -3.03485432 21 9.20202688 29.90038464 22 -34.87910331 9.20202688 23 -11.97542059 -34.87910331 24 4.18763476 -11.97542059 25 5.94654912 4.18763476 26 14.93527940 5.94654912 27 2.40242390 14.93527940 28 -4.99503829 2.40242390 29 7.64999815 -4.99503829 30 -2.59843496 7.64999815 31 -5.79576628 -2.59843496 32 5.10778148 -5.79576628 33 -9.45662369 5.10778148 34 -3.47159604 -9.45662369 35 -26.10887787 -3.47159604 36 3.54046010 -26.10887787 37 21.30407782 3.54046010 38 15.81690308 21.30407782 39 -6.15082528 15.81690308 40 -2.72721613 -6.15082528 41 -5.98121824 -2.72721613 42 -22.09707306 -5.98121824 43 6.11503487 -22.09707306 44 -4.51499697 6.11503487 45 17.33887537 -4.51499697 46 3.47294443 17.33887537 47 28.11207460 3.47294443 48 4.01859144 28.11207460 49 -17.59586527 4.01859144 50 14.80545011 -17.59586527 51 -7.62391559 14.80545011 52 20.58510591 -7.62391559 53 -2.65609734 20.58510591 54 13.36417417 -2.65609734 55 -33.11285451 13.36417417 56 23.30143889 -33.11285451 57 5.43045582 23.30143889 58 -5.23674808 5.43045582 59 4.70018796 -5.23674808 60 -4.80959604 4.70018796 61 8.09060305 -4.80959604 62 12.87842437 8.09060305 63 25.24613517 12.87842437 64 -1.68795867 25.24613517 65 16.91359622 -1.68795867 66 -16.50515248 16.91359622 67 -0.43126602 -16.50515248 68 -7.83819779 -0.43126602 69 -7.90890258 -7.83819779 70 -7.16382445 -7.90890258 71 -2.83265883 -7.16382445 72 13.63186375 -2.83265883 73 -2.04725737 13.63186375 74 19.95590332 -2.04725737 75 -5.68074233 19.95590332 76 -10.95017367 -5.68074233 77 -12.28270653 -10.95017367 78 12.27745167 -12.28270653 79 4.15959673 12.27745167 80 -1.35563016 4.15959673 81 -8.42679962 -1.35563016 82 -11.45111957 -8.42679962 83 -0.72963779 -11.45111957 84 -14.52407135 -0.72963779 85 -11.91008695 -14.52407135 86 -1.98137885 -11.91008695 87 -5.21422212 -1.98137885 88 25.55229835 -5.21422212 89 -15.53482099 25.55229835 90 2.66733111 -15.53482099 91 -19.95735911 2.66733111 92 -2.85722714 -19.95735911 93 -5.14722821 -2.85722714 94 5.03346193 -5.14722821 95 13.72401680 5.03346193 96 19.96465377 13.72401680 97 -25.90212266 19.96465377 98 -0.21998734 -25.90212266 99 1.07849607 -0.21998734 100 16.83381476 1.07849607 101 -8.71869969 16.83381476 102 -9.68670051 -8.71869969 103 15.77323618 -9.68670051 104 3.78606619 15.77323618 105 6.83397743 3.78606619 106 -1.76873447 6.83397743 107 11.28984631 -1.76873447 108 5.71557903 11.28984631 109 4.21171220 5.71557903 110 20.64179742 4.21171220 111 -20.21660757 20.64179742 112 -13.04627245 -20.21660757 113 11.00840781 -13.04627245 114 -15.06463279 11.00840781 115 -27.06131876 -15.06463279 116 10.25126362 -27.06131876 117 -22.04789674 10.25126362 118 10.63284900 -22.04789674 119 11.86151773 10.63284900 120 -3.80075522 11.86151773 121 -10.82799257 -3.80075522 122 11.23510759 -10.82799257 123 -11.03702232 11.23510759 124 -3.62172500 -11.03702232 125 13.29108119 -3.62172500 126 -1.49501215 13.29108119 127 17.57229798 -1.49501215 128 12.13715808 17.57229798 129 8.23179946 12.13715808 130 -19.52197000 8.23179946 131 9.29392294 -19.52197000 132 3.49820760 9.29392294 133 -16.83035965 3.49820760 134 11.19844506 -16.83035965 135 -6.14361123 11.19844506 136 2.00263908 -6.14361123 137 -15.81248879 2.00263908 138 -1.52031958 -15.81248879 139 -14.29036315 -1.52031958 140 9.18763476 -14.29036315 141 -18.61657681 9.18763476 142 -4.07165906 -18.61657681 143 -12.32602828 -4.07165906 144 -24.52407135 -12.32602828 145 -12.79737664 -24.52407135 146 -0.80075522 -12.79737664 147 2.28913423 -0.80075522 148 15.46305680 2.28913423 149 -15.15287471 15.46305680 150 -8.47159604 -15.15287471 151 3.84712529 -8.47159604 152 NA 3.84712529 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -0.04684491 18.07638721 [2,] -9.56733261 -0.04684491 [3,] 11.83663065 -9.56733261 [4,] -2.52069781 11.83663065 [5,] 8.95058404 -2.52069781 [6,] -7.47294856 8.95058404 [7,] -1.32690213 -7.47294856 [8,] 22.88033417 -1.32690213 [9,] 30.59903429 22.88033417 [10,] 7.02592295 30.59903429 [11,] 5.46526682 7.02592295 [12,] -29.70076523 5.46526682 [13,] 7.58703762 -29.70076523 [14,] 1.99578952 7.58703762 [15,] -5.72846351 1.99578952 [16,] 7.90946611 -5.72846351 [17,] -16.26773959 7.90946611 [18,] -5.55804679 -16.26773959 [19,] -3.03485432 -5.55804679 [20,] 29.90038464 -3.03485432 [21,] 9.20202688 29.90038464 [22,] -34.87910331 9.20202688 [23,] -11.97542059 -34.87910331 [24,] 4.18763476 -11.97542059 [25,] 5.94654912 4.18763476 [26,] 14.93527940 5.94654912 [27,] 2.40242390 14.93527940 [28,] -4.99503829 2.40242390 [29,] 7.64999815 -4.99503829 [30,] -2.59843496 7.64999815 [31,] -5.79576628 -2.59843496 [32,] 5.10778148 -5.79576628 [33,] -9.45662369 5.10778148 [34,] -3.47159604 -9.45662369 [35,] -26.10887787 -3.47159604 [36,] 3.54046010 -26.10887787 [37,] 21.30407782 3.54046010 [38,] 15.81690308 21.30407782 [39,] -6.15082528 15.81690308 [40,] -2.72721613 -6.15082528 [41,] -5.98121824 -2.72721613 [42,] -22.09707306 -5.98121824 [43,] 6.11503487 -22.09707306 [44,] -4.51499697 6.11503487 [45,] 17.33887537 -4.51499697 [46,] 3.47294443 17.33887537 [47,] 28.11207460 3.47294443 [48,] 4.01859144 28.11207460 [49,] -17.59586527 4.01859144 [50,] 14.80545011 -17.59586527 [51,] -7.62391559 14.80545011 [52,] 20.58510591 -7.62391559 [53,] -2.65609734 20.58510591 [54,] 13.36417417 -2.65609734 [55,] -33.11285451 13.36417417 [56,] 23.30143889 -33.11285451 [57,] 5.43045582 23.30143889 [58,] -5.23674808 5.43045582 [59,] 4.70018796 -5.23674808 [60,] -4.80959604 4.70018796 [61,] 8.09060305 -4.80959604 [62,] 12.87842437 8.09060305 [63,] 25.24613517 12.87842437 [64,] -1.68795867 25.24613517 [65,] 16.91359622 -1.68795867 [66,] -16.50515248 16.91359622 [67,] -0.43126602 -16.50515248 [68,] -7.83819779 -0.43126602 [69,] -7.90890258 -7.83819779 [70,] -7.16382445 -7.90890258 [71,] -2.83265883 -7.16382445 [72,] 13.63186375 -2.83265883 [73,] -2.04725737 13.63186375 [74,] 19.95590332 -2.04725737 [75,] -5.68074233 19.95590332 [76,] -10.95017367 -5.68074233 [77,] -12.28270653 -10.95017367 [78,] 12.27745167 -12.28270653 [79,] 4.15959673 12.27745167 [80,] -1.35563016 4.15959673 [81,] -8.42679962 -1.35563016 [82,] -11.45111957 -8.42679962 [83,] -0.72963779 -11.45111957 [84,] -14.52407135 -0.72963779 [85,] -11.91008695 -14.52407135 [86,] -1.98137885 -11.91008695 [87,] -5.21422212 -1.98137885 [88,] 25.55229835 -5.21422212 [89,] -15.53482099 25.55229835 [90,] 2.66733111 -15.53482099 [91,] -19.95735911 2.66733111 [92,] -2.85722714 -19.95735911 [93,] -5.14722821 -2.85722714 [94,] 5.03346193 -5.14722821 [95,] 13.72401680 5.03346193 [96,] 19.96465377 13.72401680 [97,] -25.90212266 19.96465377 [98,] -0.21998734 -25.90212266 [99,] 1.07849607 -0.21998734 [100,] 16.83381476 1.07849607 [101,] -8.71869969 16.83381476 [102,] -9.68670051 -8.71869969 [103,] 15.77323618 -9.68670051 [104,] 3.78606619 15.77323618 [105,] 6.83397743 3.78606619 [106,] -1.76873447 6.83397743 [107,] 11.28984631 -1.76873447 [108,] 5.71557903 11.28984631 [109,] 4.21171220 5.71557903 [110,] 20.64179742 4.21171220 [111,] -20.21660757 20.64179742 [112,] -13.04627245 -20.21660757 [113,] 11.00840781 -13.04627245 [114,] -15.06463279 11.00840781 [115,] -27.06131876 -15.06463279 [116,] 10.25126362 -27.06131876 [117,] -22.04789674 10.25126362 [118,] 10.63284900 -22.04789674 [119,] 11.86151773 10.63284900 [120,] -3.80075522 11.86151773 [121,] -10.82799257 -3.80075522 [122,] 11.23510759 -10.82799257 [123,] -11.03702232 11.23510759 [124,] -3.62172500 -11.03702232 [125,] 13.29108119 -3.62172500 [126,] -1.49501215 13.29108119 [127,] 17.57229798 -1.49501215 [128,] 12.13715808 17.57229798 [129,] 8.23179946 12.13715808 [130,] -19.52197000 8.23179946 [131,] 9.29392294 -19.52197000 [132,] 3.49820760 9.29392294 [133,] -16.83035965 3.49820760 [134,] 11.19844506 -16.83035965 [135,] -6.14361123 11.19844506 [136,] 2.00263908 -6.14361123 [137,] -15.81248879 2.00263908 [138,] -1.52031958 -15.81248879 [139,] -14.29036315 -1.52031958 [140,] 9.18763476 -14.29036315 [141,] -18.61657681 9.18763476 [142,] -4.07165906 -18.61657681 [143,] -12.32602828 -4.07165906 [144,] -24.52407135 -12.32602828 [145,] -12.79737664 -24.52407135 [146,] -0.80075522 -12.79737664 [147,] 2.28913423 -0.80075522 [148,] 15.46305680 2.28913423 [149,] -15.15287471 15.46305680 [150,] -8.47159604 -15.15287471 [151,] 3.84712529 -8.47159604 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -0.04684491 18.07638721 2 -9.56733261 -0.04684491 3 11.83663065 -9.56733261 4 -2.52069781 11.83663065 5 8.95058404 -2.52069781 6 -7.47294856 8.95058404 7 -1.32690213 -7.47294856 8 22.88033417 -1.32690213 9 30.59903429 22.88033417 10 7.02592295 30.59903429 11 5.46526682 7.02592295 12 -29.70076523 5.46526682 13 7.58703762 -29.70076523 14 1.99578952 7.58703762 15 -5.72846351 1.99578952 16 7.90946611 -5.72846351 17 -16.26773959 7.90946611 18 -5.55804679 -16.26773959 19 -3.03485432 -5.55804679 20 29.90038464 -3.03485432 21 9.20202688 29.90038464 22 -34.87910331 9.20202688 23 -11.97542059 -34.87910331 24 4.18763476 -11.97542059 25 5.94654912 4.18763476 26 14.93527940 5.94654912 27 2.40242390 14.93527940 28 -4.99503829 2.40242390 29 7.64999815 -4.99503829 30 -2.59843496 7.64999815 31 -5.79576628 -2.59843496 32 5.10778148 -5.79576628 33 -9.45662369 5.10778148 34 -3.47159604 -9.45662369 35 -26.10887787 -3.47159604 36 3.54046010 -26.10887787 37 21.30407782 3.54046010 38 15.81690308 21.30407782 39 -6.15082528 15.81690308 40 -2.72721613 -6.15082528 41 -5.98121824 -2.72721613 42 -22.09707306 -5.98121824 43 6.11503487 -22.09707306 44 -4.51499697 6.11503487 45 17.33887537 -4.51499697 46 3.47294443 17.33887537 47 28.11207460 3.47294443 48 4.01859144 28.11207460 49 -17.59586527 4.01859144 50 14.80545011 -17.59586527 51 -7.62391559 14.80545011 52 20.58510591 -7.62391559 53 -2.65609734 20.58510591 54 13.36417417 -2.65609734 55 -33.11285451 13.36417417 56 23.30143889 -33.11285451 57 5.43045582 23.30143889 58 -5.23674808 5.43045582 59 4.70018796 -5.23674808 60 -4.80959604 4.70018796 61 8.09060305 -4.80959604 62 12.87842437 8.09060305 63 25.24613517 12.87842437 64 -1.68795867 25.24613517 65 16.91359622 -1.68795867 66 -16.50515248 16.91359622 67 -0.43126602 -16.50515248 68 -7.83819779 -0.43126602 69 -7.90890258 -7.83819779 70 -7.16382445 -7.90890258 71 -2.83265883 -7.16382445 72 13.63186375 -2.83265883 73 -2.04725737 13.63186375 74 19.95590332 -2.04725737 75 -5.68074233 19.95590332 76 -10.95017367 -5.68074233 77 -12.28270653 -10.95017367 78 12.27745167 -12.28270653 79 4.15959673 12.27745167 80 -1.35563016 4.15959673 81 -8.42679962 -1.35563016 82 -11.45111957 -8.42679962 83 -0.72963779 -11.45111957 84 -14.52407135 -0.72963779 85 -11.91008695 -14.52407135 86 -1.98137885 -11.91008695 87 -5.21422212 -1.98137885 88 25.55229835 -5.21422212 89 -15.53482099 25.55229835 90 2.66733111 -15.53482099 91 -19.95735911 2.66733111 92 -2.85722714 -19.95735911 93 -5.14722821 -2.85722714 94 5.03346193 -5.14722821 95 13.72401680 5.03346193 96 19.96465377 13.72401680 97 -25.90212266 19.96465377 98 -0.21998734 -25.90212266 99 1.07849607 -0.21998734 100 16.83381476 1.07849607 101 -8.71869969 16.83381476 102 -9.68670051 -8.71869969 103 15.77323618 -9.68670051 104 3.78606619 15.77323618 105 6.83397743 3.78606619 106 -1.76873447 6.83397743 107 11.28984631 -1.76873447 108 5.71557903 11.28984631 109 4.21171220 5.71557903 110 20.64179742 4.21171220 111 -20.21660757 20.64179742 112 -13.04627245 -20.21660757 113 11.00840781 -13.04627245 114 -15.06463279 11.00840781 115 -27.06131876 -15.06463279 116 10.25126362 -27.06131876 117 -22.04789674 10.25126362 118 10.63284900 -22.04789674 119 11.86151773 10.63284900 120 -3.80075522 11.86151773 121 -10.82799257 -3.80075522 122 11.23510759 -10.82799257 123 -11.03702232 11.23510759 124 -3.62172500 -11.03702232 125 13.29108119 -3.62172500 126 -1.49501215 13.29108119 127 17.57229798 -1.49501215 128 12.13715808 17.57229798 129 8.23179946 12.13715808 130 -19.52197000 8.23179946 131 9.29392294 -19.52197000 132 3.49820760 9.29392294 133 -16.83035965 3.49820760 134 11.19844506 -16.83035965 135 -6.14361123 11.19844506 136 2.00263908 -6.14361123 137 -15.81248879 2.00263908 138 -1.52031958 -15.81248879 139 -14.29036315 -1.52031958 140 9.18763476 -14.29036315 141 -18.61657681 9.18763476 142 -4.07165906 -18.61657681 143 -12.32602828 -4.07165906 144 -24.52407135 -12.32602828 145 -12.79737664 -24.52407135 146 -0.80075522 -12.79737664 147 2.28913423 -0.80075522 148 15.46305680 2.28913423 149 -15.15287471 15.46305680 150 -8.47159604 -15.15287471 151 3.84712529 -8.47159604 > 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/7h2fv1292686405.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/html/rcomp/tmp/89bwf1292686405.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/html/rcomp/tmp/99bwf1292686405.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/html/rcomp/tmp/109bwf1292686405.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/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/11n3u61292686405.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/12gutr1292686405.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/135vql1292686405.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/14x4po1292686405.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/1515oc1292686405.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/16ff321292686405.tab") + } > > try(system("convert tmp/1v1y71292686405.ps tmp/1v1y71292686405.png",intern=TRUE)) character(0) > try(system("convert tmp/2v1y71292686405.ps tmp/2v1y71292686405.png",intern=TRUE)) character(0) > try(system("convert tmp/36bga1292686405.ps tmp/36bga1292686405.png",intern=TRUE)) character(0) > try(system("convert tmp/46bga1292686405.ps tmp/46bga1292686405.png",intern=TRUE)) character(0) > try(system("convert tmp/56bga1292686405.ps tmp/56bga1292686405.png",intern=TRUE)) character(0) > try(system("convert tmp/6h2fv1292686405.ps tmp/6h2fv1292686405.png",intern=TRUE)) character(0) > try(system("convert tmp/7h2fv1292686405.ps tmp/7h2fv1292686405.png",intern=TRUE)) character(0) > try(system("convert tmp/89bwf1292686405.ps tmp/89bwf1292686405.png",intern=TRUE)) character(0) > try(system("convert tmp/99bwf1292686405.ps tmp/99bwf1292686405.png",intern=TRUE)) character(0) > try(system("convert tmp/109bwf1292686405.ps tmp/109bwf1292686405.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 4.061 2.018 11.691