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 + ,6 + ,25 + ,25 + ,53 + ,20 + ,9 + ,15 + ,6 + ,25 + ,24 + ,43 + ,21 + ,9 + ,14 + ,13 + ,19 + ,21 + ,60 + ,31 + ,14 + ,10 + ,8 + ,18 + ,23 + ,49 + ,21 + ,8 + ,10 + ,7 + ,18 + ,17 + ,62 + ,18 + ,8 + ,12 + ,9 + ,22 + ,19 + ,45 + ,26 + ,11 + ,18 + ,5 + ,29 + ,18 + ,50 + ,22 + ,10 + ,12 + ,8 + ,26 + ,27 + ,75 + ,22 + ,9 + ,14 + ,9 + ,25 + ,23 + ,82 + ,29 + ,15 + ,18 + ,11 + ,23 + ,23 + ,60 + ,15 + ,14 + ,9 + ,8 + ,23 + ,29 + ,59 + ,16 + ,11 + ,11 + ,11 + ,23 + ,21 + ,21 + ,24 + ,14 + ,11 + ,12 + ,24 + ,26 + ,62 + ,17 + ,6 + ,17 + ,8 + ,30 + ,25 + ,54 + ,19 + ,20 + ,8 + ,7 + ,19 + ,25 + ,47 + ,22 + ,9 + ,16 + ,9 + ,24 + ,23 + ,59 + ,31 + ,10 + ,21 + ,12 + ,32 + ,26 + ,37 + ,28 + ,8 + ,24 + ,20 + ,30 + ,20 + ,43 + ,38 + ,11 + ,21 + ,7 + ,29 + ,29 + ,48 + ,26 + ,14 + ,14 + ,8 + ,17 + ,24 + ,79 + ,25 + ,11 + ,7 + ,8 + ,25 + ,23 + ,62 + ,25 + ,16 + ,18 + ,16 + ,26 + ,24 + ,16 + ,29 + ,14 + ,18 + ,10 + ,26 + ,30 + ,38 + ,28 + ,11 + ,13 + ,6 + ,25 + ,22 + ,58 + ,15 + ,11 + ,11 + ,8 + ,23 + ,22 + ,60 + ,18 + ,12 + ,13 + ,9 + ,21 + ,13 + ,67 + ,21 + ,9 + ,13 + ,9 + ,19 + ,24 + ,55 + ,25 + ,7 + ,18 + ,11 + ,35 + ,17 + ,47 + ,23 + ,13 + ,14 + ,12 + ,19 + ,24 + ,59 + ,23 + ,10 + ,12 + ,8 + ,20 + ,21 + ,49 + ,19 + ,9 + ,9 + ,7 + ,21 + ,23 + ,47 + ,18 + ,9 + ,12 + ,8 + ,21 + ,24 + ,57 + ,18 + ,13 + ,8 + ,9 + ,24 + ,24 + ,39 + ,26 + ,16 + ,5 + ,4 + ,23 + ,24 + ,49 + ,18 + ,12 + ,10 + ,8 + ,19 + ,23 + ,26 + ,18 + ,6 + ,11 + ,8 + ,17 + ,26 + ,53 + ,28 + ,14 + ,11 + ,8 + ,24 + ,24 + ,75 + ,17 + ,14 + ,12 + ,6 + ,15 + ,21 + ,65 + ,29 + ,10 + ,12 + ,8 + ,25 + ,23 + ,49 + ,12 + ,4 + ,15 + ,4 + ,27 + ,28 + ,48 + ,25 + ,12 + ,12 + ,7 + ,29 + ,23 + ,45 + ,28 + ,12 + ,16 + ,14 + ,27 + ,22 + ,31 + ,20 + ,14 + ,14 + ,10 + ,18 + ,24 + ,61 + ,17 + ,9 + ,17 + ,9 + ,25 + ,21 + ,49 + ,17 + ,9 + ,13 + ,6 + ,22 + ,23 + ,69 + ,20 + ,10 + ,10 + ,8 + ,26 + ,23 + ,54 + ,31 + ,14 + ,17 + ,11 + ,23 + ,20 + ,80 + ,21 + ,10 + ,12 + ,8 + ,16 + ,23 + ,57 + ,19 + ,9 + ,13 + ,8 + ,27 + ,21 + ,34 + ,23 + ,14 + ,13 + ,10 + ,25 + ,27 + ,69 + ,15 + ,8 + ,11 + ,8 + ,14 + ,12 + ,44 + ,24 + ,9 + ,13 + ,10 + ,19 + ,15 + ,70 + ,28 + ,8 + ,12 + ,7 + ,20 + ,22 + ,51 + ,16 + ,9 + ,12 + ,8 + ,16 + ,21 + ,66 + ,19 + ,9 + ,12 + ,7 + ,18 + ,21 + ,18 + ,21 + ,9 + ,9 + ,9 + ,22 + ,20 + ,74 + ,21 + ,15 + ,7 + ,5 + ,21 + ,24 + ,59 + ,20 + ,8 + ,17 + ,7 + ,22 + ,24 + ,48 + ,16 + ,10 + ,12 + ,7 + ,22 + ,29 + ,55 + ,25 + ,8 + ,12 + ,7 + ,32 + ,25 + ,44 + ,30 + ,14 + ,9 + ,9 + ,23 + ,14 + ,56 + ,29 + ,11 + ,9 + ,5 + ,31 + ,30 + ,65 + ,22 + ,10 + ,13 + ,8 + ,18 + ,19 + ,77 + ,19 + ,12 + ,10 + ,8 + ,23 + ,29 + ,46 + ,33 + ,14 + ,11 + ,8 + ,26 + ,25 + ,70 + ,17 + ,9 + ,12 + ,9 + ,24 + ,25 + ,39 + ,9 + ,13 + ,10 + ,6 + ,19 + ,25 + ,55 + ,14 + ,15 + ,13 + ,8 + ,14 + ,16 + ,44 + ,15 + ,8 + ,6 + ,6 + ,20 + ,25 + ,45 + ,12 + ,7 + ,7 + ,4 + ,22 + ,28 + ,45 + ,21 + ,10 + ,13 + ,6 + ,24 + ,24 + ,49 + ,20 + ,10 + ,11 + ,4 + ,25 + ,25 + ,65 + ,29 + ,13 + ,18 + ,12 + ,21 + ,21 + ,45 + ,33 + ,11 + ,9 + ,6 + ,28 + ,22 + ,48 + ,15 + ,12 + ,11 + ,8 + ,20 + ,25 + ,41 + ,19 + ,9 + ,11 + ,10 + ,21 + ,27 + ,40 + ,23 + ,10 + ,15 + ,10 + ,23 + ,21 + ,64 + ,20 + ,11 + ,8 + ,4 + ,13 + ,13 + ,56 + ,20 + ,11 + ,11 + ,8 + ,24 + ,26 + ,52 + ,18 + ,10 + ,14 + ,9 + ,21 + ,26 + ,41 + ,31 + ,16 + ,14 + ,9 + ,21 + ,25 + ,42 + ,18 + ,16 + ,12 + ,7 + ,17 + ,22 + ,54 + ,13 + ,8 + ,12 + ,7 + ,14 + ,19 + ,40 + ,9 + ,6 + ,8 + ,11 + ,29 + ,23 + ,40 + ,20 + ,11 + ,11 + ,8 + ,25 + ,25 + ,51 + ,18 + ,12 + ,10 + ,8 + ,16 + ,15 + ,48 + ,23 + ,14 + ,17 + ,7 + ,25 + ,21 + ,80 + ,17 + ,9 + ,16 + ,5 + ,25 + ,23 + ,38 + ,17 + ,11 + ,13 + ,7 + ,21 + ,25 + ,57 + ,16 + ,8 + ,15 + ,9 + ,23 + ,24 + ,28 + ,31 + ,8 + ,11 + ,8 + ,22 + ,24 + ,51 + ,15 + ,7 + ,12 + ,6 + ,19 + ,21 + ,46 + ,28 + ,16 + ,16 + ,8 + ,24 + ,24 + ,58 + ,26 + ,13 + ,20 + ,10 + ,26 + ,22 + ,67 + ,20 + ,8 + ,16 + ,10 + ,25 + ,24 + ,72 + ,19 + ,11 + ,11 + ,8 + ,20 + ,28 + ,26 + ,25 + ,14 + ,15 + ,11 + ,22 + ,21 + ,54 + ,18 + ,10 + ,15 + ,8 + ,14 + ,17 + ,53 + ,20 + ,10 + ,12 + ,8 + ,20 + ,28 + ,64 + ,33 + ,14 + ,9 + ,6 + ,32 + ,24 + ,47 + ,24 + ,14 + ,24 + ,20 + ,21 + ,10 + ,43 + ,22 + ,10 + ,15 + ,6 + ,22 + ,20 + ,66 + ,32 + ,12 + ,18 + ,12 + ,28 + ,22 + ,54 + ,31 + ,9 + ,17 + ,9 + ,25 + ,19 + ,62 + ,13 + ,16 + ,12 + ,5 + ,17 + ,22 + ,52 + ,18 + ,8 + ,15 + ,10 + ,21 + ,22 + ,64 + ,17 + ,9 + ,11 + ,5 + ,23 + ,26 + ,55 + ,29 + ,16 + ,11 + ,6 + ,27 + ,24 + ,57 + ,22 + ,13 + ,15 + ,10 + ,22 + ,22 + ,74 + ,18 + ,13 + ,12 + ,6 + ,19 + ,20 + ,32 + ,22 + ,8 + ,14 + ,10 + ,20 + ,20 + ,38 + ,25 + ,14 + ,11 + ,5 + ,17 + ,15 + ,66 + ,20 + ,11 + ,20 + ,13 + ,24 + ,20 + ,37 + ,20 + ,9 + ,11 + ,7 + ,21 + ,20 + ,26 + ,17 + ,8 + ,12 + ,9 + ,21 + ,24 + ,64 + ,21 + ,13 + ,17 + ,11 + ,23 + ,22 + ,28 + ,26 + ,13 + ,12 + ,8 + ,24 + ,29 + ,66 + ,10 + ,10 + ,11 + ,5 + ,19 + ,23 + ,65 + ,15 + ,8 + ,10 + ,4 + ,22 + ,24 + ,48 + ,20 + ,7 + ,11 + ,9 + ,26 + ,22 + ,44 + ,14 + ,11 + ,12 + ,7 + ,17 + ,16 + ,64 + ,16 + ,11 + ,9 + ,5 + ,17 + ,23 + ,39 + ,23 + ,14 + ,8 + ,5 + ,19 + ,27 + ,50 + ,11 + ,6 + ,6 + ,4 + ,15 + ,16 + ,66 + ,19 + ,10 + ,12 + ,7 + ,17 + ,21 + ,48 + ,30 + ,9 + ,15 + ,9 + ,27 + ,26 + ,70 + ,21 + ,12 + ,13 + ,8 + ,19 + ,22 + ,66 + ,20 + ,11 + ,17 + ,8 + ,21 + ,23 + ,61 + ,22 + ,14 + ,14 + ,11 + ,25 + ,19 + ,31 + ,30 + ,12 + ,16 + ,10 + ,19 + ,18 + ,61 + ,25 + ,14 + ,15 + ,9 + ,22 + ,24 + ,54 + ,28 + ,8 + ,16 + ,12 + ,18 + ,24 + ,34 + ,23 + ,14 + ,11 + ,10 + ,20 + ,29 + ,62 + ,23 + ,8 + ,11 + ,10 + ,15 + ,22 + ,47 + ,21 + ,11 + ,16 + ,7 + ,20 + ,24 + ,52 + ,30 + ,12 + ,15 + ,10 + ,29 + ,22 + ,37 + ,22 + ,9 + ,14 + ,6 + ,19 + ,12 + ,46 + ,32 + ,16 + ,9 + ,6 + ,29 + ,26 + ,38 + ,22 + ,11 + ,13 + ,11 + ,24 + ,18 + ,63 + ,15 + ,11 + ,11 + ,8 + ,23 + ,22 + ,34 + ,21 + ,12 + ,14 + ,9 + ,22 + ,24 + ,46 + ,27 + ,15 + ,11 + ,9 + ,23 + ,21 + ,40 + ,22 + ,13 + ,12 + ,13 + ,22 + ,15 + ,30 + ,9 + ,6 + ,8 + ,11 + ,29 + ,23 + ,35 + ,29 + ,11 + ,7 + ,4 + ,26 + ,22 + ,51 + ,20 + ,7 + ,11 + ,9 + ,26 + ,22 + ,56 + ,16 + ,8 + ,13 + ,5 + ,21 + ,24 + ,68 + ,16 + ,8 + ,9 + ,4 + ,18 + ,23 + ,39 + ,16 + ,9 + ,12 + ,9 + ,10 + ,13 + ,44 + ,18 + ,12 + ,10 + ,8 + ,19 + ,23 + ,58 + ,16 + ,9 + ,12 + ,9 + ,10 + ,13) + ,dim=c(7 + ,151) + ,dimnames=list(c('Anxiety' + ,'Concern' + ,'Doubts' + ,'Pexpectations' + ,'Pcriticism' + ,'Standards' + ,'Organization') + ,1:151)) > y <- array(NA,dim=c(7,151),dimnames=list(c('Anxiety','Concern','Doubts','Pexpectations','Pcriticism','Standards','Organization'),1:151)) > 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 Pcriticism Standards Organization 1 69 26 9 15 6 25 25 2 53 20 9 15 6 25 24 3 43 21 9 14 13 19 21 4 60 31 14 10 8 18 23 5 49 21 8 10 7 18 17 6 62 18 8 12 9 22 19 7 45 26 11 18 5 29 18 8 50 22 10 12 8 26 27 9 75 22 9 14 9 25 23 10 82 29 15 18 11 23 23 11 60 15 14 9 8 23 29 12 59 16 11 11 11 23 21 13 21 24 14 11 12 24 26 14 62 17 6 17 8 30 25 15 54 19 20 8 7 19 25 16 47 22 9 16 9 24 23 17 59 31 10 21 12 32 26 18 37 28 8 24 20 30 20 19 43 38 11 21 7 29 29 20 48 26 14 14 8 17 24 21 79 25 11 7 8 25 23 22 62 25 16 18 16 26 24 23 16 29 14 18 10 26 30 24 38 28 11 13 6 25 22 25 58 15 11 11 8 23 22 26 60 18 12 13 9 21 13 27 67 21 9 13 9 19 24 28 55 25 7 18 11 35 17 29 47 23 13 14 12 19 24 30 59 23 10 12 8 20 21 31 49 19 9 9 7 21 23 32 47 18 9 12 8 21 24 33 57 18 13 8 9 24 24 34 39 26 16 5 4 23 24 35 49 18 12 10 8 19 23 36 26 18 6 11 8 17 26 37 53 28 14 11 8 24 24 38 75 17 14 12 6 15 21 39 65 29 10 12 8 25 23 40 49 12 4 15 4 27 28 41 48 25 12 12 7 29 23 42 45 28 12 16 14 27 22 43 31 20 14 14 10 18 24 44 61 17 9 17 9 25 21 45 49 17 9 13 6 22 23 46 69 20 10 10 8 26 23 47 54 31 14 17 11 23 20 48 80 21 10 12 8 16 23 49 57 19 9 13 8 27 21 50 34 23 14 13 10 25 27 51 69 15 8 11 8 14 12 52 44 24 9 13 10 19 15 53 70 28 8 12 7 20 22 54 51 16 9 12 8 16 21 55 66 19 9 12 7 18 21 56 18 21 9 9 9 22 20 57 74 21 15 7 5 21 24 58 59 20 8 17 7 22 24 59 48 16 10 12 7 22 29 60 55 25 8 12 7 32 25 61 44 30 14 9 9 23 14 62 56 29 11 9 5 31 30 63 65 22 10 13 8 18 19 64 77 19 12 10 8 23 29 65 46 33 14 11 8 26 25 66 70 17 9 12 9 24 25 67 39 9 13 10 6 19 25 68 55 14 15 13 8 14 16 69 44 15 8 6 6 20 25 70 45 12 7 7 4 22 28 71 45 21 10 13 6 24 24 72 49 20 10 11 4 25 25 73 65 29 13 18 12 21 21 74 45 33 11 9 6 28 22 75 48 15 12 11 8 20 25 76 41 19 9 11 10 21 27 77 40 23 10 15 10 23 21 78 64 20 11 8 4 13 13 79 56 20 11 11 8 24 26 80 52 18 10 14 9 21 26 81 41 31 16 14 9 21 25 82 42 18 16 12 7 17 22 83 54 13 8 12 7 14 19 84 40 9 6 8 11 29 23 85 40 20 11 11 8 25 25 86 51 18 12 10 8 16 15 87 48 23 14 17 7 25 21 88 80 17 9 16 5 25 23 89 38 17 11 13 7 21 25 90 57 16 8 15 9 23 24 91 28 31 8 11 8 22 24 92 51 15 7 12 6 19 21 93 46 28 16 16 8 24 24 94 58 26 13 20 10 26 22 95 67 20 8 16 10 25 24 96 72 19 11 11 8 20 28 97 26 25 14 15 11 22 21 98 54 18 10 15 8 14 17 99 53 20 10 12 8 20 28 100 64 33 14 9 6 32 24 101 47 24 14 24 20 21 10 102 43 22 10 15 6 22 20 103 66 32 12 18 12 28 22 104 54 31 9 17 9 25 19 105 62 13 16 12 5 17 22 106 52 18 8 15 10 21 22 107 64 17 9 11 5 23 26 108 55 29 16 11 6 27 24 109 57 22 13 15 10 22 22 110 74 18 13 12 6 19 20 111 32 22 8 14 10 20 20 112 38 25 14 11 5 17 15 113 66 20 11 20 13 24 20 114 37 20 9 11 7 21 20 115 26 17 8 12 9 21 24 116 64 21 13 17 11 23 22 117 28 26 13 12 8 24 29 118 66 10 10 11 5 19 23 119 65 15 8 10 4 22 24 120 48 20 7 11 9 26 22 121 44 14 11 12 7 17 16 122 64 16 11 9 5 17 23 123 39 23 14 8 5 19 27 124 50 11 6 6 4 15 16 125 66 19 10 12 7 17 21 126 48 30 9 15 9 27 26 127 70 21 12 13 8 19 22 128 66 20 11 17 8 21 23 129 61 22 14 14 11 25 19 130 31 30 12 16 10 19 18 131 61 25 14 15 9 22 24 132 54 28 8 16 12 18 24 133 34 23 14 11 10 20 29 134 62 23 8 11 10 15 22 135 47 21 11 16 7 20 24 136 52 30 12 15 10 29 22 137 37 22 9 14 6 19 12 138 46 32 16 9 6 29 26 139 38 22 11 13 11 24 18 140 63 15 11 11 8 23 22 141 34 21 12 14 9 22 24 142 46 27 15 11 9 23 21 143 40 22 13 12 13 22 15 144 30 9 6 8 11 29 23 145 35 29 11 7 4 26 22 146 51 20 7 11 9 26 22 147 56 16 8 13 5 21 24 148 68 16 8 9 4 18 23 149 39 16 9 12 9 10 13 150 44 18 12 10 8 19 23 151 58 16 9 12 9 10 13 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) Concern Doubts Pexpectations Pcriticism 58.39989 -0.35927 0.26256 0.88235 -1.23270 Standards Organization 0.05056 -0.16767 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -35.497 -8.591 -1.097 9.145 32.971 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 58.39989 9.18552 6.358 2.54e-09 *** Concern -0.35927 0.24217 -1.484 0.1401 Doubts 0.26256 0.44463 0.591 0.5558 Pexpectations 0.88235 0.41030 2.150 0.0332 * Pcriticism -1.23270 0.51281 -2.404 0.0175 * Standards 0.05056 0.31061 0.163 0.8709 Organization -0.16767 0.31769 -0.528 0.5985 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 13.25 on 144 degrees of freedom Multiple R-squared: 0.0591, Adjusted R-squared: 0.01989 F-statistic: 1.507 on 6 and 144 DF, p-value: 0.1797 > 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.9111465 0.17770700 0.08885350 [2,] 0.8372066 0.32558689 0.16279345 [3,] 0.7495751 0.50084986 0.25042493 [4,] 0.9424447 0.11511066 0.05755533 [5,] 0.9068142 0.18637156 0.09318578 [6,] 0.8622925 0.27541509 0.13770755 [7,] 0.8706232 0.25875365 0.12937682 [8,] 0.8223655 0.35526892 0.17763446 [9,] 0.7776795 0.44464100 0.22232050 [10,] 0.8216278 0.35674440 0.17837220 [11,] 0.8132894 0.37342112 0.18671056 [12,] 0.9015697 0.19686058 0.09843029 [13,] 0.8988984 0.20220311 0.10110156 [14,] 0.9756540 0.04869206 0.02434603 [15,] 0.9826111 0.03477783 0.01738892 [16,] 0.9743330 0.05133404 0.02566702 [17,] 0.9638358 0.07232841 0.03616421 [18,] 0.9652698 0.06946044 0.03473022 [19,] 0.9515677 0.09686459 0.04843229 [20,] 0.9344091 0.13118172 0.06559086 [21,] 0.9145668 0.17086643 0.08543322 [22,] 0.8979978 0.20400441 0.10200220 [23,] 0.8766824 0.24663528 0.12331764 [24,] 0.8497684 0.30046325 0.15023163 [25,] 0.8573213 0.28535746 0.14267873 [26,] 0.8270574 0.34588526 0.17294263 [27,] 0.8906135 0.21877308 0.10938654 [28,] 0.8623383 0.27532337 0.13766169 [29,] 0.8814932 0.23701354 0.11850677 [30,] 0.8863734 0.22725324 0.11362662 [31,] 0.8703794 0.25924126 0.12962063 [32,] 0.8462137 0.30757266 0.15378633 [33,] 0.8158847 0.36823054 0.18411527 [34,] 0.8580828 0.28383443 0.14191721 [35,] 0.8291855 0.34162900 0.17081450 [36,] 0.8025301 0.39493981 0.19746990 [37,] 0.8210803 0.35783941 0.17891970 [38,] 0.7857342 0.42853167 0.21426584 [39,] 0.8919374 0.21612519 0.10806260 [40,] 0.8669035 0.26619309 0.13309654 [41,] 0.8704026 0.25919477 0.12959739 [42,] 0.8668853 0.26622949 0.13311475 [43,] 0.8659151 0.26816979 0.13408490 [44,] 0.8878443 0.22431134 0.11215567 [45,] 0.8646200 0.27075990 0.13537995 [46,] 0.8573858 0.28522830 0.14261415 [47,] 0.9544590 0.09108190 0.04554095 [48,] 0.9708263 0.05834746 0.02917373 [49,] 0.9621532 0.07569358 0.03784679 [50,] 0.9526859 0.09462815 0.04731407 [51,] 0.9402419 0.11951630 0.05975815 [52,] 0.9358752 0.12824969 0.06412484 [53,] 0.9241972 0.15160568 0.07580284 [54,] 0.9207235 0.15855304 0.07927652 [55,] 0.9650905 0.06981896 0.03490948 [56,] 0.9554671 0.08906573 0.04453286 [57,] 0.9657553 0.06848944 0.03424472 [58,] 0.9733051 0.05338985 0.02669492 [59,] 0.9652523 0.06949545 0.03474773 [60,] 0.9587241 0.08255173 0.04127587 [61,] 0.9523172 0.09536552 0.04768276 [62,] 0.9475872 0.10482558 0.05241279 [63,] 0.9380519 0.12389626 0.06194813 [64,] 0.9430321 0.11393584 0.05696792 [65,] 0.9309944 0.13801121 0.06900560 [66,] 0.9155755 0.16884900 0.08442450 [67,] 0.9000777 0.19984452 0.09992226 [68,] 0.8951600 0.20968004 0.10484002 [69,] 0.8972775 0.20544508 0.10272254 [70,] 0.8783843 0.24323144 0.12161572 [71,] 0.8525473 0.29490550 0.14745275 [72,] 0.8332709 0.33345824 0.16672912 [73,] 0.8312179 0.33756427 0.16878213 [74,] 0.7995031 0.40099376 0.20049688 [75,] 0.7758496 0.44830075 0.22415038 [76,] 0.7640688 0.47186239 0.23593119 [77,] 0.7346339 0.53073212 0.26536606 [78,] 0.7275822 0.54483560 0.27241780 [79,] 0.7582018 0.48359635 0.24179817 [80,] 0.7956609 0.40867823 0.20433911 [81,] 0.7600437 0.47991266 0.23995633 [82,] 0.7815915 0.43681703 0.21840851 [83,] 0.7487246 0.50255087 0.25127544 [84,] 0.7294498 0.54110047 0.27055023 [85,] 0.6888748 0.62225031 0.31112515 [86,] 0.6849362 0.63012756 0.31506378 [87,] 0.7509230 0.49815397 0.24907699 [88,] 0.8372915 0.32541702 0.16270851 [89,] 0.8041245 0.39175098 0.19587549 [90,] 0.7665721 0.46685585 0.23342792 [91,] 0.8137307 0.37253861 0.18626931 [92,] 0.7794567 0.44108651 0.22054325 [93,] 0.7939419 0.41211616 0.20605808 [94,] 0.8242431 0.35151378 0.17575689 [95,] 0.7942585 0.41148304 0.20574152 [96,] 0.7607009 0.47859813 0.23929906 [97,] 0.7164360 0.56712809 0.28356405 [98,] 0.6852238 0.62955246 0.31477623 [99,] 0.6485752 0.70284958 0.35142479 [100,] 0.6006134 0.79877324 0.39938662 [101,] 0.6458956 0.70820878 0.35410439 [102,] 0.6803432 0.63931362 0.31965681 [103,] 0.6757745 0.64845096 0.32422548 [104,] 0.6534528 0.69309450 0.34654725 [105,] 0.6512924 0.69741520 0.34870760 [106,] 0.7922709 0.41545822 0.20772911 [107,] 0.7768325 0.44633500 0.22316750 [108,] 0.8582758 0.28344841 0.14172420 [109,] 0.8267790 0.34644198 0.17322099 [110,] 0.8007240 0.39855208 0.19927604 [111,] 0.7533311 0.49333774 0.24666887 [112,] 0.7309875 0.53802494 0.26901247 [113,] 0.7050033 0.58999337 0.29499668 [114,] 0.7017914 0.59641718 0.29820859 [115,] 0.6402779 0.71944415 0.35972208 [116,] 0.6301498 0.73970034 0.36985017 [117,] 0.5598122 0.88037568 0.44018784 [118,] 0.6176577 0.76468470 0.38234235 [119,] 0.5897806 0.82043883 0.41021942 [120,] 0.6741694 0.65166118 0.32583059 [121,] 0.7178107 0.56437857 0.28218929 [122,] 0.7279261 0.54414783 0.27207391 [123,] 0.6523561 0.69528789 0.34764394 [124,] 0.7163001 0.56739982 0.28369991 [125,] 0.6593599 0.68128012 0.34064006 [126,] 0.6058679 0.78826424 0.39413212 [127,] 0.6093794 0.78124118 0.39062059 [128,] 0.6208247 0.75835069 0.37917534 [129,] 0.5135488 0.97290239 0.48645119 [130,] 0.3948021 0.78960423 0.60519788 [131,] 0.3605300 0.72106006 0.63946997 [132,] 0.4184861 0.83697214 0.58151393 > postscript(file="/var/www/html/rcomp/tmp/1h5em1292690628.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/2h5em1292690628.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/3h5em1292690628.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/49wvp1292690628.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/59wvp1292690628.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 = 151 Frequency = 1 1 2 3 4 5 6 14.6666146 -3.6566721 -3.9857566 13.0459049 -2.2101152 10.5458572 7 8 9 10 11 12 -15.1141711 -0.6358213 23.4746519 30.4513128 8.9331004 9.6721436 13 14 15 16 17 18 -24.2209184 5.6687585 1.9760437 -6.2394755 8.1162453 -8.1267338 19 20 21 22 23 24 -11.1402406 -4.0615993 32.9710577 14.9311467 -35.4968586 -14.8782766 25 26 27 28 29 30 4.7824358 5.6578288 16.4687824 2.5019630 -1.0471716 8.0208422 31 32 33 34 35 36 -1.4545714 -5.0605126 8.4996267 -10.8798040 -2.1500456 -23.8528868 37 38 39 40 41 42 3.9500256 18.6023912 16.2589708 -11.1138867 -4.1381959 -1.0273979 43 44 45 46 47 48 -20.8023825 4.6959313 -6.9857619 18.7396670 3.8117644 28.8398928 49 50 51 52 53 54 3.6100250 -15.6931819 15.3485488 -5.7296991 20.2772834 -2.0292266 55 56 57 58 59 60 12.7147530 -29.8241912 22.1555469 2.2255943 -5.4865523 4.0956933 61 62 63 64 65 66 -2.9601349 6.8156150 12.5450238 27.0129607 -1.1870874 18.8288899 67 68 69 70 71 72 -17.7761103 -1.9426905 -5.8288554 -8.5899831 -9.7447080 -6.6875872 73 74 75 76 77 78 14.9749376 -2.7042360 -4.8254351 -6.8504964 -11.3124880 9.2916748 79 80 81 82 83 84 5.1988852 -0.5197348 -8.5922666 -13.2642270 -1.3113775 -7.8509514 85 86 87 88 89 90 -11.0193455 -1.3396784 -9.9266650 19.9828044 -16.8922900 2.9680434 91 92 93 94 95 96 -18.2956568 -4.4804676 -7.9868306 2.5818747 14.6543495 21.3772060 97 98 99 100 101 102 -24.3609336 -1.7898215 2.1166930 15.6411478 -2.3607678 -13.7196640 103 104 105 106 107 108 17.1290233 2.3903812 2.4740200 -0.3149173 8.9986620 3.1670732 109 110 111 112 113 114 4.7587837 17.8542993 -18.2802578 -16.9809278 12.4152811 -15.3629911 115 116 117 118 119 120 -24.9245187 10.8169578 -21.5499683 7.9204696 8.9075626 -1.2899550 121 122 123 124 125 126 -12.3944882 9.6793492 -12.1415687 -4.4623814 12.5027548 -1.1316651 127 128 129 130 131 132 17.1130606 9.5535055 9.9565760 -19.5058076 8.6766617 7.3478663 133 134 135 136 137 138 -13.3403341 15.3142063 -9.2193488 2.5415541 -19.7643877 -2.7562221 139 140 141 142 143 144 -11.4904903 9.7824358 -18.3529468 -2.8915391 -7.0697358 -17.8509514 145 146 147 148 149 150 -14.7408972 1.7100450 -1.0969395 13.1837720 -13.8344639 -7.1500456 151 5.1655361 > postscript(file="/var/www/html/rcomp/tmp/69wvp1292690628.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 = 151 Frequency = 1 lag(myerror, k = 1) myerror 0 14.6666146 NA 1 -3.6566721 14.6666146 2 -3.9857566 -3.6566721 3 13.0459049 -3.9857566 4 -2.2101152 13.0459049 5 10.5458572 -2.2101152 6 -15.1141711 10.5458572 7 -0.6358213 -15.1141711 8 23.4746519 -0.6358213 9 30.4513128 23.4746519 10 8.9331004 30.4513128 11 9.6721436 8.9331004 12 -24.2209184 9.6721436 13 5.6687585 -24.2209184 14 1.9760437 5.6687585 15 -6.2394755 1.9760437 16 8.1162453 -6.2394755 17 -8.1267338 8.1162453 18 -11.1402406 -8.1267338 19 -4.0615993 -11.1402406 20 32.9710577 -4.0615993 21 14.9311467 32.9710577 22 -35.4968586 14.9311467 23 -14.8782766 -35.4968586 24 4.7824358 -14.8782766 25 5.6578288 4.7824358 26 16.4687824 5.6578288 27 2.5019630 16.4687824 28 -1.0471716 2.5019630 29 8.0208422 -1.0471716 30 -1.4545714 8.0208422 31 -5.0605126 -1.4545714 32 8.4996267 -5.0605126 33 -10.8798040 8.4996267 34 -2.1500456 -10.8798040 35 -23.8528868 -2.1500456 36 3.9500256 -23.8528868 37 18.6023912 3.9500256 38 16.2589708 18.6023912 39 -11.1138867 16.2589708 40 -4.1381959 -11.1138867 41 -1.0273979 -4.1381959 42 -20.8023825 -1.0273979 43 4.6959313 -20.8023825 44 -6.9857619 4.6959313 45 18.7396670 -6.9857619 46 3.8117644 18.7396670 47 28.8398928 3.8117644 48 3.6100250 28.8398928 49 -15.6931819 3.6100250 50 15.3485488 -15.6931819 51 -5.7296991 15.3485488 52 20.2772834 -5.7296991 53 -2.0292266 20.2772834 54 12.7147530 -2.0292266 55 -29.8241912 12.7147530 56 22.1555469 -29.8241912 57 2.2255943 22.1555469 58 -5.4865523 2.2255943 59 4.0956933 -5.4865523 60 -2.9601349 4.0956933 61 6.8156150 -2.9601349 62 12.5450238 6.8156150 63 27.0129607 12.5450238 64 -1.1870874 27.0129607 65 18.8288899 -1.1870874 66 -17.7761103 18.8288899 67 -1.9426905 -17.7761103 68 -5.8288554 -1.9426905 69 -8.5899831 -5.8288554 70 -9.7447080 -8.5899831 71 -6.6875872 -9.7447080 72 14.9749376 -6.6875872 73 -2.7042360 14.9749376 74 -4.8254351 -2.7042360 75 -6.8504964 -4.8254351 76 -11.3124880 -6.8504964 77 9.2916748 -11.3124880 78 5.1988852 9.2916748 79 -0.5197348 5.1988852 80 -8.5922666 -0.5197348 81 -13.2642270 -8.5922666 82 -1.3113775 -13.2642270 83 -7.8509514 -1.3113775 84 -11.0193455 -7.8509514 85 -1.3396784 -11.0193455 86 -9.9266650 -1.3396784 87 19.9828044 -9.9266650 88 -16.8922900 19.9828044 89 2.9680434 -16.8922900 90 -18.2956568 2.9680434 91 -4.4804676 -18.2956568 92 -7.9868306 -4.4804676 93 2.5818747 -7.9868306 94 14.6543495 2.5818747 95 21.3772060 14.6543495 96 -24.3609336 21.3772060 97 -1.7898215 -24.3609336 98 2.1166930 -1.7898215 99 15.6411478 2.1166930 100 -2.3607678 15.6411478 101 -13.7196640 -2.3607678 102 17.1290233 -13.7196640 103 2.3903812 17.1290233 104 2.4740200 2.3903812 105 -0.3149173 2.4740200 106 8.9986620 -0.3149173 107 3.1670732 8.9986620 108 4.7587837 3.1670732 109 17.8542993 4.7587837 110 -18.2802578 17.8542993 111 -16.9809278 -18.2802578 112 12.4152811 -16.9809278 113 -15.3629911 12.4152811 114 -24.9245187 -15.3629911 115 10.8169578 -24.9245187 116 -21.5499683 10.8169578 117 7.9204696 -21.5499683 118 8.9075626 7.9204696 119 -1.2899550 8.9075626 120 -12.3944882 -1.2899550 121 9.6793492 -12.3944882 122 -12.1415687 9.6793492 123 -4.4623814 -12.1415687 124 12.5027548 -4.4623814 125 -1.1316651 12.5027548 126 17.1130606 -1.1316651 127 9.5535055 17.1130606 128 9.9565760 9.5535055 129 -19.5058076 9.9565760 130 8.6766617 -19.5058076 131 7.3478663 8.6766617 132 -13.3403341 7.3478663 133 15.3142063 -13.3403341 134 -9.2193488 15.3142063 135 2.5415541 -9.2193488 136 -19.7643877 2.5415541 137 -2.7562221 -19.7643877 138 -11.4904903 -2.7562221 139 9.7824358 -11.4904903 140 -18.3529468 9.7824358 141 -2.8915391 -18.3529468 142 -7.0697358 -2.8915391 143 -17.8509514 -7.0697358 144 -14.7408972 -17.8509514 145 1.7100450 -14.7408972 146 -1.0969395 1.7100450 147 13.1837720 -1.0969395 148 -13.8344639 13.1837720 149 -7.1500456 -13.8344639 150 5.1655361 -7.1500456 151 NA 5.1655361 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -3.6566721 14.6666146 [2,] -3.9857566 -3.6566721 [3,] 13.0459049 -3.9857566 [4,] -2.2101152 13.0459049 [5,] 10.5458572 -2.2101152 [6,] -15.1141711 10.5458572 [7,] -0.6358213 -15.1141711 [8,] 23.4746519 -0.6358213 [9,] 30.4513128 23.4746519 [10,] 8.9331004 30.4513128 [11,] 9.6721436 8.9331004 [12,] -24.2209184 9.6721436 [13,] 5.6687585 -24.2209184 [14,] 1.9760437 5.6687585 [15,] -6.2394755 1.9760437 [16,] 8.1162453 -6.2394755 [17,] -8.1267338 8.1162453 [18,] -11.1402406 -8.1267338 [19,] -4.0615993 -11.1402406 [20,] 32.9710577 -4.0615993 [21,] 14.9311467 32.9710577 [22,] -35.4968586 14.9311467 [23,] -14.8782766 -35.4968586 [24,] 4.7824358 -14.8782766 [25,] 5.6578288 4.7824358 [26,] 16.4687824 5.6578288 [27,] 2.5019630 16.4687824 [28,] -1.0471716 2.5019630 [29,] 8.0208422 -1.0471716 [30,] -1.4545714 8.0208422 [31,] -5.0605126 -1.4545714 [32,] 8.4996267 -5.0605126 [33,] -10.8798040 8.4996267 [34,] -2.1500456 -10.8798040 [35,] -23.8528868 -2.1500456 [36,] 3.9500256 -23.8528868 [37,] 18.6023912 3.9500256 [38,] 16.2589708 18.6023912 [39,] -11.1138867 16.2589708 [40,] -4.1381959 -11.1138867 [41,] -1.0273979 -4.1381959 [42,] -20.8023825 -1.0273979 [43,] 4.6959313 -20.8023825 [44,] -6.9857619 4.6959313 [45,] 18.7396670 -6.9857619 [46,] 3.8117644 18.7396670 [47,] 28.8398928 3.8117644 [48,] 3.6100250 28.8398928 [49,] -15.6931819 3.6100250 [50,] 15.3485488 -15.6931819 [51,] -5.7296991 15.3485488 [52,] 20.2772834 -5.7296991 [53,] -2.0292266 20.2772834 [54,] 12.7147530 -2.0292266 [55,] -29.8241912 12.7147530 [56,] 22.1555469 -29.8241912 [57,] 2.2255943 22.1555469 [58,] -5.4865523 2.2255943 [59,] 4.0956933 -5.4865523 [60,] -2.9601349 4.0956933 [61,] 6.8156150 -2.9601349 [62,] 12.5450238 6.8156150 [63,] 27.0129607 12.5450238 [64,] -1.1870874 27.0129607 [65,] 18.8288899 -1.1870874 [66,] -17.7761103 18.8288899 [67,] -1.9426905 -17.7761103 [68,] -5.8288554 -1.9426905 [69,] -8.5899831 -5.8288554 [70,] -9.7447080 -8.5899831 [71,] -6.6875872 -9.7447080 [72,] 14.9749376 -6.6875872 [73,] -2.7042360 14.9749376 [74,] -4.8254351 -2.7042360 [75,] -6.8504964 -4.8254351 [76,] -11.3124880 -6.8504964 [77,] 9.2916748 -11.3124880 [78,] 5.1988852 9.2916748 [79,] -0.5197348 5.1988852 [80,] -8.5922666 -0.5197348 [81,] -13.2642270 -8.5922666 [82,] -1.3113775 -13.2642270 [83,] -7.8509514 -1.3113775 [84,] -11.0193455 -7.8509514 [85,] -1.3396784 -11.0193455 [86,] -9.9266650 -1.3396784 [87,] 19.9828044 -9.9266650 [88,] -16.8922900 19.9828044 [89,] 2.9680434 -16.8922900 [90,] -18.2956568 2.9680434 [91,] -4.4804676 -18.2956568 [92,] -7.9868306 -4.4804676 [93,] 2.5818747 -7.9868306 [94,] 14.6543495 2.5818747 [95,] 21.3772060 14.6543495 [96,] -24.3609336 21.3772060 [97,] -1.7898215 -24.3609336 [98,] 2.1166930 -1.7898215 [99,] 15.6411478 2.1166930 [100,] -2.3607678 15.6411478 [101,] -13.7196640 -2.3607678 [102,] 17.1290233 -13.7196640 [103,] 2.3903812 17.1290233 [104,] 2.4740200 2.3903812 [105,] -0.3149173 2.4740200 [106,] 8.9986620 -0.3149173 [107,] 3.1670732 8.9986620 [108,] 4.7587837 3.1670732 [109,] 17.8542993 4.7587837 [110,] -18.2802578 17.8542993 [111,] -16.9809278 -18.2802578 [112,] 12.4152811 -16.9809278 [113,] -15.3629911 12.4152811 [114,] -24.9245187 -15.3629911 [115,] 10.8169578 -24.9245187 [116,] -21.5499683 10.8169578 [117,] 7.9204696 -21.5499683 [118,] 8.9075626 7.9204696 [119,] -1.2899550 8.9075626 [120,] -12.3944882 -1.2899550 [121,] 9.6793492 -12.3944882 [122,] -12.1415687 9.6793492 [123,] -4.4623814 -12.1415687 [124,] 12.5027548 -4.4623814 [125,] -1.1316651 12.5027548 [126,] 17.1130606 -1.1316651 [127,] 9.5535055 17.1130606 [128,] 9.9565760 9.5535055 [129,] -19.5058076 9.9565760 [130,] 8.6766617 -19.5058076 [131,] 7.3478663 8.6766617 [132,] -13.3403341 7.3478663 [133,] 15.3142063 -13.3403341 [134,] -9.2193488 15.3142063 [135,] 2.5415541 -9.2193488 [136,] -19.7643877 2.5415541 [137,] -2.7562221 -19.7643877 [138,] -11.4904903 -2.7562221 [139,] 9.7824358 -11.4904903 [140,] -18.3529468 9.7824358 [141,] -2.8915391 -18.3529468 [142,] -7.0697358 -2.8915391 [143,] -17.8509514 -7.0697358 [144,] -14.7408972 -17.8509514 [145,] 1.7100450 -14.7408972 [146,] -1.0969395 1.7100450 [147,] 13.1837720 -1.0969395 [148,] -13.8344639 13.1837720 [149,] -7.1500456 -13.8344639 [150,] 5.1655361 -7.1500456 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -3.6566721 14.6666146 2 -3.9857566 -3.6566721 3 13.0459049 -3.9857566 4 -2.2101152 13.0459049 5 10.5458572 -2.2101152 6 -15.1141711 10.5458572 7 -0.6358213 -15.1141711 8 23.4746519 -0.6358213 9 30.4513128 23.4746519 10 8.9331004 30.4513128 11 9.6721436 8.9331004 12 -24.2209184 9.6721436 13 5.6687585 -24.2209184 14 1.9760437 5.6687585 15 -6.2394755 1.9760437 16 8.1162453 -6.2394755 17 -8.1267338 8.1162453 18 -11.1402406 -8.1267338 19 -4.0615993 -11.1402406 20 32.9710577 -4.0615993 21 14.9311467 32.9710577 22 -35.4968586 14.9311467 23 -14.8782766 -35.4968586 24 4.7824358 -14.8782766 25 5.6578288 4.7824358 26 16.4687824 5.6578288 27 2.5019630 16.4687824 28 -1.0471716 2.5019630 29 8.0208422 -1.0471716 30 -1.4545714 8.0208422 31 -5.0605126 -1.4545714 32 8.4996267 -5.0605126 33 -10.8798040 8.4996267 34 -2.1500456 -10.8798040 35 -23.8528868 -2.1500456 36 3.9500256 -23.8528868 37 18.6023912 3.9500256 38 16.2589708 18.6023912 39 -11.1138867 16.2589708 40 -4.1381959 -11.1138867 41 -1.0273979 -4.1381959 42 -20.8023825 -1.0273979 43 4.6959313 -20.8023825 44 -6.9857619 4.6959313 45 18.7396670 -6.9857619 46 3.8117644 18.7396670 47 28.8398928 3.8117644 48 3.6100250 28.8398928 49 -15.6931819 3.6100250 50 15.3485488 -15.6931819 51 -5.7296991 15.3485488 52 20.2772834 -5.7296991 53 -2.0292266 20.2772834 54 12.7147530 -2.0292266 55 -29.8241912 12.7147530 56 22.1555469 -29.8241912 57 2.2255943 22.1555469 58 -5.4865523 2.2255943 59 4.0956933 -5.4865523 60 -2.9601349 4.0956933 61 6.8156150 -2.9601349 62 12.5450238 6.8156150 63 27.0129607 12.5450238 64 -1.1870874 27.0129607 65 18.8288899 -1.1870874 66 -17.7761103 18.8288899 67 -1.9426905 -17.7761103 68 -5.8288554 -1.9426905 69 -8.5899831 -5.8288554 70 -9.7447080 -8.5899831 71 -6.6875872 -9.7447080 72 14.9749376 -6.6875872 73 -2.7042360 14.9749376 74 -4.8254351 -2.7042360 75 -6.8504964 -4.8254351 76 -11.3124880 -6.8504964 77 9.2916748 -11.3124880 78 5.1988852 9.2916748 79 -0.5197348 5.1988852 80 -8.5922666 -0.5197348 81 -13.2642270 -8.5922666 82 -1.3113775 -13.2642270 83 -7.8509514 -1.3113775 84 -11.0193455 -7.8509514 85 -1.3396784 -11.0193455 86 -9.9266650 -1.3396784 87 19.9828044 -9.9266650 88 -16.8922900 19.9828044 89 2.9680434 -16.8922900 90 -18.2956568 2.9680434 91 -4.4804676 -18.2956568 92 -7.9868306 -4.4804676 93 2.5818747 -7.9868306 94 14.6543495 2.5818747 95 21.3772060 14.6543495 96 -24.3609336 21.3772060 97 -1.7898215 -24.3609336 98 2.1166930 -1.7898215 99 15.6411478 2.1166930 100 -2.3607678 15.6411478 101 -13.7196640 -2.3607678 102 17.1290233 -13.7196640 103 2.3903812 17.1290233 104 2.4740200 2.3903812 105 -0.3149173 2.4740200 106 8.9986620 -0.3149173 107 3.1670732 8.9986620 108 4.7587837 3.1670732 109 17.8542993 4.7587837 110 -18.2802578 17.8542993 111 -16.9809278 -18.2802578 112 12.4152811 -16.9809278 113 -15.3629911 12.4152811 114 -24.9245187 -15.3629911 115 10.8169578 -24.9245187 116 -21.5499683 10.8169578 117 7.9204696 -21.5499683 118 8.9075626 7.9204696 119 -1.2899550 8.9075626 120 -12.3944882 -1.2899550 121 9.6793492 -12.3944882 122 -12.1415687 9.6793492 123 -4.4623814 -12.1415687 124 12.5027548 -4.4623814 125 -1.1316651 12.5027548 126 17.1130606 -1.1316651 127 9.5535055 17.1130606 128 9.9565760 9.5535055 129 -19.5058076 9.9565760 130 8.6766617 -19.5058076 131 7.3478663 8.6766617 132 -13.3403341 7.3478663 133 15.3142063 -13.3403341 134 -9.2193488 15.3142063 135 2.5415541 -9.2193488 136 -19.7643877 2.5415541 137 -2.7562221 -19.7643877 138 -11.4904903 -2.7562221 139 9.7824358 -11.4904903 140 -18.3529468 9.7824358 141 -2.8915391 -18.3529468 142 -7.0697358 -2.8915391 143 -17.8509514 -7.0697358 144 -14.7408972 -17.8509514 145 1.7100450 -14.7408972 146 -1.0969395 1.7100450 147 13.1837720 -1.0969395 148 -13.8344639 13.1837720 149 -7.1500456 -13.8344639 150 5.1655361 -7.1500456 > 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/725ua1292690628.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/8vwud1292690628.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/9vwud1292690628.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/10vwud1292690628.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/11gxai1292690628.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/121fqo1292690628.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/13rho01292690628.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/14ch461292690628.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/15xilc1292690628.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/1610ji1292690628.tab") + } > > try(system("convert tmp/1h5em1292690628.ps tmp/1h5em1292690628.png",intern=TRUE)) character(0) > try(system("convert tmp/2h5em1292690628.ps tmp/2h5em1292690628.png",intern=TRUE)) character(0) > try(system("convert tmp/3h5em1292690628.ps tmp/3h5em1292690628.png",intern=TRUE)) character(0) > try(system("convert tmp/49wvp1292690628.ps tmp/49wvp1292690628.png",intern=TRUE)) character(0) > try(system("convert tmp/59wvp1292690628.ps tmp/59wvp1292690628.png",intern=TRUE)) character(0) > try(system("convert tmp/69wvp1292690628.ps tmp/69wvp1292690628.png",intern=TRUE)) character(0) > try(system("convert tmp/725ua1292690628.ps tmp/725ua1292690628.png",intern=TRUE)) character(0) > try(system("convert tmp/8vwud1292690628.ps tmp/8vwud1292690628.png",intern=TRUE)) character(0) > try(system("convert tmp/9vwud1292690628.ps tmp/9vwud1292690628.png",intern=TRUE)) character(0) > try(system("convert tmp/10vwud1292690628.ps tmp/10vwud1292690628.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 4.075 1.870 10.304