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 + ,41 + ,38 + ,13 + ,12 + ,14 + ,12 + ,53 + ,32 + ,9 + ,39 + ,32 + ,16 + ,11 + ,18 + ,11 + ,83 + ,51 + ,9 + ,30 + ,35 + ,19 + ,15 + ,11 + ,14 + ,66 + ,42 + ,9 + ,31 + ,33 + ,15 + ,6 + ,12 + ,12 + ,67 + ,41 + ,9 + ,34 + ,37 + ,14 + ,13 + ,16 + ,21 + ,76 + ,46 + ,9 + ,35 + ,29 + ,13 + ,10 + ,18 + ,12 + ,78 + ,47 + ,9 + ,39 + ,31 + ,19 + ,12 + ,14 + ,22 + ,53 + ,37 + ,9 + ,34 + ,36 + ,15 + ,14 + ,14 + ,11 + ,80 + ,49 + ,9 + ,36 + ,35 + ,14 + ,12 + ,15 + ,10 + ,74 + ,45 + ,9 + ,37 + ,38 + ,15 + ,9 + ,15 + ,13 + ,76 + ,47 + ,9 + ,38 + ,31 + ,16 + ,10 + ,17 + ,10 + ,79 + ,49 + ,9 + ,36 + ,34 + ,16 + ,12 + ,19 + ,8 + ,54 + ,33 + ,9 + ,38 + ,35 + ,16 + ,12 + ,10 + ,15 + ,67 + ,42 + ,9 + ,39 + ,38 + ,16 + ,11 + ,16 + ,14 + ,54 + ,33 + ,9 + ,33 + ,37 + ,17 + ,15 + ,18 + ,10 + ,87 + ,53 + ,9 + ,32 + ,33 + ,15 + ,12 + ,14 + ,14 + ,58 + ,36 + ,9 + ,36 + ,32 + ,15 + ,10 + ,14 + ,14 + ,75 + ,45 + ,9 + ,38 + ,38 + ,20 + ,12 + ,17 + ,11 + ,88 + ,54 + ,9 + ,39 + ,38 + ,18 + ,11 + ,14 + ,10 + ,64 + ,41 + ,9 + ,32 + ,32 + ,16 + ,12 + ,16 + ,13 + ,57 + ,36 + ,9 + ,32 + ,33 + ,16 + ,11 + ,18 + ,9.5 + ,66 + ,41 + ,9 + ,31 + ,31 + ,16 + ,12 + ,11 + ,14 + ,68 + ,44 + ,9 + ,39 + ,38 + ,19 + ,13 + ,14 + ,12 + ,54 + ,33 + ,9 + ,37 + ,39 + ,16 + ,11 + ,12 + ,14 + ,56 + ,37 + ,9 + ,39 + ,32 + ,17 + ,12 + ,17 + ,11 + ,86 + ,52 + ,9 + ,41 + ,32 + ,17 + ,13 + ,9 + ,9 + ,80 + ,47 + ,9 + ,36 + ,35 + ,16 + ,10 + ,16 + ,11 + ,76 + ,43 + ,9 + ,33 + ,37 + ,15 + ,14 + ,14 + ,15 + ,69 + ,44 + ,9 + ,33 + ,33 + ,16 + ,12 + ,15 + ,14 + ,78 + ,45 + ,9 + ,34 + ,33 + ,14 + ,10 + ,11 + ,13 + ,67 + ,44 + ,9 + ,31 + ,31 + ,15 + ,12 + ,16 + ,9 + ,80 + ,49 + ,9 + ,27 + ,32 + ,12 + ,8 + ,13 + ,15 + ,54 + ,33 + ,9 + ,37 + ,31 + ,14 + ,10 + ,17 + ,10 + ,71 + ,43 + ,9 + ,34 + ,37 + ,16 + ,12 + ,15 + ,11 + ,84 + ,54 + ,9 + ,34 + ,30 + ,14 + ,12 + ,14 + ,13 + ,74 + ,42 + ,9 + ,32 + ,33 + ,10 + ,7 + ,16 + ,8 + ,71 + ,44 + ,9 + ,29 + ,31 + ,10 + ,9 + ,9 + ,20 + ,63 + ,37 + ,9 + ,36 + ,33 + ,14 + ,12 + ,15 + ,12 + ,71 + ,43 + ,9 + ,29 + ,31 + ,16 + ,10 + ,17 + ,10 + ,76 + ,46 + ,9 + ,35 + ,33 + ,16 + ,10 + ,13 + ,10 + ,69 + ,42 + ,9 + ,37 + ,32 + ,16 + ,10 + ,15 + ,9 + ,74 + ,45 + ,9 + ,34 + ,33 + ,14 + ,12 + ,16 + ,14 + ,75 + ,44 + ,9 + ,38 + ,32 + ,20 + ,15 + ,16 + ,8 + ,54 + ,33 + ,9 + ,35 + ,33 + ,14 + ,10 + ,12 + ,14 + ,52 + ,31 + ,9 + ,38 + ,28 + ,14 + ,10 + ,15 + ,11 + ,69 + ,42 + ,9 + ,37 + ,35 + ,11 + ,12 + ,11 + ,13 + ,68 + ,40 + ,9 + ,38 + ,39 + ,14 + ,13 + ,15 + ,9 + ,65 + ,43 + ,9 + ,33 + ,34 + ,15 + ,11 + ,15 + ,11 + ,75 + ,46 + ,9 + ,36 + ,38 + ,16 + ,11 + ,17 + ,15 + ,74 + ,42 + ,9 + ,38 + ,32 + ,14 + ,12 + ,13 + ,11 + ,75 + ,45 + ,9 + ,32 + ,38 + ,16 + ,14 + ,16 + ,10 + ,72 + ,44 + ,9 + ,32 + ,30 + ,14 + ,10 + ,14 + ,14 + ,67 + ,40 + ,9 + ,32 + ,33 + ,12 + ,12 + ,11 + ,18 + ,63 + ,37 + ,10 + ,34 + ,38 + ,16 + ,13 + ,12 + ,14 + ,62 + ,46 + ,10 + ,32 + ,32 + ,9 + ,5 + ,12 + ,11 + ,63 + ,36 + ,10 + ,37 + ,35 + ,14 + ,6 + ,15 + ,14.5 + ,76 + ,47 + ,10 + ,39 + ,34 + ,16 + ,12 + ,16 + ,13 + ,74 + ,45 + ,10 + ,29 + ,34 + ,16 + ,12 + ,15 + ,9 + ,67 + ,42 + ,10 + ,37 + ,36 + ,15 + ,11 + ,12 + ,10 + ,73 + ,43 + ,10 + ,35 + ,34 + ,16 + ,10 + ,12 + ,15 + ,70 + ,43 + ,10 + ,30 + ,28 + ,12 + ,7 + ,8 + ,20 + ,53 + ,32 + ,10 + ,38 + ,34 + ,16 + ,12 + ,13 + ,12 + ,77 + ,45 + ,10 + ,34 + ,35 + ,16 + ,14 + ,11 + ,12 + ,80 + ,48 + ,10 + ,31 + ,35 + ,14 + ,11 + ,14 + ,14 + ,52 + ,31 + ,10 + ,34 + ,31 + ,16 + ,12 + ,15 + ,13 + ,54 + ,33 + ,10 + ,35 + ,37 + ,17 + ,13 + ,10 + ,11 + ,80 + ,49 + ,10 + ,36 + ,35 + ,18 + ,14 + ,11 + ,17 + ,66 + ,42 + ,10 + ,30 + ,27 + ,18 + ,11 + ,12 + ,12 + ,73 + ,41 + ,10 + ,39 + ,40 + ,12 + ,12 + ,15 + ,13 + ,63 + ,38 + ,10 + ,35 + ,37 + ,16 + ,12 + ,15 + ,14 + ,69 + ,42 + ,10 + ,38 + ,36 + ,10 + ,8 + ,14 + ,13 + ,67 + ,44 + ,10 + ,31 + ,38 + ,14 + ,11 + ,16 + ,15 + ,54 + ,33 + ,10 + ,34 + ,39 + ,18 + ,14 + ,15 + ,13 + ,81 + ,48 + ,10 + ,38 + ,41 + ,18 + ,14 + ,15 + ,10 + ,69 + ,40 + ,10 + ,34 + ,27 + ,16 + ,12 + ,13 + ,11 + ,84 + ,50 + ,10 + ,39 + ,30 + ,17 + ,9 + ,12 + ,19 + ,80 + ,49 + ,10 + ,37 + ,37 + ,16 + ,13 + ,17 + ,13 + ,70 + ,43 + ,10 + ,34 + ,31 + ,16 + ,11 + ,13 + ,17 + ,69 + ,44 + ,10 + ,28 + ,31 + ,13 + ,12 + ,15 + ,13 + ,77 + ,47 + ,10 + ,37 + ,27 + ,16 + ,12 + ,13 + ,9 + ,54 + ,33 + ,10 + ,33 + ,36 + ,16 + ,12 + ,15 + ,11 + ,79 + ,46 + ,10 + ,35 + ,37 + ,16 + ,12 + ,15 + ,9 + ,71 + ,45 + ,10 + ,37 + ,33 + ,15 + ,12 + ,16 + ,12 + ,73 + ,43 + ,10 + ,32 + ,34 + ,15 + ,11 + ,15 + ,12 + ,72 + ,44 + ,10 + ,33 + ,31 + ,16 + ,10 + ,14 + ,13 + ,77 + ,47 + ,10 + ,38 + ,39 + ,14 + ,9 + ,15 + ,13 + ,75 + ,45 + ,10 + ,33 + ,34 + ,16 + ,12 + ,14 + ,12 + ,69 + ,42 + ,10 + ,29 + ,32 + ,16 + ,12 + ,13 + ,15 + ,54 + ,33 + ,10 + ,33 + ,33 + ,15 + ,12 + ,7 + ,22 + ,70 + ,43 + ,10 + ,31 + ,36 + ,12 + ,9 + ,17 + ,13 + ,73 + ,46 + ,10 + ,36 + ,32 + ,17 + ,15 + ,13 + ,15 + ,54 + ,33 + ,10 + ,35 + ,41 + ,16 + ,12 + ,15 + ,13 + ,77 + ,46 + ,10 + ,32 + ,28 + ,15 + ,12 + ,14 + ,15 + ,82 + ,48 + ,10 + ,29 + ,30 + ,13 + ,12 + ,13 + ,12.5 + ,80 + ,47 + ,10 + ,39 + ,36 + ,16 + ,10 + ,16 + ,11 + ,80 + ,47 + ,10 + ,37 + ,35 + ,16 + ,13 + ,12 + ,16 + ,69 + ,43 + ,10 + ,35 + ,31 + ,16 + ,9 + ,14 + ,11 + ,78 + ,46 + ,10 + ,37 + ,34 + ,16 + ,12 + ,17 + ,11 + ,81 + ,48 + ,10 + ,32 + ,36 + ,14 + ,10 + ,15 + ,10 + ,76 + ,46 + ,10 + ,38 + ,36 + ,16 + ,14 + ,17 + ,10 + ,76 + ,45 + ,10 + ,37 + ,35 + ,16 + ,11 + ,12 + ,16 + ,73 + ,45 + ,10 + ,36 + ,37 + ,20 + ,15 + ,16 + ,12 + ,85 + ,52 + ,10 + ,32 + ,28 + ,15 + ,11 + ,11 + ,11 + ,66 + ,42 + ,10 + ,33 + ,39 + ,16 + ,11 + ,15 + ,16 + ,79 + ,47 + ,10 + ,40 + ,32 + ,13 + ,12 + ,9 + ,19 + ,68 + ,41 + ,10 + ,38 + ,35 + ,17 + ,12 + ,16 + ,11 + ,76 + ,47 + ,10 + ,41 + ,39 + ,16 + ,12 + ,15 + ,16 + ,71 + ,43 + ,10 + ,36 + ,35 + ,16 + ,11 + ,10 + ,15 + ,54 + ,33 + ,11 + ,43 + ,42 + ,12 + ,7 + ,10 + ,24 + ,46 + ,30 + ,11 + ,30 + ,34 + ,16 + ,12 + ,15 + ,14 + ,85 + ,52 + ,11 + ,31 + ,33 + ,16 + ,14 + ,11 + ,15 + ,74 + ,44 + ,11 + ,32 + ,41 + ,17 + ,11 + ,13 + ,11 + ,88 + ,55 + ,11 + ,32 + ,33 + ,13 + ,11 + ,14 + ,15 + ,38 + ,11 + ,11 + ,37 + ,34 + ,12 + ,10 + ,18 + ,12 + ,76 + ,47 + ,11 + ,37 + ,32 + ,18 + ,13 + ,16 + ,10 + ,86 + ,53 + ,11 + ,33 + ,40 + ,14 + ,13 + ,14 + ,14 + ,54 + ,33 + ,11 + ,34 + ,40 + ,14 + ,8 + ,14 + ,13 + ,67 + ,44 + ,11 + ,33 + ,35 + ,13 + ,11 + ,14 + ,9 + ,69 + ,42 + ,11 + ,38 + ,36 + ,16 + ,12 + ,14 + ,15 + ,90 + ,55 + ,11 + ,33 + ,37 + ,13 + ,11 + ,12 + ,15 + ,54 + ,33 + ,11 + ,31 + ,27 + ,16 + ,13 + ,14 + ,14 + ,76 + ,46 + ,11 + ,38 + ,39 + ,13 + ,12 + ,15 + ,11 + ,89 + ,54 + ,11 + ,37 + ,38 + ,16 + ,14 + ,15 + ,8 + ,76 + ,47 + ,11 + ,36 + ,31 + ,15 + ,13 + ,15 + ,11 + ,73 + ,45 + ,11 + ,31 + ,33 + ,16 + ,15 + ,13 + ,11 + ,79 + ,47 + ,11 + ,39 + ,32 + ,15 + ,10 + ,17 + ,8 + ,90 + ,55 + ,11 + ,44 + ,39 + ,17 + ,11 + ,17 + ,10 + ,74 + ,44 + ,11 + ,33 + ,36 + ,15 + ,9 + ,19 + ,11 + ,81 + ,53 + ,11 + ,35 + ,33 + ,12 + ,11 + ,15 + ,13 + ,72 + ,44 + ,11 + ,32 + ,33 + ,16 + ,10 + ,13 + ,11 + ,71 + ,42 + ,11 + ,28 + ,32 + ,10 + ,11 + ,9 + ,20 + ,66 + ,40 + ,11 + ,40 + ,37 + ,16 + ,8 + ,15 + ,10 + ,77 + ,46 + ,11 + ,27 + ,30 + ,12 + ,11 + ,15 + ,15 + ,65 + ,40 + ,11 + ,37 + ,38 + ,14 + ,12 + ,15 + ,12 + ,74 + ,46 + ,11 + ,32 + ,29 + ,15 + ,12 + ,16 + ,14 + ,85 + ,53 + ,11 + ,28 + ,22 + ,13 + ,9 + ,11 + ,23 + ,54 + ,33 + ,11 + ,34 + ,35 + ,15 + ,11 + ,14 + ,14 + ,63 + ,42 + ,11 + ,30 + ,35 + ,11 + ,10 + ,11 + ,16 + ,54 + ,35 + ,11 + ,35 + ,34 + ,12 + ,8 + ,15 + ,11 + ,64 + ,40 + ,11 + ,31 + ,35 + ,11 + ,9 + ,13 + ,12 + ,69 + ,41 + ,11 + ,32 + ,34 + ,16 + ,8 + ,15 + ,10 + ,54 + ,33 + ,11 + ,30 + ,37 + ,15 + ,9 + ,16 + ,14 + ,84 + ,51 + ,11 + ,30 + ,35 + ,17 + ,15 + ,14 + ,12 + ,86 + ,53 + ,11 + ,31 + ,23 + ,16 + ,11 + ,15 + ,12 + ,77 + ,46 + ,11 + ,40 + ,31 + ,10 + ,8 + ,16 + ,11 + ,89 + ,55 + ,11 + ,32 + ,27 + ,18 + ,13 + ,16 + ,12 + ,76 + ,47 + ,11 + ,36 + ,36 + ,13 + ,12 + ,11 + ,13 + ,60 + ,38 + ,11 + ,32 + ,31 + ,16 + ,12 + ,12 + ,11 + ,75 + ,46 + ,11 + ,35 + ,32 + ,13 + ,9 + ,9 + ,19 + ,73 + ,46 + ,11 + ,38 + ,39 + ,10 + ,7 + ,16 + ,12 + ,85 + ,53 + ,11 + ,42 + ,37 + ,15 + ,13 + ,13 + ,17 + ,79 + ,47 + ,11 + ,34 + ,38 + ,16 + ,9 + ,16 + ,9 + ,71 + ,41 + ,11 + ,35 + ,39 + ,16 + ,6 + ,12 + ,12 + ,72 + ,44 + ,11 + ,38 + ,34 + ,14 + ,8 + ,9 + ,19 + ,69 + ,43 + ,11 + ,33 + ,31 + ,10 + ,8 + ,13 + ,18 + ,78 + ,51 + ,11 + ,36 + ,32 + ,17 + ,15 + ,13 + ,15 + ,54 + ,33 + ,11 + ,32 + ,37 + ,13 + ,6 + ,14 + ,14 + ,69 + ,43 + ,11 + ,33 + ,36 + ,15 + ,9 + ,19 + ,11 + ,81 + ,53 + ,11 + ,34 + ,32 + ,16 + ,11 + ,13 + ,9 + ,84 + ,51 + ,11 + ,32 + ,38 + ,12 + ,8 + ,12 + ,18 + ,84 + ,50 + ,11 + ,34 + ,36 + ,13 + ,8 + ,13 + ,16 + ,69 + ,46) + ,dim=c(9 + ,161) + ,dimnames=list(c('month' + ,'Connected' + ,'Separate' + ,'Learning' + ,'Software' + ,'Happiness' + ,'Depression' + ,'Belonging' + ,'Belonging_Final') + ,1:161)) > y <- array(NA,dim=c(9,161),dimnames=list(c('month','Connected','Separate','Learning','Software','Happiness','Depression','Belonging','Belonging_Final'),1:161)) > 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 = '4' > 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 Learning month Connected Separate Software Happiness Depression Belonging 1 13 9 41 38 12 14 12.0 53 2 16 9 39 32 11 18 11.0 83 3 19 9 30 35 15 11 14.0 66 4 15 9 31 33 6 12 12.0 67 5 14 9 34 37 13 16 21.0 76 6 13 9 35 29 10 18 12.0 78 7 19 9 39 31 12 14 22.0 53 8 15 9 34 36 14 14 11.0 80 9 14 9 36 35 12 15 10.0 74 10 15 9 37 38 9 15 13.0 76 11 16 9 38 31 10 17 10.0 79 12 16 9 36 34 12 19 8.0 54 13 16 9 38 35 12 10 15.0 67 14 16 9 39 38 11 16 14.0 54 15 17 9 33 37 15 18 10.0 87 16 15 9 32 33 12 14 14.0 58 17 15 9 36 32 10 14 14.0 75 18 20 9 38 38 12 17 11.0 88 19 18 9 39 38 11 14 10.0 64 20 16 9 32 32 12 16 13.0 57 21 16 9 32 33 11 18 9.5 66 22 16 9 31 31 12 11 14.0 68 23 19 9 39 38 13 14 12.0 54 24 16 9 37 39 11 12 14.0 56 25 17 9 39 32 12 17 11.0 86 26 17 9 41 32 13 9 9.0 80 27 16 9 36 35 10 16 11.0 76 28 15 9 33 37 14 14 15.0 69 29 16 9 33 33 12 15 14.0 78 30 14 9 34 33 10 11 13.0 67 31 15 9 31 31 12 16 9.0 80 32 12 9 27 32 8 13 15.0 54 33 14 9 37 31 10 17 10.0 71 34 16 9 34 37 12 15 11.0 84 35 14 9 34 30 12 14 13.0 74 36 10 9 32 33 7 16 8.0 71 37 10 9 29 31 9 9 20.0 63 38 14 9 36 33 12 15 12.0 71 39 16 9 29 31 10 17 10.0 76 40 16 9 35 33 10 13 10.0 69 41 16 9 37 32 10 15 9.0 74 42 14 9 34 33 12 16 14.0 75 43 20 9 38 32 15 16 8.0 54 44 14 9 35 33 10 12 14.0 52 45 14 9 38 28 10 15 11.0 69 46 11 9 37 35 12 11 13.0 68 47 14 9 38 39 13 15 9.0 65 48 15 9 33 34 11 15 11.0 75 49 16 9 36 38 11 17 15.0 74 50 14 9 38 32 12 13 11.0 75 51 16 9 32 38 14 16 10.0 72 52 14 9 32 30 10 14 14.0 67 53 12 9 32 33 12 11 18.0 63 54 16 10 34 38 13 12 14.0 62 55 9 10 32 32 5 12 11.0 63 56 14 10 37 35 6 15 14.5 76 57 16 10 39 34 12 16 13.0 74 58 16 10 29 34 12 15 9.0 67 59 15 10 37 36 11 12 10.0 73 60 16 10 35 34 10 12 15.0 70 61 12 10 30 28 7 8 20.0 53 62 16 10 38 34 12 13 12.0 77 63 16 10 34 35 14 11 12.0 80 64 14 10 31 35 11 14 14.0 52 65 16 10 34 31 12 15 13.0 54 66 17 10 35 37 13 10 11.0 80 67 18 10 36 35 14 11 17.0 66 68 18 10 30 27 11 12 12.0 73 69 12 10 39 40 12 15 13.0 63 70 16 10 35 37 12 15 14.0 69 71 10 10 38 36 8 14 13.0 67 72 14 10 31 38 11 16 15.0 54 73 18 10 34 39 14 15 13.0 81 74 18 10 38 41 14 15 10.0 69 75 16 10 34 27 12 13 11.0 84 76 17 10 39 30 9 12 19.0 80 77 16 10 37 37 13 17 13.0 70 78 16 10 34 31 11 13 17.0 69 79 13 10 28 31 12 15 13.0 77 80 16 10 37 27 12 13 9.0 54 81 16 10 33 36 12 15 11.0 79 82 16 10 35 37 12 15 9.0 71 83 15 10 37 33 12 16 12.0 73 84 15 10 32 34 11 15 12.0 72 85 16 10 33 31 10 14 13.0 77 86 14 10 38 39 9 15 13.0 75 87 16 10 33 34 12 14 12.0 69 88 16 10 29 32 12 13 15.0 54 89 15 10 33 33 12 7 22.0 70 90 12 10 31 36 9 17 13.0 73 91 17 10 36 32 15 13 15.0 54 92 16 10 35 41 12 15 13.0 77 93 15 10 32 28 12 14 15.0 82 94 13 10 29 30 12 13 12.5 80 95 16 10 39 36 10 16 11.0 80 96 16 10 37 35 13 12 16.0 69 97 16 10 35 31 9 14 11.0 78 98 16 10 37 34 12 17 11.0 81 99 14 10 32 36 10 15 10.0 76 100 16 10 38 36 14 17 10.0 76 101 16 10 37 35 11 12 16.0 73 102 20 10 36 37 15 16 12.0 85 103 15 10 32 28 11 11 11.0 66 104 16 10 33 39 11 15 16.0 79 105 13 10 40 32 12 9 19.0 68 106 17 10 38 35 12 16 11.0 76 107 16 10 41 39 12 15 16.0 71 108 16 10 36 35 11 10 15.0 54 109 12 11 43 42 7 10 24.0 46 110 16 11 30 34 12 15 14.0 85 111 16 11 31 33 14 11 15.0 74 112 17 11 32 41 11 13 11.0 88 113 13 11 32 33 11 14 15.0 38 114 12 11 37 34 10 18 12.0 76 115 18 11 37 32 13 16 10.0 86 116 14 11 33 40 13 14 14.0 54 117 14 11 34 40 8 14 13.0 67 118 13 11 33 35 11 14 9.0 69 119 16 11 38 36 12 14 15.0 90 120 13 11 33 37 11 12 15.0 54 121 16 11 31 27 13 14 14.0 76 122 13 11 38 39 12 15 11.0 89 123 16 11 37 38 14 15 8.0 76 124 15 11 36 31 13 15 11.0 73 125 16 11 31 33 15 13 11.0 79 126 15 11 39 32 10 17 8.0 90 127 17 11 44 39 11 17 10.0 74 128 15 11 33 36 9 19 11.0 81 129 12 11 35 33 11 15 13.0 72 130 16 11 32 33 10 13 11.0 71 131 10 11 28 32 11 9 20.0 66 132 16 11 40 37 8 15 10.0 77 133 12 11 27 30 11 15 15.0 65 134 14 11 37 38 12 15 12.0 74 135 15 11 32 29 12 16 14.0 85 136 13 11 28 22 9 11 23.0 54 137 15 11 34 35 11 14 14.0 63 138 11 11 30 35 10 11 16.0 54 139 12 11 35 34 8 15 11.0 64 140 11 11 31 35 9 13 12.0 69 141 16 11 32 34 8 15 10.0 54 142 15 11 30 37 9 16 14.0 84 143 17 11 30 35 15 14 12.0 86 144 16 11 31 23 11 15 12.0 77 145 10 11 40 31 8 16 11.0 89 146 18 11 32 27 13 16 12.0 76 147 13 11 36 36 12 11 13.0 60 148 16 11 32 31 12 12 11.0 75 149 13 11 35 32 9 9 19.0 73 150 10 11 38 39 7 16 12.0 85 151 15 11 42 37 13 13 17.0 79 152 16 11 34 38 9 16 9.0 71 153 16 11 35 39 6 12 12.0 72 154 14 11 38 34 8 9 19.0 69 155 10 11 33 31 8 13 18.0 78 156 17 11 36 32 15 13 15.0 54 157 13 11 32 37 6 14 14.0 69 158 15 11 33 36 9 19 11.0 81 159 16 11 34 32 11 13 9.0 84 160 12 11 32 38 8 12 18.0 84 161 13 11 34 36 8 13 16.0 69 Belonging_Final t 1 32 1 2 51 2 3 42 3 4 41 4 5 46 5 6 47 6 7 37 7 8 49 8 9 45 9 10 47 10 11 49 11 12 33 12 13 42 13 14 33 14 15 53 15 16 36 16 17 45 17 18 54 18 19 41 19 20 36 20 21 41 21 22 44 22 23 33 23 24 37 24 25 52 25 26 47 26 27 43 27 28 44 28 29 45 29 30 44 30 31 49 31 32 33 32 33 43 33 34 54 34 35 42 35 36 44 36 37 37 37 38 43 38 39 46 39 40 42 40 41 45 41 42 44 42 43 33 43 44 31 44 45 42 45 46 40 46 47 43 47 48 46 48 49 42 49 50 45 50 51 44 51 52 40 52 53 37 53 54 46 54 55 36 55 56 47 56 57 45 57 58 42 58 59 43 59 60 43 60 61 32 61 62 45 62 63 48 63 64 31 64 65 33 65 66 49 66 67 42 67 68 41 68 69 38 69 70 42 70 71 44 71 72 33 72 73 48 73 74 40 74 75 50 75 76 49 76 77 43 77 78 44 78 79 47 79 80 33 80 81 46 81 82 45 82 83 43 83 84 44 84 85 47 85 86 45 86 87 42 87 88 33 88 89 43 89 90 46 90 91 33 91 92 46 92 93 48 93 94 47 94 95 47 95 96 43 96 97 46 97 98 48 98 99 46 99 100 45 100 101 45 101 102 52 102 103 42 103 104 47 104 105 41 105 106 47 106 107 43 107 108 33 108 109 30 109 110 52 110 111 44 111 112 55 112 113 11 113 114 47 114 115 53 115 116 33 116 117 44 117 118 42 118 119 55 119 120 33 120 121 46 121 122 54 122 123 47 123 124 45 124 125 47 125 126 55 126 127 44 127 128 53 128 129 44 129 130 42 130 131 40 131 132 46 132 133 40 133 134 46 134 135 53 135 136 33 136 137 42 137 138 35 138 139 40 139 140 41 140 141 33 141 142 51 142 143 53 143 144 46 144 145 55 145 146 47 146 147 38 147 148 46 148 149 46 149 150 53 150 151 47 151 152 41 152 153 44 153 154 43 154 155 51 155 156 33 156 157 43 157 158 53 158 159 51 159 160 50 160 161 46 161 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) month Connected Separate 5.456741 0.147564 0.087991 -0.020540 Software Happiness Depression Belonging 0.522499 0.030456 -0.087567 -0.024164 Belonging_Final t 0.064957 -0.006402 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -4.449 -1.055 0.190 1.111 4.053 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 5.456741 4.962242 1.100 0.2732 month 0.147564 0.506087 0.292 0.7710 Connected 0.087991 0.043569 2.020 0.0452 * Separate -0.020540 0.042088 -0.488 0.6262 Software 0.522499 0.067502 7.740 1.32e-12 *** Happiness 0.030456 0.071749 0.424 0.6718 Depression -0.087567 0.053313 -1.643 0.1026 Belonging -0.024164 0.047810 -0.505 0.6140 Belonging_Final 0.064957 0.074513 0.872 0.3847 t -0.006402 0.008885 -0.721 0.4723 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.723 on 151 degrees of freedom Multiple R-squared: 0.3796, Adjusted R-squared: 0.3426 F-statistic: 10.26 on 9 and 151 DF, p-value: 2.89e-12 > 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.37311773 0.74623547 0.6268823 [2,] 0.37260560 0.74521120 0.6273944 [3,] 0.24257952 0.48515903 0.7574205 [4,] 0.19467043 0.38934087 0.8053296 [5,] 0.20777345 0.41554690 0.7922265 [6,] 0.41270168 0.82540336 0.5872983 [7,] 0.36390196 0.72780392 0.6360980 [8,] 0.30819167 0.61638334 0.6918083 [9,] 0.25515715 0.51031430 0.7448429 [10,] 0.29687623 0.59375245 0.7031238 [11,] 0.45574194 0.91148388 0.5442581 [12,] 0.59856262 0.80287475 0.4014374 [13,] 0.52711669 0.94576662 0.4728833 [14,] 0.46959347 0.93918694 0.5304065 [15,] 0.46025477 0.92050954 0.5397452 [16,] 0.58998798 0.82002404 0.4100120 [17,] 0.53541961 0.92916078 0.4645804 [18,] 0.64854103 0.70291794 0.3514590 [19,] 0.60673400 0.78653199 0.3932660 [20,] 0.57503934 0.84992132 0.4249607 [21,] 0.55754243 0.88491513 0.4424576 [22,] 0.51433800 0.97132400 0.4856620 [23,] 0.46403160 0.92806320 0.5359684 [24,] 0.63016569 0.73966862 0.3698343 [25,] 0.66316022 0.67367956 0.3368398 [26,] 0.64380109 0.71239782 0.3561989 [27,] 0.68446981 0.63106038 0.3155302 [28,] 0.66481586 0.67036829 0.3351841 [29,] 0.62381659 0.75236683 0.3761834 [30,] 0.58407442 0.83185116 0.4159256 [31,] 0.61685728 0.76628544 0.3831427 [32,] 0.56287186 0.87425629 0.4371281 [33,] 0.53000470 0.93999059 0.4699953 [34,] 0.74869696 0.50260608 0.2513030 [35,] 0.82280358 0.35439283 0.1771964 [36,] 0.79156878 0.41686243 0.2084312 [37,] 0.80586545 0.38826910 0.1941346 [38,] 0.80247590 0.39504820 0.1975241 [39,] 0.76960850 0.46078300 0.2303915 [40,] 0.73570211 0.52859579 0.2642979 [41,] 0.76544055 0.46911890 0.2345595 [42,] 0.72540374 0.54919252 0.2745963 [43,] 0.73687682 0.52624636 0.2631232 [44,] 0.74540584 0.50918832 0.2545942 [45,] 0.70682356 0.58635288 0.2931764 [46,] 0.67970350 0.64059301 0.3202965 [47,] 0.64108705 0.71782589 0.3589129 [48,] 0.64960607 0.70078785 0.3503939 [49,] 0.60902963 0.78194074 0.3909704 [50,] 0.56373838 0.87252324 0.4362616 [51,] 0.52094345 0.95811309 0.4790565 [52,] 0.47275880 0.94551759 0.5272412 [53,] 0.43137788 0.86275576 0.5686221 [54,] 0.39993519 0.79987038 0.6000648 [55,] 0.40054209 0.80108419 0.5994579 [56,] 0.54530330 0.90939340 0.4546967 [57,] 0.69330660 0.61338680 0.3066934 [58,] 0.65696035 0.68607931 0.3430397 [59,] 0.80075609 0.39848782 0.1992439 [60,] 0.76665340 0.46669321 0.2333466 [61,] 0.76385520 0.47228960 0.2361448 [62,] 0.74710915 0.50578170 0.2528908 [63,] 0.70756304 0.58487393 0.2924370 [64,] 0.78941052 0.42117896 0.2105895 [65,] 0.75413114 0.49173773 0.2458689 [66,] 0.74043525 0.51912951 0.2595648 [67,] 0.76475777 0.47048447 0.2352422 [68,] 0.72665196 0.54669608 0.2733480 [69,] 0.69155254 0.61689493 0.3084475 [70,] 0.65031181 0.69937638 0.3496882 [71,] 0.61579379 0.76841242 0.3842062 [72,] 0.57139769 0.85720462 0.4286023 [73,] 0.55951172 0.88097656 0.4404883 [74,] 0.51547914 0.96904173 0.4845209 [75,] 0.47298036 0.94596072 0.5270196 [76,] 0.45318303 0.90636606 0.5468170 [77,] 0.41732555 0.83465109 0.5826745 [78,] 0.42526380 0.85052759 0.5747362 [79,] 0.38060568 0.76121136 0.6193943 [80,] 0.34528862 0.69057724 0.6547114 [81,] 0.30366924 0.60733848 0.6963308 [82,] 0.34655049 0.69310099 0.6534495 [83,] 0.31670164 0.63340327 0.6832984 [84,] 0.27477185 0.54954370 0.7252282 [85,] 0.26985668 0.53971335 0.7301433 [86,] 0.23275847 0.46551695 0.7672415 [87,] 0.21932863 0.43865726 0.7806714 [88,] 0.21491588 0.42983176 0.7850841 [89,] 0.18982852 0.37965704 0.8101715 [90,] 0.21162104 0.42324208 0.7883790 [91,] 0.18150036 0.36300073 0.8184996 [92,] 0.16543630 0.33087260 0.8345637 [93,] 0.18973820 0.37947641 0.8102618 [94,] 0.16077932 0.32155864 0.8392207 [95,] 0.13238673 0.26477347 0.8676133 [96,] 0.11688470 0.23376940 0.8831153 [97,] 0.11931025 0.23862049 0.8806898 [98,] 0.10722643 0.21445285 0.8927736 [99,] 0.09210815 0.18421630 0.9078919 [100,] 0.11796833 0.23593666 0.8820317 [101,] 0.10264325 0.20528651 0.8973567 [102,] 0.13878247 0.27756494 0.8612175 [103,] 0.15126874 0.30253747 0.8487313 [104,] 0.13068647 0.26137294 0.8693135 [105,] 0.14121654 0.28243307 0.8587835 [106,] 0.13907780 0.27815561 0.8609222 [107,] 0.16855008 0.33710016 0.8314499 [108,] 0.13979273 0.27958546 0.8602073 [109,] 0.12689640 0.25379280 0.8731036 [110,] 0.13186652 0.26373303 0.8681335 [111,] 0.10573909 0.21147818 0.8942609 [112,] 0.08579847 0.17159693 0.9142015 [113,] 0.06593820 0.13187641 0.9340618 [114,] 0.04914669 0.09829338 0.9508533 [115,] 0.04747943 0.09495885 0.9525206 [116,] 0.05691121 0.11382242 0.9430888 [117,] 0.06182525 0.12365050 0.9381748 [118,] 0.06386774 0.12773548 0.9361323 [119,] 0.08098168 0.16196336 0.9190183 [120,] 0.14559020 0.29118040 0.8544098 [121,] 0.17310834 0.34621668 0.8268917 [122,] 0.13758924 0.27517848 0.8624108 [123,] 0.11244280 0.22488560 0.8875572 [124,] 0.08326603 0.16653207 0.9167340 [125,] 0.10318641 0.20637282 0.8968136 [126,] 0.10859853 0.21719707 0.8914015 [127,] 0.08212842 0.16425685 0.9178716 [128,] 0.24736465 0.49472931 0.7526353 [129,] 0.20758210 0.41516421 0.7924179 [130,] 0.16725411 0.33450821 0.8327459 [131,] 0.12516540 0.25033079 0.8748346 [132,] 0.08204348 0.16408696 0.9179565 [133,] 0.15617842 0.31235684 0.8438216 [134,] 0.17096497 0.34192993 0.8290350 [135,] 0.29176647 0.58353294 0.7082335 [136,] 0.17735662 0.35471323 0.8226434 > postscript(file="/var/fisher/rcomp/tmp/1jfi81355065236.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/2xyyv1355065236.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/3wlzq1355065236.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/4bfxu1355065236.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/5r0cl1355065236.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 = 161 Frequency = 1 1 2 3 4 5 -3.0490104618 -0.1860219269 2.2336464364 2.6969964224 -1.5769323250 6 7 8 9 10 -2.1209943344 3.5724916793 -2.0137390005 -2.1620417775 0.5666024473 11 12 13 14 15 0.4376967412 -0.1641331339 0.3034268977 0.8061316553 -0.6829613161 16 17 18 19 20 -0.2276273945 0.2774450791 3.5615578519 2.2707720852 0.6047977754 21 22 23 24 25 0.6795326949 0.6710519727 2.7045349633 0.9770042032 0.4767288854 26 27 28 29 30 0.0329684114 1.2335548499 -1.3679090284 0.6358276313 -0.5673550620 31 32 33 34 35 -0.8962595562 -0.3995386159 -1.1370275805 -0.0403222945 -1.4342652606 36 37 38 39 40 -3.2789234544 -2.5692353189 -1.7848933482 1.5312657607 1.2633072028 41 42 43 44 45 0.8506564963 -1.4069230427 2.3411548846 -0.0266194648 -1.0447004096 46 47 48 49 50 -4.4488116565 -2.7101982421 -0.0996382114 1.2499734127 -1.9644976463 51 52 53 54 55 -0.5383768845 -0.0561112677 -2.4932319603 -0.2196790652 -2.5695101721 56 57 58 59 60 1.3507802823 -0.0545534288 0.5376690969 -0.3373127577 1.6918339378 61 62 63 64 65 0.4458467903 0.1417451844 -0.5858112863 -0.2364998541 0.7016597750 66 67 68 69 70 0.7869160975 1.7530968962 3.4564346851 -3.6351315346 0.6343384796 71 72 73 74 75 -3.7891318494 -0.1785908244 1.5502804247 1.2127840206 0.1899565287 76 77 78 79 80 3.0848156559 -0.2085982734 1.3665071225 -2.0343823104 0.1622065979 81 82 83 84 85 0.5793196641 0.1267883720 -0.7144634313 0.2162683612 1.6395310906 86 87 88 89 90 -0.0560716933 0.7128642581 1.5454606236 0.7532046255 -1.6503435998 91 92 93 94 95 0.3812342125 0.7032721837 -0.0968770977 -1.9572539543 1.1147559775 96 97 98 99 100 0.2627887784 1.9768645915 0.1526182446 -0.3325070655 -0.9400016902 101 102 103 104 105 1.3065412813 2.7151955376 0.2338617841 1.6835759135 -2.0228622262 106 107 108 109 110 1.1109796286 0.5428707485 1.7330617333 -0.0005969502 0.8582651654 111 112 113 114 115 0.1743834377 2.0372001774 -0.1509986333 -2.8462612594 1.2892418835 116 117 118 119 120 -1.2509980380 0.7919448838 -1.9558849040 0.2970126255 -1.0935310256 121 122 123 124 125 0.3771429081 -2.9620919368 -1.0553726530 -1.2621382249 -0.7437130668 126 127 128 129 130 -0.4876652396 1.2031011888 0.7719710113 -2.8401289874 1.9442742062 131 132 133 134 135 -3.3213728124 2.1169849858 -1.9063969972 -1.5730496432 -0.3557695740 136 137 138 139 140 0.9167535120 0.3706222762 -2.2447853712 -1.2966873506 -2.2359344356 141 142 143 144 145 3.1055819409 1.7025986012 0.3371204573 1.3058100622 -4.1605574799 146 147 148 149 150 2.1482093231 -2.0521548949 0.8407255844 -0.0852293404 -3.1449173603 151 152 153 154 155 -0.8925878118 2.3328001663 4.0530681344 1.3446038444 -2.7822320473 156 157 158 159 160 0.6498330614 1.4082571067 0.9640459858 0.9653107609 -0.2780470851 161 0.2030662964 > postscript(file="/var/fisher/rcomp/tmp/6ru6m1355065236.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 = 161 Frequency = 1 lag(myerror, k = 1) myerror 0 -3.0490104618 NA 1 -0.1860219269 -3.0490104618 2 2.2336464364 -0.1860219269 3 2.6969964224 2.2336464364 4 -1.5769323250 2.6969964224 5 -2.1209943344 -1.5769323250 6 3.5724916793 -2.1209943344 7 -2.0137390005 3.5724916793 8 -2.1620417775 -2.0137390005 9 0.5666024473 -2.1620417775 10 0.4376967412 0.5666024473 11 -0.1641331339 0.4376967412 12 0.3034268977 -0.1641331339 13 0.8061316553 0.3034268977 14 -0.6829613161 0.8061316553 15 -0.2276273945 -0.6829613161 16 0.2774450791 -0.2276273945 17 3.5615578519 0.2774450791 18 2.2707720852 3.5615578519 19 0.6047977754 2.2707720852 20 0.6795326949 0.6047977754 21 0.6710519727 0.6795326949 22 2.7045349633 0.6710519727 23 0.9770042032 2.7045349633 24 0.4767288854 0.9770042032 25 0.0329684114 0.4767288854 26 1.2335548499 0.0329684114 27 -1.3679090284 1.2335548499 28 0.6358276313 -1.3679090284 29 -0.5673550620 0.6358276313 30 -0.8962595562 -0.5673550620 31 -0.3995386159 -0.8962595562 32 -1.1370275805 -0.3995386159 33 -0.0403222945 -1.1370275805 34 -1.4342652606 -0.0403222945 35 -3.2789234544 -1.4342652606 36 -2.5692353189 -3.2789234544 37 -1.7848933482 -2.5692353189 38 1.5312657607 -1.7848933482 39 1.2633072028 1.5312657607 40 0.8506564963 1.2633072028 41 -1.4069230427 0.8506564963 42 2.3411548846 -1.4069230427 43 -0.0266194648 2.3411548846 44 -1.0447004096 -0.0266194648 45 -4.4488116565 -1.0447004096 46 -2.7101982421 -4.4488116565 47 -0.0996382114 -2.7101982421 48 1.2499734127 -0.0996382114 49 -1.9644976463 1.2499734127 50 -0.5383768845 -1.9644976463 51 -0.0561112677 -0.5383768845 52 -2.4932319603 -0.0561112677 53 -0.2196790652 -2.4932319603 54 -2.5695101721 -0.2196790652 55 1.3507802823 -2.5695101721 56 -0.0545534288 1.3507802823 57 0.5376690969 -0.0545534288 58 -0.3373127577 0.5376690969 59 1.6918339378 -0.3373127577 60 0.4458467903 1.6918339378 61 0.1417451844 0.4458467903 62 -0.5858112863 0.1417451844 63 -0.2364998541 -0.5858112863 64 0.7016597750 -0.2364998541 65 0.7869160975 0.7016597750 66 1.7530968962 0.7869160975 67 3.4564346851 1.7530968962 68 -3.6351315346 3.4564346851 69 0.6343384796 -3.6351315346 70 -3.7891318494 0.6343384796 71 -0.1785908244 -3.7891318494 72 1.5502804247 -0.1785908244 73 1.2127840206 1.5502804247 74 0.1899565287 1.2127840206 75 3.0848156559 0.1899565287 76 -0.2085982734 3.0848156559 77 1.3665071225 -0.2085982734 78 -2.0343823104 1.3665071225 79 0.1622065979 -2.0343823104 80 0.5793196641 0.1622065979 81 0.1267883720 0.5793196641 82 -0.7144634313 0.1267883720 83 0.2162683612 -0.7144634313 84 1.6395310906 0.2162683612 85 -0.0560716933 1.6395310906 86 0.7128642581 -0.0560716933 87 1.5454606236 0.7128642581 88 0.7532046255 1.5454606236 89 -1.6503435998 0.7532046255 90 0.3812342125 -1.6503435998 91 0.7032721837 0.3812342125 92 -0.0968770977 0.7032721837 93 -1.9572539543 -0.0968770977 94 1.1147559775 -1.9572539543 95 0.2627887784 1.1147559775 96 1.9768645915 0.2627887784 97 0.1526182446 1.9768645915 98 -0.3325070655 0.1526182446 99 -0.9400016902 -0.3325070655 100 1.3065412813 -0.9400016902 101 2.7151955376 1.3065412813 102 0.2338617841 2.7151955376 103 1.6835759135 0.2338617841 104 -2.0228622262 1.6835759135 105 1.1109796286 -2.0228622262 106 0.5428707485 1.1109796286 107 1.7330617333 0.5428707485 108 -0.0005969502 1.7330617333 109 0.8582651654 -0.0005969502 110 0.1743834377 0.8582651654 111 2.0372001774 0.1743834377 112 -0.1509986333 2.0372001774 113 -2.8462612594 -0.1509986333 114 1.2892418835 -2.8462612594 115 -1.2509980380 1.2892418835 116 0.7919448838 -1.2509980380 117 -1.9558849040 0.7919448838 118 0.2970126255 -1.9558849040 119 -1.0935310256 0.2970126255 120 0.3771429081 -1.0935310256 121 -2.9620919368 0.3771429081 122 -1.0553726530 -2.9620919368 123 -1.2621382249 -1.0553726530 124 -0.7437130668 -1.2621382249 125 -0.4876652396 -0.7437130668 126 1.2031011888 -0.4876652396 127 0.7719710113 1.2031011888 128 -2.8401289874 0.7719710113 129 1.9442742062 -2.8401289874 130 -3.3213728124 1.9442742062 131 2.1169849858 -3.3213728124 132 -1.9063969972 2.1169849858 133 -1.5730496432 -1.9063969972 134 -0.3557695740 -1.5730496432 135 0.9167535120 -0.3557695740 136 0.3706222762 0.9167535120 137 -2.2447853712 0.3706222762 138 -1.2966873506 -2.2447853712 139 -2.2359344356 -1.2966873506 140 3.1055819409 -2.2359344356 141 1.7025986012 3.1055819409 142 0.3371204573 1.7025986012 143 1.3058100622 0.3371204573 144 -4.1605574799 1.3058100622 145 2.1482093231 -4.1605574799 146 -2.0521548949 2.1482093231 147 0.8407255844 -2.0521548949 148 -0.0852293404 0.8407255844 149 -3.1449173603 -0.0852293404 150 -0.8925878118 -3.1449173603 151 2.3328001663 -0.8925878118 152 4.0530681344 2.3328001663 153 1.3446038444 4.0530681344 154 -2.7822320473 1.3446038444 155 0.6498330614 -2.7822320473 156 1.4082571067 0.6498330614 157 0.9640459858 1.4082571067 158 0.9653107609 0.9640459858 159 -0.2780470851 0.9653107609 160 0.2030662964 -0.2780470851 161 NA 0.2030662964 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -0.1860219269 -3.0490104618 [2,] 2.2336464364 -0.1860219269 [3,] 2.6969964224 2.2336464364 [4,] -1.5769323250 2.6969964224 [5,] -2.1209943344 -1.5769323250 [6,] 3.5724916793 -2.1209943344 [7,] -2.0137390005 3.5724916793 [8,] -2.1620417775 -2.0137390005 [9,] 0.5666024473 -2.1620417775 [10,] 0.4376967412 0.5666024473 [11,] -0.1641331339 0.4376967412 [12,] 0.3034268977 -0.1641331339 [13,] 0.8061316553 0.3034268977 [14,] -0.6829613161 0.8061316553 [15,] -0.2276273945 -0.6829613161 [16,] 0.2774450791 -0.2276273945 [17,] 3.5615578519 0.2774450791 [18,] 2.2707720852 3.5615578519 [19,] 0.6047977754 2.2707720852 [20,] 0.6795326949 0.6047977754 [21,] 0.6710519727 0.6795326949 [22,] 2.7045349633 0.6710519727 [23,] 0.9770042032 2.7045349633 [24,] 0.4767288854 0.9770042032 [25,] 0.0329684114 0.4767288854 [26,] 1.2335548499 0.0329684114 [27,] -1.3679090284 1.2335548499 [28,] 0.6358276313 -1.3679090284 [29,] -0.5673550620 0.6358276313 [30,] -0.8962595562 -0.5673550620 [31,] -0.3995386159 -0.8962595562 [32,] -1.1370275805 -0.3995386159 [33,] -0.0403222945 -1.1370275805 [34,] -1.4342652606 -0.0403222945 [35,] -3.2789234544 -1.4342652606 [36,] -2.5692353189 -3.2789234544 [37,] -1.7848933482 -2.5692353189 [38,] 1.5312657607 -1.7848933482 [39,] 1.2633072028 1.5312657607 [40,] 0.8506564963 1.2633072028 [41,] -1.4069230427 0.8506564963 [42,] 2.3411548846 -1.4069230427 [43,] -0.0266194648 2.3411548846 [44,] -1.0447004096 -0.0266194648 [45,] -4.4488116565 -1.0447004096 [46,] -2.7101982421 -4.4488116565 [47,] -0.0996382114 -2.7101982421 [48,] 1.2499734127 -0.0996382114 [49,] -1.9644976463 1.2499734127 [50,] -0.5383768845 -1.9644976463 [51,] -0.0561112677 -0.5383768845 [52,] -2.4932319603 -0.0561112677 [53,] -0.2196790652 -2.4932319603 [54,] -2.5695101721 -0.2196790652 [55,] 1.3507802823 -2.5695101721 [56,] -0.0545534288 1.3507802823 [57,] 0.5376690969 -0.0545534288 [58,] -0.3373127577 0.5376690969 [59,] 1.6918339378 -0.3373127577 [60,] 0.4458467903 1.6918339378 [61,] 0.1417451844 0.4458467903 [62,] -0.5858112863 0.1417451844 [63,] -0.2364998541 -0.5858112863 [64,] 0.7016597750 -0.2364998541 [65,] 0.7869160975 0.7016597750 [66,] 1.7530968962 0.7869160975 [67,] 3.4564346851 1.7530968962 [68,] -3.6351315346 3.4564346851 [69,] 0.6343384796 -3.6351315346 [70,] -3.7891318494 0.6343384796 [71,] -0.1785908244 -3.7891318494 [72,] 1.5502804247 -0.1785908244 [73,] 1.2127840206 1.5502804247 [74,] 0.1899565287 1.2127840206 [75,] 3.0848156559 0.1899565287 [76,] -0.2085982734 3.0848156559 [77,] 1.3665071225 -0.2085982734 [78,] -2.0343823104 1.3665071225 [79,] 0.1622065979 -2.0343823104 [80,] 0.5793196641 0.1622065979 [81,] 0.1267883720 0.5793196641 [82,] -0.7144634313 0.1267883720 [83,] 0.2162683612 -0.7144634313 [84,] 1.6395310906 0.2162683612 [85,] -0.0560716933 1.6395310906 [86,] 0.7128642581 -0.0560716933 [87,] 1.5454606236 0.7128642581 [88,] 0.7532046255 1.5454606236 [89,] -1.6503435998 0.7532046255 [90,] 0.3812342125 -1.6503435998 [91,] 0.7032721837 0.3812342125 [92,] -0.0968770977 0.7032721837 [93,] -1.9572539543 -0.0968770977 [94,] 1.1147559775 -1.9572539543 [95,] 0.2627887784 1.1147559775 [96,] 1.9768645915 0.2627887784 [97,] 0.1526182446 1.9768645915 [98,] -0.3325070655 0.1526182446 [99,] -0.9400016902 -0.3325070655 [100,] 1.3065412813 -0.9400016902 [101,] 2.7151955376 1.3065412813 [102,] 0.2338617841 2.7151955376 [103,] 1.6835759135 0.2338617841 [104,] -2.0228622262 1.6835759135 [105,] 1.1109796286 -2.0228622262 [106,] 0.5428707485 1.1109796286 [107,] 1.7330617333 0.5428707485 [108,] -0.0005969502 1.7330617333 [109,] 0.8582651654 -0.0005969502 [110,] 0.1743834377 0.8582651654 [111,] 2.0372001774 0.1743834377 [112,] -0.1509986333 2.0372001774 [113,] -2.8462612594 -0.1509986333 [114,] 1.2892418835 -2.8462612594 [115,] -1.2509980380 1.2892418835 [116,] 0.7919448838 -1.2509980380 [117,] -1.9558849040 0.7919448838 [118,] 0.2970126255 -1.9558849040 [119,] -1.0935310256 0.2970126255 [120,] 0.3771429081 -1.0935310256 [121,] -2.9620919368 0.3771429081 [122,] -1.0553726530 -2.9620919368 [123,] -1.2621382249 -1.0553726530 [124,] -0.7437130668 -1.2621382249 [125,] -0.4876652396 -0.7437130668 [126,] 1.2031011888 -0.4876652396 [127,] 0.7719710113 1.2031011888 [128,] -2.8401289874 0.7719710113 [129,] 1.9442742062 -2.8401289874 [130,] -3.3213728124 1.9442742062 [131,] 2.1169849858 -3.3213728124 [132,] -1.9063969972 2.1169849858 [133,] -1.5730496432 -1.9063969972 [134,] -0.3557695740 -1.5730496432 [135,] 0.9167535120 -0.3557695740 [136,] 0.3706222762 0.9167535120 [137,] -2.2447853712 0.3706222762 [138,] -1.2966873506 -2.2447853712 [139,] -2.2359344356 -1.2966873506 [140,] 3.1055819409 -2.2359344356 [141,] 1.7025986012 3.1055819409 [142,] 0.3371204573 1.7025986012 [143,] 1.3058100622 0.3371204573 [144,] -4.1605574799 1.3058100622 [145,] 2.1482093231 -4.1605574799 [146,] -2.0521548949 2.1482093231 [147,] 0.8407255844 -2.0521548949 [148,] -0.0852293404 0.8407255844 [149,] -3.1449173603 -0.0852293404 [150,] -0.8925878118 -3.1449173603 [151,] 2.3328001663 -0.8925878118 [152,] 4.0530681344 2.3328001663 [153,] 1.3446038444 4.0530681344 [154,] -2.7822320473 1.3446038444 [155,] 0.6498330614 -2.7822320473 [156,] 1.4082571067 0.6498330614 [157,] 0.9640459858 1.4082571067 [158,] 0.9653107609 0.9640459858 [159,] -0.2780470851 0.9653107609 [160,] 0.2030662964 -0.2780470851 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -0.1860219269 -3.0490104618 2 2.2336464364 -0.1860219269 3 2.6969964224 2.2336464364 4 -1.5769323250 2.6969964224 5 -2.1209943344 -1.5769323250 6 3.5724916793 -2.1209943344 7 -2.0137390005 3.5724916793 8 -2.1620417775 -2.0137390005 9 0.5666024473 -2.1620417775 10 0.4376967412 0.5666024473 11 -0.1641331339 0.4376967412 12 0.3034268977 -0.1641331339 13 0.8061316553 0.3034268977 14 -0.6829613161 0.8061316553 15 -0.2276273945 -0.6829613161 16 0.2774450791 -0.2276273945 17 3.5615578519 0.2774450791 18 2.2707720852 3.5615578519 19 0.6047977754 2.2707720852 20 0.6795326949 0.6047977754 21 0.6710519727 0.6795326949 22 2.7045349633 0.6710519727 23 0.9770042032 2.7045349633 24 0.4767288854 0.9770042032 25 0.0329684114 0.4767288854 26 1.2335548499 0.0329684114 27 -1.3679090284 1.2335548499 28 0.6358276313 -1.3679090284 29 -0.5673550620 0.6358276313 30 -0.8962595562 -0.5673550620 31 -0.3995386159 -0.8962595562 32 -1.1370275805 -0.3995386159 33 -0.0403222945 -1.1370275805 34 -1.4342652606 -0.0403222945 35 -3.2789234544 -1.4342652606 36 -2.5692353189 -3.2789234544 37 -1.7848933482 -2.5692353189 38 1.5312657607 -1.7848933482 39 1.2633072028 1.5312657607 40 0.8506564963 1.2633072028 41 -1.4069230427 0.8506564963 42 2.3411548846 -1.4069230427 43 -0.0266194648 2.3411548846 44 -1.0447004096 -0.0266194648 45 -4.4488116565 -1.0447004096 46 -2.7101982421 -4.4488116565 47 -0.0996382114 -2.7101982421 48 1.2499734127 -0.0996382114 49 -1.9644976463 1.2499734127 50 -0.5383768845 -1.9644976463 51 -0.0561112677 -0.5383768845 52 -2.4932319603 -0.0561112677 53 -0.2196790652 -2.4932319603 54 -2.5695101721 -0.2196790652 55 1.3507802823 -2.5695101721 56 -0.0545534288 1.3507802823 57 0.5376690969 -0.0545534288 58 -0.3373127577 0.5376690969 59 1.6918339378 -0.3373127577 60 0.4458467903 1.6918339378 61 0.1417451844 0.4458467903 62 -0.5858112863 0.1417451844 63 -0.2364998541 -0.5858112863 64 0.7016597750 -0.2364998541 65 0.7869160975 0.7016597750 66 1.7530968962 0.7869160975 67 3.4564346851 1.7530968962 68 -3.6351315346 3.4564346851 69 0.6343384796 -3.6351315346 70 -3.7891318494 0.6343384796 71 -0.1785908244 -3.7891318494 72 1.5502804247 -0.1785908244 73 1.2127840206 1.5502804247 74 0.1899565287 1.2127840206 75 3.0848156559 0.1899565287 76 -0.2085982734 3.0848156559 77 1.3665071225 -0.2085982734 78 -2.0343823104 1.3665071225 79 0.1622065979 -2.0343823104 80 0.5793196641 0.1622065979 81 0.1267883720 0.5793196641 82 -0.7144634313 0.1267883720 83 0.2162683612 -0.7144634313 84 1.6395310906 0.2162683612 85 -0.0560716933 1.6395310906 86 0.7128642581 -0.0560716933 87 1.5454606236 0.7128642581 88 0.7532046255 1.5454606236 89 -1.6503435998 0.7532046255 90 0.3812342125 -1.6503435998 91 0.7032721837 0.3812342125 92 -0.0968770977 0.7032721837 93 -1.9572539543 -0.0968770977 94 1.1147559775 -1.9572539543 95 0.2627887784 1.1147559775 96 1.9768645915 0.2627887784 97 0.1526182446 1.9768645915 98 -0.3325070655 0.1526182446 99 -0.9400016902 -0.3325070655 100 1.3065412813 -0.9400016902 101 2.7151955376 1.3065412813 102 0.2338617841 2.7151955376 103 1.6835759135 0.2338617841 104 -2.0228622262 1.6835759135 105 1.1109796286 -2.0228622262 106 0.5428707485 1.1109796286 107 1.7330617333 0.5428707485 108 -0.0005969502 1.7330617333 109 0.8582651654 -0.0005969502 110 0.1743834377 0.8582651654 111 2.0372001774 0.1743834377 112 -0.1509986333 2.0372001774 113 -2.8462612594 -0.1509986333 114 1.2892418835 -2.8462612594 115 -1.2509980380 1.2892418835 116 0.7919448838 -1.2509980380 117 -1.9558849040 0.7919448838 118 0.2970126255 -1.9558849040 119 -1.0935310256 0.2970126255 120 0.3771429081 -1.0935310256 121 -2.9620919368 0.3771429081 122 -1.0553726530 -2.9620919368 123 -1.2621382249 -1.0553726530 124 -0.7437130668 -1.2621382249 125 -0.4876652396 -0.7437130668 126 1.2031011888 -0.4876652396 127 0.7719710113 1.2031011888 128 -2.8401289874 0.7719710113 129 1.9442742062 -2.8401289874 130 -3.3213728124 1.9442742062 131 2.1169849858 -3.3213728124 132 -1.9063969972 2.1169849858 133 -1.5730496432 -1.9063969972 134 -0.3557695740 -1.5730496432 135 0.9167535120 -0.3557695740 136 0.3706222762 0.9167535120 137 -2.2447853712 0.3706222762 138 -1.2966873506 -2.2447853712 139 -2.2359344356 -1.2966873506 140 3.1055819409 -2.2359344356 141 1.7025986012 3.1055819409 142 0.3371204573 1.7025986012 143 1.3058100622 0.3371204573 144 -4.1605574799 1.3058100622 145 2.1482093231 -4.1605574799 146 -2.0521548949 2.1482093231 147 0.8407255844 -2.0521548949 148 -0.0852293404 0.8407255844 149 -3.1449173603 -0.0852293404 150 -0.8925878118 -3.1449173603 151 2.3328001663 -0.8925878118 152 4.0530681344 2.3328001663 153 1.3446038444 4.0530681344 154 -2.7822320473 1.3446038444 155 0.6498330614 -2.7822320473 156 1.4082571067 0.6498330614 157 0.9640459858 1.4082571067 158 0.9653107609 0.9640459858 159 -0.2780470851 0.9653107609 160 0.2030662964 -0.2780470851 > 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/712bj1355065236.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/8mtrc1355065236.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/9mebr1355065236.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/10oijg1355065236.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/11joy91355065236.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/12hm8a1355065236.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/13us2e1355065236.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/149rb51355065236.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/1585ry1355065236.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/16s9wq1355065237.tab") + } > > try(system("convert tmp/1jfi81355065236.ps tmp/1jfi81355065236.png",intern=TRUE)) character(0) > try(system("convert tmp/2xyyv1355065236.ps tmp/2xyyv1355065236.png",intern=TRUE)) character(0) > try(system("convert tmp/3wlzq1355065236.ps tmp/3wlzq1355065236.png",intern=TRUE)) character(0) > try(system("convert tmp/4bfxu1355065236.ps tmp/4bfxu1355065236.png",intern=TRUE)) character(0) > try(system("convert tmp/5r0cl1355065236.ps tmp/5r0cl1355065236.png",intern=TRUE)) character(0) > try(system("convert tmp/6ru6m1355065236.ps tmp/6ru6m1355065236.png",intern=TRUE)) character(0) > try(system("convert tmp/712bj1355065236.ps tmp/712bj1355065236.png",intern=TRUE)) character(0) > try(system("convert tmp/8mtrc1355065236.ps tmp/8mtrc1355065236.png",intern=TRUE)) character(0) > try(system("convert tmp/9mebr1355065236.ps tmp/9mebr1355065236.png",intern=TRUE)) character(0) > try(system("convert tmp/10oijg1355065236.ps tmp/10oijg1355065236.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 8.528 1.593 10.125