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(1 + ,26 + ,24 + ,14 + ,11 + ,12 + ,24 + ,1 + ,23 + ,25 + ,11 + ,7 + ,8 + ,25 + ,0 + ,25 + ,17 + ,6 + ,17 + ,8 + ,30 + ,1 + ,23 + ,18 + ,12 + ,10 + ,8 + ,19 + ,1 + ,19 + ,18 + ,8 + ,12 + ,9 + ,22 + ,0 + ,29 + ,16 + ,10 + ,12 + ,7 + ,22 + ,1 + ,25 + ,20 + ,10 + ,11 + ,4 + ,25 + ,1 + ,21 + ,16 + ,11 + ,11 + ,11 + ,23 + ,1 + ,22 + ,18 + ,16 + ,12 + ,7 + ,17 + ,1 + ,25 + ,17 + ,11 + ,13 + ,7 + ,21 + ,1 + ,24 + ,23 + ,13 + ,14 + ,12 + ,19 + ,1 + ,18 + ,30 + ,12 + ,16 + ,10 + ,19 + ,1 + ,22 + ,23 + ,8 + ,11 + ,10 + ,15 + ,1 + ,15 + ,18 + ,12 + ,10 + ,8 + ,16 + ,1 + ,22 + ,15 + ,11 + ,11 + ,8 + ,23 + ,1 + ,28 + ,12 + ,4 + ,15 + ,4 + ,27 + ,1 + ,20 + ,21 + ,9 + ,9 + ,9 + ,22 + ,1 + ,12 + ,15 + ,8 + ,11 + ,8 + ,14 + ,1 + ,24 + ,20 + ,8 + ,17 + ,7 + ,22 + ,1 + ,20 + ,31 + ,14 + ,17 + ,11 + ,23 + ,1 + ,21 + ,27 + ,15 + ,11 + ,9 + ,23 + ,1 + ,20 + ,34 + ,16 + ,18 + ,11 + ,21 + ,1 + ,21 + ,21 + ,9 + ,14 + ,13 + ,19 + ,1 + ,23 + ,31 + ,14 + ,10 + ,8 + ,18 + ,1 + ,28 + ,19 + ,11 + ,11 + ,8 + ,20 + ,1 + ,24 + ,16 + ,8 + ,15 + ,9 + ,23 + ,1 + ,24 + ,20 + ,9 + ,15 + ,6 + ,25 + ,1 + ,24 + ,21 + ,9 + ,13 + ,9 + ,19 + ,1 + ,23 + ,22 + ,9 + ,16 + ,9 + ,24 + ,1 + ,23 + ,17 + ,9 + ,13 + ,6 + ,22 + ,1 + ,29 + ,24 + ,10 + ,9 + ,6 + ,25 + ,1 + ,24 + ,25 + ,16 + ,18 + ,16 + ,26 + ,1 + ,18 + ,26 + ,11 + ,18 + ,5 + ,29 + ,1 + ,25 + ,25 + ,8 + ,12 + ,7 + ,32 + ,1 + ,21 + ,17 + ,9 + ,17 + ,9 + ,25 + ,1 + ,26 + ,32 + ,16 + ,9 + ,6 + ,29 + ,1 + ,22 + ,33 + ,11 + ,9 + ,6 + ,28 + ,1 + ,22 + ,13 + ,16 + ,12 + ,5 + ,17 + ,0 + ,22 + ,32 + ,12 + ,18 + ,12 + ,28 + ,1 + ,23 + ,25 + ,12 + ,12 + ,7 + ,29 + ,1 + ,30 + ,29 + ,14 + ,18 + ,10 + ,26 + ,1 + ,23 + ,22 + ,9 + ,14 + ,9 + ,25 + ,1 + ,17 + ,18 + ,10 + ,15 + ,8 + ,14 + ,1 + ,23 + ,17 + ,9 + ,16 + ,5 + ,25 + ,1 + ,23 + ,20 + ,10 + ,10 + ,8 + ,26 + ,1 + ,25 + ,15 + ,12 + ,11 + ,8 + ,20 + ,1 + ,24 + ,20 + ,14 + ,14 + ,10 + ,18 + ,1 + ,24 + ,33 + ,14 + ,9 + ,6 + ,32 + ,1 + ,23 + ,29 + ,10 + ,12 + ,8 + ,25 + ,1 + ,21 + ,23 + ,14 + ,17 + ,7 + ,25 + ,1 + ,24 + ,26 + ,16 + ,5 + ,4 + ,23 + ,1 + ,24 + ,18 + ,9 + ,12 + ,8 + ,21 + ,1 + ,28 + ,20 + ,10 + ,12 + ,8 + ,20 + ,1 + ,16 + ,11 + ,6 + ,6 + ,4 + ,15 + ,1 + ,20 + ,28 + ,8 + ,24 + ,20 + ,30 + ,1 + ,29 + ,26 + ,13 + ,12 + ,8 + ,24 + ,1 + ,27 + ,22 + ,10 + ,12 + ,8 + ,26 + ,1 + ,22 + ,17 + ,8 + ,14 + ,6 + ,24 + ,1 + ,28 + ,12 + ,7 + ,7 + ,4 + ,22 + ,1 + ,16 + ,14 + ,15 + ,13 + ,8 + ,14 + ,1 + ,25 + ,17 + ,9 + ,12 + ,9 + ,24 + ,1 + ,24 + ,21 + ,10 + ,13 + ,6 + ,24 + ,0 + ,28 + ,19 + ,12 + ,14 + ,7 + ,24 + ,1 + ,24 + ,18 + ,13 + ,8 + ,9 + ,24 + ,1 + ,23 + ,10 + ,10 + ,11 + ,5 + ,19 + ,1 + ,30 + ,29 + ,11 + ,9 + ,5 + ,31 + ,1 + ,24 + ,31 + ,8 + ,11 + ,8 + ,22 + ,1 + ,21 + ,19 + ,9 + ,13 + ,8 + ,27 + ,1 + ,25 + ,9 + ,13 + ,10 + ,6 + ,19 + ,0 + ,25 + ,20 + ,11 + ,11 + ,8 + ,25 + ,1 + ,22 + ,28 + ,8 + ,12 + ,7 + ,20 + ,1 + ,23 + ,19 + ,9 + ,9 + ,7 + ,21 + ,1 + ,26 + ,30 + ,9 + ,15 + ,9 + ,27 + ,1 + ,23 + ,29 + ,15 + ,18 + ,11 + ,23 + ,1 + ,25 + ,26 + ,9 + ,15 + ,6 + ,25 + ,1 + ,21 + ,23 + ,10 + ,12 + ,8 + ,20 + ,1 + ,25 + ,13 + ,14 + ,13 + ,6 + ,21 + ,1 + ,24 + ,21 + ,12 + ,14 + ,9 + ,22 + ,1 + ,29 + ,19 + ,12 + ,10 + ,8 + ,23 + ,1 + ,22 + ,28 + ,11 + ,13 + ,6 + ,25 + ,1 + ,27 + ,23 + ,14 + ,13 + ,10 + ,25 + ,0 + ,26 + ,18 + ,6 + ,11 + ,8 + ,17 + ,1 + ,22 + ,21 + ,12 + ,13 + ,8 + ,19 + ,1 + ,24 + ,20 + ,8 + ,16 + ,10 + ,25 + ,0 + ,27 + ,23 + ,14 + ,8 + ,5 + ,19 + ,1 + ,24 + ,21 + ,11 + ,16 + ,7 + ,20 + ,1 + ,24 + ,21 + ,10 + ,11 + ,5 + ,26 + ,1 + ,29 + ,15 + ,14 + ,9 + ,8 + ,23 + ,1 + ,22 + ,28 + ,12 + ,16 + ,14 + ,27 + ,0 + ,21 + ,19 + ,10 + ,12 + ,7 + ,17 + ,1 + ,24 + ,26 + ,14 + ,14 + ,8 + ,17 + ,1 + ,24 + ,10 + ,5 + ,8 + ,6 + ,19 + ,0 + ,23 + ,16 + ,11 + ,9 + ,5 + ,17 + ,1 + ,20 + ,22 + ,10 + ,15 + ,6 + ,22 + ,1 + ,27 + ,19 + ,9 + ,11 + ,10 + ,21 + ,1 + ,26 + ,31 + ,10 + ,21 + ,12 + ,32 + ,1 + ,25 + ,31 + ,16 + ,14 + ,9 + ,21 + ,1 + ,21 + ,29 + ,13 + ,18 + ,12 + ,21 + ,1 + ,21 + ,19 + ,9 + ,12 + ,7 + ,18 + ,1 + ,19 + ,22 + ,10 + ,13 + ,8 + ,18 + ,1 + ,21 + ,23 + ,10 + ,15 + ,10 + ,23 + ,1 + ,21 + ,15 + ,7 + ,12 + ,6 + ,19 + ,1 + ,16 + ,20 + ,9 + ,19 + ,10 + ,20 + ,1 + ,22 + ,18 + ,8 + ,15 + ,10 + ,21 + ,1 + ,29 + ,23 + ,14 + ,11 + ,10 + ,20 + ,0 + ,15 + ,25 + ,14 + ,11 + ,5 + ,17 + ,1 + ,17 + ,21 + ,8 + ,10 + ,7 + ,18 + ,1 + ,15 + ,24 + ,9 + ,13 + ,10 + ,19 + ,1 + ,21 + ,25 + ,14 + ,15 + ,11 + ,22 + ,0 + ,21 + ,17 + ,14 + ,12 + ,6 + ,15 + ,1 + ,19 + ,13 + ,8 + ,12 + ,7 + ,14 + ,1 + ,24 + ,28 + ,8 + ,16 + ,12 + ,18 + ,1 + ,20 + ,21 + ,8 + ,9 + ,11 + ,24 + ,0 + ,17 + ,25 + ,7 + ,18 + ,11 + ,35 + ,1 + ,23 + ,9 + ,6 + ,8 + ,11 + ,29 + ,1 + ,24 + ,16 + ,8 + ,13 + ,5 + ,21 + ,1 + ,14 + ,19 + ,6 + ,17 + ,8 + ,25 + ,1 + ,19 + ,17 + ,11 + ,9 + ,6 + ,20 + ,1 + ,24 + ,25 + ,14 + ,15 + ,9 + ,22 + ,1 + ,13 + ,20 + ,11 + ,8 + ,4 + ,13 + ,1 + ,22 + ,29 + ,11 + ,7 + ,4 + ,26 + ,1 + ,16 + ,14 + ,11 + ,12 + ,7 + ,17 + ,0 + ,19 + ,22 + ,14 + ,14 + ,11 + ,25 + ,1 + ,25 + ,15 + ,8 + ,6 + ,6 + ,20 + ,1 + ,25 + ,19 + ,20 + ,8 + ,7 + ,19 + ,1 + ,23 + ,20 + ,11 + ,17 + ,8 + ,21 + ,0 + ,24 + ,15 + ,8 + ,10 + ,4 + ,22 + ,1 + ,26 + ,20 + ,11 + ,11 + ,8 + ,24 + ,1 + ,26 + ,18 + ,10 + ,14 + ,9 + ,21 + ,1 + ,25 + ,33 + ,14 + ,11 + ,8 + ,26 + ,1 + ,18 + ,22 + ,11 + ,13 + ,11 + ,24 + ,1 + ,21 + ,16 + ,9 + ,12 + ,8 + ,16 + ,1 + ,26 + ,17 + ,9 + ,11 + ,5 + ,23 + ,1 + ,23 + ,16 + ,8 + ,9 + ,4 + ,18 + ,1 + ,23 + ,21 + ,10 + ,12 + ,8 + ,16 + ,1 + ,22 + ,26 + ,13 + ,20 + ,10 + ,26 + ,1 + ,20 + ,18 + ,13 + ,12 + ,6 + ,19 + ,1 + ,13 + ,18 + ,12 + ,13 + ,9 + ,21 + ,1 + ,24 + ,17 + ,8 + ,12 + ,9 + ,21 + ,1 + ,15 + ,22 + ,13 + ,12 + ,13 + ,22 + ,1 + ,14 + ,30 + ,14 + ,9 + ,9 + ,23 + ,0 + ,22 + ,30 + ,12 + ,15 + ,10 + ,29 + ,1 + ,10 + ,24 + ,14 + ,24 + ,20 + ,21 + ,1 + ,24 + ,21 + ,15 + ,7 + ,5 + ,21 + ,1 + ,22 + ,21 + ,13 + ,17 + ,11 + ,23 + ,1 + ,24 + ,29 + ,16 + ,11 + ,6 + ,27 + ,1 + ,19 + ,31 + ,9 + ,17 + ,9 + ,25 + ,0 + ,20 + ,20 + ,9 + ,11 + ,7 + ,21 + ,1 + ,13 + ,16 + ,9 + ,12 + ,9 + ,10 + ,1 + ,20 + ,22 + ,8 + ,14 + ,10 + ,20 + ,1 + ,22 + ,20 + ,7 + ,11 + ,9 + ,26 + ,1 + ,24 + ,28 + ,16 + ,16 + ,8 + ,24 + ,1 + ,29 + ,38 + ,11 + ,21 + ,7 + ,29 + ,1 + ,12 + ,22 + ,9 + ,14 + ,6 + ,19 + ,1 + ,20 + ,20 + ,11 + ,20 + ,13 + ,24 + ,1 + ,21 + ,17 + ,9 + ,13 + ,6 + ,19 + ,1 + ,24 + ,28 + ,14 + ,11 + ,8 + ,24 + ,1 + ,22 + ,22 + ,13 + ,15 + ,10 + ,22 + ,1 + ,20 + ,31 + ,16 + ,19 + ,16 + ,17) + ,dim=c(7 + ,159) + ,dimnames=list(c('Pop' + ,'Organization' + ,'concernmistakes' + ,'doubtactions' + ,'parentalexp' + ,'parentalcrit' + ,'personalstandards') + ,1:159)) > y <- array(NA,dim=c(7,159),dimnames=list(c('Pop','Organization','concernmistakes','doubtactions','parentalexp','parentalcrit','personalstandards'),1:159)) > for (i in 1:dim(x)[1]) + { + for (j in 1:dim(x)[2]) + { + y[i,j] <- as.numeric(x[i,j]) + } + } > par3 = 'No Linear Trend' > par2 = 'Do not include Seasonal Dummies' > par1 = '2' > #'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 Organization Pop concernmistakes doubtactions parentalexp parentalcrit 1 26 1 24 14 11 12 2 23 1 25 11 7 8 3 25 0 17 6 17 8 4 23 1 18 12 10 8 5 19 1 18 8 12 9 6 29 0 16 10 12 7 7 25 1 20 10 11 4 8 21 1 16 11 11 11 9 22 1 18 16 12 7 10 25 1 17 11 13 7 11 24 1 23 13 14 12 12 18 1 30 12 16 10 13 22 1 23 8 11 10 14 15 1 18 12 10 8 15 22 1 15 11 11 8 16 28 1 12 4 15 4 17 20 1 21 9 9 9 18 12 1 15 8 11 8 19 24 1 20 8 17 7 20 20 1 31 14 17 11 21 21 1 27 15 11 9 22 20 1 34 16 18 11 23 21 1 21 9 14 13 24 23 1 31 14 10 8 25 28 1 19 11 11 8 26 24 1 16 8 15 9 27 24 1 20 9 15 6 28 24 1 21 9 13 9 29 23 1 22 9 16 9 30 23 1 17 9 13 6 31 29 1 24 10 9 6 32 24 1 25 16 18 16 33 18 1 26 11 18 5 34 25 1 25 8 12 7 35 21 1 17 9 17 9 36 26 1 32 16 9 6 37 22 1 33 11 9 6 38 22 1 13 16 12 5 39 22 0 32 12 18 12 40 23 1 25 12 12 7 41 30 1 29 14 18 10 42 23 1 22 9 14 9 43 17 1 18 10 15 8 44 23 1 17 9 16 5 45 23 1 20 10 10 8 46 25 1 15 12 11 8 47 24 1 20 14 14 10 48 24 1 33 14 9 6 49 23 1 29 10 12 8 50 21 1 23 14 17 7 51 24 1 26 16 5 4 52 24 1 18 9 12 8 53 28 1 20 10 12 8 54 16 1 11 6 6 4 55 20 1 28 8 24 20 56 29 1 26 13 12 8 57 27 1 22 10 12 8 58 22 1 17 8 14 6 59 28 1 12 7 7 4 60 16 1 14 15 13 8 61 25 1 17 9 12 9 62 24 1 21 10 13 6 63 28 0 19 12 14 7 64 24 1 18 13 8 9 65 23 1 10 10 11 5 66 30 1 29 11 9 5 67 24 1 31 8 11 8 68 21 1 19 9 13 8 69 25 1 9 13 10 6 70 25 0 20 11 11 8 71 22 1 28 8 12 7 72 23 1 19 9 9 7 73 26 1 30 9 15 9 74 23 1 29 15 18 11 75 25 1 26 9 15 6 76 21 1 23 10 12 8 77 25 1 13 14 13 6 78 24 1 21 12 14 9 79 29 1 19 12 10 8 80 22 1 28 11 13 6 81 27 1 23 14 13 10 82 26 0 18 6 11 8 83 22 1 21 12 13 8 84 24 1 20 8 16 10 85 27 0 23 14 8 5 86 24 1 21 11 16 7 87 24 1 21 10 11 5 88 29 1 15 14 9 8 89 22 1 28 12 16 14 90 21 0 19 10 12 7 91 24 1 26 14 14 8 92 24 1 10 5 8 6 93 23 0 16 11 9 5 94 20 1 22 10 15 6 95 27 1 19 9 11 10 96 26 1 31 10 21 12 97 25 1 31 16 14 9 98 21 1 29 13 18 12 99 21 1 19 9 12 7 100 19 1 22 10 13 8 101 21 1 23 10 15 10 102 21 1 15 7 12 6 103 16 1 20 9 19 10 104 22 1 18 8 15 10 105 29 1 23 14 11 10 106 15 0 25 14 11 5 107 17 1 21 8 10 7 108 15 1 24 9 13 10 109 21 1 25 14 15 11 110 21 0 17 14 12 6 111 19 1 13 8 12 7 112 24 1 28 8 16 12 113 20 1 21 8 9 11 114 17 0 25 7 18 11 115 23 1 9 6 8 11 116 24 1 16 8 13 5 117 14 1 19 6 17 8 118 19 1 17 11 9 6 119 24 1 25 14 15 9 120 13 1 20 11 8 4 121 22 1 29 11 7 4 122 16 1 14 11 12 7 123 19 0 22 14 14 11 124 25 1 15 8 6 6 125 25 1 19 20 8 7 126 23 1 20 11 17 8 127 24 0 15 8 10 4 128 26 1 20 11 11 8 129 26 1 18 10 14 9 130 25 1 33 14 11 8 131 18 1 22 11 13 11 132 21 1 16 9 12 8 133 26 1 17 9 11 5 134 23 1 16 8 9 4 135 23 1 21 10 12 8 136 22 1 26 13 20 10 137 20 1 18 13 12 6 138 13 1 18 12 13 9 139 24 1 17 8 12 9 140 15 1 22 13 12 13 141 14 1 30 14 9 9 142 22 0 30 12 15 10 143 10 1 24 14 24 20 144 24 1 21 15 7 5 145 22 1 21 13 17 11 146 24 1 29 16 11 6 147 19 1 31 9 17 9 148 20 0 20 9 11 7 149 13 1 16 9 12 9 150 20 1 22 8 14 10 151 22 1 20 7 11 9 152 24 1 28 16 16 8 153 29 1 38 11 21 7 154 12 1 22 9 14 6 155 20 1 20 11 20 13 156 21 1 17 9 13 6 157 24 1 28 14 11 8 158 22 1 22 13 15 10 159 20 1 31 16 19 16 personalstandards 1 24 2 25 3 30 4 19 5 22 6 22 7 25 8 23 9 17 10 21 11 19 12 19 13 15 14 16 15 23 16 27 17 22 18 14 19 22 20 23 21 23 22 21 23 19 24 18 25 20 26 23 27 25 28 19 29 24 30 22 31 25 32 26 33 29 34 32 35 25 36 29 37 28 38 17 39 28 40 29 41 26 42 25 43 14 44 25 45 26 46 20 47 18 48 32 49 25 50 25 51 23 52 21 53 20 54 15 55 30 56 24 57 26 58 24 59 22 60 14 61 24 62 24 63 24 64 24 65 19 66 31 67 22 68 27 69 19 70 25 71 20 72 21 73 27 74 23 75 25 76 20 77 21 78 22 79 23 80 25 81 25 82 17 83 19 84 25 85 19 86 20 87 26 88 23 89 27 90 17 91 17 92 19 93 17 94 22 95 21 96 32 97 21 98 21 99 18 100 18 101 23 102 19 103 20 104 21 105 20 106 17 107 18 108 19 109 22 110 15 111 14 112 18 113 24 114 35 115 29 116 21 117 25 118 20 119 22 120 13 121 26 122 17 123 25 124 20 125 19 126 21 127 22 128 24 129 21 130 26 131 24 132 16 133 23 134 18 135 16 136 26 137 19 138 21 139 21 140 22 141 23 142 29 143 21 144 21 145 23 146 27 147 25 148 21 149 10 150 20 151 26 152 24 153 29 154 19 155 24 156 19 157 24 158 22 159 17 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) Pop concernmistakes doubtactions 16.135493 -0.001220 -0.070672 0.218173 parentalexp parentalcrit personalstandards -0.148958 -0.255148 0.422751 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -9.1549 -1.7376 0.2699 2.2317 7.1718 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 16.13549 2.18040 7.400 8.62e-12 *** Pop -0.00122 0.93151 -0.001 0.9990 concernmistakes -0.07067 0.06319 -1.118 0.2652 doubtactions 0.21817 0.11299 1.931 0.0554 . parentalexp -0.14896 0.10468 -1.423 0.1568 parentalcrit -0.25515 0.13127 -1.944 0.0538 . personalstandards 0.42275 0.07601 5.562 1.17e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 3.511 on 152 degrees of freedom Multiple R-squared: 0.2224, Adjusted R-squared: 0.1917 F-statistic: 7.244 on 6 and 152 DF, p-value: 8.124e-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.434874568 0.869749136 0.5651254 [2,] 0.290017249 0.580034499 0.7099828 [3,] 0.297358081 0.594716162 0.7026419 [4,] 0.267087433 0.534174866 0.7329126 [5,] 0.619368477 0.761263045 0.3806315 [6,] 0.514624950 0.970750101 0.4853751 [7,] 0.592058838 0.815882324 0.4079412 [8,] 0.522320474 0.955359053 0.4776795 [9,] 0.658322042 0.683355915 0.3416780 [10,] 0.589093051 0.821813899 0.4109069 [11,] 0.582919154 0.834161691 0.4170808 [12,] 0.535596172 0.928807655 0.4644038 [13,] 0.464533480 0.929066961 0.5354665 [14,] 0.408743227 0.817486453 0.5912568 [15,] 0.389990794 0.779981588 0.6100092 [16,] 0.544321200 0.911357600 0.4556788 [17,] 0.486015658 0.972031316 0.5139843 [18,] 0.417595348 0.835190696 0.5824047 [19,] 0.412286314 0.824572627 0.5877137 [20,] 0.348736844 0.697473688 0.6512632 [21,] 0.289438780 0.578877559 0.7105612 [22,] 0.317295683 0.634591366 0.6827043 [23,] 0.269967533 0.539935065 0.7300325 [24,] 0.470437124 0.940874247 0.5295629 [25,] 0.417389781 0.834779562 0.5826102 [26,] 0.373384633 0.746769267 0.6266154 [27,] 0.318385613 0.636771227 0.6816144 [28,] 0.297798863 0.595597727 0.7022011 [29,] 0.249668736 0.499337471 0.7503313 [30,] 0.229007452 0.458014904 0.7709925 [31,] 0.202569559 0.405139118 0.7974304 [32,] 0.368166824 0.736333648 0.6318332 [33,] 0.316677643 0.633355286 0.6833224 [34,] 0.284539352 0.569078703 0.7154606 [35,] 0.240898601 0.481797202 0.7591014 [36,] 0.206456408 0.412912815 0.7935436 [37,] 0.184935172 0.369870343 0.8150648 [38,] 0.172106877 0.344213753 0.8278931 [39,] 0.158517498 0.317034996 0.8414825 [40,] 0.129248430 0.258496860 0.8707516 [41,] 0.118395377 0.236790754 0.8816046 [42,] 0.097651860 0.195303719 0.9023481 [43,] 0.082764126 0.165528252 0.9172359 [44,] 0.139165646 0.278331292 0.8608344 [45,] 0.173931039 0.347862077 0.8260690 [46,] 0.159575878 0.319151756 0.8404241 [47,] 0.215218306 0.430436611 0.7847817 [48,] 0.207489330 0.414978661 0.7925107 [49,] 0.176953057 0.353906113 0.8230469 [50,] 0.187517198 0.375034396 0.8124828 [51,] 0.217191090 0.434382180 0.7828089 [52,] 0.191206172 0.382412344 0.8087938 [53,] 0.160350647 0.320701295 0.8396494 [54,] 0.159547828 0.319095655 0.8404522 [55,] 0.133194770 0.266389541 0.8668052 [56,] 0.108806347 0.217612694 0.8911937 [57,] 0.106178531 0.212357062 0.8938215 [58,] 0.096049100 0.192098201 0.9039509 [59,] 0.094458022 0.188916045 0.9055420 [60,] 0.079644935 0.159289871 0.9203551 [61,] 0.067251752 0.134503505 0.9327482 [62,] 0.054110546 0.108221092 0.9458895 [63,] 0.042328188 0.084656376 0.9576718 [64,] 0.039977718 0.079955436 0.9600223 [65,] 0.031933152 0.063866304 0.9680668 [66,] 0.026499133 0.052998266 0.9735009 [67,] 0.020188292 0.040376585 0.9798117 [68,] 0.015826354 0.031652708 0.9841736 [69,] 0.012608075 0.025216151 0.9873919 [70,] 0.019181905 0.038363811 0.9808181 [71,] 0.015205379 0.030410758 0.9847946 [72,] 0.014939138 0.029878276 0.9850609 [73,] 0.024487956 0.048975913 0.9755120 [74,] 0.018614963 0.037229925 0.9813850 [75,] 0.015441169 0.030882338 0.9845588 [76,] 0.016135649 0.032271298 0.9838644 [77,] 0.014236082 0.028472164 0.9857639 [78,] 0.010646889 0.021293778 0.9893531 [79,] 0.013913176 0.027826352 0.9860868 [80,] 0.010729730 0.021459461 0.9892703 [81,] 0.009518010 0.019036019 0.9904820 [82,] 0.009680030 0.019360059 0.9903200 [83,] 0.008363634 0.016727269 0.9916364 [84,] 0.007764271 0.015528542 0.9922357 [85,] 0.006467760 0.012935520 0.9935322 [86,] 0.012282607 0.024565214 0.9877174 [87,] 0.010785868 0.021571736 0.9892141 [88,] 0.010208221 0.020416443 0.9897918 [89,] 0.007776152 0.015552304 0.9922238 [90,] 0.005685009 0.011370019 0.9943150 [91,] 0.004311732 0.008623464 0.9956883 [92,] 0.003144738 0.006289476 0.9968553 [93,] 0.002202517 0.004405035 0.9977975 [94,] 0.002388844 0.004777687 0.9976112 [95,] 0.001842557 0.003685114 0.9981574 [96,] 0.008203177 0.016406355 0.9917968 [97,] 0.018290833 0.036581667 0.9817092 [98,] 0.017998585 0.035997170 0.9820014 [99,] 0.022594411 0.045188823 0.9774056 [100,] 0.017332738 0.034665476 0.9826673 [101,] 0.013760777 0.027521554 0.9862392 [102,] 0.009983635 0.019967270 0.9900164 [103,] 0.025341947 0.050683895 0.9746581 [104,] 0.022761174 0.045522349 0.9772388 [105,] 0.059881269 0.119762539 0.9401187 [106,] 0.050535421 0.101070843 0.9494646 [107,] 0.040834857 0.081669714 0.9591651 [108,] 0.125670111 0.251340222 0.8743299 [109,] 0.122007793 0.244015587 0.8779922 [110,] 0.108078686 0.216157372 0.8919213 [111,] 0.181914326 0.363828653 0.8180857 [112,] 0.177191990 0.354383980 0.8228080 [113,] 0.211836402 0.423672803 0.7881636 [114,] 0.198754973 0.397509946 0.8012450 [115,] 0.193871684 0.387743368 0.8061283 [116,] 0.177529374 0.355058747 0.8224706 [117,] 0.144708963 0.289417925 0.8552910 [118,] 0.114727282 0.229454564 0.8852727 [119,] 0.116280047 0.232560095 0.8837200 [120,] 0.164553153 0.329106307 0.8354468 [121,] 0.140635517 0.281271034 0.8593645 [122,] 0.123611186 0.247222371 0.8763888 [123,] 0.107136604 0.214273208 0.8928634 [124,] 0.097475528 0.194951056 0.9025245 [125,] 0.079373843 0.158747686 0.9206262 [126,] 0.107972369 0.215944739 0.8920276 [127,] 0.080178720 0.160357440 0.9198213 [128,] 0.058512842 0.117025684 0.9414872 [129,] 0.149755405 0.299510810 0.8502446 [130,] 0.209641176 0.419282353 0.7903588 [131,] 0.190479830 0.380959661 0.8095202 [132,] 0.424807529 0.849615058 0.5751925 [133,] 0.359293512 0.718587025 0.6407065 [134,] 0.671530929 0.656938142 0.3284691 [135,] 0.615294099 0.769411802 0.3847059 [136,] 0.504849191 0.990301617 0.4951508 [137,] 0.429177174 0.858354349 0.5708228 [138,] 0.437382042 0.874764084 0.5626180 [139,] 0.305353606 0.610707211 0.6946464 [140,] 0.212991088 0.425982176 0.7870089 > postscript(file="/var/www/html/rcomp/tmp/1y55s1290178602.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(x[,1], type='l', main='Actuals and Interpolation', ylab='value of Actuals and Interpolation (dots)', xlab='time or index') > points(x[,1]-mysum$resid) > grid() > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/2y55s1290178602.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(mysum$resid, type='b', pch=19, main='Residuals', ylab='value of Residuals', xlab='time or index') > grid() > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/3re4d1290178602.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > hist(mysum$resid, main='Residual Histogram', xlab='values of Residuals') > grid() > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/4re4d1290178602.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > densityplot(~mysum$resid,col='black',main='Residual Density Plot', xlab='values of Residuals') > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/5re4d1290178602.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > qqnorm(mysum$resid, main='Residual Normal Q-Q Plot') > qqline(mysum$resid) > grid() > dev.off() null device 1 > (myerror <- as.ts(mysum$resid)) Time Series: Start = 1 End = 159 Frequency = 1 1 2 3 4 5 6 3.061726966 -1.252258162 0.647840048 1.018246606 -2.824250751 6.086544668 7 8 9 10 11 12 0.187798246 -1.681526217 0.033826565 2.511973231 3.769857056 -1.729646326 13 14 15 16 17 18 3.594553343 -5.713500914 -1.517641052 3.681791738 -2.277283113 -7.058365567 19 20 21 22 23 24 2.551589271 -1.382217163 -2.287122536 -0.612087125 1.756351870 1.923385431 25 26 27 28 29 30 6.033298616 2.058529900 0.512099716 3.586802795 0.990595532 0.270420089 31 32 33 34 35 36 4.682864079 1.913850964 -6.999490779 -1.067351794 -1.636555923 -0.751800943 37 38 39 40 41 42 -3.167514908 -0.829827779 -0.586068361 -2.671790044 7.101997441 0.269927991 43 44 45 46 47 48 -1.686862111 -0.806104998 -1.363320221 2.532438745 3.252124450 -3.513036261 49 50 51 52 53 54 -0.006606505 -2.813683910 -1.745455555 2.125179714 6.471101453 -5.092840721 55 56 57 58 59 60 0.094585368 5.549610883 3.075940088 -1.207950524 3.949360966 -4.358329425 61 62 63 64 65 66 2.041403117 0.489432943 4.314629757 -0.356449244 0.272732913 3.026397744 67 68 69 70 71 72 2.690376576 -3.191695090 1.653732391 0.988996017 1.217673516 0.493828760 73 74 75 76 77 78 3.138759072 1.407224918 1.936130499 -0.316883156 1.319620316 1.812990626 79 80 81 82 83 84 5.397915097 -1.656787986 3.355925699 6.320522446 0.677137069 1.899821472 85 86 87 88 89 90 3.870680211 2.664286318 -0.909133104 4.529924187 -0.232405815 0.412314192 91 92 93 94 95 96 3.588610701 2.171868931 1.024955688 -2.296476893 5.557188513 2.536697236 97 98 99 100 101 102 3.069768695 0.944219615 0.208956312 -1.393094943 -0.627965205 -0.315284018 103 104 105 106 107 108 -3.757722006 1.300522827 7.171763117 -6.695599470 -3.729444126 -4.946034134 109 110 111 112 113 114 -0.681413834 -0.011366157 -0.305898483 5.934746994 -2.394316725 -8.204310994 115 116 117 118 119 120 -2.068745417 1.585524122 -8.095841961 -3.916257051 1.808290808 -7.404239590 121 122 123 124 125 126 -3.412912517 -5.157997212 -4.311860326 2.150042330 0.790472551 1.574969730 127 128 129 130 131 132 0.388858483 2.412967107 4.460071426 0.831680771 -4.382329546 1.097590252 133 134 135 136 137 138 2.294604869 1.002795493 3.232776556 -0.593928553 -2.412304720 -9.125232296 139 140 141 142 143 144 2.527828279 -6.611836256 -9.154851176 -2.107333212 -7.692380476 -0.482075812 145 146 147 148 149 150 0.129237548 -1.820397967 -2.647150763 -2.138802992 -4.110757109 -0.142997515 151 152 153 154 155 156 -1.304696137 0.632269860 5.805741217 -8.959010088 -0.970669281 -0.461327431 157 158 159 0.323823438 0.069595778 2.291597543 > postscript(file="/var/www/html/rcomp/tmp/61nmg1290178602.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > dum <- cbind(lag(myerror,k=1),myerror) > dum Time Series: Start = 0 End = 159 Frequency = 1 lag(myerror, k = 1) myerror 0 3.061726966 NA 1 -1.252258162 3.061726966 2 0.647840048 -1.252258162 3 1.018246606 0.647840048 4 -2.824250751 1.018246606 5 6.086544668 -2.824250751 6 0.187798246 6.086544668 7 -1.681526217 0.187798246 8 0.033826565 -1.681526217 9 2.511973231 0.033826565 10 3.769857056 2.511973231 11 -1.729646326 3.769857056 12 3.594553343 -1.729646326 13 -5.713500914 3.594553343 14 -1.517641052 -5.713500914 15 3.681791738 -1.517641052 16 -2.277283113 3.681791738 17 -7.058365567 -2.277283113 18 2.551589271 -7.058365567 19 -1.382217163 2.551589271 20 -2.287122536 -1.382217163 21 -0.612087125 -2.287122536 22 1.756351870 -0.612087125 23 1.923385431 1.756351870 24 6.033298616 1.923385431 25 2.058529900 6.033298616 26 0.512099716 2.058529900 27 3.586802795 0.512099716 28 0.990595532 3.586802795 29 0.270420089 0.990595532 30 4.682864079 0.270420089 31 1.913850964 4.682864079 32 -6.999490779 1.913850964 33 -1.067351794 -6.999490779 34 -1.636555923 -1.067351794 35 -0.751800943 -1.636555923 36 -3.167514908 -0.751800943 37 -0.829827779 -3.167514908 38 -0.586068361 -0.829827779 39 -2.671790044 -0.586068361 40 7.101997441 -2.671790044 41 0.269927991 7.101997441 42 -1.686862111 0.269927991 43 -0.806104998 -1.686862111 44 -1.363320221 -0.806104998 45 2.532438745 -1.363320221 46 3.252124450 2.532438745 47 -3.513036261 3.252124450 48 -0.006606505 -3.513036261 49 -2.813683910 -0.006606505 50 -1.745455555 -2.813683910 51 2.125179714 -1.745455555 52 6.471101453 2.125179714 53 -5.092840721 6.471101453 54 0.094585368 -5.092840721 55 5.549610883 0.094585368 56 3.075940088 5.549610883 57 -1.207950524 3.075940088 58 3.949360966 -1.207950524 59 -4.358329425 3.949360966 60 2.041403117 -4.358329425 61 0.489432943 2.041403117 62 4.314629757 0.489432943 63 -0.356449244 4.314629757 64 0.272732913 -0.356449244 65 3.026397744 0.272732913 66 2.690376576 3.026397744 67 -3.191695090 2.690376576 68 1.653732391 -3.191695090 69 0.988996017 1.653732391 70 1.217673516 0.988996017 71 0.493828760 1.217673516 72 3.138759072 0.493828760 73 1.407224918 3.138759072 74 1.936130499 1.407224918 75 -0.316883156 1.936130499 76 1.319620316 -0.316883156 77 1.812990626 1.319620316 78 5.397915097 1.812990626 79 -1.656787986 5.397915097 80 3.355925699 -1.656787986 81 6.320522446 3.355925699 82 0.677137069 6.320522446 83 1.899821472 0.677137069 84 3.870680211 1.899821472 85 2.664286318 3.870680211 86 -0.909133104 2.664286318 87 4.529924187 -0.909133104 88 -0.232405815 4.529924187 89 0.412314192 -0.232405815 90 3.588610701 0.412314192 91 2.171868931 3.588610701 92 1.024955688 2.171868931 93 -2.296476893 1.024955688 94 5.557188513 -2.296476893 95 2.536697236 5.557188513 96 3.069768695 2.536697236 97 0.944219615 3.069768695 98 0.208956312 0.944219615 99 -1.393094943 0.208956312 100 -0.627965205 -1.393094943 101 -0.315284018 -0.627965205 102 -3.757722006 -0.315284018 103 1.300522827 -3.757722006 104 7.171763117 1.300522827 105 -6.695599470 7.171763117 106 -3.729444126 -6.695599470 107 -4.946034134 -3.729444126 108 -0.681413834 -4.946034134 109 -0.011366157 -0.681413834 110 -0.305898483 -0.011366157 111 5.934746994 -0.305898483 112 -2.394316725 5.934746994 113 -8.204310994 -2.394316725 114 -2.068745417 -8.204310994 115 1.585524122 -2.068745417 116 -8.095841961 1.585524122 117 -3.916257051 -8.095841961 118 1.808290808 -3.916257051 119 -7.404239590 1.808290808 120 -3.412912517 -7.404239590 121 -5.157997212 -3.412912517 122 -4.311860326 -5.157997212 123 2.150042330 -4.311860326 124 0.790472551 2.150042330 125 1.574969730 0.790472551 126 0.388858483 1.574969730 127 2.412967107 0.388858483 128 4.460071426 2.412967107 129 0.831680771 4.460071426 130 -4.382329546 0.831680771 131 1.097590252 -4.382329546 132 2.294604869 1.097590252 133 1.002795493 2.294604869 134 3.232776556 1.002795493 135 -0.593928553 3.232776556 136 -2.412304720 -0.593928553 137 -9.125232296 -2.412304720 138 2.527828279 -9.125232296 139 -6.611836256 2.527828279 140 -9.154851176 -6.611836256 141 -2.107333212 -9.154851176 142 -7.692380476 -2.107333212 143 -0.482075812 -7.692380476 144 0.129237548 -0.482075812 145 -1.820397967 0.129237548 146 -2.647150763 -1.820397967 147 -2.138802992 -2.647150763 148 -4.110757109 -2.138802992 149 -0.142997515 -4.110757109 150 -1.304696137 -0.142997515 151 0.632269860 -1.304696137 152 5.805741217 0.632269860 153 -8.959010088 5.805741217 154 -0.970669281 -8.959010088 155 -0.461327431 -0.970669281 156 0.323823438 -0.461327431 157 0.069595778 0.323823438 158 2.291597543 0.069595778 159 NA 2.291597543 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -1.252258162 3.061726966 [2,] 0.647840048 -1.252258162 [3,] 1.018246606 0.647840048 [4,] -2.824250751 1.018246606 [5,] 6.086544668 -2.824250751 [6,] 0.187798246 6.086544668 [7,] -1.681526217 0.187798246 [8,] 0.033826565 -1.681526217 [9,] 2.511973231 0.033826565 [10,] 3.769857056 2.511973231 [11,] -1.729646326 3.769857056 [12,] 3.594553343 -1.729646326 [13,] -5.713500914 3.594553343 [14,] -1.517641052 -5.713500914 [15,] 3.681791738 -1.517641052 [16,] -2.277283113 3.681791738 [17,] -7.058365567 -2.277283113 [18,] 2.551589271 -7.058365567 [19,] -1.382217163 2.551589271 [20,] -2.287122536 -1.382217163 [21,] -0.612087125 -2.287122536 [22,] 1.756351870 -0.612087125 [23,] 1.923385431 1.756351870 [24,] 6.033298616 1.923385431 [25,] 2.058529900 6.033298616 [26,] 0.512099716 2.058529900 [27,] 3.586802795 0.512099716 [28,] 0.990595532 3.586802795 [29,] 0.270420089 0.990595532 [30,] 4.682864079 0.270420089 [31,] 1.913850964 4.682864079 [32,] -6.999490779 1.913850964 [33,] -1.067351794 -6.999490779 [34,] -1.636555923 -1.067351794 [35,] -0.751800943 -1.636555923 [36,] -3.167514908 -0.751800943 [37,] -0.829827779 -3.167514908 [38,] -0.586068361 -0.829827779 [39,] -2.671790044 -0.586068361 [40,] 7.101997441 -2.671790044 [41,] 0.269927991 7.101997441 [42,] -1.686862111 0.269927991 [43,] -0.806104998 -1.686862111 [44,] -1.363320221 -0.806104998 [45,] 2.532438745 -1.363320221 [46,] 3.252124450 2.532438745 [47,] -3.513036261 3.252124450 [48,] -0.006606505 -3.513036261 [49,] -2.813683910 -0.006606505 [50,] -1.745455555 -2.813683910 [51,] 2.125179714 -1.745455555 [52,] 6.471101453 2.125179714 [53,] -5.092840721 6.471101453 [54,] 0.094585368 -5.092840721 [55,] 5.549610883 0.094585368 [56,] 3.075940088 5.549610883 [57,] -1.207950524 3.075940088 [58,] 3.949360966 -1.207950524 [59,] -4.358329425 3.949360966 [60,] 2.041403117 -4.358329425 [61,] 0.489432943 2.041403117 [62,] 4.314629757 0.489432943 [63,] -0.356449244 4.314629757 [64,] 0.272732913 -0.356449244 [65,] 3.026397744 0.272732913 [66,] 2.690376576 3.026397744 [67,] -3.191695090 2.690376576 [68,] 1.653732391 -3.191695090 [69,] 0.988996017 1.653732391 [70,] 1.217673516 0.988996017 [71,] 0.493828760 1.217673516 [72,] 3.138759072 0.493828760 [73,] 1.407224918 3.138759072 [74,] 1.936130499 1.407224918 [75,] -0.316883156 1.936130499 [76,] 1.319620316 -0.316883156 [77,] 1.812990626 1.319620316 [78,] 5.397915097 1.812990626 [79,] -1.656787986 5.397915097 [80,] 3.355925699 -1.656787986 [81,] 6.320522446 3.355925699 [82,] 0.677137069 6.320522446 [83,] 1.899821472 0.677137069 [84,] 3.870680211 1.899821472 [85,] 2.664286318 3.870680211 [86,] -0.909133104 2.664286318 [87,] 4.529924187 -0.909133104 [88,] -0.232405815 4.529924187 [89,] 0.412314192 -0.232405815 [90,] 3.588610701 0.412314192 [91,] 2.171868931 3.588610701 [92,] 1.024955688 2.171868931 [93,] -2.296476893 1.024955688 [94,] 5.557188513 -2.296476893 [95,] 2.536697236 5.557188513 [96,] 3.069768695 2.536697236 [97,] 0.944219615 3.069768695 [98,] 0.208956312 0.944219615 [99,] -1.393094943 0.208956312 [100,] -0.627965205 -1.393094943 [101,] -0.315284018 -0.627965205 [102,] -3.757722006 -0.315284018 [103,] 1.300522827 -3.757722006 [104,] 7.171763117 1.300522827 [105,] -6.695599470 7.171763117 [106,] -3.729444126 -6.695599470 [107,] -4.946034134 -3.729444126 [108,] -0.681413834 -4.946034134 [109,] -0.011366157 -0.681413834 [110,] -0.305898483 -0.011366157 [111,] 5.934746994 -0.305898483 [112,] -2.394316725 5.934746994 [113,] -8.204310994 -2.394316725 [114,] -2.068745417 -8.204310994 [115,] 1.585524122 -2.068745417 [116,] -8.095841961 1.585524122 [117,] -3.916257051 -8.095841961 [118,] 1.808290808 -3.916257051 [119,] -7.404239590 1.808290808 [120,] -3.412912517 -7.404239590 [121,] -5.157997212 -3.412912517 [122,] -4.311860326 -5.157997212 [123,] 2.150042330 -4.311860326 [124,] 0.790472551 2.150042330 [125,] 1.574969730 0.790472551 [126,] 0.388858483 1.574969730 [127,] 2.412967107 0.388858483 [128,] 4.460071426 2.412967107 [129,] 0.831680771 4.460071426 [130,] -4.382329546 0.831680771 [131,] 1.097590252 -4.382329546 [132,] 2.294604869 1.097590252 [133,] 1.002795493 2.294604869 [134,] 3.232776556 1.002795493 [135,] -0.593928553 3.232776556 [136,] -2.412304720 -0.593928553 [137,] -9.125232296 -2.412304720 [138,] 2.527828279 -9.125232296 [139,] -6.611836256 2.527828279 [140,] -9.154851176 -6.611836256 [141,] -2.107333212 -9.154851176 [142,] -7.692380476 -2.107333212 [143,] -0.482075812 -7.692380476 [144,] 0.129237548 -0.482075812 [145,] -1.820397967 0.129237548 [146,] -2.647150763 -1.820397967 [147,] -2.138802992 -2.647150763 [148,] -4.110757109 -2.138802992 [149,] -0.142997515 -4.110757109 [150,] -1.304696137 -0.142997515 [151,] 0.632269860 -1.304696137 [152,] 5.805741217 0.632269860 [153,] -8.959010088 5.805741217 [154,] -0.970669281 -8.959010088 [155,] -0.461327431 -0.970669281 [156,] 0.323823438 -0.461327431 [157,] 0.069595778 0.323823438 [158,] 2.291597543 0.069595778 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -1.252258162 3.061726966 2 0.647840048 -1.252258162 3 1.018246606 0.647840048 4 -2.824250751 1.018246606 5 6.086544668 -2.824250751 6 0.187798246 6.086544668 7 -1.681526217 0.187798246 8 0.033826565 -1.681526217 9 2.511973231 0.033826565 10 3.769857056 2.511973231 11 -1.729646326 3.769857056 12 3.594553343 -1.729646326 13 -5.713500914 3.594553343 14 -1.517641052 -5.713500914 15 3.681791738 -1.517641052 16 -2.277283113 3.681791738 17 -7.058365567 -2.277283113 18 2.551589271 -7.058365567 19 -1.382217163 2.551589271 20 -2.287122536 -1.382217163 21 -0.612087125 -2.287122536 22 1.756351870 -0.612087125 23 1.923385431 1.756351870 24 6.033298616 1.923385431 25 2.058529900 6.033298616 26 0.512099716 2.058529900 27 3.586802795 0.512099716 28 0.990595532 3.586802795 29 0.270420089 0.990595532 30 4.682864079 0.270420089 31 1.913850964 4.682864079 32 -6.999490779 1.913850964 33 -1.067351794 -6.999490779 34 -1.636555923 -1.067351794 35 -0.751800943 -1.636555923 36 -3.167514908 -0.751800943 37 -0.829827779 -3.167514908 38 -0.586068361 -0.829827779 39 -2.671790044 -0.586068361 40 7.101997441 -2.671790044 41 0.269927991 7.101997441 42 -1.686862111 0.269927991 43 -0.806104998 -1.686862111 44 -1.363320221 -0.806104998 45 2.532438745 -1.363320221 46 3.252124450 2.532438745 47 -3.513036261 3.252124450 48 -0.006606505 -3.513036261 49 -2.813683910 -0.006606505 50 -1.745455555 -2.813683910 51 2.125179714 -1.745455555 52 6.471101453 2.125179714 53 -5.092840721 6.471101453 54 0.094585368 -5.092840721 55 5.549610883 0.094585368 56 3.075940088 5.549610883 57 -1.207950524 3.075940088 58 3.949360966 -1.207950524 59 -4.358329425 3.949360966 60 2.041403117 -4.358329425 61 0.489432943 2.041403117 62 4.314629757 0.489432943 63 -0.356449244 4.314629757 64 0.272732913 -0.356449244 65 3.026397744 0.272732913 66 2.690376576 3.026397744 67 -3.191695090 2.690376576 68 1.653732391 -3.191695090 69 0.988996017 1.653732391 70 1.217673516 0.988996017 71 0.493828760 1.217673516 72 3.138759072 0.493828760 73 1.407224918 3.138759072 74 1.936130499 1.407224918 75 -0.316883156 1.936130499 76 1.319620316 -0.316883156 77 1.812990626 1.319620316 78 5.397915097 1.812990626 79 -1.656787986 5.397915097 80 3.355925699 -1.656787986 81 6.320522446 3.355925699 82 0.677137069 6.320522446 83 1.899821472 0.677137069 84 3.870680211 1.899821472 85 2.664286318 3.870680211 86 -0.909133104 2.664286318 87 4.529924187 -0.909133104 88 -0.232405815 4.529924187 89 0.412314192 -0.232405815 90 3.588610701 0.412314192 91 2.171868931 3.588610701 92 1.024955688 2.171868931 93 -2.296476893 1.024955688 94 5.557188513 -2.296476893 95 2.536697236 5.557188513 96 3.069768695 2.536697236 97 0.944219615 3.069768695 98 0.208956312 0.944219615 99 -1.393094943 0.208956312 100 -0.627965205 -1.393094943 101 -0.315284018 -0.627965205 102 -3.757722006 -0.315284018 103 1.300522827 -3.757722006 104 7.171763117 1.300522827 105 -6.695599470 7.171763117 106 -3.729444126 -6.695599470 107 -4.946034134 -3.729444126 108 -0.681413834 -4.946034134 109 -0.011366157 -0.681413834 110 -0.305898483 -0.011366157 111 5.934746994 -0.305898483 112 -2.394316725 5.934746994 113 -8.204310994 -2.394316725 114 -2.068745417 -8.204310994 115 1.585524122 -2.068745417 116 -8.095841961 1.585524122 117 -3.916257051 -8.095841961 118 1.808290808 -3.916257051 119 -7.404239590 1.808290808 120 -3.412912517 -7.404239590 121 -5.157997212 -3.412912517 122 -4.311860326 -5.157997212 123 2.150042330 -4.311860326 124 0.790472551 2.150042330 125 1.574969730 0.790472551 126 0.388858483 1.574969730 127 2.412967107 0.388858483 128 4.460071426 2.412967107 129 0.831680771 4.460071426 130 -4.382329546 0.831680771 131 1.097590252 -4.382329546 132 2.294604869 1.097590252 133 1.002795493 2.294604869 134 3.232776556 1.002795493 135 -0.593928553 3.232776556 136 -2.412304720 -0.593928553 137 -9.125232296 -2.412304720 138 2.527828279 -9.125232296 139 -6.611836256 2.527828279 140 -9.154851176 -6.611836256 141 -2.107333212 -9.154851176 142 -7.692380476 -2.107333212 143 -0.482075812 -7.692380476 144 0.129237548 -0.482075812 145 -1.820397967 0.129237548 146 -2.647150763 -1.820397967 147 -2.138802992 -2.647150763 148 -4.110757109 -2.138802992 149 -0.142997515 -4.110757109 150 -1.304696137 -0.142997515 151 0.632269860 -1.304696137 152 5.805741217 0.632269860 153 -8.959010088 5.805741217 154 -0.970669281 -8.959010088 155 -0.461327431 -0.970669281 156 0.323823438 -0.461327431 157 0.069595778 0.323823438 158 2.291597543 0.069595778 > 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/7cflj1290178602.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > acf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Autocorrelation Function') > grid() > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/8cflj1290178602.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > pacf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Partial Autocorrelation Function') > grid() > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/9cflj1290178602.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > opar <- par(mfrow = c(2,2), oma = c(0, 0, 1.1, 0)) > plot(mylm, las = 1, sub='Residual Diagnostics') > par(opar) > dev.off() null device 1 > if (n > n25) { + postscript(file="/var/www/html/rcomp/tmp/10no241290178602.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) + plot(kp3:nmkm3,gqarr[,2], main='Goldfeld-Quandt test',ylab='2-sided p-value',xlab='breakpoint') + grid() + dev.off() + } null device 1 > > #Note: the /var/www/html/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/11qpjs1290178602.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/12cpzg1290178602.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/138hf71290178602.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/14thdv1290178602.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/15w0c01290178602.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/160jso1290178602.tab") + } > > try(system("convert tmp/1y55s1290178602.ps tmp/1y55s1290178602.png",intern=TRUE)) character(0) > try(system("convert tmp/2y55s1290178602.ps tmp/2y55s1290178602.png",intern=TRUE)) character(0) > try(system("convert tmp/3re4d1290178602.ps tmp/3re4d1290178602.png",intern=TRUE)) character(0) > try(system("convert tmp/4re4d1290178602.ps tmp/4re4d1290178602.png",intern=TRUE)) character(0) > try(system("convert tmp/5re4d1290178602.ps tmp/5re4d1290178602.png",intern=TRUE)) character(0) > try(system("convert tmp/61nmg1290178602.ps tmp/61nmg1290178602.png",intern=TRUE)) character(0) > try(system("convert tmp/7cflj1290178602.ps tmp/7cflj1290178602.png",intern=TRUE)) character(0) > try(system("convert tmp/8cflj1290178602.ps tmp/8cflj1290178602.png",intern=TRUE)) character(0) > try(system("convert tmp/9cflj1290178602.ps tmp/9cflj1290178602.png",intern=TRUE)) character(0) > try(system("convert tmp/10no241290178602.ps tmp/10no241290178602.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 4.449 1.855 17.141