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(26 + ,1 + ,24 + ,14 + ,11 + ,12 + ,24 + ,23 + ,1 + ,25 + ,11 + ,7 + ,8 + ,25 + ,25 + ,1 + ,17 + ,6 + ,17 + ,8 + ,30 + ,23 + ,1 + ,18 + ,12 + ,10 + ,8 + ,19 + ,19 + ,1 + ,18 + ,8 + ,12 + ,9 + ,22 + ,29 + ,1 + ,16 + ,10 + ,12 + ,7 + ,22 + ,25 + ,1 + ,20 + ,10 + ,11 + ,4 + ,25 + ,21 + ,1 + ,16 + ,11 + ,11 + ,11 + ,23 + ,22 + ,1 + ,18 + ,16 + ,12 + ,7 + ,17 + ,25 + ,2 + ,17 + ,11 + ,13 + ,7 + ,21 + ,24 + ,2 + ,23 + ,13 + ,14 + ,12 + ,19 + ,18 + ,2 + ,30 + ,12 + ,16 + ,10 + ,19 + ,22 + ,2 + ,23 + ,8 + ,11 + ,10 + ,15 + ,15 + ,2 + ,18 + ,12 + ,10 + ,8 + ,16 + ,22 + ,2 + ,15 + ,11 + ,11 + ,8 + ,23 + ,28 + ,2 + ,12 + ,4 + ,15 + ,4 + ,27 + ,20 + ,2 + ,21 + ,9 + ,9 + ,9 + ,22 + ,12 + ,2 + ,15 + ,8 + ,11 + ,8 + ,14 + ,24 + ,2 + ,20 + ,8 + ,17 + ,7 + ,22 + ,20 + ,3 + ,31 + ,14 + ,17 + ,11 + ,23 + ,21 + ,3 + ,27 + ,15 + ,11 + ,9 + ,23 + ,20 + ,3 + ,34 + ,16 + ,18 + ,11 + ,21 + ,21 + ,3 + ,21 + ,9 + ,14 + ,13 + ,19 + ,23 + ,3 + ,31 + ,14 + ,10 + ,8 + ,18 + ,28 + ,3 + ,19 + ,11 + ,11 + ,8 + ,20 + ,24 + ,3 + ,16 + ,8 + ,15 + ,9 + ,23 + ,24 + ,3 + ,20 + ,9 + ,15 + ,6 + ,25 + ,24 + ,3 + ,21 + ,9 + ,13 + ,9 + ,19 + ,23 + ,3 + ,22 + ,9 + ,16 + ,9 + ,24 + ,23 + ,3 + ,17 + ,9 + ,13 + ,6 + ,22 + ,29 + ,3 + ,24 + ,10 + ,9 + ,6 + ,25 + ,24 + ,3 + ,25 + ,16 + ,18 + ,16 + ,26 + ,18 + ,3 + ,26 + ,11 + ,18 + ,5 + ,29 + ,25 + ,3 + ,25 + ,8 + ,12 + ,7 + ,32 + ,21 + ,3 + ,17 + ,9 + ,17 + ,9 + ,25 + ,26 + ,3 + ,32 + ,16 + ,9 + ,6 + ,29 + ,22 + ,3 + ,33 + ,11 + ,9 + ,6 + ,28 + ,22 + ,3 + ,13 + ,16 + ,12 + ,5 + ,17 + ,22 + ,3 + ,32 + ,12 + ,18 + ,12 + ,28 + ,23 + ,3 + ,25 + ,12 + ,12 + ,7 + ,29 + ,30 + ,3 + ,29 + ,14 + ,18 + ,10 + ,26 + ,23 + ,3 + ,22 + ,9 + ,14 + ,9 + ,25 + ,17 + ,3 + ,18 + ,10 + ,15 + ,8 + ,14 + ,23 + ,3 + ,17 + ,9 + ,16 + ,5 + ,25 + ,23 + ,3 + ,20 + ,10 + ,10 + ,8 + ,26 + ,25 + ,3 + ,15 + ,12 + ,11 + ,8 + ,20 + ,24 + ,3 + ,20 + ,14 + ,14 + ,10 + ,18 + ,24 + ,3 + ,33 + ,14 + ,9 + ,6 + ,32 + ,23 + ,3 + ,29 + ,10 + ,12 + ,8 + ,25 + ,21 + ,3 + ,23 + ,14 + ,17 + ,7 + ,25 + ,24 + ,3 + ,26 + ,16 + ,5 + ,4 + ,23 + ,24 + ,3 + ,18 + ,9 + ,12 + ,8 + ,21 + ,28 + ,3 + ,20 + ,10 + ,12 + ,8 + ,20 + ,16 + ,3 + ,11 + ,6 + ,6 + ,4 + ,15 + ,20 + ,3 + ,28 + ,8 + ,24 + ,20 + ,30 + ,29 + ,3 + ,26 + ,13 + ,12 + ,8 + ,24 + ,27 + ,3 + ,22 + ,10 + ,12 + ,8 + ,26 + ,22 + ,3 + ,17 + ,8 + ,14 + ,6 + ,24 + ,28 + ,3 + ,12 + ,7 + ,7 + ,4 + ,22 + ,16 + ,3 + ,14 + ,15 + ,13 + ,8 + ,14 + ,25 + ,3 + ,17 + ,9 + ,12 + ,9 + ,24 + ,24 + ,3 + ,21 + ,10 + ,13 + ,6 + ,24 + ,28 + ,3 + ,19 + ,12 + ,14 + ,7 + ,24 + ,24 + ,3 + ,18 + ,13 + ,8 + ,9 + ,24 + ,23 + ,3 + ,10 + ,10 + ,11 + ,5 + ,19 + ,30 + ,3 + ,29 + ,11 + ,9 + ,5 + ,31 + ,24 + ,3 + ,31 + ,8 + ,11 + ,8 + ,22 + ,21 + ,3 + ,19 + ,9 + ,13 + ,8 + ,27 + ,25 + ,3 + ,9 + ,13 + ,10 + ,6 + ,19 + ,25 + ,3 + ,20 + ,11 + ,11 + ,8 + ,25 + ,22 + ,3 + ,28 + ,8 + ,12 + ,7 + ,20 + ,23 + ,3 + ,19 + ,9 + ,9 + ,7 + ,21 + ,26 + ,3 + ,30 + ,9 + ,15 + ,9 + ,27 + ,23 + ,3 + ,29 + ,15 + ,18 + ,11 + ,23 + ,25 + ,3 + ,26 + ,9 + ,15 + ,6 + ,25 + ,21 + ,3 + ,23 + ,10 + ,12 + ,8 + ,20 + ,25 + ,3 + ,13 + ,14 + ,13 + ,6 + ,21 + ,24 + ,3 + ,21 + ,12 + ,14 + ,9 + ,22 + ,29 + ,3 + ,19 + ,12 + ,10 + ,8 + ,23 + ,22 + ,3 + ,28 + ,11 + ,13 + ,6 + ,25 + ,27 + ,3 + ,23 + ,14 + ,13 + ,10 + ,25 + ,26 + ,3 + ,18 + ,6 + ,11 + ,8 + ,17 + ,22 + ,3 + ,21 + ,12 + ,13 + ,8 + ,19 + ,24 + ,3 + ,20 + ,8 + ,16 + ,10 + ,25 + ,27 + ,4 + ,23 + ,14 + ,8 + ,5 + ,19 + ,24 + ,4 + ,21 + ,11 + ,16 + ,7 + ,20 + ,24 + ,4 + ,21 + ,10 + ,11 + ,5 + ,26 + ,29 + ,4 + ,15 + ,14 + ,9 + ,8 + ,23 + ,22 + ,4 + ,28 + ,12 + ,16 + ,14 + ,27 + ,21 + ,4 + ,19 + ,10 + ,12 + ,7 + ,17 + ,24 + ,4 + ,26 + ,14 + ,14 + ,8 + ,17 + ,24 + ,4 + ,10 + ,5 + ,8 + ,6 + ,19 + ,23 + ,4 + ,16 + ,11 + ,9 + ,5 + ,17 + ,20 + ,4 + ,22 + ,10 + ,15 + ,6 + ,22 + ,27 + ,4 + ,19 + ,9 + ,11 + ,10 + ,21 + ,26 + ,4 + ,31 + ,10 + ,21 + ,12 + ,32 + ,25 + ,4 + ,31 + ,16 + ,14 + ,9 + ,21 + ,21 + ,4 + ,29 + ,13 + ,18 + ,12 + ,21 + ,21 + ,4 + ,19 + ,9 + ,12 + ,7 + ,18 + ,19 + ,4 + ,22 + ,10 + ,13 + ,8 + ,18 + ,21 + ,4 + ,23 + ,10 + ,15 + ,10 + ,23 + ,21 + ,4 + ,15 + ,7 + ,12 + ,6 + ,19 + ,16 + ,4 + ,20 + ,9 + ,19 + ,10 + ,20 + ,22 + ,4 + ,18 + ,8 + ,15 + ,10 + ,21 + ,29 + ,4 + ,23 + ,14 + ,11 + ,10 + ,20 + ,15 + ,4 + ,25 + ,14 + ,11 + ,5 + ,17 + ,17 + ,4 + ,21 + ,8 + ,10 + ,7 + ,18 + ,15 + ,4 + ,24 + ,9 + ,13 + ,10 + ,19 + ,21 + ,4 + ,25 + ,14 + ,15 + ,11 + ,22 + ,21 + ,4 + ,17 + ,14 + ,12 + ,6 + ,15 + ,19 + ,4 + ,13 + ,8 + ,12 + ,7 + ,14 + ,24 + ,4 + ,28 + ,8 + ,16 + ,12 + ,18 + ,20 + ,4 + ,21 + ,8 + ,9 + ,11 + ,24 + ,17 + ,4 + ,25 + ,7 + ,18 + ,11 + ,35 + ,23 + ,4 + ,9 + ,6 + ,8 + ,11 + ,29 + ,24 + ,4 + ,16 + ,8 + ,13 + ,5 + ,21 + ,14 + ,4 + ,19 + ,6 + ,17 + ,8 + ,25 + ,19 + ,4 + ,17 + ,11 + ,9 + ,6 + ,20 + ,24 + ,4 + ,25 + ,14 + ,15 + ,9 + ,22 + ,13 + ,4 + ,20 + ,11 + ,8 + ,4 + ,13 + ,22 + ,4 + ,29 + ,11 + ,7 + ,4 + ,26 + ,16 + ,4 + ,14 + ,11 + ,12 + ,7 + ,17 + ,19 + ,4 + ,22 + ,14 + ,14 + ,11 + ,25 + ,25 + ,4 + ,15 + ,8 + ,6 + ,6 + ,20 + ,25 + ,4 + ,19 + ,20 + ,8 + ,7 + ,19 + ,23 + ,4 + ,20 + ,11 + ,17 + ,8 + ,21 + ,24 + ,4 + ,15 + ,8 + ,10 + ,4 + ,22 + ,26 + ,4 + ,20 + ,11 + ,11 + ,8 + ,24 + ,26 + ,4 + ,18 + ,10 + ,14 + ,9 + ,21 + ,25 + ,4 + ,33 + ,14 + ,11 + ,8 + ,26 + ,18 + ,4 + ,22 + ,11 + ,13 + ,11 + ,24 + ,21 + ,4 + ,16 + ,9 + ,12 + ,8 + ,16 + ,26 + ,4 + ,17 + ,9 + ,11 + ,5 + ,23 + ,23 + ,4 + ,16 + ,8 + ,9 + ,4 + ,18 + ,23 + ,4 + ,21 + ,10 + ,12 + ,8 + ,16 + ,22 + ,4 + ,26 + ,13 + ,20 + ,10 + ,26 + ,20 + ,4 + ,18 + ,13 + ,12 + ,6 + ,19 + ,13 + ,4 + ,18 + ,12 + ,13 + ,9 + ,21 + ,24 + ,4 + ,17 + ,8 + ,12 + ,9 + ,21 + ,15 + ,4 + ,22 + ,13 + ,12 + ,13 + ,22 + ,14 + ,4 + ,30 + ,14 + ,9 + ,9 + ,23 + ,22 + ,4 + ,30 + ,12 + ,15 + ,10 + ,29 + ,10 + ,4 + ,24 + ,14 + ,24 + ,20 + ,21 + ,24 + ,4 + ,21 + ,15 + ,7 + ,5 + ,21 + ,22 + ,4 + ,21 + ,13 + ,17 + ,11 + ,23 + ,24 + ,4 + ,29 + ,16 + ,11 + ,6 + ,27 + ,19 + ,4 + ,31 + ,9 + ,17 + ,9 + ,25 + ,20 + ,4 + ,20 + ,9 + ,11 + ,7 + ,21 + ,13 + ,4 + ,16 + ,9 + ,12 + ,9 + ,10 + ,20 + ,4 + ,22 + ,8 + ,14 + ,10 + ,20 + ,22 + ,4 + ,20 + ,7 + ,11 + ,9 + ,26 + ,24 + ,4 + ,28 + ,16 + ,16 + ,8 + ,24 + ,29 + ,4 + ,38 + ,11 + ,21 + ,7 + ,29 + ,12 + ,4 + ,22 + ,9 + ,14 + ,6 + ,19 + ,20 + ,4 + ,20 + ,11 + ,20 + ,13 + ,24 + ,21 + ,4 + ,17 + ,9 + ,13 + ,6 + ,19 + ,24 + ,4 + ,28 + ,14 + ,11 + ,8 + ,24 + ,22 + ,4 + ,22 + ,13 + ,15 + ,10 + ,22 + ,20 + ,4 + ,31 + ,16 + ,19 + ,16 + ,17) + ,dim=c(7 + ,159) + ,dimnames=list(c('Organisation' + ,'Week' + ,'Concern' + ,'Doubts' + ,'Pexpect' + ,'Pcriticism' + ,'Pstandards') + ,1:159)) > y <- array(NA,dim=c(7,159),dimnames=list(c('Organisation','Week','Concern','Doubts','Pexpect','Pcriticism','Pstandards'),1:159)) > for (i in 1:dim(x)[1]) + { + for (j in 1:dim(x)[2]) + { + y[i,j] <- as.numeric(x[i,j]) + } + } > par3 = '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 Organisation Week Concern Doubts Pexpect Pcriticism Pstandards t 1 26 1 24 14 11 12 24 1 2 23 1 25 11 7 8 25 2 3 25 1 17 6 17 8 30 3 4 23 1 18 12 10 8 19 4 5 19 1 18 8 12 9 22 5 6 29 1 16 10 12 7 22 6 7 25 1 20 10 11 4 25 7 8 21 1 16 11 11 11 23 8 9 22 1 18 16 12 7 17 9 10 25 2 17 11 13 7 21 10 11 24 2 23 13 14 12 19 11 12 18 2 30 12 16 10 19 12 13 22 2 23 8 11 10 15 13 14 15 2 18 12 10 8 16 14 15 22 2 15 11 11 8 23 15 16 28 2 12 4 15 4 27 16 17 20 2 21 9 9 9 22 17 18 12 2 15 8 11 8 14 18 19 24 2 20 8 17 7 22 19 20 20 3 31 14 17 11 23 20 21 21 3 27 15 11 9 23 21 22 20 3 34 16 18 11 21 22 23 21 3 21 9 14 13 19 23 24 23 3 31 14 10 8 18 24 25 28 3 19 11 11 8 20 25 26 24 3 16 8 15 9 23 26 27 24 3 20 9 15 6 25 27 28 24 3 21 9 13 9 19 28 29 23 3 22 9 16 9 24 29 30 23 3 17 9 13 6 22 30 31 29 3 24 10 9 6 25 31 32 24 3 25 16 18 16 26 32 33 18 3 26 11 18 5 29 33 34 25 3 25 8 12 7 32 34 35 21 3 17 9 17 9 25 35 36 26 3 32 16 9 6 29 36 37 22 3 33 11 9 6 28 37 38 22 3 13 16 12 5 17 38 39 22 3 32 12 18 12 28 39 40 23 3 25 12 12 7 29 40 41 30 3 29 14 18 10 26 41 42 23 3 22 9 14 9 25 42 43 17 3 18 10 15 8 14 43 44 23 3 17 9 16 5 25 44 45 23 3 20 10 10 8 26 45 46 25 3 15 12 11 8 20 46 47 24 3 20 14 14 10 18 47 48 24 3 33 14 9 6 32 48 49 23 3 29 10 12 8 25 49 50 21 3 23 14 17 7 25 50 51 24 3 26 16 5 4 23 51 52 24 3 18 9 12 8 21 52 53 28 3 20 10 12 8 20 53 54 16 3 11 6 6 4 15 54 55 20 3 28 8 24 20 30 55 56 29 3 26 13 12 8 24 56 57 27 3 22 10 12 8 26 57 58 22 3 17 8 14 6 24 58 59 28 3 12 7 7 4 22 59 60 16 3 14 15 13 8 14 60 61 25 3 17 9 12 9 24 61 62 24 3 21 10 13 6 24 62 63 28 3 19 12 14 7 24 63 64 24 3 18 13 8 9 24 64 65 23 3 10 10 11 5 19 65 66 30 3 29 11 9 5 31 66 67 24 3 31 8 11 8 22 67 68 21 3 19 9 13 8 27 68 69 25 3 9 13 10 6 19 69 70 25 3 20 11 11 8 25 70 71 22 3 28 8 12 7 20 71 72 23 3 19 9 9 7 21 72 73 26 3 30 9 15 9 27 73 74 23 3 29 15 18 11 23 74 75 25 3 26 9 15 6 25 75 76 21 3 23 10 12 8 20 76 77 25 3 13 14 13 6 21 77 78 24 3 21 12 14 9 22 78 79 29 3 19 12 10 8 23 79 80 22 3 28 11 13 6 25 80 81 27 3 23 14 13 10 25 81 82 26 3 18 6 11 8 17 82 83 22 3 21 12 13 8 19 83 84 24 3 20 8 16 10 25 84 85 27 4 23 14 8 5 19 85 86 24 4 21 11 16 7 20 86 87 24 4 21 10 11 5 26 87 88 29 4 15 14 9 8 23 88 89 22 4 28 12 16 14 27 89 90 21 4 19 10 12 7 17 90 91 24 4 26 14 14 8 17 91 92 24 4 10 5 8 6 19 92 93 23 4 16 11 9 5 17 93 94 20 4 22 10 15 6 22 94 95 27 4 19 9 11 10 21 95 96 26 4 31 10 21 12 32 96 97 25 4 31 16 14 9 21 97 98 21 4 29 13 18 12 21 98 99 21 4 19 9 12 7 18 99 100 19 4 22 10 13 8 18 100 101 21 4 23 10 15 10 23 101 102 21 4 15 7 12 6 19 102 103 16 4 20 9 19 10 20 103 104 22 4 18 8 15 10 21 104 105 29 4 23 14 11 10 20 105 106 15 4 25 14 11 5 17 106 107 17 4 21 8 10 7 18 107 108 15 4 24 9 13 10 19 108 109 21 4 25 14 15 11 22 109 110 21 4 17 14 12 6 15 110 111 19 4 13 8 12 7 14 111 112 24 4 28 8 16 12 18 112 113 20 4 21 8 9 11 24 113 114 17 4 25 7 18 11 35 114 115 23 4 9 6 8 11 29 115 116 24 4 16 8 13 5 21 116 117 14 4 19 6 17 8 25 117 118 19 4 17 11 9 6 20 118 119 24 4 25 14 15 9 22 119 120 13 4 20 11 8 4 13 120 121 22 4 29 11 7 4 26 121 122 16 4 14 11 12 7 17 122 123 19 4 22 14 14 11 25 123 124 25 4 15 8 6 6 20 124 125 25 4 19 20 8 7 19 125 126 23 4 20 11 17 8 21 126 127 24 4 15 8 10 4 22 127 128 26 4 20 11 11 8 24 128 129 26 4 18 10 14 9 21 129 130 25 4 33 14 11 8 26 130 131 18 4 22 11 13 11 24 131 132 21 4 16 9 12 8 16 132 133 26 4 17 9 11 5 23 133 134 23 4 16 8 9 4 18 134 135 23 4 21 10 12 8 16 135 136 22 4 26 13 20 10 26 136 137 20 4 18 13 12 6 19 137 138 13 4 18 12 13 9 21 138 139 24 4 17 8 12 9 21 139 140 15 4 22 13 12 13 22 140 141 14 4 30 14 9 9 23 141 142 22 4 30 12 15 10 29 142 143 10 4 24 14 24 20 21 143 144 24 4 21 15 7 5 21 144 145 22 4 21 13 17 11 23 145 146 24 4 29 16 11 6 27 146 147 19 4 31 9 17 9 25 147 148 20 4 20 9 11 7 21 148 149 13 4 16 9 12 9 10 149 150 20 4 22 8 14 10 20 150 151 22 4 20 7 11 9 26 151 152 24 4 28 16 16 8 24 152 153 29 4 38 11 21 7 29 153 154 12 4 22 9 14 6 19 154 155 20 4 20 11 20 13 24 155 156 21 4 17 9 13 6 19 156 157 24 4 28 14 11 8 24 157 158 22 4 22 13 15 10 22 158 159 20 4 31 16 19 16 17 159 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) Week Concern Doubts Pexpect Pcriticism 16.72366 0.36602 -0.06332 0.21800 -0.13705 -0.24699 Pstandards t 0.39855 -0.02046 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -8.2057 -1.8989 0.2747 2.2191 7.3711 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 16.72366 2.45045 6.825 2.00e-10 *** Week 0.36602 0.66201 0.553 0.5812 Concern -0.06332 0.06262 -1.011 0.3136 Doubts 0.21800 0.11108 1.963 0.0515 . Pexpect -0.13705 0.10325 -1.327 0.1864 Pcriticism -0.24699 0.12908 -1.914 0.0576 . Pstandards 0.39855 0.07550 5.279 4.44e-07 *** t -0.02046 0.01178 -1.737 0.0844 . --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 3.451 on 151 degrees of freedom Multiple R-squared: 0.2538, Adjusted R-squared: 0.2192 F-statistic: 7.336 on 7 and 151 DF, p-value: 1.424e-07 > 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.675872967 0.648254066 0.3241270 [2,] 0.532331063 0.935337874 0.4676689 [3,] 0.551748586 0.896502829 0.4482514 [4,] 0.778516224 0.442967552 0.2214838 [5,] 0.694936122 0.610127756 0.3050639 [6,] 0.692611740 0.614776520 0.3073883 [7,] 0.607519260 0.784961479 0.3924807 [8,] 0.715567632 0.568864735 0.2844324 [9,] 0.683360114 0.633279772 0.3166399 [10,] 0.641103173 0.717793654 0.3588968 [11,] 0.569117106 0.861765788 0.4308829 [12,] 0.491848027 0.983696054 0.5081520 [13,] 0.472082423 0.944164845 0.5279176 [14,] 0.529006283 0.941987433 0.4709937 [15,] 0.682543932 0.634912136 0.3174561 [16,] 0.618662684 0.762674631 0.3813373 [17,] 0.552151852 0.895696297 0.4478481 [18,] 0.547556567 0.904886867 0.4524434 [19,] 0.479314907 0.958629813 0.5206851 [20,] 0.414260511 0.828521023 0.5857395 [21,] 0.430449432 0.860898865 0.5695506 [22,] 0.368547300 0.737094600 0.6314527 [23,] 0.594739930 0.810520140 0.4052601 [24,] 0.541590103 0.916819794 0.4584099 [25,] 0.496111962 0.992223923 0.5038880 [26,] 0.445743207 0.891486414 0.5542568 [27,] 0.412175468 0.824350935 0.5878245 [28,] 0.361580262 0.723160525 0.6384197 [29,] 0.323041778 0.646083557 0.6769582 [30,] 0.291747663 0.583495327 0.7082523 [31,] 0.520381850 0.959236299 0.4796181 [32,] 0.465993388 0.931986776 0.5340066 [33,] 0.429672039 0.859344077 0.5703280 [34,] 0.381242174 0.762484347 0.6187578 [35,] 0.339058999 0.678117999 0.6609410 [36,] 0.317959174 0.635918349 0.6820408 [37,] 0.300615474 0.601230948 0.6993845 [38,] 0.292434179 0.584868359 0.7075658 [39,] 0.256888006 0.513776011 0.7431120 [40,] 0.251516085 0.503032170 0.7484839 [41,] 0.231507664 0.463015327 0.7684923 [42,] 0.204345892 0.408691785 0.7956541 [43,] 0.278724658 0.557449316 0.7212753 [44,] 0.359405013 0.718810026 0.6405950 [45,] 0.336595681 0.673191363 0.6634043 [46,] 0.403583088 0.807166175 0.5964169 [47,] 0.379995402 0.759990803 0.6200046 [48,] 0.349115187 0.698230374 0.6508848 [49,] 0.348094410 0.696188819 0.6519056 [50,] 0.429021675 0.858043349 0.5709783 [51,] 0.384781681 0.769563362 0.6152183 [52,] 0.342932739 0.685865478 0.6570673 [53,] 0.344237342 0.688474683 0.6557627 [54,] 0.310517717 0.621035434 0.6894823 [55,] 0.271744180 0.543488359 0.7282558 [56,] 0.254076974 0.508153949 0.7459230 [57,] 0.223410806 0.446821611 0.7765892 [58,] 0.250270645 0.500541289 0.7497294 [59,] 0.216334737 0.432669474 0.7836653 [60,] 0.183655428 0.367310856 0.8163446 [61,] 0.154697045 0.309394090 0.8453030 [62,] 0.130257322 0.260514644 0.8697427 [63,] 0.111645172 0.223290345 0.8883548 [64,] 0.091480792 0.182961585 0.9085192 [65,] 0.074170779 0.148341559 0.9258292 [66,] 0.064574675 0.129149351 0.9354253 [67,] 0.052057482 0.104114964 0.9479425 [68,] 0.041024165 0.082048331 0.9589758 [69,] 0.042797283 0.085594565 0.9572027 [70,] 0.044116129 0.088232259 0.9558839 [71,] 0.035388959 0.070777918 0.9646110 [72,] 0.040816537 0.081633073 0.9591835 [73,] 0.032538978 0.065077956 0.9674610 [74,] 0.024880240 0.049760479 0.9751198 [75,] 0.023098827 0.046197654 0.9769012 [76,] 0.018290310 0.036580621 0.9817097 [77,] 0.014730229 0.029460458 0.9852698 [78,] 0.015288908 0.030577815 0.9847111 [79,] 0.012738458 0.025476916 0.9872615 [80,] 0.009562571 0.019125141 0.9904374 [81,] 0.008145342 0.016290683 0.9918547 [82,] 0.006621823 0.013243645 0.9933782 [83,] 0.004851198 0.009702395 0.9951488 [84,] 0.004593294 0.009186588 0.9954067 [85,] 0.006872635 0.013745270 0.9931274 [86,] 0.005582763 0.011165525 0.9944172 [87,] 0.004744216 0.009488432 0.9952558 [88,] 0.003625872 0.007251744 0.9963741 [89,] 0.002724004 0.005448007 0.9972760 [90,] 0.002258621 0.004517242 0.9977414 [91,] 0.001771856 0.003543712 0.9982281 [92,] 0.001294893 0.002589787 0.9987051 [93,] 0.001597367 0.003194735 0.9984026 [94,] 0.001242031 0.002484062 0.9987580 [95,] 0.005427427 0.010854853 0.9945726 [96,] 0.013297159 0.026594318 0.9867028 [97,] 0.014008234 0.028016468 0.9859918 [98,] 0.019068669 0.038137338 0.9809313 [99,] 0.014842545 0.029685089 0.9851575 [100,] 0.010749991 0.021499982 0.9892500 [101,] 0.007756585 0.015513170 0.9922434 [102,] 0.022348879 0.044697758 0.9776511 [103,] 0.022360852 0.044721704 0.9776391 [104,] 0.055763752 0.111527504 0.9442362 [105,] 0.047605142 0.095210284 0.9523949 [106,] 0.039874279 0.079748559 0.9601257 [107,] 0.104297025 0.208594050 0.8957030 [108,] 0.098256332 0.196512664 0.9017437 [109,] 0.087637535 0.175275070 0.9123625 [110,] 0.152261221 0.304522442 0.8477388 [111,] 0.149211403 0.298422805 0.8507886 [112,] 0.189016197 0.378032394 0.8109838 [113,] 0.187789385 0.375578770 0.8122106 [114,] 0.177968365 0.355936729 0.8220316 [115,] 0.154173227 0.308346454 0.8458268 [116,] 0.123796205 0.247592410 0.8762038 [117,] 0.096935752 0.193871504 0.9030642 [118,] 0.094525942 0.189051883 0.9054741 [119,] 0.132653785 0.265307570 0.8673462 [120,] 0.114738929 0.229477858 0.8852611 [121,] 0.096000949 0.192001897 0.9039991 [122,] 0.085221882 0.170443764 0.9147781 [123,] 0.083391588 0.166783177 0.9166084 [124,] 0.074196942 0.148393883 0.9258031 [125,] 0.173388639 0.346777278 0.8266114 [126,] 0.138262027 0.276524053 0.8617380 [127,] 0.115803154 0.231606308 0.8841968 [128,] 0.162832369 0.325664739 0.8371676 [129,] 0.394667676 0.789335351 0.6053323 [130,] 0.339605768 0.679211537 0.6603942 [131,] 0.481929833 0.963859666 0.5180702 [132,] 0.390634951 0.781269901 0.6093650 [133,] 0.552332757 0.895334487 0.4476672 [134,] 0.498813860 0.997627720 0.5011861 [135,] 0.402455716 0.804911431 0.5975443 [136,] 0.298069267 0.596138534 0.7019307 [137,] 0.289509793 0.579019587 0.7104902 [138,] 0.172331531 0.344663062 0.8276685 > postscript(file="/var/www/html/rcomp/tmp/11f3e1291127967.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/2u6lh1291127967.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/3u6lh1291127967.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/4u6lh1291127967.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/55gk21291127967.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 = 159 Frequency = 1 1 2 3 4 5 6 2.30454807 -1.89236518 0.08929717 0.28976565 -3.49232041 5.47151209 7 8 9 10 11 12 -0.32843480 -2.25319699 -0.65576022 1.56823665 2.70169092 -2.83652745 13 14 15 16 17 18 2.52170512 -6.67601389 -2.28029537 3.04226144 -3.05202060 -7.97796446 19 20 21 22 23 24 1.74596395 -2.62172213 -3.38879000 -1.89272104 0.57356145 0.75256269 25 26 27 28 29 30 5.00718953 1.09124157 -0.39111543 2.55084079 0.05300795 -0.59813034 31 32 33 34 35 36 3.90370881 0.98424566 -7.75452448 -1.66730171 -2.40232081 -1.38968842 37 38 39 40 41 42 -3.81734206 -1.60504595 -1.34237844 -3.22091754 6.37569493 -0.35366212 43 44 45 46 47 48 -2.53038140 -1.34320465 -1.83064457 1.96556398 2.56881457 -3.84049965 49 50 51 52 53 54 -0.50632302 -3.29954386 -2.11357101 1.67077738 5.99841326 -5.49645419 55 56 57 58 59 60 -0.39516054 5.19147869 2.81558898 -1.46732049 3.79835674 -4.79995235 61 62 63 64 65 66 1.84294027 0.29472647 4.13658284 -0.45256545 0.13128766 3.08007099 67 68 69 70 71 72 2.48318500 -3.19280711 1.60574246 0.99842546 1.06222389 0.48514850 73 74 75 76 77 78 3.12704979 1.27548377 1.97082310 -0.34107668 1.41871463 1.86118655 79 80 81 82 83 84 5.56129012 -1.51034838 3.52748824 6.39571697 0.77509100 2.11808041 85 86 87 88 89 90 3.71440891 2.45404937 -0.87799309 4.55308598 -0.32025719 0.27472335 91 92 93 94 95 96 3.38746127 2.24354663 1.02302629 -2.28209246 5.60476127 2.64741152 97 98 99 100 101 102 3.04358545 0.88058590 0.27831175 -1.34524690 -0.48613954 -0.12310791 103 104 105 106 107 108 -3.67333664 1.49176417 7.37114450 -6.52108148 -3.48746881 -4.74149987 109 110 111 112 113 114 -0.42230970 0.23536249 -0.04387445 6.11527663 -1.90508108 -7.56398191 115 116 117 118 119 120 -1.31773699 2.10158749 -7.55703150 -3.35083130 2.28829673 -6.96115340 121 122 123 124 125 126 -2.68903019 -4.60516704 -3.65852124 2.88816872 1.46547175 2.19459085 127 128 129 130 131 132 1.20664465 3.21759002 5.18319721 1.63050678 -3.57933084 1.80760780 133 134 135 136 137 138 3.22351703 1.87032532 3.96756153 0.25544818 -1.52511397 -8.20572423 139 140 141 142 143 144 3.48639116 -5.67716888 -8.16584167 -1.03140153 -6.93511973 0.64272220 145 146 147 148 149 150 1.15450368 -0.62395374 -1.59048250 -0.98856315 -3.20629956 0.94765553 151 152 153 154 155 156 0.01006452 1.81034483 6.99947718 -7.77793445 0.23836152 0.80935799 157 158 159 1.66342257 1.36125467 3.32042861 > postscript(file="/var/www/html/rcomp/tmp/65gk21291127967.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 = 159 Frequency = 1 lag(myerror, k = 1) myerror 0 2.30454807 NA 1 -1.89236518 2.30454807 2 0.08929717 -1.89236518 3 0.28976565 0.08929717 4 -3.49232041 0.28976565 5 5.47151209 -3.49232041 6 -0.32843480 5.47151209 7 -2.25319699 -0.32843480 8 -0.65576022 -2.25319699 9 1.56823665 -0.65576022 10 2.70169092 1.56823665 11 -2.83652745 2.70169092 12 2.52170512 -2.83652745 13 -6.67601389 2.52170512 14 -2.28029537 -6.67601389 15 3.04226144 -2.28029537 16 -3.05202060 3.04226144 17 -7.97796446 -3.05202060 18 1.74596395 -7.97796446 19 -2.62172213 1.74596395 20 -3.38879000 -2.62172213 21 -1.89272104 -3.38879000 22 0.57356145 -1.89272104 23 0.75256269 0.57356145 24 5.00718953 0.75256269 25 1.09124157 5.00718953 26 -0.39111543 1.09124157 27 2.55084079 -0.39111543 28 0.05300795 2.55084079 29 -0.59813034 0.05300795 30 3.90370881 -0.59813034 31 0.98424566 3.90370881 32 -7.75452448 0.98424566 33 -1.66730171 -7.75452448 34 -2.40232081 -1.66730171 35 -1.38968842 -2.40232081 36 -3.81734206 -1.38968842 37 -1.60504595 -3.81734206 38 -1.34237844 -1.60504595 39 -3.22091754 -1.34237844 40 6.37569493 -3.22091754 41 -0.35366212 6.37569493 42 -2.53038140 -0.35366212 43 -1.34320465 -2.53038140 44 -1.83064457 -1.34320465 45 1.96556398 -1.83064457 46 2.56881457 1.96556398 47 -3.84049965 2.56881457 48 -0.50632302 -3.84049965 49 -3.29954386 -0.50632302 50 -2.11357101 -3.29954386 51 1.67077738 -2.11357101 52 5.99841326 1.67077738 53 -5.49645419 5.99841326 54 -0.39516054 -5.49645419 55 5.19147869 -0.39516054 56 2.81558898 5.19147869 57 -1.46732049 2.81558898 58 3.79835674 -1.46732049 59 -4.79995235 3.79835674 60 1.84294027 -4.79995235 61 0.29472647 1.84294027 62 4.13658284 0.29472647 63 -0.45256545 4.13658284 64 0.13128766 -0.45256545 65 3.08007099 0.13128766 66 2.48318500 3.08007099 67 -3.19280711 2.48318500 68 1.60574246 -3.19280711 69 0.99842546 1.60574246 70 1.06222389 0.99842546 71 0.48514850 1.06222389 72 3.12704979 0.48514850 73 1.27548377 3.12704979 74 1.97082310 1.27548377 75 -0.34107668 1.97082310 76 1.41871463 -0.34107668 77 1.86118655 1.41871463 78 5.56129012 1.86118655 79 -1.51034838 5.56129012 80 3.52748824 -1.51034838 81 6.39571697 3.52748824 82 0.77509100 6.39571697 83 2.11808041 0.77509100 84 3.71440891 2.11808041 85 2.45404937 3.71440891 86 -0.87799309 2.45404937 87 4.55308598 -0.87799309 88 -0.32025719 4.55308598 89 0.27472335 -0.32025719 90 3.38746127 0.27472335 91 2.24354663 3.38746127 92 1.02302629 2.24354663 93 -2.28209246 1.02302629 94 5.60476127 -2.28209246 95 2.64741152 5.60476127 96 3.04358545 2.64741152 97 0.88058590 3.04358545 98 0.27831175 0.88058590 99 -1.34524690 0.27831175 100 -0.48613954 -1.34524690 101 -0.12310791 -0.48613954 102 -3.67333664 -0.12310791 103 1.49176417 -3.67333664 104 7.37114450 1.49176417 105 -6.52108148 7.37114450 106 -3.48746881 -6.52108148 107 -4.74149987 -3.48746881 108 -0.42230970 -4.74149987 109 0.23536249 -0.42230970 110 -0.04387445 0.23536249 111 6.11527663 -0.04387445 112 -1.90508108 6.11527663 113 -7.56398191 -1.90508108 114 -1.31773699 -7.56398191 115 2.10158749 -1.31773699 116 -7.55703150 2.10158749 117 -3.35083130 -7.55703150 118 2.28829673 -3.35083130 119 -6.96115340 2.28829673 120 -2.68903019 -6.96115340 121 -4.60516704 -2.68903019 122 -3.65852124 -4.60516704 123 2.88816872 -3.65852124 124 1.46547175 2.88816872 125 2.19459085 1.46547175 126 1.20664465 2.19459085 127 3.21759002 1.20664465 128 5.18319721 3.21759002 129 1.63050678 5.18319721 130 -3.57933084 1.63050678 131 1.80760780 -3.57933084 132 3.22351703 1.80760780 133 1.87032532 3.22351703 134 3.96756153 1.87032532 135 0.25544818 3.96756153 136 -1.52511397 0.25544818 137 -8.20572423 -1.52511397 138 3.48639116 -8.20572423 139 -5.67716888 3.48639116 140 -8.16584167 -5.67716888 141 -1.03140153 -8.16584167 142 -6.93511973 -1.03140153 143 0.64272220 -6.93511973 144 1.15450368 0.64272220 145 -0.62395374 1.15450368 146 -1.59048250 -0.62395374 147 -0.98856315 -1.59048250 148 -3.20629956 -0.98856315 149 0.94765553 -3.20629956 150 0.01006452 0.94765553 151 1.81034483 0.01006452 152 6.99947718 1.81034483 153 -7.77793445 6.99947718 154 0.23836152 -7.77793445 155 0.80935799 0.23836152 156 1.66342257 0.80935799 157 1.36125467 1.66342257 158 3.32042861 1.36125467 159 NA 3.32042861 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -1.89236518 2.30454807 [2,] 0.08929717 -1.89236518 [3,] 0.28976565 0.08929717 [4,] -3.49232041 0.28976565 [5,] 5.47151209 -3.49232041 [6,] -0.32843480 5.47151209 [7,] -2.25319699 -0.32843480 [8,] -0.65576022 -2.25319699 [9,] 1.56823665 -0.65576022 [10,] 2.70169092 1.56823665 [11,] -2.83652745 2.70169092 [12,] 2.52170512 -2.83652745 [13,] -6.67601389 2.52170512 [14,] -2.28029537 -6.67601389 [15,] 3.04226144 -2.28029537 [16,] -3.05202060 3.04226144 [17,] -7.97796446 -3.05202060 [18,] 1.74596395 -7.97796446 [19,] -2.62172213 1.74596395 [20,] -3.38879000 -2.62172213 [21,] -1.89272104 -3.38879000 [22,] 0.57356145 -1.89272104 [23,] 0.75256269 0.57356145 [24,] 5.00718953 0.75256269 [25,] 1.09124157 5.00718953 [26,] -0.39111543 1.09124157 [27,] 2.55084079 -0.39111543 [28,] 0.05300795 2.55084079 [29,] -0.59813034 0.05300795 [30,] 3.90370881 -0.59813034 [31,] 0.98424566 3.90370881 [32,] -7.75452448 0.98424566 [33,] -1.66730171 -7.75452448 [34,] -2.40232081 -1.66730171 [35,] -1.38968842 -2.40232081 [36,] -3.81734206 -1.38968842 [37,] -1.60504595 -3.81734206 [38,] -1.34237844 -1.60504595 [39,] -3.22091754 -1.34237844 [40,] 6.37569493 -3.22091754 [41,] -0.35366212 6.37569493 [42,] -2.53038140 -0.35366212 [43,] -1.34320465 -2.53038140 [44,] -1.83064457 -1.34320465 [45,] 1.96556398 -1.83064457 [46,] 2.56881457 1.96556398 [47,] -3.84049965 2.56881457 [48,] -0.50632302 -3.84049965 [49,] -3.29954386 -0.50632302 [50,] -2.11357101 -3.29954386 [51,] 1.67077738 -2.11357101 [52,] 5.99841326 1.67077738 [53,] -5.49645419 5.99841326 [54,] -0.39516054 -5.49645419 [55,] 5.19147869 -0.39516054 [56,] 2.81558898 5.19147869 [57,] -1.46732049 2.81558898 [58,] 3.79835674 -1.46732049 [59,] -4.79995235 3.79835674 [60,] 1.84294027 -4.79995235 [61,] 0.29472647 1.84294027 [62,] 4.13658284 0.29472647 [63,] -0.45256545 4.13658284 [64,] 0.13128766 -0.45256545 [65,] 3.08007099 0.13128766 [66,] 2.48318500 3.08007099 [67,] -3.19280711 2.48318500 [68,] 1.60574246 -3.19280711 [69,] 0.99842546 1.60574246 [70,] 1.06222389 0.99842546 [71,] 0.48514850 1.06222389 [72,] 3.12704979 0.48514850 [73,] 1.27548377 3.12704979 [74,] 1.97082310 1.27548377 [75,] -0.34107668 1.97082310 [76,] 1.41871463 -0.34107668 [77,] 1.86118655 1.41871463 [78,] 5.56129012 1.86118655 [79,] -1.51034838 5.56129012 [80,] 3.52748824 -1.51034838 [81,] 6.39571697 3.52748824 [82,] 0.77509100 6.39571697 [83,] 2.11808041 0.77509100 [84,] 3.71440891 2.11808041 [85,] 2.45404937 3.71440891 [86,] -0.87799309 2.45404937 [87,] 4.55308598 -0.87799309 [88,] -0.32025719 4.55308598 [89,] 0.27472335 -0.32025719 [90,] 3.38746127 0.27472335 [91,] 2.24354663 3.38746127 [92,] 1.02302629 2.24354663 [93,] -2.28209246 1.02302629 [94,] 5.60476127 -2.28209246 [95,] 2.64741152 5.60476127 [96,] 3.04358545 2.64741152 [97,] 0.88058590 3.04358545 [98,] 0.27831175 0.88058590 [99,] -1.34524690 0.27831175 [100,] -0.48613954 -1.34524690 [101,] -0.12310791 -0.48613954 [102,] -3.67333664 -0.12310791 [103,] 1.49176417 -3.67333664 [104,] 7.37114450 1.49176417 [105,] -6.52108148 7.37114450 [106,] -3.48746881 -6.52108148 [107,] -4.74149987 -3.48746881 [108,] -0.42230970 -4.74149987 [109,] 0.23536249 -0.42230970 [110,] -0.04387445 0.23536249 [111,] 6.11527663 -0.04387445 [112,] -1.90508108 6.11527663 [113,] -7.56398191 -1.90508108 [114,] -1.31773699 -7.56398191 [115,] 2.10158749 -1.31773699 [116,] -7.55703150 2.10158749 [117,] -3.35083130 -7.55703150 [118,] 2.28829673 -3.35083130 [119,] -6.96115340 2.28829673 [120,] -2.68903019 -6.96115340 [121,] -4.60516704 -2.68903019 [122,] -3.65852124 -4.60516704 [123,] 2.88816872 -3.65852124 [124,] 1.46547175 2.88816872 [125,] 2.19459085 1.46547175 [126,] 1.20664465 2.19459085 [127,] 3.21759002 1.20664465 [128,] 5.18319721 3.21759002 [129,] 1.63050678 5.18319721 [130,] -3.57933084 1.63050678 [131,] 1.80760780 -3.57933084 [132,] 3.22351703 1.80760780 [133,] 1.87032532 3.22351703 [134,] 3.96756153 1.87032532 [135,] 0.25544818 3.96756153 [136,] -1.52511397 0.25544818 [137,] -8.20572423 -1.52511397 [138,] 3.48639116 -8.20572423 [139,] -5.67716888 3.48639116 [140,] -8.16584167 -5.67716888 [141,] -1.03140153 -8.16584167 [142,] -6.93511973 -1.03140153 [143,] 0.64272220 -6.93511973 [144,] 1.15450368 0.64272220 [145,] -0.62395374 1.15450368 [146,] -1.59048250 -0.62395374 [147,] -0.98856315 -1.59048250 [148,] -3.20629956 -0.98856315 [149,] 0.94765553 -3.20629956 [150,] 0.01006452 0.94765553 [151,] 1.81034483 0.01006452 [152,] 6.99947718 1.81034483 [153,] -7.77793445 6.99947718 [154,] 0.23836152 -7.77793445 [155,] 0.80935799 0.23836152 [156,] 1.66342257 0.80935799 [157,] 1.36125467 1.66342257 [158,] 3.32042861 1.36125467 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -1.89236518 2.30454807 2 0.08929717 -1.89236518 3 0.28976565 0.08929717 4 -3.49232041 0.28976565 5 5.47151209 -3.49232041 6 -0.32843480 5.47151209 7 -2.25319699 -0.32843480 8 -0.65576022 -2.25319699 9 1.56823665 -0.65576022 10 2.70169092 1.56823665 11 -2.83652745 2.70169092 12 2.52170512 -2.83652745 13 -6.67601389 2.52170512 14 -2.28029537 -6.67601389 15 3.04226144 -2.28029537 16 -3.05202060 3.04226144 17 -7.97796446 -3.05202060 18 1.74596395 -7.97796446 19 -2.62172213 1.74596395 20 -3.38879000 -2.62172213 21 -1.89272104 -3.38879000 22 0.57356145 -1.89272104 23 0.75256269 0.57356145 24 5.00718953 0.75256269 25 1.09124157 5.00718953 26 -0.39111543 1.09124157 27 2.55084079 -0.39111543 28 0.05300795 2.55084079 29 -0.59813034 0.05300795 30 3.90370881 -0.59813034 31 0.98424566 3.90370881 32 -7.75452448 0.98424566 33 -1.66730171 -7.75452448 34 -2.40232081 -1.66730171 35 -1.38968842 -2.40232081 36 -3.81734206 -1.38968842 37 -1.60504595 -3.81734206 38 -1.34237844 -1.60504595 39 -3.22091754 -1.34237844 40 6.37569493 -3.22091754 41 -0.35366212 6.37569493 42 -2.53038140 -0.35366212 43 -1.34320465 -2.53038140 44 -1.83064457 -1.34320465 45 1.96556398 -1.83064457 46 2.56881457 1.96556398 47 -3.84049965 2.56881457 48 -0.50632302 -3.84049965 49 -3.29954386 -0.50632302 50 -2.11357101 -3.29954386 51 1.67077738 -2.11357101 52 5.99841326 1.67077738 53 -5.49645419 5.99841326 54 -0.39516054 -5.49645419 55 5.19147869 -0.39516054 56 2.81558898 5.19147869 57 -1.46732049 2.81558898 58 3.79835674 -1.46732049 59 -4.79995235 3.79835674 60 1.84294027 -4.79995235 61 0.29472647 1.84294027 62 4.13658284 0.29472647 63 -0.45256545 4.13658284 64 0.13128766 -0.45256545 65 3.08007099 0.13128766 66 2.48318500 3.08007099 67 -3.19280711 2.48318500 68 1.60574246 -3.19280711 69 0.99842546 1.60574246 70 1.06222389 0.99842546 71 0.48514850 1.06222389 72 3.12704979 0.48514850 73 1.27548377 3.12704979 74 1.97082310 1.27548377 75 -0.34107668 1.97082310 76 1.41871463 -0.34107668 77 1.86118655 1.41871463 78 5.56129012 1.86118655 79 -1.51034838 5.56129012 80 3.52748824 -1.51034838 81 6.39571697 3.52748824 82 0.77509100 6.39571697 83 2.11808041 0.77509100 84 3.71440891 2.11808041 85 2.45404937 3.71440891 86 -0.87799309 2.45404937 87 4.55308598 -0.87799309 88 -0.32025719 4.55308598 89 0.27472335 -0.32025719 90 3.38746127 0.27472335 91 2.24354663 3.38746127 92 1.02302629 2.24354663 93 -2.28209246 1.02302629 94 5.60476127 -2.28209246 95 2.64741152 5.60476127 96 3.04358545 2.64741152 97 0.88058590 3.04358545 98 0.27831175 0.88058590 99 -1.34524690 0.27831175 100 -0.48613954 -1.34524690 101 -0.12310791 -0.48613954 102 -3.67333664 -0.12310791 103 1.49176417 -3.67333664 104 7.37114450 1.49176417 105 -6.52108148 7.37114450 106 -3.48746881 -6.52108148 107 -4.74149987 -3.48746881 108 -0.42230970 -4.74149987 109 0.23536249 -0.42230970 110 -0.04387445 0.23536249 111 6.11527663 -0.04387445 112 -1.90508108 6.11527663 113 -7.56398191 -1.90508108 114 -1.31773699 -7.56398191 115 2.10158749 -1.31773699 116 -7.55703150 2.10158749 117 -3.35083130 -7.55703150 118 2.28829673 -3.35083130 119 -6.96115340 2.28829673 120 -2.68903019 -6.96115340 121 -4.60516704 -2.68903019 122 -3.65852124 -4.60516704 123 2.88816872 -3.65852124 124 1.46547175 2.88816872 125 2.19459085 1.46547175 126 1.20664465 2.19459085 127 3.21759002 1.20664465 128 5.18319721 3.21759002 129 1.63050678 5.18319721 130 -3.57933084 1.63050678 131 1.80760780 -3.57933084 132 3.22351703 1.80760780 133 1.87032532 3.22351703 134 3.96756153 1.87032532 135 0.25544818 3.96756153 136 -1.52511397 0.25544818 137 -8.20572423 -1.52511397 138 3.48639116 -8.20572423 139 -5.67716888 3.48639116 140 -8.16584167 -5.67716888 141 -1.03140153 -8.16584167 142 -6.93511973 -1.03140153 143 0.64272220 -6.93511973 144 1.15450368 0.64272220 145 -0.62395374 1.15450368 146 -1.59048250 -0.62395374 147 -0.98856315 -1.59048250 148 -3.20629956 -0.98856315 149 0.94765553 -3.20629956 150 0.01006452 0.94765553 151 1.81034483 0.01006452 152 6.99947718 1.81034483 153 -7.77793445 6.99947718 154 0.23836152 -7.77793445 155 0.80935799 0.23836152 156 1.66342257 0.80935799 157 1.36125467 1.66342257 158 3.32042861 1.36125467 > 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/7gpjn1291127967.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/8gpjn1291127967.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/9qy081291127967.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/10qy081291127967.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/114qgg1291127967.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/12qqf41291127967.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/13m0ud1291127967.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/14p1t11291127967.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/15tjrp1291127967.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/16ek8d1291127967.tab") + } > > try(system("convert tmp/11f3e1291127967.ps tmp/11f3e1291127967.png",intern=TRUE)) character(0) > try(system("convert tmp/2u6lh1291127967.ps tmp/2u6lh1291127967.png",intern=TRUE)) character(0) > try(system("convert tmp/3u6lh1291127967.ps tmp/3u6lh1291127967.png",intern=TRUE)) character(0) > try(system("convert tmp/4u6lh1291127967.ps tmp/4u6lh1291127967.png",intern=TRUE)) character(0) > try(system("convert tmp/55gk21291127967.ps tmp/55gk21291127967.png",intern=TRUE)) character(0) > try(system("convert tmp/65gk21291127967.ps tmp/65gk21291127967.png",intern=TRUE)) character(0) > try(system("convert tmp/7gpjn1291127967.ps tmp/7gpjn1291127967.png",intern=TRUE)) character(0) > try(system("convert tmp/8gpjn1291127967.ps tmp/8gpjn1291127967.png",intern=TRUE)) character(0) > try(system("convert tmp/9qy081291127967.ps tmp/9qy081291127967.png",intern=TRUE)) character(0) > try(system("convert tmp/10qy081291127967.ps tmp/10qy081291127967.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 4.183 1.854 10.882