R version 2.15.2 (2012-10-26) -- "Trick or Treat" Copyright (C) 2012 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i686-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(9 + ,26 + ,21 + ,21 + ,23 + ,17 + ,23 + ,4 + ,14 + ,12 + ,9 + ,20 + ,16 + ,15 + ,24 + ,17 + ,20 + ,4 + ,18 + ,11 + ,9 + ,19 + ,19 + ,18 + ,22 + ,18 + ,20 + ,6 + ,11 + ,14 + ,9 + ,19 + ,18 + ,11 + ,20 + ,21 + ,21 + ,8 + ,12 + ,12 + ,9 + ,20 + ,16 + ,8 + ,24 + ,20 + ,24 + ,8 + ,16 + ,21 + ,9 + ,25 + ,23 + ,19 + ,27 + ,28 + ,22 + ,4 + ,18 + ,12 + ,9 + ,25 + ,17 + ,4 + ,28 + ,19 + ,23 + ,4 + ,14 + ,22 + ,9 + ,22 + ,12 + ,20 + ,27 + ,22 + ,20 + ,8 + ,14 + ,11 + ,9 + ,26 + ,19 + ,16 + ,24 + ,16 + ,25 + ,5 + ,15 + ,10 + ,9 + ,22 + ,16 + ,14 + ,23 + ,18 + ,23 + ,4 + ,15 + ,13 + ,9 + ,17 + ,19 + ,10 + ,24 + ,25 + ,27 + ,4 + ,17 + ,10 + ,9 + ,22 + ,20 + ,13 + ,27 + ,17 + ,27 + ,4 + ,19 + ,8 + ,9 + ,19 + ,13 + ,14 + ,27 + ,14 + ,22 + ,4 + ,10 + ,15 + ,9 + ,24 + ,20 + ,8 + ,28 + ,11 + ,24 + ,4 + ,16 + ,14 + ,9 + ,26 + ,27 + ,23 + ,27 + ,27 + ,25 + ,4 + ,18 + ,10 + ,9 + ,21 + ,17 + ,11 + ,23 + ,20 + ,22 + ,8 + ,14 + ,14 + ,9 + ,13 + ,8 + ,9 + ,24 + ,22 + ,28 + ,4 + ,14 + ,14 + ,9 + ,26 + ,25 + ,24 + ,28 + ,22 + ,28 + ,4 + ,17 + ,11 + ,9 + ,20 + ,26 + ,5 + ,27 + ,21 + ,27 + ,4 + ,14 + ,10 + ,9 + ,22 + ,13 + ,15 + ,25 + ,23 + ,25 + ,8 + ,16 + ,13 + ,9 + ,14 + ,19 + ,5 + ,19 + ,17 + ,16 + ,4 + ,18 + ,7 + ,9 + ,21 + ,15 + ,19 + ,24 + ,24 + ,28 + ,7 + ,11 + ,14 + ,9 + ,7 + ,5 + ,6 + ,20 + ,14 + ,21 + ,4 + ,14 + ,12 + ,9 + ,23 + ,16 + ,13 + ,28 + ,17 + ,24 + ,4 + ,12 + ,14 + ,9 + ,17 + ,14 + ,11 + ,26 + ,23 + ,27 + ,5 + ,17 + ,11 + ,9 + ,25 + ,24 + ,17 + ,23 + ,24 + ,14 + ,4 + ,9 + ,9 + ,9 + ,25 + ,24 + ,17 + ,23 + ,24 + ,14 + ,4 + ,16 + ,11 + ,9 + ,19 + ,9 + ,5 + ,20 + ,8 + ,27 + ,4 + ,14 + ,15 + ,9 + ,20 + ,19 + ,9 + ,11 + ,22 + ,20 + ,4 + ,15 + ,14 + ,9 + ,23 + ,19 + ,15 + ,24 + ,23 + ,21 + ,4 + ,11 + ,13 + ,9 + ,22 + ,25 + ,17 + ,25 + ,25 + ,22 + ,4 + ,16 + ,9 + ,9 + ,22 + ,19 + ,17 + ,23 + ,21 + ,21 + ,4 + ,13 + ,15 + ,9 + ,21 + ,18 + ,20 + ,18 + ,24 + ,12 + ,15 + ,17 + ,10 + ,9 + ,15 + ,15 + ,12 + ,20 + ,15 + ,20 + ,10 + ,15 + ,11 + ,9 + ,20 + ,12 + ,7 + ,20 + ,22 + ,24 + ,4 + ,14 + ,13 + ,9 + ,22 + ,21 + ,16 + ,24 + ,21 + ,19 + ,8 + ,16 + ,8 + ,9 + ,18 + ,12 + ,7 + ,23 + ,25 + ,28 + ,4 + ,9 + ,20 + ,9 + ,20 + ,15 + ,14 + ,25 + ,16 + ,23 + ,4 + ,15 + ,12 + ,9 + ,28 + ,28 + ,24 + ,28 + ,28 + ,27 + ,4 + ,17 + ,10 + ,9 + ,22 + ,25 + ,15 + ,26 + ,23 + ,22 + ,4 + ,13 + ,10 + ,9 + ,18 + ,19 + ,15 + ,26 + ,21 + ,27 + ,7 + ,15 + ,9 + ,9 + ,23 + ,20 + ,10 + ,23 + ,21 + ,26 + ,4 + ,16 + ,14 + ,9 + ,20 + ,24 + ,14 + ,22 + ,26 + ,22 + ,6 + ,16 + ,8 + ,9 + ,25 + ,26 + ,18 + ,24 + ,22 + ,21 + ,5 + ,12 + ,14 + ,9 + ,26 + ,25 + ,12 + ,21 + ,21 + ,19 + ,4 + ,12 + ,11 + ,9 + ,15 + ,12 + ,9 + ,20 + ,18 + ,24 + ,16 + ,11 + ,13 + ,9 + ,17 + ,12 + ,9 + ,22 + ,12 + ,19 + ,5 + ,15 + ,9 + ,9 + ,23 + ,15 + ,8 + ,20 + ,25 + ,26 + ,12 + ,15 + ,11 + ,9 + ,21 + ,17 + ,18 + ,25 + ,17 + ,22 + ,6 + ,17 + ,15 + ,9 + ,13 + ,14 + ,10 + ,20 + ,24 + ,28 + ,9 + ,13 + ,11 + ,9 + ,18 + ,16 + ,17 + ,22 + ,15 + ,21 + ,9 + ,16 + ,10 + ,9 + ,19 + ,11 + ,14 + ,23 + ,13 + ,23 + ,4 + ,14 + ,14 + ,9 + ,22 + ,20 + ,16 + ,25 + ,26 + ,28 + ,5 + ,11 + ,18 + ,9 + ,16 + ,11 + ,10 + ,23 + ,16 + ,10 + ,4 + ,12 + ,14 + ,9 + ,24 + ,22 + ,19 + ,23 + ,24 + ,24 + ,4 + ,12 + ,11 + ,9 + ,18 + ,20 + ,10 + ,22 + ,21 + ,21 + ,5 + ,15 + ,12 + ,9 + ,20 + ,19 + ,14 + ,24 + ,20 + ,21 + ,4 + ,16 + ,13 + ,9 + ,24 + ,17 + ,10 + ,25 + ,14 + ,24 + ,4 + ,15 + ,9 + ,9 + ,14 + ,21 + ,4 + ,21 + ,25 + ,24 + ,4 + ,12 + ,10 + ,9 + ,22 + ,23 + ,19 + ,12 + ,25 + ,25 + ,5 + ,12 + ,15 + ,9 + ,24 + ,18 + ,9 + ,17 + ,20 + ,25 + ,4 + ,8 + ,20 + ,9 + ,18 + ,17 + ,12 + ,20 + ,22 + ,23 + ,6 + ,13 + ,12 + ,9 + ,21 + ,27 + ,16 + ,23 + ,20 + ,21 + ,4 + ,11 + ,12 + ,9 + ,23 + ,25 + ,11 + ,23 + ,26 + ,16 + ,4 + ,14 + ,14 + ,9 + ,17 + ,19 + ,18 + ,20 + ,18 + ,17 + ,18 + ,15 + ,13 + ,10 + ,22 + ,22 + ,11 + ,28 + ,22 + ,25 + ,4 + ,10 + ,11 + ,10 + ,24 + ,24 + ,24 + ,24 + ,24 + ,24 + ,6 + ,11 + ,17 + ,10 + ,21 + ,20 + ,17 + ,24 + ,17 + ,23 + ,4 + ,12 + ,12 + ,10 + ,22 + ,19 + ,18 + ,24 + ,24 + ,25 + ,4 + ,15 + ,13 + ,10 + ,16 + ,11 + ,9 + ,24 + ,20 + ,23 + ,5 + ,15 + ,14 + ,10 + ,21 + ,22 + ,19 + ,28 + ,19 + ,28 + ,4 + ,14 + ,13 + ,10 + ,23 + ,22 + ,18 + ,25 + ,20 + ,26 + ,4 + ,16 + ,15 + ,10 + ,22 + ,16 + ,12 + ,21 + ,15 + ,22 + ,5 + ,15 + ,13 + ,10 + ,24 + ,20 + ,23 + ,25 + ,23 + ,19 + ,10 + ,15 + ,10 + ,10 + ,24 + ,24 + ,22 + ,25 + ,26 + ,26 + ,5 + ,13 + ,11 + ,10 + ,16 + ,16 + ,14 + ,18 + ,22 + ,18 + ,8 + ,12 + ,19 + ,10 + ,16 + ,16 + ,14 + ,17 + ,20 + ,18 + ,8 + ,17 + ,13 + ,10 + ,21 + ,22 + ,16 + ,26 + ,24 + ,25 + ,5 + ,13 + ,17 + ,10 + ,26 + ,24 + ,23 + ,28 + ,26 + ,27 + ,4 + ,15 + ,13 + ,10 + ,15 + ,16 + ,7 + ,21 + ,21 + ,12 + ,4 + ,13 + ,9 + ,10 + ,25 + ,27 + ,10 + ,27 + ,25 + ,15 + ,4 + ,15 + ,11 + ,10 + ,18 + ,11 + ,12 + ,22 + ,13 + ,21 + ,5 + ,16 + ,10 + ,10 + ,23 + ,21 + ,12 + ,21 + ,20 + ,23 + ,4 + ,15 + ,9 + ,10 + ,20 + ,20 + ,12 + ,25 + ,22 + ,22 + ,4 + ,16 + ,12 + ,10 + ,17 + ,20 + ,17 + ,22 + ,23 + ,21 + ,8 + ,15 + ,12 + ,10 + ,25 + ,27 + ,21 + ,23 + ,28 + ,24 + ,4 + ,14 + ,13 + ,10 + ,24 + ,20 + ,16 + ,26 + ,22 + ,27 + ,5 + ,15 + ,13 + ,10 + ,17 + ,12 + ,11 + ,19 + ,20 + ,22 + ,14 + ,14 + ,12 + ,10 + ,19 + ,8 + ,14 + ,25 + ,6 + ,28 + ,8 + ,13 + ,15 + ,10 + ,20 + ,21 + ,13 + ,21 + ,21 + ,26 + ,8 + ,7 + ,22 + ,10 + ,15 + ,18 + ,9 + ,13 + ,20 + ,10 + ,4 + ,17 + ,13 + ,10 + ,27 + ,24 + ,19 + ,24 + ,18 + ,19 + ,4 + ,13 + ,15 + ,10 + ,22 + ,16 + ,13 + ,25 + ,23 + ,22 + ,6 + ,15 + ,13 + ,10 + ,23 + ,18 + ,19 + ,26 + ,20 + ,21 + ,4 + ,14 + ,15 + ,10 + ,16 + ,20 + ,13 + ,25 + ,24 + ,24 + ,7 + ,13 + ,10 + ,10 + ,19 + ,20 + ,13 + ,25 + ,22 + ,25 + ,7 + ,16 + ,11 + ,10 + ,25 + ,19 + ,13 + ,22 + ,21 + ,21 + ,4 + ,12 + ,16 + ,10 + ,19 + ,17 + ,14 + ,21 + ,18 + ,20 + ,6 + ,14 + ,11 + ,10 + ,19 + ,16 + ,12 + ,23 + ,21 + ,21 + ,4 + ,17 + ,11 + ,10 + ,26 + ,26 + ,22 + ,25 + ,23 + ,24 + ,7 + ,15 + ,10 + ,10 + ,21 + ,15 + ,11 + ,24 + ,23 + ,23 + ,4 + ,17 + ,10 + ,10 + ,20 + ,22 + ,5 + ,21 + ,15 + ,18 + ,4 + ,12 + ,16 + ,10 + ,24 + ,17 + ,18 + ,21 + ,21 + ,24 + ,8 + ,16 + ,12 + ,10 + ,22 + ,23 + ,19 + ,25 + ,24 + ,24 + ,4 + ,11 + ,11 + ,10 + ,20 + ,21 + ,14 + ,22 + ,23 + ,19 + ,4 + ,15 + ,16 + ,10 + ,18 + ,19 + ,15 + ,20 + ,21 + ,20 + ,10 + ,9 + ,19 + ,10 + ,18 + ,14 + ,12 + ,20 + ,21 + ,18 + ,8 + ,16 + ,11 + ,10 + ,24 + ,17 + ,19 + ,23 + ,20 + ,20 + ,6 + ,15 + ,16 + ,10 + ,24 + ,12 + ,15 + ,28 + ,11 + ,27 + ,4 + ,10 + ,15 + ,10 + ,22 + ,24 + ,17 + ,23 + ,22 + ,23 + ,4 + ,10 + ,24 + ,10 + ,23 + ,18 + ,8 + ,28 + ,27 + ,26 + ,4 + ,15 + ,14 + ,10 + ,22 + ,20 + ,10 + ,24 + ,25 + ,23 + ,5 + ,11 + ,15 + ,10 + ,20 + ,16 + ,12 + ,18 + ,18 + ,17 + ,4 + ,13 + ,11 + ,10 + ,18 + ,20 + ,12 + ,20 + ,20 + ,21 + ,6 + ,14 + ,15 + ,10 + ,25 + ,22 + ,20 + ,28 + ,24 + ,25 + ,4 + ,18 + ,12 + ,10 + ,18 + ,12 + ,12 + ,21 + ,10 + ,23 + ,5 + ,16 + ,10 + ,10 + ,16 + ,16 + ,12 + ,21 + ,27 + ,27 + ,7 + ,14 + ,14 + ,10 + ,20 + ,17 + ,14 + ,25 + ,21 + ,24 + ,8 + ,14 + ,13 + ,10 + ,19 + ,22 + ,6 + ,19 + ,21 + ,20 + ,5 + ,14 + ,9 + ,10 + ,15 + ,12 + ,10 + ,18 + ,18 + ,27 + ,8 + ,14 + ,15 + ,10 + ,19 + ,14 + ,18 + ,21 + ,15 + ,21 + ,10 + ,12 + ,15 + ,10 + ,19 + ,23 + ,18 + ,22 + ,24 + ,24 + ,8 + ,14 + ,14 + ,10 + ,16 + ,15 + ,7 + ,24 + ,22 + ,21 + ,5 + ,15 + ,11 + ,10 + ,17 + ,17 + ,18 + ,15 + ,14 + ,15 + ,12 + ,15 + ,8 + ,10 + ,28 + ,28 + ,9 + ,28 + ,28 + ,25 + ,4 + ,15 + ,11 + ,10 + ,23 + ,20 + ,17 + ,26 + ,18 + ,25 + ,5 + ,13 + ,11 + ,10 + ,25 + ,23 + ,22 + ,23 + ,26 + ,22 + ,4 + ,17 + ,8 + ,10 + ,20 + ,13 + ,11 + ,26 + ,17 + ,24 + ,6 + ,17 + ,10 + ,10 + ,17 + ,18 + ,15 + ,20 + ,19 + ,21 + ,4 + ,19 + ,11 + ,10 + ,23 + ,23 + ,17 + ,22 + ,22 + ,22 + ,4 + ,15 + ,13 + ,10 + ,16 + ,19 + ,15 + ,20 + ,18 + ,23 + ,7 + ,13 + ,11 + ,10 + ,23 + ,23 + ,22 + ,23 + ,24 + ,22 + ,7 + ,9 + ,20 + ,10 + ,11 + ,12 + ,9 + ,22 + ,15 + ,20 + ,10 + ,15 + ,10 + ,10 + ,18 + ,16 + ,13 + ,24 + ,18 + ,23 + ,4 + ,15 + ,15 + ,10 + ,24 + ,23 + ,20 + ,23 + ,26 + ,25 + ,5 + ,15 + ,12 + ,10 + ,23 + ,13 + ,14 + ,22 + ,11 + ,23 + ,8 + ,16 + ,14 + ,10 + ,21 + ,22 + ,14 + ,26 + ,26 + ,22 + ,11 + ,11 + ,23 + ,10 + ,16 + ,18 + ,12 + ,23 + ,21 + ,25 + ,7 + ,14 + ,14 + ,10 + ,24 + ,23 + ,20 + ,27 + ,23 + ,26 + ,4 + ,11 + ,16 + ,10 + ,23 + ,20 + ,20 + ,23 + ,23 + ,22 + ,8 + ,15 + ,11 + ,10 + ,18 + ,10 + ,8 + ,21 + ,15 + ,24 + ,6 + ,13 + ,12 + ,10 + ,20 + ,17 + ,17 + ,26 + ,22 + ,24 + ,7 + ,15 + ,10 + ,10 + ,9 + ,18 + ,9 + ,23 + ,26 + ,25 + ,5 + ,16 + ,14 + ,10 + ,24 + ,15 + ,18 + ,21 + ,16 + ,20 + ,4 + ,14 + ,12 + ,10 + ,25 + ,23 + ,22 + ,27 + ,20 + ,26 + ,8 + ,15 + ,12 + ,10 + ,20 + ,17 + ,10 + ,19 + ,18 + ,21 + ,4 + ,16 + ,11 + ,10 + ,21 + ,17 + ,13 + ,23 + ,22 + ,26 + ,8 + ,16 + ,12 + ,10 + ,25 + ,22 + ,15 + ,25 + ,16 + ,21 + ,6 + ,11 + ,13 + ,10 + ,22 + ,20 + ,18 + ,23 + ,19 + ,22 + ,4 + ,12 + ,11 + ,10 + ,21 + ,20 + ,18 + ,22 + ,20 + ,16 + ,9 + ,9 + ,19 + ,10 + ,21 + ,19 + ,12 + ,22 + ,19 + ,26 + ,5 + ,16 + ,12 + ,10 + ,22 + ,18 + ,12 + ,25 + ,23 + ,28 + ,6 + ,13 + ,17 + ,10 + ,27 + ,22 + ,20 + ,25 + ,24 + ,18 + ,4 + ,16 + ,9 + ,9 + ,24 + ,20 + ,12 + ,28 + ,25 + ,25 + ,4 + ,12 + ,12 + ,10 + ,24 + ,22 + ,16 + ,28 + ,21 + ,23 + ,4 + ,9 + ,19 + ,10 + ,21 + ,18 + ,16 + ,20 + ,21 + ,21 + ,5 + ,13 + ,18 + ,10 + ,18 + ,16 + ,18 + ,25 + ,23 + ,20 + ,6 + ,13 + ,15 + ,10 + ,16 + ,16 + ,16 + ,19 + ,27 + ,25 + ,16 + ,14 + ,14 + ,10 + ,22 + ,16 + ,13 + ,25 + ,23 + ,22 + ,6 + ,19 + ,11 + ,10 + ,20 + ,16 + ,17 + ,22 + ,18 + ,21 + ,6 + ,13 + ,9 + ,10 + ,18 + ,17 + ,13 + ,18 + ,16 + ,16 + ,4 + ,12 + ,18 + ,11 + ,20 + ,18 + ,17 + ,20 + ,16 + ,18 + ,4 + ,13 + ,16) + ,dim=c(10 + ,162) + ,dimnames=list(c('Month' + ,'I1' + ,'I2' + ,'I3' + ,'E1' + ,'E2' + ,'E3' + ,'A' + ,'Happiness' + ,'Depression ') + ,1:162)) > y <- array(NA,dim=c(10,162),dimnames=list(c('Month','I1','I2','I3','E1','E2','E3','A','Happiness','Depression '),1:162)) > for (i in 1:dim(x)[1]) + { + for (j in 1:dim(x)[2]) + { + y[i,j] <- as.numeric(x[i,j]) + } + } > par20 = '' > par19 = '' > par18 = '' > par17 = '' > par16 = '' > par15 = '' > par14 = '' > par13 = '' > par12 = '' > par11 = '' > par10 = '' > par9 = '' > par8 = '' > par7 = '' > par6 = '' > par5 = '' > par4 = '' > par3 = 'Linear Trend' > par2 = 'Do not include Seasonal Dummies' > par1 = '2' > library(lattice) > library(lmtest) Loading required package: zoo Attaching package: 'zoo' The following object(s) are masked from 'package:base': as.Date, 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 I1 Month I2 I3 E1 E2 E3 A Happiness Depression\r t 1 26 9 21 21 23 17 23 4 14 12 1 2 20 9 16 15 24 17 20 4 18 11 2 3 19 9 19 18 22 18 20 6 11 14 3 4 19 9 18 11 20 21 21 8 12 12 4 5 20 9 16 8 24 20 24 8 16 21 5 6 25 9 23 19 27 28 22 4 18 12 6 7 25 9 17 4 28 19 23 4 14 22 7 8 22 9 12 20 27 22 20 8 14 11 8 9 26 9 19 16 24 16 25 5 15 10 9 10 22 9 16 14 23 18 23 4 15 13 10 11 17 9 19 10 24 25 27 4 17 10 11 12 22 9 20 13 27 17 27 4 19 8 12 13 19 9 13 14 27 14 22 4 10 15 13 14 24 9 20 8 28 11 24 4 16 14 14 15 26 9 27 23 27 27 25 4 18 10 15 16 21 9 17 11 23 20 22 8 14 14 16 17 13 9 8 9 24 22 28 4 14 14 17 18 26 9 25 24 28 22 28 4 17 11 18 19 20 9 26 5 27 21 27 4 14 10 19 20 22 9 13 15 25 23 25 8 16 13 20 21 14 9 19 5 19 17 16 4 18 7 21 22 21 9 15 19 24 24 28 7 11 14 22 23 7 9 5 6 20 14 21 4 14 12 23 24 23 9 16 13 28 17 24 4 12 14 24 25 17 9 14 11 26 23 27 5 17 11 25 26 25 9 24 17 23 24 14 4 9 9 26 27 25 9 24 17 23 24 14 4 16 11 27 28 19 9 9 5 20 8 27 4 14 15 28 29 20 9 19 9 11 22 20 4 15 14 29 30 23 9 19 15 24 23 21 4 11 13 30 31 22 9 25 17 25 25 22 4 16 9 31 32 22 9 19 17 23 21 21 4 13 15 32 33 21 9 18 20 18 24 12 15 17 10 33 34 15 9 15 12 20 15 20 10 15 11 34 35 20 9 12 7 20 22 24 4 14 13 35 36 22 9 21 16 24 21 19 8 16 8 36 37 18 9 12 7 23 25 28 4 9 20 37 38 20 9 15 14 25 16 23 4 15 12 38 39 28 9 28 24 28 28 27 4 17 10 39 40 22 9 25 15 26 23 22 4 13 10 40 41 18 9 19 15 26 21 27 7 15 9 41 42 23 9 20 10 23 21 26 4 16 14 42 43 20 9 24 14 22 26 22 6 16 8 43 44 25 9 26 18 24 22 21 5 12 14 44 45 26 9 25 12 21 21 19 4 12 11 45 46 15 9 12 9 20 18 24 16 11 13 46 47 17 9 12 9 22 12 19 5 15 9 47 48 23 9 15 8 20 25 26 12 15 11 48 49 21 9 17 18 25 17 22 6 17 15 49 50 13 9 14 10 20 24 28 9 13 11 50 51 18 9 16 17 22 15 21 9 16 10 51 52 19 9 11 14 23 13 23 4 14 14 52 53 22 9 20 16 25 26 28 5 11 18 53 54 16 9 11 10 23 16 10 4 12 14 54 55 24 9 22 19 23 24 24 4 12 11 55 56 18 9 20 10 22 21 21 5 15 12 56 57 20 9 19 14 24 20 21 4 16 13 57 58 24 9 17 10 25 14 24 4 15 9 58 59 14 9 21 4 21 25 24 4 12 10 59 60 22 9 23 19 12 25 25 5 12 15 60 61 24 9 18 9 17 20 25 4 8 20 61 62 18 9 17 12 20 22 23 6 13 12 62 63 21 9 27 16 23 20 21 4 11 12 63 64 23 9 25 11 23 26 16 4 14 14 64 65 17 9 19 18 20 18 17 18 15 13 65 66 22 10 22 11 28 22 25 4 10 11 66 67 24 10 24 24 24 24 24 6 11 17 67 68 21 10 20 17 24 17 23 4 12 12 68 69 22 10 19 18 24 24 25 4 15 13 69 70 16 10 11 9 24 20 23 5 15 14 70 71 21 10 22 19 28 19 28 4 14 13 71 72 23 10 22 18 25 20 26 4 16 15 72 73 22 10 16 12 21 15 22 5 15 13 73 74 24 10 20 23 25 23 19 10 15 10 74 75 24 10 24 22 25 26 26 5 13 11 75 76 16 10 16 14 18 22 18 8 12 19 76 77 16 10 16 14 17 20 18 8 17 13 77 78 21 10 22 16 26 24 25 5 13 17 78 79 26 10 24 23 28 26 27 4 15 13 79 80 15 10 16 7 21 21 12 4 13 9 80 81 25 10 27 10 27 25 15 4 15 11 81 82 18 10 11 12 22 13 21 5 16 10 82 83 23 10 21 12 21 20 23 4 15 9 83 84 20 10 20 12 25 22 22 4 16 12 84 85 17 10 20 17 22 23 21 8 15 12 85 86 25 10 27 21 23 28 24 4 14 13 86 87 24 10 20 16 26 22 27 5 15 13 87 88 17 10 12 11 19 20 22 14 14 12 88 89 19 10 8 14 25 6 28 8 13 15 89 90 20 10 21 13 21 21 26 8 7 22 90 91 15 10 18 9 13 20 10 4 17 13 91 92 27 10 24 19 24 18 19 4 13 15 92 93 22 10 16 13 25 23 22 6 15 13 93 94 23 10 18 19 26 20 21 4 14 15 94 95 16 10 20 13 25 24 24 7 13 10 95 96 19 10 20 13 25 22 25 7 16 11 96 97 25 10 19 13 22 21 21 4 12 16 97 98 19 10 17 14 21 18 20 6 14 11 98 99 19 10 16 12 23 21 21 4 17 11 99 100 26 10 26 22 25 23 24 7 15 10 100 101 21 10 15 11 24 23 23 4 17 10 101 102 20 10 22 5 21 15 18 4 12 16 102 103 24 10 17 18 21 21 24 8 16 12 103 104 22 10 23 19 25 24 24 4 11 11 104 105 20 10 21 14 22 23 19 4 15 16 105 106 18 10 19 15 20 21 20 10 9 19 106 107 18 10 14 12 20 21 18 8 16 11 107 108 24 10 17 19 23 20 20 6 15 16 108 109 24 10 12 15 28 11 27 4 10 15 109 110 22 10 24 17 23 22 23 4 10 24 110 111 23 10 18 8 28 27 26 4 15 14 111 112 22 10 20 10 24 25 23 5 11 15 112 113 20 10 16 12 18 18 17 4 13 11 113 114 18 10 20 12 20 20 21 6 14 15 114 115 25 10 22 20 28 24 25 4 18 12 115 116 18 10 12 12 21 10 23 5 16 10 116 117 16 10 16 12 21 27 27 7 14 14 117 118 20 10 17 14 25 21 24 8 14 13 118 119 19 10 22 6 19 21 20 5 14 9 119 120 15 10 12 10 18 18 27 8 14 15 120 121 19 10 14 18 21 15 21 10 12 15 121 122 19 10 23 18 22 24 24 8 14 14 122 123 16 10 15 7 24 22 21 5 15 11 123 124 17 10 17 18 15 14 15 12 15 8 124 125 28 10 28 9 28 28 25 4 15 11 125 126 23 10 20 17 26 18 25 5 13 11 126 127 25 10 23 22 23 26 22 4 17 8 127 128 20 10 13 11 26 17 24 6 17 10 128 129 17 10 18 15 20 19 21 4 19 11 129 130 23 10 23 17 22 22 22 4 15 13 130 131 16 10 19 15 20 18 23 7 13 11 131 132 23 10 23 22 23 24 22 7 9 20 132 133 11 10 12 9 22 15 20 10 15 10 133 134 18 10 16 13 24 18 23 4 15 15 134 135 24 10 23 20 23 26 25 5 15 12 135 136 23 10 13 14 22 11 23 8 16 14 136 137 21 10 22 14 26 26 22 11 11 23 137 138 16 10 18 12 23 21 25 7 14 14 138 139 24 10 23 20 27 23 26 4 11 16 139 140 23 10 20 20 23 23 22 8 15 11 140 141 18 10 10 8 21 15 24 6 13 12 141 142 20 10 17 17 26 22 24 7 15 10 142 143 9 10 18 9 23 26 25 5 16 14 143 144 24 10 15 18 21 16 20 4 14 12 144 145 25 10 23 22 27 20 26 8 15 12 145 146 20 10 17 10 19 18 21 4 16 11 146 147 21 10 17 13 23 22 26 8 16 12 147 148 25 10 22 15 25 16 21 6 11 13 148 149 22 10 20 18 23 19 22 4 12 11 149 150 21 10 20 18 22 20 16 9 9 19 150 151 21 10 19 12 22 19 26 5 16 12 151 152 22 10 18 12 25 23 28 6 13 17 152 153 27 10 22 20 25 24 18 4 16 9 153 154 24 9 20 12 28 25 25 4 12 12 154 155 24 10 22 16 28 21 23 4 9 19 155 156 21 10 18 16 20 21 21 5 13 18 156 157 18 10 16 18 25 23 20 6 13 15 157 158 16 10 16 16 19 27 25 16 14 14 158 159 22 10 16 13 25 23 22 6 19 11 159 160 20 10 16 17 22 18 21 6 13 9 160 161 18 10 17 13 18 16 16 4 12 18 161 162 20 11 18 17 20 16 18 4 13 16 162 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) Month I2 I3 12.242614 -0.812022 0.366415 0.263119 E1 E2 E3 A 0.267207 -0.123305 0.022526 -0.215226 Happiness `Depression\\r` t 0.059722 0.127970 0.003644 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -9.781 -1.461 0.074 1.688 7.721 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 12.242614 6.737058 1.817 0.071168 . Month -0.812022 0.718578 -1.130 0.260251 I2 0.366415 0.063483 5.772 4.31e-08 *** I3 0.263119 0.050992 5.160 7.66e-07 *** E1 0.267207 0.075251 3.551 0.000512 *** E2 -0.123305 0.059075 -2.087 0.038544 * E3 0.022526 0.061702 0.365 0.715557 A -0.215226 0.084393 -2.550 0.011759 * Happiness 0.059722 0.102460 0.583 0.560843 `Depression\\r` 0.127970 0.076284 1.678 0.095505 . t 0.003644 0.007684 0.474 0.636045 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.498 on 151 degrees of freedom Multiple R-squared: 0.5625, Adjusted R-squared: 0.5335 F-statistic: 19.41 on 10 and 151 DF, p-value: < 2.2e-16 > 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.95013761 0.09972479 0.04986239 [2,] 0.90114705 0.19770591 0.09885295 [3,] 0.86202524 0.27594953 0.13797476 [4,] 0.79992422 0.40015157 0.20007578 [5,] 0.72768476 0.54463049 0.27231524 [6,] 0.65953465 0.68093070 0.34046535 [7,] 0.64743623 0.70512754 0.35256377 [8,] 0.58337771 0.83324458 0.41662229 [9,] 0.50486356 0.99027288 0.49513644 [10,] 0.58501340 0.82997320 0.41498660 [11,] 0.55865916 0.88268169 0.44134084 [12,] 0.48632384 0.97264769 0.51367616 [13,] 0.56036508 0.87926984 0.43963492 [14,] 0.49871524 0.99743048 0.50128476 [15,] 0.64692358 0.70615284 0.35307642 [16,] 0.65684049 0.68631902 0.34315951 [17,] 0.59746304 0.80507392 0.40253696 [18,] 0.59461780 0.81076440 0.40538220 [19,] 0.57658314 0.84683371 0.42341686 [20,] 0.55409831 0.89180338 0.44590169 [21,] 0.62369113 0.75261774 0.37630887 [22,] 0.75360070 0.49279860 0.24639930 [23,] 0.70537159 0.58925683 0.29462841 [24,] 0.65920572 0.68158856 0.34079428 [25,] 0.60747403 0.78505195 0.39252597 [26,] 0.55060939 0.89878122 0.44939061 [27,] 0.52670981 0.94658039 0.47329019 [28,] 0.53381482 0.93237035 0.46618518 [29,] 0.49921788 0.99843576 0.50078212 [30,] 0.45108866 0.90217732 0.54891134 [31,] 0.41836717 0.83673435 0.58163283 [32,] 0.47431195 0.94862390 0.52568805 [33,] 0.42055078 0.84110156 0.57944922 [34,] 0.37464204 0.74928409 0.62535796 [35,] 0.77792927 0.44414146 0.22207073 [36,] 0.77392323 0.45215354 0.22607677 [37,] 0.80087769 0.39824463 0.19912231 [38,] 0.78463780 0.43072439 0.21536220 [39,] 0.74823643 0.50352714 0.25176357 [40,] 0.72723513 0.54552974 0.27276487 [41,] 0.70024117 0.59951765 0.29975883 [42,] 0.66208543 0.67582913 0.33791457 [43,] 0.65022992 0.69954015 0.34977008 [44,] 0.62810561 0.74378878 0.37189439 [45,] 0.73086872 0.53826255 0.26913128 [46,] 0.78598342 0.42803316 0.21401658 [47,] 0.75512383 0.48975234 0.24487617 [48,] 0.83763542 0.32472917 0.16236458 [49,] 0.80647934 0.38704132 0.19352066 [50,] 0.85143228 0.29713544 0.14856772 [51,] 0.82251142 0.35497717 0.17748858 [52,] 0.84156048 0.31687904 0.15843952 [53,] 0.81047440 0.37905120 0.18952560 [54,] 0.79444988 0.41110024 0.20555012 [55,] 0.76870953 0.46258093 0.23129047 [56,] 0.73489875 0.53020249 0.26510125 [57,] 0.69692297 0.60615406 0.30307703 [58,] 0.74809709 0.50380581 0.25190291 [59,] 0.71555991 0.56888018 0.28444009 [60,] 0.74096779 0.51806441 0.25903221 [61,] 0.72933489 0.54133023 0.27066511 [62,] 0.69004225 0.61991551 0.30995775 [63,] 0.69466043 0.61067913 0.30533957 [64,] 0.66093448 0.67813103 0.33906552 [65,] 0.64799025 0.70401949 0.35200975 [66,] 0.61255490 0.77489021 0.38744510 [67,] 0.58845725 0.82308550 0.41154275 [68,] 0.57567176 0.84865647 0.42432824 [69,] 0.55208140 0.89583720 0.44791860 [70,] 0.57302290 0.85395421 0.42697710 [71,] 0.53929625 0.92140750 0.46070375 [72,] 0.59078521 0.81842959 0.40921479 [73,] 0.54393733 0.91212533 0.45606267 [74,] 0.52118119 0.95763763 0.47881881 [75,] 0.54081828 0.91836344 0.45918172 [76,] 0.50131061 0.99737878 0.49868939 [77,] 0.47416530 0.94833059 0.52583470 [78,] 0.44089130 0.88178260 0.55910870 [79,] 0.42259078 0.84518155 0.57740922 [80,] 0.42513525 0.85027051 0.57486475 [81,] 0.38444088 0.76888176 0.61555912 [82,] 0.47239933 0.94479866 0.52760067 [83,] 0.45490805 0.90981609 0.54509195 [84,] 0.55914304 0.88171393 0.44085696 [85,] 0.51415711 0.97168578 0.48584289 [86,] 0.47230702 0.94461404 0.52769298 [87,] 0.43069867 0.86139734 0.56930133 [88,] 0.42578568 0.85157137 0.57421432 [89,] 0.37820191 0.75640383 0.62179809 [90,] 0.47123463 0.94246925 0.52876537 [91,] 0.45443517 0.90887034 0.54556483 [92,] 0.42109768 0.84219537 0.57890232 [93,] 0.38718678 0.77437357 0.61281322 [94,] 0.35348013 0.70696026 0.64651987 [95,] 0.35975457 0.71950914 0.64024543 [96,] 0.34747343 0.69494686 0.65252657 [97,] 0.33222135 0.66444270 0.66777865 [98,] 0.36737837 0.73475675 0.63262163 [99,] 0.38051587 0.76103174 0.61948413 [100,] 0.40431764 0.80863528 0.59568236 [101,] 0.36603746 0.73207492 0.63396254 [102,] 0.31624876 0.63249752 0.68375124 [103,] 0.26977736 0.53955473 0.73022264 [104,] 0.24508243 0.49016487 0.75491757 [105,] 0.20915745 0.41831490 0.79084255 [106,] 0.18769555 0.37539109 0.81230445 [107,] 0.17847663 0.35695326 0.82152337 [108,] 0.15364926 0.30729851 0.84635074 [109,] 0.14660204 0.29320409 0.85339796 [110,] 0.12219695 0.24439390 0.87780305 [111,] 0.09535778 0.19071556 0.90464222 [112,] 0.28668984 0.57337967 0.71331016 [113,] 0.23760607 0.47521214 0.76239393 [114,] 0.23276075 0.46552150 0.76723925 [115,] 0.22756306 0.45512611 0.77243694 [116,] 0.24594470 0.49188939 0.75405530 [117,] 0.20959030 0.41918059 0.79040970 [118,] 0.22450795 0.44901590 0.77549205 [119,] 0.17941763 0.35883526 0.82058237 [120,] 0.27647955 0.55295911 0.72352045 [121,] 0.26617720 0.53235440 0.73382280 [122,] 0.25918704 0.51837408 0.74081296 [123,] 0.23386237 0.46772474 0.76613763 [124,] 0.23689281 0.47378563 0.76310719 [125,] 0.22400011 0.44800021 0.77599989 [126,] 0.17338821 0.34677643 0.82661179 [127,] 0.14394279 0.28788557 0.85605721 [128,] 0.12269134 0.24538268 0.87730866 [129,] 0.08350830 0.16701659 0.91649170 [130,] 0.88390279 0.23219441 0.11609721 [131,] 0.97600469 0.04799063 0.02399531 [132,] 0.95542354 0.08915292 0.04457646 [133,] 0.90809621 0.18380758 0.09190379 [134,] 0.82613239 0.34773523 0.17386761 [135,] 0.70182461 0.59635079 0.29817539 > postscript(file="/var/fisher/rcomp/tmp/1jwfg1353336441.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/fisher/rcomp/tmp/2r6a61353336441.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/fisher/rcomp/tmp/30eoi1353336441.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/fisher/rcomp/tmp/4c5fs1353336441.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/fisher/rcomp/tmp/5fgeu1353336441.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 = 162 Frequency = 1 1 2 3 4 5 6 1.76319266 -1.14020247 -2.91013777 0.80294171 0.67115768 0.60955075 7 8 9 10 11 12 4.31089726 1.90269497 3.75835001 1.33992541 -2.94019730 -0.75117929 13 14 15 16 17 18 -2.06861207 1.02901744 -0.87632552 1.80279753 -3.39352775 -1.43710530 19 20 21 22 23 24 -2.33433268 2.97785543 -3.73946387 0.46360552 -7.03077353 1.12136311 25 26 27 28 29 30 -2.11601934 2.37372593 1.69608991 2.48956656 3.12635888 1.53794573 31 32 33 34 35 36 -2.02028054 -0.35036725 2.90018004 -2.80828924 3.88836729 0.52072062 37 38 39 40 41 42 0.76208749 -1.04873540 0.27745917 -1.98945646 -3.49964720 1.92478875 43 44 45 46 47 48 -1.42488386 0.03689794 3.87043863 0.59070162 -0.66904357 7.72152064 49 50 51 52 53 54 -1.80119430 -3.14018175 -2.25616115 -0.66580509 -0.65499435 -1.83841161 55 56 57 58 59 60 0.81428167 -2.21549556 -1.96583764 3.31281172 -4.10139820 1.17304758 61 62 63 64 65 66 5.06392584 -0.71701518 -3.75147531 0.71066638 -2.06225965 0.20545143 67 68 69 70 71 72 -1.01070112 -1.39778016 0.21281961 -0.85233876 -3.85004371 -0.99597292 73 74 75 76 77 78 2.85088698 1.93250043 -0.14611033 -1.87439816 -1.38823390 -2.10460504 79 80 81 82 83 84 0.16143941 -1.47782821 2.14561766 0.48306852 2.87302720 -1.00752358 85 86 87 88 89 90 -3.45868741 0.27287226 1.69620610 2.80067523 0.39312076 -0.68480544 91 92 93 94 95 96 -1.46834230 2.29265138 2.64773378 0.09127787 -4.02838348 -1.60829915 97 98 99 100 101 102 4.47625380 -0.18700258 -0.09463369 1.14408326 2.58993412 0.05870019 103 104 105 106 107 108 4.20514887 -1.39334218 -1.43634754 -1.43922820 1.39887234 2.47358872 109 110 111 112 113 114 2.74716101 -2.54893918 3.20798674 2.16121304 2.14946710 -1.83889778 115 116 117 118 119 120 0.29970424 -0.15499246 -1.58020173 0.12561772 0.95440237 -0.82010237 121 122 123 124 125 126 -0.14801363 -3.09636056 -1.30930165 -0.49601944 4.75944454 0.21820041 127 128 129 130 131 132 1.58515208 1.35806675 -3.29056525 0.14339783 -3.82861832 -1.09186541 133 134 135 136 137 138 -4.87482797 -2.55989259 0.83745127 3.86937572 -0.83617444 -3.61874044 139 140 141 142 143 144 -1.12661124 1.38979030 2.27167441 -0.78612719 -9.78096996 3.52071098 145 146 147 148 149 150 0.08926859 1.65257188 1.90426348 2.12087994 -0.29172177 -0.53816085 151 152 153 154 155 156 0.67159199 1.43545149 3.62390503 1.66500079 -0.47672095 0.27231314 157 158 159 160 161 162 -2.99250033 -0.26557098 2.42430573 0.19007667 -1.71511498 -0.70887752 > postscript(file="/var/fisher/rcomp/tmp/6xv8t1353336441.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 = 162 Frequency = 1 lag(myerror, k = 1) myerror 0 1.76319266 NA 1 -1.14020247 1.76319266 2 -2.91013777 -1.14020247 3 0.80294171 -2.91013777 4 0.67115768 0.80294171 5 0.60955075 0.67115768 6 4.31089726 0.60955075 7 1.90269497 4.31089726 8 3.75835001 1.90269497 9 1.33992541 3.75835001 10 -2.94019730 1.33992541 11 -0.75117929 -2.94019730 12 -2.06861207 -0.75117929 13 1.02901744 -2.06861207 14 -0.87632552 1.02901744 15 1.80279753 -0.87632552 16 -3.39352775 1.80279753 17 -1.43710530 -3.39352775 18 -2.33433268 -1.43710530 19 2.97785543 -2.33433268 20 -3.73946387 2.97785543 21 0.46360552 -3.73946387 22 -7.03077353 0.46360552 23 1.12136311 -7.03077353 24 -2.11601934 1.12136311 25 2.37372593 -2.11601934 26 1.69608991 2.37372593 27 2.48956656 1.69608991 28 3.12635888 2.48956656 29 1.53794573 3.12635888 30 -2.02028054 1.53794573 31 -0.35036725 -2.02028054 32 2.90018004 -0.35036725 33 -2.80828924 2.90018004 34 3.88836729 -2.80828924 35 0.52072062 3.88836729 36 0.76208749 0.52072062 37 -1.04873540 0.76208749 38 0.27745917 -1.04873540 39 -1.98945646 0.27745917 40 -3.49964720 -1.98945646 41 1.92478875 -3.49964720 42 -1.42488386 1.92478875 43 0.03689794 -1.42488386 44 3.87043863 0.03689794 45 0.59070162 3.87043863 46 -0.66904357 0.59070162 47 7.72152064 -0.66904357 48 -1.80119430 7.72152064 49 -3.14018175 -1.80119430 50 -2.25616115 -3.14018175 51 -0.66580509 -2.25616115 52 -0.65499435 -0.66580509 53 -1.83841161 -0.65499435 54 0.81428167 -1.83841161 55 -2.21549556 0.81428167 56 -1.96583764 -2.21549556 57 3.31281172 -1.96583764 58 -4.10139820 3.31281172 59 1.17304758 -4.10139820 60 5.06392584 1.17304758 61 -0.71701518 5.06392584 62 -3.75147531 -0.71701518 63 0.71066638 -3.75147531 64 -2.06225965 0.71066638 65 0.20545143 -2.06225965 66 -1.01070112 0.20545143 67 -1.39778016 -1.01070112 68 0.21281961 -1.39778016 69 -0.85233876 0.21281961 70 -3.85004371 -0.85233876 71 -0.99597292 -3.85004371 72 2.85088698 -0.99597292 73 1.93250043 2.85088698 74 -0.14611033 1.93250043 75 -1.87439816 -0.14611033 76 -1.38823390 -1.87439816 77 -2.10460504 -1.38823390 78 0.16143941 -2.10460504 79 -1.47782821 0.16143941 80 2.14561766 -1.47782821 81 0.48306852 2.14561766 82 2.87302720 0.48306852 83 -1.00752358 2.87302720 84 -3.45868741 -1.00752358 85 0.27287226 -3.45868741 86 1.69620610 0.27287226 87 2.80067523 1.69620610 88 0.39312076 2.80067523 89 -0.68480544 0.39312076 90 -1.46834230 -0.68480544 91 2.29265138 -1.46834230 92 2.64773378 2.29265138 93 0.09127787 2.64773378 94 -4.02838348 0.09127787 95 -1.60829915 -4.02838348 96 4.47625380 -1.60829915 97 -0.18700258 4.47625380 98 -0.09463369 -0.18700258 99 1.14408326 -0.09463369 100 2.58993412 1.14408326 101 0.05870019 2.58993412 102 4.20514887 0.05870019 103 -1.39334218 4.20514887 104 -1.43634754 -1.39334218 105 -1.43922820 -1.43634754 106 1.39887234 -1.43922820 107 2.47358872 1.39887234 108 2.74716101 2.47358872 109 -2.54893918 2.74716101 110 3.20798674 -2.54893918 111 2.16121304 3.20798674 112 2.14946710 2.16121304 113 -1.83889778 2.14946710 114 0.29970424 -1.83889778 115 -0.15499246 0.29970424 116 -1.58020173 -0.15499246 117 0.12561772 -1.58020173 118 0.95440237 0.12561772 119 -0.82010237 0.95440237 120 -0.14801363 -0.82010237 121 -3.09636056 -0.14801363 122 -1.30930165 -3.09636056 123 -0.49601944 -1.30930165 124 4.75944454 -0.49601944 125 0.21820041 4.75944454 126 1.58515208 0.21820041 127 1.35806675 1.58515208 128 -3.29056525 1.35806675 129 0.14339783 -3.29056525 130 -3.82861832 0.14339783 131 -1.09186541 -3.82861832 132 -4.87482797 -1.09186541 133 -2.55989259 -4.87482797 134 0.83745127 -2.55989259 135 3.86937572 0.83745127 136 -0.83617444 3.86937572 137 -3.61874044 -0.83617444 138 -1.12661124 -3.61874044 139 1.38979030 -1.12661124 140 2.27167441 1.38979030 141 -0.78612719 2.27167441 142 -9.78096996 -0.78612719 143 3.52071098 -9.78096996 144 0.08926859 3.52071098 145 1.65257188 0.08926859 146 1.90426348 1.65257188 147 2.12087994 1.90426348 148 -0.29172177 2.12087994 149 -0.53816085 -0.29172177 150 0.67159199 -0.53816085 151 1.43545149 0.67159199 152 3.62390503 1.43545149 153 1.66500079 3.62390503 154 -0.47672095 1.66500079 155 0.27231314 -0.47672095 156 -2.99250033 0.27231314 157 -0.26557098 -2.99250033 158 2.42430573 -0.26557098 159 0.19007667 2.42430573 160 -1.71511498 0.19007667 161 -0.70887752 -1.71511498 162 NA -0.70887752 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -1.14020247 1.76319266 [2,] -2.91013777 -1.14020247 [3,] 0.80294171 -2.91013777 [4,] 0.67115768 0.80294171 [5,] 0.60955075 0.67115768 [6,] 4.31089726 0.60955075 [7,] 1.90269497 4.31089726 [8,] 3.75835001 1.90269497 [9,] 1.33992541 3.75835001 [10,] -2.94019730 1.33992541 [11,] -0.75117929 -2.94019730 [12,] -2.06861207 -0.75117929 [13,] 1.02901744 -2.06861207 [14,] -0.87632552 1.02901744 [15,] 1.80279753 -0.87632552 [16,] -3.39352775 1.80279753 [17,] -1.43710530 -3.39352775 [18,] -2.33433268 -1.43710530 [19,] 2.97785543 -2.33433268 [20,] -3.73946387 2.97785543 [21,] 0.46360552 -3.73946387 [22,] -7.03077353 0.46360552 [23,] 1.12136311 -7.03077353 [24,] -2.11601934 1.12136311 [25,] 2.37372593 -2.11601934 [26,] 1.69608991 2.37372593 [27,] 2.48956656 1.69608991 [28,] 3.12635888 2.48956656 [29,] 1.53794573 3.12635888 [30,] -2.02028054 1.53794573 [31,] -0.35036725 -2.02028054 [32,] 2.90018004 -0.35036725 [33,] -2.80828924 2.90018004 [34,] 3.88836729 -2.80828924 [35,] 0.52072062 3.88836729 [36,] 0.76208749 0.52072062 [37,] -1.04873540 0.76208749 [38,] 0.27745917 -1.04873540 [39,] -1.98945646 0.27745917 [40,] -3.49964720 -1.98945646 [41,] 1.92478875 -3.49964720 [42,] -1.42488386 1.92478875 [43,] 0.03689794 -1.42488386 [44,] 3.87043863 0.03689794 [45,] 0.59070162 3.87043863 [46,] -0.66904357 0.59070162 [47,] 7.72152064 -0.66904357 [48,] -1.80119430 7.72152064 [49,] -3.14018175 -1.80119430 [50,] -2.25616115 -3.14018175 [51,] -0.66580509 -2.25616115 [52,] -0.65499435 -0.66580509 [53,] -1.83841161 -0.65499435 [54,] 0.81428167 -1.83841161 [55,] -2.21549556 0.81428167 [56,] -1.96583764 -2.21549556 [57,] 3.31281172 -1.96583764 [58,] -4.10139820 3.31281172 [59,] 1.17304758 -4.10139820 [60,] 5.06392584 1.17304758 [61,] -0.71701518 5.06392584 [62,] -3.75147531 -0.71701518 [63,] 0.71066638 -3.75147531 [64,] -2.06225965 0.71066638 [65,] 0.20545143 -2.06225965 [66,] -1.01070112 0.20545143 [67,] -1.39778016 -1.01070112 [68,] 0.21281961 -1.39778016 [69,] -0.85233876 0.21281961 [70,] -3.85004371 -0.85233876 [71,] -0.99597292 -3.85004371 [72,] 2.85088698 -0.99597292 [73,] 1.93250043 2.85088698 [74,] -0.14611033 1.93250043 [75,] -1.87439816 -0.14611033 [76,] -1.38823390 -1.87439816 [77,] -2.10460504 -1.38823390 [78,] 0.16143941 -2.10460504 [79,] -1.47782821 0.16143941 [80,] 2.14561766 -1.47782821 [81,] 0.48306852 2.14561766 [82,] 2.87302720 0.48306852 [83,] -1.00752358 2.87302720 [84,] -3.45868741 -1.00752358 [85,] 0.27287226 -3.45868741 [86,] 1.69620610 0.27287226 [87,] 2.80067523 1.69620610 [88,] 0.39312076 2.80067523 [89,] -0.68480544 0.39312076 [90,] -1.46834230 -0.68480544 [91,] 2.29265138 -1.46834230 [92,] 2.64773378 2.29265138 [93,] 0.09127787 2.64773378 [94,] -4.02838348 0.09127787 [95,] -1.60829915 -4.02838348 [96,] 4.47625380 -1.60829915 [97,] -0.18700258 4.47625380 [98,] -0.09463369 -0.18700258 [99,] 1.14408326 -0.09463369 [100,] 2.58993412 1.14408326 [101,] 0.05870019 2.58993412 [102,] 4.20514887 0.05870019 [103,] -1.39334218 4.20514887 [104,] -1.43634754 -1.39334218 [105,] -1.43922820 -1.43634754 [106,] 1.39887234 -1.43922820 [107,] 2.47358872 1.39887234 [108,] 2.74716101 2.47358872 [109,] -2.54893918 2.74716101 [110,] 3.20798674 -2.54893918 [111,] 2.16121304 3.20798674 [112,] 2.14946710 2.16121304 [113,] -1.83889778 2.14946710 [114,] 0.29970424 -1.83889778 [115,] -0.15499246 0.29970424 [116,] -1.58020173 -0.15499246 [117,] 0.12561772 -1.58020173 [118,] 0.95440237 0.12561772 [119,] -0.82010237 0.95440237 [120,] -0.14801363 -0.82010237 [121,] -3.09636056 -0.14801363 [122,] -1.30930165 -3.09636056 [123,] -0.49601944 -1.30930165 [124,] 4.75944454 -0.49601944 [125,] 0.21820041 4.75944454 [126,] 1.58515208 0.21820041 [127,] 1.35806675 1.58515208 [128,] -3.29056525 1.35806675 [129,] 0.14339783 -3.29056525 [130,] -3.82861832 0.14339783 [131,] -1.09186541 -3.82861832 [132,] -4.87482797 -1.09186541 [133,] -2.55989259 -4.87482797 [134,] 0.83745127 -2.55989259 [135,] 3.86937572 0.83745127 [136,] -0.83617444 3.86937572 [137,] -3.61874044 -0.83617444 [138,] -1.12661124 -3.61874044 [139,] 1.38979030 -1.12661124 [140,] 2.27167441 1.38979030 [141,] -0.78612719 2.27167441 [142,] -9.78096996 -0.78612719 [143,] 3.52071098 -9.78096996 [144,] 0.08926859 3.52071098 [145,] 1.65257188 0.08926859 [146,] 1.90426348 1.65257188 [147,] 2.12087994 1.90426348 [148,] -0.29172177 2.12087994 [149,] -0.53816085 -0.29172177 [150,] 0.67159199 -0.53816085 [151,] 1.43545149 0.67159199 [152,] 3.62390503 1.43545149 [153,] 1.66500079 3.62390503 [154,] -0.47672095 1.66500079 [155,] 0.27231314 -0.47672095 [156,] -2.99250033 0.27231314 [157,] -0.26557098 -2.99250033 [158,] 2.42430573 -0.26557098 [159,] 0.19007667 2.42430573 [160,] -1.71511498 0.19007667 [161,] -0.70887752 -1.71511498 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -1.14020247 1.76319266 2 -2.91013777 -1.14020247 3 0.80294171 -2.91013777 4 0.67115768 0.80294171 5 0.60955075 0.67115768 6 4.31089726 0.60955075 7 1.90269497 4.31089726 8 3.75835001 1.90269497 9 1.33992541 3.75835001 10 -2.94019730 1.33992541 11 -0.75117929 -2.94019730 12 -2.06861207 -0.75117929 13 1.02901744 -2.06861207 14 -0.87632552 1.02901744 15 1.80279753 -0.87632552 16 -3.39352775 1.80279753 17 -1.43710530 -3.39352775 18 -2.33433268 -1.43710530 19 2.97785543 -2.33433268 20 -3.73946387 2.97785543 21 0.46360552 -3.73946387 22 -7.03077353 0.46360552 23 1.12136311 -7.03077353 24 -2.11601934 1.12136311 25 2.37372593 -2.11601934 26 1.69608991 2.37372593 27 2.48956656 1.69608991 28 3.12635888 2.48956656 29 1.53794573 3.12635888 30 -2.02028054 1.53794573 31 -0.35036725 -2.02028054 32 2.90018004 -0.35036725 33 -2.80828924 2.90018004 34 3.88836729 -2.80828924 35 0.52072062 3.88836729 36 0.76208749 0.52072062 37 -1.04873540 0.76208749 38 0.27745917 -1.04873540 39 -1.98945646 0.27745917 40 -3.49964720 -1.98945646 41 1.92478875 -3.49964720 42 -1.42488386 1.92478875 43 0.03689794 -1.42488386 44 3.87043863 0.03689794 45 0.59070162 3.87043863 46 -0.66904357 0.59070162 47 7.72152064 -0.66904357 48 -1.80119430 7.72152064 49 -3.14018175 -1.80119430 50 -2.25616115 -3.14018175 51 -0.66580509 -2.25616115 52 -0.65499435 -0.66580509 53 -1.83841161 -0.65499435 54 0.81428167 -1.83841161 55 -2.21549556 0.81428167 56 -1.96583764 -2.21549556 57 3.31281172 -1.96583764 58 -4.10139820 3.31281172 59 1.17304758 -4.10139820 60 5.06392584 1.17304758 61 -0.71701518 5.06392584 62 -3.75147531 -0.71701518 63 0.71066638 -3.75147531 64 -2.06225965 0.71066638 65 0.20545143 -2.06225965 66 -1.01070112 0.20545143 67 -1.39778016 -1.01070112 68 0.21281961 -1.39778016 69 -0.85233876 0.21281961 70 -3.85004371 -0.85233876 71 -0.99597292 -3.85004371 72 2.85088698 -0.99597292 73 1.93250043 2.85088698 74 -0.14611033 1.93250043 75 -1.87439816 -0.14611033 76 -1.38823390 -1.87439816 77 -2.10460504 -1.38823390 78 0.16143941 -2.10460504 79 -1.47782821 0.16143941 80 2.14561766 -1.47782821 81 0.48306852 2.14561766 82 2.87302720 0.48306852 83 -1.00752358 2.87302720 84 -3.45868741 -1.00752358 85 0.27287226 -3.45868741 86 1.69620610 0.27287226 87 2.80067523 1.69620610 88 0.39312076 2.80067523 89 -0.68480544 0.39312076 90 -1.46834230 -0.68480544 91 2.29265138 -1.46834230 92 2.64773378 2.29265138 93 0.09127787 2.64773378 94 -4.02838348 0.09127787 95 -1.60829915 -4.02838348 96 4.47625380 -1.60829915 97 -0.18700258 4.47625380 98 -0.09463369 -0.18700258 99 1.14408326 -0.09463369 100 2.58993412 1.14408326 101 0.05870019 2.58993412 102 4.20514887 0.05870019 103 -1.39334218 4.20514887 104 -1.43634754 -1.39334218 105 -1.43922820 -1.43634754 106 1.39887234 -1.43922820 107 2.47358872 1.39887234 108 2.74716101 2.47358872 109 -2.54893918 2.74716101 110 3.20798674 -2.54893918 111 2.16121304 3.20798674 112 2.14946710 2.16121304 113 -1.83889778 2.14946710 114 0.29970424 -1.83889778 115 -0.15499246 0.29970424 116 -1.58020173 -0.15499246 117 0.12561772 -1.58020173 118 0.95440237 0.12561772 119 -0.82010237 0.95440237 120 -0.14801363 -0.82010237 121 -3.09636056 -0.14801363 122 -1.30930165 -3.09636056 123 -0.49601944 -1.30930165 124 4.75944454 -0.49601944 125 0.21820041 4.75944454 126 1.58515208 0.21820041 127 1.35806675 1.58515208 128 -3.29056525 1.35806675 129 0.14339783 -3.29056525 130 -3.82861832 0.14339783 131 -1.09186541 -3.82861832 132 -4.87482797 -1.09186541 133 -2.55989259 -4.87482797 134 0.83745127 -2.55989259 135 3.86937572 0.83745127 136 -0.83617444 3.86937572 137 -3.61874044 -0.83617444 138 -1.12661124 -3.61874044 139 1.38979030 -1.12661124 140 2.27167441 1.38979030 141 -0.78612719 2.27167441 142 -9.78096996 -0.78612719 143 3.52071098 -9.78096996 144 0.08926859 3.52071098 145 1.65257188 0.08926859 146 1.90426348 1.65257188 147 2.12087994 1.90426348 148 -0.29172177 2.12087994 149 -0.53816085 -0.29172177 150 0.67159199 -0.53816085 151 1.43545149 0.67159199 152 3.62390503 1.43545149 153 1.66500079 3.62390503 154 -0.47672095 1.66500079 155 0.27231314 -0.47672095 156 -2.99250033 0.27231314 157 -0.26557098 -2.99250033 158 2.42430573 -0.26557098 159 0.19007667 2.42430573 160 -1.71511498 0.19007667 161 -0.70887752 -1.71511498 > 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/fisher/rcomp/tmp/7ddet1353336441.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/fisher/rcomp/tmp/8fog71353336441.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/fisher/rcomp/tmp/9nhxe1353336441.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/fisher/rcomp/tmp/10zw0d1353336441.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/fisher/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/fisher/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/fisher/rcomp/tmp/1151301353336441.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/fisher/rcomp/tmp/12oplp1353336441.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/fisher/rcomp/tmp/13596z1353336441.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/fisher/rcomp/tmp/141iwb1353336441.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/fisher/rcomp/tmp/155xpv1353336441.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/fisher/rcomp/tmp/160gov1353336441.tab") + } > > try(system("convert tmp/1jwfg1353336441.ps tmp/1jwfg1353336441.png",intern=TRUE)) character(0) > try(system("convert tmp/2r6a61353336441.ps tmp/2r6a61353336441.png",intern=TRUE)) character(0) > try(system("convert tmp/30eoi1353336441.ps tmp/30eoi1353336441.png",intern=TRUE)) character(0) > try(system("convert tmp/4c5fs1353336441.ps tmp/4c5fs1353336441.png",intern=TRUE)) character(0) > try(system("convert tmp/5fgeu1353336441.ps tmp/5fgeu1353336441.png",intern=TRUE)) character(0) > try(system("convert tmp/6xv8t1353336441.ps tmp/6xv8t1353336441.png",intern=TRUE)) character(0) > try(system("convert tmp/7ddet1353336441.ps tmp/7ddet1353336441.png",intern=TRUE)) character(0) > try(system("convert tmp/8fog71353336441.ps tmp/8fog71353336441.png",intern=TRUE)) character(0) > try(system("convert tmp/9nhxe1353336441.ps tmp/9nhxe1353336441.png",intern=TRUE)) character(0) > try(system("convert tmp/10zw0d1353336441.ps tmp/10zw0d1353336441.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 8.656 1.356 10.013