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(NA + ,NA + ,0.52 + ,6.82 + ,6.76 + ,2.81 + ,3.00 + ,5.00 + ,3.00 + ,6.30 + ,0.30 + ,0.92 + ,3.00 + ,3.82 + ,1.62 + ,3.00 + ,1.00 + ,3.00 + ,NA + ,NA + ,1.10 + ,3.53 + ,4.65 + ,1.78 + ,1.00 + ,1.00 + ,1.00 + ,NA + ,NA + ,1.22 + ,-0.04 + ,3.76 + ,1.40 + ,5.00 + ,2.00 + ,3.00 + ,2.10 + ,0.26 + ,0.59 + ,6.41 + ,6.66 + ,2.80 + ,3.00 + ,5.00 + ,4.00 + ,9.10 + ,-0.15 + ,0.99 + ,4.02 + ,5.25 + ,2.26 + ,4.00 + ,4.00 + ,4.00 + ,15.80 + ,0.59 + ,1.29 + ,-1.64 + ,-0.52 + ,1.54 + ,1.00 + ,1.00 + ,1.00 + ,5.20 + ,0.00 + ,0.79 + ,5.20 + ,5.23 + ,2.59 + ,4.00 + ,5.00 + ,4.00 + ,10.90 + ,0.56 + ,1.16 + ,3.52 + ,4.41 + ,1.80 + ,1.00 + ,2.00 + ,1.00 + ,8.30 + ,0.15 + ,0.99 + ,4.72 + ,5.64 + ,2.36 + ,1.00 + ,1.00 + ,1.00 + ,11.00 + ,0.18 + ,1.10 + ,-0.37 + ,3.81 + ,2.05 + ,5.00 + ,4.00 + ,4.00 + ,3.20 + ,-0.15 + ,0.59 + ,5.67 + ,5.63 + ,2.45 + ,5.00 + ,5.00 + ,5.00 + ,7.60 + ,0.43 + ,1.01 + ,-0.26 + ,3.38 + ,NA + ,2.00 + ,1.00 + ,2.00 + ,NA + ,NA + ,0.49 + ,5.27 + ,5.62 + ,2.56 + ,5.00 + ,5.00 + ,5.00 + ,6.30 + ,0.32 + ,0.92 + ,-1.12 + ,3.08 + ,1.62 + ,1.00 + ,1.00 + ,1.00 + ,8.60 + ,NA + ,0.93 + ,3.48 + ,4.40 + ,1.45 + ,2.00 + ,2.00 + ,2.00 + ,6.60 + ,0.61 + ,1.03 + ,-0.11 + ,3.54 + ,1.62 + ,2.00 + ,2.00 + ,2.00 + ,9.50 + ,0.08 + ,1.03 + ,-0.70 + ,3.70 + ,2.08 + ,2.00 + ,2.00 + ,2.00 + ,4.80 + ,0.11 + ,0.79 + ,3.15 + ,4.24 + ,NA + ,1.00 + ,2.00 + ,1.00 + ,12.00 + ,0.79 + ,1.26 + ,4.78 + ,4.91 + ,NA + ,1.00 + ,1.00 + ,1.00 + ,NA + ,-0.52 + ,NA + ,5.72 + ,5.83 + ,2.60 + ,5.00 + ,5.00 + ,5.00 + ,3.30 + ,-0.30 + ,0.58 + ,4.44 + ,5.06 + ,2.17 + ,5.00 + ,5.00 + ,5.00 + ,11.00 + ,0.53 + ,1.16 + ,-0.92 + ,3.00 + ,1.20 + ,3.00 + ,1.00 + ,2.00 + ,NA + ,NA + ,1.08 + ,5.32 + ,5.61 + ,2.40 + ,1.00 + ,4.00 + ,1.00 + ,4.70 + ,0.18 + ,0.79 + ,4.93 + ,5.51 + ,2.49 + ,1.00 + ,3.00 + ,1.00 + ,NA + ,NA + ,1.11 + ,4.56 + ,5.08 + ,1.80 + ,1.00 + ,1.00 + ,1.00 + ,10.40 + ,0.53 + ,1.14 + ,-1.00 + ,3.60 + ,1.45 + ,5.00 + ,1.00 + ,3.00 + ,7.40 + ,-0.10 + ,0.91 + ,3.02 + ,3.74 + ,1.83 + ,5.00 + ,3.00 + ,4.00 + ,2.10 + ,-0.10 + ,0.46 + ,5.72 + ,5.82 + ,2.53 + ,5.00 + ,5.00 + ,5.00 + ,NA + ,NA + ,1.03 + ,5.00 + ,5.20 + ,2.00 + ,1.00 + ,1.00 + ,1.00 + ,NA + ,NA + ,NA + ,4.54 + ,4.75 + ,1.52 + ,3.00 + ,5.00 + ,4.00 + ,7.70 + ,0.15 + ,0.96 + ,-2.30 + ,-0.85 + ,1.33 + ,5.00 + ,2.00 + ,4.00 + ,17.90 + ,0.30 + ,1.30 + ,-2.00 + ,-0.60 + ,1.70 + ,1.00 + ,1.00 + ,1.00 + ,6.10 + ,0.28 + ,0.90 + ,4.79 + ,6.12 + ,2.43 + ,1.00 + ,1.00 + ,1.00 + ,8.20 + ,0.38 + ,1.03 + ,-0.91 + ,3.48 + ,1.48 + ,2.00 + ,1.00 + ,1.00 + ,8.40 + ,0.45 + ,1.05 + ,3.13 + ,3.91 + ,1.65 + ,3.00 + ,1.00 + ,3.00 + ,11.90 + ,0.11 + ,1.12 + ,-1.64 + ,-0.40 + ,1.28 + ,4.00 + ,1.00 + ,3.00 + ,10.80 + ,0.30 + ,1.11 + ,-1.32 + ,-0.48 + ,1.48 + ,4.00 + ,1.00 + ,3.00 + ,13.80 + ,0.75 + ,1.29 + ,3.23 + ,3.80 + ,1.08 + ,2.00 + ,1.00 + ,1.00 + ,14.30 + ,0.49 + ,1.24 + ,3.54 + ,4.03 + ,2.08 + ,2.00 + ,1.00 + ,1.00 + ,NA + ,0.00 + ,NA + ,5.40 + ,5.69 + ,2.64 + ,5.00 + ,5.00 + ,5.00 + ,15.20 + ,0.26 + ,1.23 + ,-0.32 + ,4.19 + ,2.15 + ,2.00 + ,2.00 + ,2.00 + ,10.00 + ,-0.05 + ,1.04 + ,4.00 + ,5.06 + ,2.23 + ,4.00 + ,4.00 + ,4.00 + ,11.90 + ,0.26 + ,1.14 + ,3.21 + ,4.06 + ,1.23 + ,2.00 + ,1.00 + ,2.00 + ,6.50 + ,0.28 + ,0.92 + ,5.28 + ,5.26 + ,2.06 + ,4.00 + ,4.00 + ,4.00 + ,7.50 + ,-0.05 + ,0.92 + ,3.40 + ,4.08 + ,1.49 + ,5.00 + ,5.00 + ,5.00 + ,NA + ,NA + ,1.10 + ,3.63 + ,4.59 + ,1.80 + ,2.00 + ,2.00 + ,2.00 + ,10.60 + ,0.41 + ,1.12 + ,-0.55 + ,3.28 + ,1.32 + ,3.00 + ,1.00 + ,3.00 + ,7.40 + ,0.38 + ,0.99 + ,3.63 + ,4.70 + ,1.72 + ,1.00 + ,1.00 + ,1.00 + ,8.40 + ,0.08 + ,0.98 + ,3.83 + ,5.25 + ,2.21 + ,2.00 + ,3.00 + ,2.00 + ,5.70 + ,-0.05 + ,0.82 + ,-0.12 + ,4.09 + ,2.35 + ,2.00 + ,2.00 + ,2.00 + ,4.90 + ,-0.30 + ,0.73 + ,3.56 + ,4.32 + ,2.35 + ,3.00 + ,2.00 + ,3.00 + ,NA + ,NA + ,0.41 + ,4.17 + ,4.99 + ,2.18 + ,5.00 + ,5.00 + ,5.00 + ,3.20 + ,-0.22 + ,0.58 + ,4.74 + ,5.24 + ,2.18 + ,5.00 + ,5.00 + ,5.00 + ,NA + ,NA + ,1.04 + ,3.15 + ,4.10 + ,1.95 + ,2.00 + ,2.00 + ,2.00 + ,8.10 + ,0.34 + ,1.01 + ,-1.22 + ,3.00 + ,NA + ,3.00 + ,1.00 + ,2.00 + ,11.00 + ,0.36 + ,1.12 + ,-0.05 + ,3.41 + ,1.78 + ,2.00 + ,1.00 + ,2.00 + ,4.90 + ,-0.30 + ,0.73 + ,3.30 + ,4.09 + ,2.30 + ,3.00 + ,1.00 + ,3.00 + ,13.20 + ,0.41 + ,1.20 + ,-0.98 + ,3.40 + ,1.66 + ,3.00 + ,2.00 + ,2.00 + ,9.70 + ,-0.22 + ,1.01 + ,3.62 + ,4.76 + ,2.32 + ,4.00 + ,3.00 + ,4.00 + ,12.80 + ,0.82 + ,1.29 + ,3.54 + ,3.59 + ,1.15 + ,2.00 + ,1.00 + ,1.00 + ,NA + ,NA + ,NA + ,3.61 + ,4.23 + ,1.58 + ,3.00 + ,1.00 + ,1.00) + ,dim=c(9 + ,62) + ,dimnames=list(c('SWS' + ,'Pslog' + ,'Llog' + ,'wblog' + ,'wbrlog' + ,'tglog' + ,'P' + ,'S' + ,'D') + ,1:62)) > y <- array(NA,dim=c(9,62),dimnames=list(c('SWS','Pslog','Llog','wblog','wbrlog','tglog','P','S','D'),1:62)) > 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 Pslog SWS Llog wblog wbrlog tglog P S D 1 NA NA 0.52 6.82 6.76 2.81 3 5 3 2 0.30 6.3 0.92 3.00 3.82 1.62 3 1 3 3 NA NA 1.10 3.53 4.65 1.78 1 1 1 4 NA NA 1.22 -0.04 3.76 1.40 5 2 3 5 0.26 2.1 0.59 6.41 6.66 2.80 3 5 4 6 -0.15 9.1 0.99 4.02 5.25 2.26 4 4 4 7 0.59 15.8 1.29 -1.64 -0.52 1.54 1 1 1 8 0.00 5.2 0.79 5.20 5.23 2.59 4 5 4 9 0.56 10.9 1.16 3.52 4.41 1.80 1 2 1 10 0.15 8.3 0.99 4.72 5.64 2.36 1 1 1 11 0.18 11.0 1.10 -0.37 3.81 2.05 5 4 4 12 -0.15 3.2 0.59 5.67 5.63 2.45 5 5 5 13 0.43 7.6 1.01 -0.26 3.38 NA 2 1 2 14 NA NA 0.49 5.27 5.62 2.56 5 5 5 15 0.32 6.3 0.92 -1.12 3.08 1.62 1 1 1 16 NA 8.6 0.93 3.48 4.40 1.45 2 2 2 17 0.61 6.6 1.03 -0.11 3.54 1.62 2 2 2 18 0.08 9.5 1.03 -0.70 3.70 2.08 2 2 2 19 0.11 4.8 0.79 3.15 4.24 NA 1 2 1 20 0.79 12.0 1.26 4.78 4.91 NA 1 1 1 21 -0.52 NA NA 5.72 5.83 2.60 5 5 5 22 -0.30 3.3 0.58 4.44 5.06 2.17 5 5 5 23 0.53 11.0 1.16 -0.92 3.00 1.20 3 1 2 24 NA NA 1.08 5.32 5.61 2.40 1 4 1 25 0.18 4.7 0.79 4.93 5.51 2.49 1 3 1 26 NA NA 1.11 4.56 5.08 1.80 1 1 1 27 0.53 10.4 1.14 -1.00 3.60 1.45 5 1 3 28 -0.10 7.4 0.91 3.02 3.74 1.83 5 3 4 29 -0.10 2.1 0.46 5.72 5.82 2.53 5 5 5 30 NA NA 1.03 5.00 5.20 2.00 1 1 1 31 NA NA NA 4.54 4.75 1.52 3 5 4 32 0.15 7.7 0.96 -2.30 -0.85 1.33 5 2 4 33 0.30 17.9 1.30 -2.00 -0.60 1.70 1 1 1 34 0.28 6.1 0.90 4.79 6.12 2.43 1 1 1 35 0.38 8.2 1.03 -0.91 3.48 1.48 2 1 1 36 0.45 8.4 1.05 3.13 3.91 1.65 3 1 3 37 0.11 11.9 1.12 -1.64 -0.40 1.28 4 1 3 38 0.30 10.8 1.11 -1.32 -0.48 1.48 4 1 3 39 0.75 13.8 1.29 3.23 3.80 1.08 2 1 1 40 0.49 14.3 1.24 3.54 4.03 2.08 2 1 1 41 0.00 NA NA 5.40 5.69 2.64 5 5 5 42 0.26 15.2 1.23 -0.32 4.19 2.15 2 2 2 43 -0.05 10.0 1.04 4.00 5.06 2.23 4 4 4 44 0.26 11.9 1.14 3.21 4.06 1.23 2 1 2 45 0.28 6.5 0.92 5.28 5.26 2.06 4 4 4 46 -0.05 7.5 0.92 3.40 4.08 1.49 5 5 5 47 NA NA 1.10 3.63 4.59 1.80 2 2 2 48 0.41 10.6 1.12 -0.55 3.28 1.32 3 1 3 49 0.38 7.4 0.99 3.63 4.70 1.72 1 1 1 50 0.08 8.4 0.98 3.83 5.25 2.21 2 3 2 51 -0.05 5.7 0.82 -0.12 4.09 2.35 2 2 2 52 -0.30 4.9 0.73 3.56 4.32 2.35 3 2 3 53 NA NA 0.41 4.17 4.99 2.18 5 5 5 54 -0.22 3.2 0.58 4.74 5.24 2.18 5 5 5 55 NA NA 1.04 3.15 4.10 1.95 2 2 2 56 0.34 8.1 1.01 -1.22 3.00 NA 3 1 2 57 0.36 11.0 1.12 -0.05 3.41 1.78 2 1 2 58 -0.30 4.9 0.73 3.30 4.09 2.30 3 1 3 59 0.41 13.2 1.20 -0.98 3.40 1.66 3 2 2 60 -0.22 9.7 1.01 3.62 4.76 2.32 4 3 4 61 0.82 12.8 1.29 3.54 3.59 1.15 2 1 1 62 NA NA NA 3.61 4.23 1.58 3 1 1 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) SWS Llog wblog wbrlog tglog -0.010256 -0.047507 1.279321 0.009126 0.003147 -0.259256 P S D 0.013026 0.058144 -0.127568 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -0.23601 -0.12010 0.02163 0.09229 0.44215 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) -0.010256 0.479809 -0.021 0.9831 SWS -0.047507 0.026120 -1.819 0.0778 . Llog 1.279321 0.540645 2.366 0.0238 * wblog 0.009126 0.017794 0.513 0.6113 wbrlog 0.003147 0.028852 0.109 0.9138 tglog -0.259256 0.105009 -2.469 0.0187 * P 0.013026 0.059563 0.219 0.8282 S 0.058144 0.035501 1.638 0.1107 D -0.127568 0.075534 -1.689 0.1004 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.1656 on 34 degrees of freedom (19 observations deleted due to missingness) Multiple R-squared: 0.7369, Adjusted R-squared: 0.6749 F-statistic: 11.9 on 8 and 34 DF, p-value: 6.736e-08 > 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 + } Error in if (gqarr[mypoint - kp3 + 1, 2] < 0.01) numsignificant1 <- numsignificant1 + : missing value where TRUE/FALSE needed Execution halted