R version 2.13.0 (2011-04-13) Copyright (C) 2011 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i486-pc-linux-gnu (32-bit) 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(0.0013,0.0009,0.0035,0.0023,0.0071,0.0052,0.0148,0.0102,0.0247,0.0197,0.0356,0.0297,0.0460,0.0412,0.0601,0.0533,0.0696,0.0643,0.0840,0.0756,0.1017,0.0924,0.1226,0.1130,0.1362,0.1300,0.1457,0.1422,0.1503,0.1494,0.1442,0.1472,0.1316,0.1398,0.1154,0.1227,0.1002,0.1075,0.0839,0.0929,0.0711,0.0781,0.0552,0.0622,0.0444,0.0495,0.0332,0.0389,0.0245,0.0285,0.0175,0.0205,0.0115,0.0146,0.0065,0.0087,0.0037,0.0045,0.0016,0.0027,0.0011,0.0012,0.0006,0.0008,0.0004,0.0005,0.0001,0.0003,0.0001,0.0001),dim=c(2,35),dimnames=list(c('X_1t','X_2t'),1:35)) > y <- array(NA,dim=c(2,35),dimnames=list(c('X_1t','X_2t'),1:35)) > 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 = '' > #'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 > 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 t 1 NA NA NA 1 2 NA NA NA 2 3 NA NA NA 3 4 NA NA NA 4 5 NA NA NA 5 6 NA NA NA 6 7 NA NA NA 7 8 NA NA NA 8 9 NA NA NA 9 10 NA NA NA 10 11 NA NA NA 11 12 NA NA NA 12 13 NA NA NA 13 14 NA NA NA 14 15 NA NA NA 15 16 NA NA NA 16 17 NA NA NA 17 18 NA NA NA 18 19 NA NA NA 19 20 NA NA NA 20 21 NA NA NA 21 22 NA NA NA 22 23 NA NA NA 23 24 NA NA NA 24 25 NA NA NA 25 26 NA NA NA 26 27 NA NA NA 27 28 NA NA NA 28 29 NA NA NA 29 30 NA NA NA 30 31 NA NA NA 31 32 NA NA NA 32 33 NA NA NA 33 34 NA NA NA 34 35 NA NA NA 35 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Error in lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) : 0 (non-NA) cases Calls: lm -> lm.fit In addition: Warning messages: 1: In model.matrix.default(mt, mf, contrasts) : the response appeared on the right-hand side and was dropped 2: In model.matrix.default(mt, mf, contrasts) : problem with term 1 in model.matrix: no columns are assigned Execution halted