R version 3.0.2 (2013-09-25) -- "Frisbee Sailing" Copyright (C) 2013 The R Foundation for Statistical Computing 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(41 + ,38 + ,12 + ,12 + ,53 + ,39 + ,32 + ,11 + ,11 + ,83 + ,30 + ,35 + ,15 + ,14 + ,66 + ,31 + ,33 + ,6 + ,12 + ,67 + ,34 + ,37 + ,13 + ,21 + ,76 + ,35 + ,29 + ,10 + ,12 + ,78 + ,39 + ,31 + ,12 + ,22 + ,53 + ,34 + ,36 + ,14 + ,11 + ,80 + ,36 + ,35 + ,12 + ,10 + ,74 + ,37 + ,38 + ,9 + ,13 + ,76 + ,38 + ,31 + ,10 + ,10 + ,79 + ,36 + ,34 + ,12 + ,8 + ,54 + ,38 + ,35 + ,12 + ,15 + ,67 + ,39 + ,38 + ,11 + ,14 + ,54 + ,33 + ,37 + ,15 + ,10 + ,87 + ,32 + ,33 + ,12 + ,14 + ,58 + ,36 + ,32 + ,10 + ,14 + ,75 + ,38 + ,38 + ,12 + ,11 + ,88 + ,39 + ,38 + ,11 + ,10 + ,64 + ,32 + ,32 + ,12 + ,13 + ,57 + ,32 + ,33 + ,11 + ,9.5 + ,66 + ,31 + ,31 + ,12 + ,14 + ,68 + ,39 + ,38 + ,13 + ,12 + ,54 + ,37 + ,39 + ,11 + ,14 + ,56 + ,39 + ,32 + ,12 + ,11 + ,86 + ,41 + ,32 + ,13 + ,9 + ,80 + ,36 + ,35 + ,10 + ,11 + ,76 + ,33 + ,37 + ,14 + ,15 + ,69 + ,33 + ,33 + ,12 + ,14 + ,78 + ,34 + ,33 + ,10 + ,13 + ,67 + ,31 + ,31 + ,12 + ,9 + ,80 + ,27 + ,32 + ,8 + ,15 + ,54 + ,37 + ,31 + ,10 + ,10 + ,71 + ,34 + ,37 + ,12 + ,11 + ,84 + ,34 + ,30 + ,12 + ,13 + ,74 + ,32 + ,33 + ,7 + ,8 + ,71 + ,29 + ,31 + ,9 + ,20 + ,63 + ,36 + ,33 + ,12 + ,12 + ,71 + ,29 + ,31 + ,10 + ,10 + ,76 + ,35 + ,33 + ,10 + ,10 + ,69 + ,37 + ,32 + ,10 + ,9 + ,74 + ,34 + ,33 + ,12 + ,14 + ,75 + ,38 + ,32 + ,15 + ,8 + ,54 + ,35 + ,33 + ,10 + ,14 + ,52 + ,38 + ,28 + ,10 + ,11 + ,69 + ,37 + ,35 + ,12 + ,13 + ,68 + ,38 + ,39 + ,13 + ,9 + ,65 + ,33 + ,34 + ,11 + ,11 + ,75 + ,36 + ,38 + ,11 + ,15 + ,74 + ,38 + ,32 + ,12 + ,11 + ,75 + ,32 + ,38 + ,14 + ,10 + ,72 + ,32 + ,30 + ,10 + ,14 + ,67 + ,32 + ,33 + ,12 + ,18 + ,63 + ,34 + ,38 + ,13 + ,14 + ,62 + ,32 + ,32 + ,5 + ,11 + ,63 + ,37 + ,35 + ,6 + ,14.5 + ,76 + ,39 + ,34 + ,12 + ,13 + ,74 + ,29 + ,34 + ,12 + ,9 + ,67 + ,37 + ,36 + ,11 + ,10 + ,73 + ,35 + ,34 + ,10 + ,15 + ,70 + ,30 + ,28 + ,7 + ,20 + ,53 + ,38 + ,34 + ,12 + ,12 + ,77 + ,34 + ,35 + ,14 + ,12 + ,80 + ,31 + ,35 + ,11 + ,14 + ,52 + ,34 + ,31 + ,12 + ,13 + ,54 + ,35 + ,37 + ,13 + ,11 + ,80 + ,36 + ,35 + ,14 + ,17 + ,66 + ,30 + ,27 + ,11 + ,12 + ,73 + ,39 + ,40 + ,12 + ,13 + ,63 + ,35 + ,37 + ,12 + ,14 + ,69 + ,38 + ,36 + ,8 + ,13 + ,67 + ,31 + ,38 + ,11 + ,15 + ,54 + ,34 + ,39 + ,14 + ,13 + ,81 + ,38 + ,41 + ,14 + ,10 + ,69 + ,34 + ,27 + ,12 + ,11 + ,84 + ,39 + ,30 + ,9 + ,19 + ,80 + ,37 + ,37 + ,13 + ,13 + ,70 + ,34 + ,31 + ,11 + ,17 + ,69 + ,28 + ,31 + ,12 + ,13 + ,77 + ,37 + ,27 + ,12 + ,9 + ,54 + ,33 + ,36 + ,12 + ,11 + ,79 + ,35 + ,37 + ,12 + ,9 + ,71 + ,37 + ,33 + ,12 + ,12 + ,73 + ,32 + ,34 + ,11 + ,12 + ,72 + ,33 + ,31 + ,10 + ,13 + ,77 + ,38 + ,39 + ,9 + ,13 + ,75 + ,33 + ,34 + ,12 + ,12 + ,69 + ,29 + ,32 + ,12 + ,15 + ,54 + ,33 + ,33 + ,12 + ,22 + ,70 + ,31 + ,36 + ,9 + ,13 + ,73 + ,36 + ,32 + ,15 + ,15 + ,54 + ,35 + ,41 + ,12 + ,13 + ,77 + ,32 + ,28 + ,12 + ,15 + ,82 + ,29 + ,30 + ,12 + ,12.5 + ,80 + ,39 + ,36 + ,10 + ,11 + ,80 + ,37 + ,35 + ,13 + ,16 + ,69 + ,35 + ,31 + ,9 + ,11 + ,78 + ,37 + ,34 + ,12 + ,11 + ,81 + ,32 + ,36 + ,10 + ,10 + ,76 + ,38 + ,36 + ,14 + ,10 + ,76 + ,37 + ,35 + ,11 + ,16 + ,73 + ,36 + ,37 + ,15 + ,12 + ,85 + ,32 + ,28 + ,11 + ,11 + ,66 + ,33 + ,39 + ,11 + ,16 + ,79 + ,40 + ,32 + ,12 + ,19 + ,68 + ,38 + ,35 + ,12 + ,11 + ,76 + ,41 + ,39 + ,12 + ,16 + ,71 + ,36 + ,35 + ,11 + ,15 + ,54 + ,43 + ,42 + ,7 + ,24 + ,46 + ,30 + ,34 + ,12 + ,14 + ,85 + ,31 + ,33 + ,14 + ,15 + ,74 + ,32 + ,41 + ,11 + ,11 + ,88 + ,32 + ,33 + ,11 + ,15 + ,38 + ,37 + ,34 + ,10 + ,12 + ,76 + ,37 + ,32 + ,13 + ,10 + ,86 + ,33 + ,40 + ,13 + ,14 + ,54 + ,34 + ,40 + ,8 + ,13 + ,67 + ,33 + ,35 + ,11 + ,9 + ,69 + ,38 + ,36 + ,12 + ,15 + ,90 + ,33 + ,37 + ,11 + ,15 + ,54 + ,31 + ,27 + ,13 + ,14 + ,76 + ,38 + ,39 + ,12 + ,11 + ,89 + ,37 + ,38 + ,14 + ,8 + ,76 + ,36 + ,31 + ,13 + ,11 + ,73 + ,31 + ,33 + ,15 + ,11 + ,79 + ,39 + ,32 + ,10 + ,8 + ,90 + ,44 + ,39 + ,11 + ,10 + ,74 + ,33 + ,36 + ,9 + ,11 + ,81 + ,35 + ,33 + ,11 + ,13 + ,72 + ,32 + ,33 + ,10 + ,11 + ,71 + ,28 + ,32 + ,11 + ,20 + ,66 + ,40 + ,37 + ,8 + ,10 + ,77 + ,27 + ,30 + ,11 + ,15 + ,65 + ,37 + ,38 + ,12 + ,12 + ,74 + ,32 + ,29 + ,12 + ,14 + ,85 + ,28 + ,22 + ,9 + ,23 + ,54 + ,34 + ,35 + ,11 + ,14 + ,63 + ,30 + ,35 + ,10 + ,16 + ,54 + ,35 + ,34 + ,8 + ,11 + ,64 + ,31 + ,35 + ,9 + ,12 + ,69 + ,32 + ,34 + ,8 + ,10 + ,54 + ,30 + ,37 + ,9 + ,14 + ,84 + ,30 + ,35 + ,15 + ,12 + ,86 + ,31 + ,23 + ,11 + ,12 + ,77 + ,40 + ,31 + ,8 + ,11 + ,89 + ,32 + ,27 + ,13 + ,12 + ,76 + ,36 + ,36 + ,12 + ,13 + ,60 + ,32 + ,31 + ,12 + ,11 + ,75 + ,35 + ,32 + ,9 + ,19 + ,73 + ,38 + ,39 + ,7 + ,12 + ,85 + ,42 + ,37 + ,13 + ,17 + ,79 + ,34 + ,38 + ,9 + ,9 + ,71 + ,35 + ,39 + ,6 + ,12 + ,72 + ,38 + ,34 + ,8 + ,19 + ,69 + ,33 + ,31 + ,8 + ,18 + ,78 + ,36 + ,32 + ,15 + ,15 + ,54 + ,32 + ,37 + ,6 + ,14 + ,69 + ,33 + ,36 + ,9 + ,11 + ,81 + ,34 + ,32 + ,11 + ,9 + ,84 + ,32 + ,38 + ,8 + ,18 + ,84 + ,34 + ,36 + ,8 + ,16 + ,69 + ,27 + ,26 + ,10 + ,24 + ,66 + ,31 + ,26 + ,8 + ,14 + ,81 + ,38 + ,33 + ,14 + ,20 + ,82 + ,34 + ,39 + ,10 + ,18 + ,72 + ,24 + ,30 + ,8 + ,23 + ,54 + ,30 + ,33 + ,11 + ,12 + ,78 + ,26 + ,25 + ,12 + ,14 + ,74 + ,34 + ,38 + ,12 + ,16 + ,82 + ,27 + ,37 + ,12 + ,18 + ,73 + ,37 + ,31 + ,5 + ,20 + ,55 + ,36 + ,37 + ,12 + ,12 + ,72 + ,41 + ,35 + ,10 + ,12 + ,78 + ,29 + ,25 + ,7 + ,17 + ,59 + ,36 + ,28 + ,12 + ,13 + ,72 + ,32 + ,35 + ,11 + ,9 + ,78 + ,37 + ,33 + ,8 + ,16 + ,68 + ,30 + ,30 + ,9 + ,18 + ,69 + ,31 + ,31 + ,10 + ,10 + ,67 + ,38 + ,37 + ,9 + ,14 + ,74 + ,36 + ,36 + ,12 + ,11 + ,54 + ,35 + ,30 + ,6 + ,9 + ,67 + ,31 + ,36 + ,15 + ,11 + ,70 + ,38 + ,32 + ,12 + ,10 + ,80 + ,22 + ,28 + ,12 + ,11 + ,89 + ,32 + ,36 + ,12 + ,19 + ,76 + ,36 + ,34 + ,11 + ,14 + ,74 + ,39 + ,31 + ,7 + ,12 + ,87 + ,28 + ,28 + ,7 + ,14 + ,54 + ,32 + ,36 + ,5 + ,21 + ,61 + ,32 + ,36 + ,12 + ,13 + ,38 + ,38 + ,40 + ,12 + ,10 + ,75 + ,32 + ,33 + ,3 + ,15 + ,69 + ,35 + ,37 + ,11 + ,16 + ,62 + ,32 + ,32 + ,10 + ,14 + ,72 + ,37 + ,38 + ,12 + ,12 + ,70 + ,34 + ,31 + ,9 + ,19 + ,79 + ,33 + ,37 + ,12 + ,15 + ,87 + ,33 + ,33 + ,9 + ,19 + ,62 + ,26 + ,32 + ,12 + ,13 + ,77 + ,30 + ,30 + ,12 + ,17 + ,69 + ,24 + ,30 + ,10 + ,12 + ,69 + ,34 + ,31 + ,9 + ,11 + ,75 + ,34 + ,32 + ,12 + ,14 + ,54 + ,33 + ,34 + ,8 + ,11 + ,72 + ,34 + ,36 + ,11 + ,13 + ,74 + ,35 + ,37 + ,11 + ,12 + ,85 + ,35 + ,36 + ,12 + ,15 + ,52 + ,36 + ,33 + ,10 + ,14 + ,70 + ,34 + ,33 + ,10 + ,12 + ,84 + ,34 + ,33 + ,12 + ,17 + ,64 + ,41 + ,44 + ,12 + ,11 + ,84 + ,32 + ,39 + ,11 + ,18 + ,87 + ,30 + ,32 + ,8 + ,13 + ,79 + ,35 + ,35 + ,12 + ,17 + ,67 + ,28 + ,25 + ,10 + ,13 + ,65 + ,33 + ,35 + ,11 + ,11 + ,85 + ,39 + ,34 + ,10 + ,12 + ,83 + ,36 + ,35 + ,8 + ,22 + ,61 + ,36 + ,39 + ,12 + ,14 + ,82 + ,35 + ,33 + ,12 + ,12 + ,76 + ,38 + ,36 + ,10 + ,12 + ,58 + ,33 + ,32 + ,12 + ,17 + ,72 + ,31 + ,32 + ,9 + ,9 + ,72 + ,34 + ,36 + ,9 + ,21 + ,38 + ,32 + ,36 + ,6 + ,10 + ,78 + ,31 + ,32 + ,10 + ,11 + ,54 + ,33 + ,34 + ,9 + ,12 + ,63 + ,34 + ,33 + ,9 + ,23 + ,66 + ,34 + ,35 + ,9 + ,13 + ,70 + ,34 + ,30 + ,6 + ,12 + ,71 + ,33 + ,38 + ,10 + ,16 + ,67 + ,32 + ,34 + ,6 + ,9 + ,58 + ,41 + ,33 + ,14 + ,17 + ,72 + ,34 + ,32 + ,10 + ,9 + ,72 + ,36 + ,31 + ,10 + ,14 + ,70 + ,37 + ,30 + ,6 + ,17 + ,76 + ,36 + ,27 + ,12 + ,13 + ,50 + ,29 + ,31 + ,12 + ,11 + ,72 + ,37 + ,30 + ,7 + ,12 + ,72 + ,27 + ,32 + ,8 + ,10 + ,88 + ,35 + ,35 + ,11 + ,19 + ,53 + ,28 + ,28 + ,3 + ,16 + ,58 + ,35 + ,33 + ,6 + ,16 + ,66 + ,37 + ,31 + ,10 + ,14 + ,82 + ,29 + ,35 + ,8 + ,20 + ,69 + ,32 + ,35 + ,9 + ,15 + ,68 + ,36 + ,32 + ,9 + ,23 + ,44 + ,19 + ,21 + ,8 + ,20 + ,56 + ,21 + ,20 + ,9 + ,16 + ,53 + ,31 + ,34 + ,7 + ,14 + ,70 + ,33 + ,32 + ,7 + ,17 + ,78 + ,36 + ,34 + ,6 + ,11 + ,71 + ,33 + ,32 + ,9 + ,13 + ,72 + ,37 + ,33 + ,10 + ,17 + ,68 + ,34 + ,33 + ,11 + ,15 + ,67 + ,35 + ,37 + ,12 + ,21 + ,75 + ,31 + ,32 + ,8 + ,18 + ,62 + ,37 + ,34 + ,11 + ,15 + ,67 + ,35 + ,30 + ,3 + ,8 + ,83 + ,27 + ,30 + ,11 + ,12 + ,64 + ,34 + ,38 + ,12 + ,12 + ,68 + ,40 + ,36 + ,7 + ,22 + ,62 + ,29 + ,32 + ,9 + ,12 + ,72) + ,dim=c(5 + ,264) + ,dimnames=list(c('Connected' + ,'Separate' + ,'Computer' + ,'Depression' + ,'Sport ') + ,1:264)) > y <- array(NA,dim=c(5,264),dimnames=list(c('Connected','Separate','Computer','Depression','Sport '),1:264)) > for (i in 1:dim(x)[1]) + { + for (j in 1:dim(x)[2]) + { + y[i,j] <- as.numeric(x[i,j]) + } + } > par3 = 'No Linear Trend' > par2 = 'Do not include Seasonal Dummies' > par1 = '3' > library(lattice) > library(lmtest) Loading required package: zoo Attaching package: 'zoo' The following objects 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 Computer Connected Separate Depression Sport\r\r 1 12 41 38 12.0 53 2 11 39 32 11.0 83 3 15 30 35 14.0 66 4 6 31 33 12.0 67 5 13 34 37 21.0 76 6 10 35 29 12.0 78 7 12 39 31 22.0 53 8 14 34 36 11.0 80 9 12 36 35 10.0 74 10 9 37 38 13.0 76 11 10 38 31 10.0 79 12 12 36 34 8.0 54 13 12 38 35 15.0 67 14 11 39 38 14.0 54 15 15 33 37 10.0 87 16 12 32 33 14.0 58 17 10 36 32 14.0 75 18 12 38 38 11.0 88 19 11 39 38 10.0 64 20 12 32 32 13.0 57 21 11 32 33 9.5 66 22 12 31 31 14.0 68 23 13 39 38 12.0 54 24 11 37 39 14.0 56 25 12 39 32 11.0 86 26 13 41 32 9.0 80 27 10 36 35 11.0 76 28 14 33 37 15.0 69 29 12 33 33 14.0 78 30 10 34 33 13.0 67 31 12 31 31 9.0 80 32 8 27 32 15.0 54 33 10 37 31 10.0 71 34 12 34 37 11.0 84 35 12 34 30 13.0 74 36 7 32 33 8.0 71 37 9 29 31 20.0 63 38 12 36 33 12.0 71 39 10 29 31 10.0 76 40 10 35 33 10.0 69 41 10 37 32 9.0 74 42 12 34 33 14.0 75 43 15 38 32 8.0 54 44 10 35 33 14.0 52 45 10 38 28 11.0 69 46 12 37 35 13.0 68 47 13 38 39 9.0 65 48 11 33 34 11.0 75 49 11 36 38 15.0 74 50 12 38 32 11.0 75 51 14 32 38 10.0 72 52 10 32 30 14.0 67 53 12 32 33 18.0 63 54 13 34 38 14.0 62 55 5 32 32 11.0 63 56 6 37 35 14.5 76 57 12 39 34 13.0 74 58 12 29 34 9.0 67 59 11 37 36 10.0 73 60 10 35 34 15.0 70 61 7 30 28 20.0 53 62 12 38 34 12.0 77 63 14 34 35 12.0 80 64 11 31 35 14.0 52 65 12 34 31 13.0 54 66 13 35 37 11.0 80 67 14 36 35 17.0 66 68 11 30 27 12.0 73 69 12 39 40 13.0 63 70 12 35 37 14.0 69 71 8 38 36 13.0 67 72 11 31 38 15.0 54 73 14 34 39 13.0 81 74 14 38 41 10.0 69 75 12 34 27 11.0 84 76 9 39 30 19.0 80 77 13 37 37 13.0 70 78 11 34 31 17.0 69 79 12 28 31 13.0 77 80 12 37 27 9.0 54 81 12 33 36 11.0 79 82 12 35 37 9.0 71 83 12 37 33 12.0 73 84 11 32 34 12.0 72 85 10 33 31 13.0 77 86 9 38 39 13.0 75 87 12 33 34 12.0 69 88 12 29 32 15.0 54 89 12 33 33 22.0 70 90 9 31 36 13.0 73 91 15 36 32 15.0 54 92 12 35 41 13.0 77 93 12 32 28 15.0 82 94 12 29 30 12.5 80 95 10 39 36 11.0 80 96 13 37 35 16.0 69 97 9 35 31 11.0 78 98 12 37 34 11.0 81 99 10 32 36 10.0 76 100 14 38 36 10.0 76 101 11 37 35 16.0 73 102 15 36 37 12.0 85 103 11 32 28 11.0 66 104 11 33 39 16.0 79 105 12 40 32 19.0 68 106 12 38 35 11.0 76 107 12 41 39 16.0 71 108 11 36 35 15.0 54 109 7 43 42 24.0 46 110 12 30 34 14.0 85 111 14 31 33 15.0 74 112 11 32 41 11.0 88 113 11 32 33 15.0 38 114 10 37 34 12.0 76 115 13 37 32 10.0 86 116 13 33 40 14.0 54 117 8 34 40 13.0 67 118 11 33 35 9.0 69 119 12 38 36 15.0 90 120 11 33 37 15.0 54 121 13 31 27 14.0 76 122 12 38 39 11.0 89 123 14 37 38 8.0 76 124 13 36 31 11.0 73 125 15 31 33 11.0 79 126 10 39 32 8.0 90 127 11 44 39 10.0 74 128 9 33 36 11.0 81 129 11 35 33 13.0 72 130 10 32 33 11.0 71 131 11 28 32 20.0 66 132 8 40 37 10.0 77 133 11 27 30 15.0 65 134 12 37 38 12.0 74 135 12 32 29 14.0 85 136 9 28 22 23.0 54 137 11 34 35 14.0 63 138 10 30 35 16.0 54 139 8 35 34 11.0 64 140 9 31 35 12.0 69 141 8 32 34 10.0 54 142 9 30 37 14.0 84 143 15 30 35 12.0 86 144 11 31 23 12.0 77 145 8 40 31 11.0 89 146 13 32 27 12.0 76 147 12 36 36 13.0 60 148 12 32 31 11.0 75 149 9 35 32 19.0 73 150 7 38 39 12.0 85 151 13 42 37 17.0 79 152 9 34 38 9.0 71 153 6 35 39 12.0 72 154 8 38 34 19.0 69 155 8 33 31 18.0 78 156 15 36 32 15.0 54 157 6 32 37 14.0 69 158 9 33 36 11.0 81 159 11 34 32 9.0 84 160 8 32 38 18.0 84 161 8 34 36 16.0 69 162 10 27 26 24.0 66 163 8 31 26 14.0 81 164 14 38 33 20.0 82 165 10 34 39 18.0 72 166 8 24 30 23.0 54 167 11 30 33 12.0 78 168 12 26 25 14.0 74 169 12 34 38 16.0 82 170 12 27 37 18.0 73 171 5 37 31 20.0 55 172 12 36 37 12.0 72 173 10 41 35 12.0 78 174 7 29 25 17.0 59 175 12 36 28 13.0 72 176 11 32 35 9.0 78 177 8 37 33 16.0 68 178 9 30 30 18.0 69 179 10 31 31 10.0 67 180 9 38 37 14.0 74 181 12 36 36 11.0 54 182 6 35 30 9.0 67 183 15 31 36 11.0 70 184 12 38 32 10.0 80 185 12 22 28 11.0 89 186 12 32 36 19.0 76 187 11 36 34 14.0 74 188 7 39 31 12.0 87 189 7 28 28 14.0 54 190 5 32 36 21.0 61 191 12 32 36 13.0 38 192 12 38 40 10.0 75 193 3 32 33 15.0 69 194 11 35 37 16.0 62 195 10 32 32 14.0 72 196 12 37 38 12.0 70 197 9 34 31 19.0 79 198 12 33 37 15.0 87 199 9 33 33 19.0 62 200 12 26 32 13.0 77 201 12 30 30 17.0 69 202 10 24 30 12.0 69 203 9 34 31 11.0 75 204 12 34 32 14.0 54 205 8 33 34 11.0 72 206 11 34 36 13.0 74 207 11 35 37 12.0 85 208 12 35 36 15.0 52 209 10 36 33 14.0 70 210 10 34 33 12.0 84 211 12 34 33 17.0 64 212 12 41 44 11.0 84 213 11 32 39 18.0 87 214 8 30 32 13.0 79 215 12 35 35 17.0 67 216 10 28 25 13.0 65 217 11 33 35 11.0 85 218 10 39 34 12.0 83 219 8 36 35 22.0 61 220 12 36 39 14.0 82 221 12 35 33 12.0 76 222 10 38 36 12.0 58 223 12 33 32 17.0 72 224 9 31 32 9.0 72 225 9 34 36 21.0 38 226 6 32 36 10.0 78 227 10 31 32 11.0 54 228 9 33 34 12.0 63 229 9 34 33 23.0 66 230 9 34 35 13.0 70 231 6 34 30 12.0 71 232 10 33 38 16.0 67 233 6 32 34 9.0 58 234 14 41 33 17.0 72 235 10 34 32 9.0 72 236 10 36 31 14.0 70 237 6 37 30 17.0 76 238 12 36 27 13.0 50 239 12 29 31 11.0 72 240 7 37 30 12.0 72 241 8 27 32 10.0 88 242 11 35 35 19.0 53 243 3 28 28 16.0 58 244 6 35 33 16.0 66 245 10 37 31 14.0 82 246 8 29 35 20.0 69 247 9 32 35 15.0 68 248 9 36 32 23.0 44 249 8 19 21 20.0 56 250 9 21 20 16.0 53 251 7 31 34 14.0 70 252 7 33 32 17.0 78 253 6 36 34 11.0 71 254 9 33 32 13.0 72 255 10 37 33 17.0 68 256 11 34 33 15.0 67 257 12 35 37 21.0 75 258 8 31 32 18.0 62 259 11 37 34 15.0 67 260 3 35 30 8.0 83 261 11 27 30 12.0 64 262 12 34 38 12.0 68 263 7 40 36 22.0 62 264 9 29 32 12.0 72 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) Connected Separate Depression `Sport\\r\\r` 6.78261 0.02467 0.09624 -0.08404 0.01163 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -7.8264 -1.1101 0.4004 1.5313 4.8819 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 6.78261 1.97302 3.438 0.000683 *** Connected 0.02467 0.04161 0.593 0.553802 Separate 0.09624 0.04242 2.269 0.024104 * Depression -0.08404 0.04288 -1.960 0.051105 . `Sport\\r\\r` 0.01163 0.01429 0.814 0.416546 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 2.265 on 259 degrees of freedom Multiple R-squared: 0.06105, Adjusted R-squared: 0.04655 F-statistic: 4.21 on 4 and 259 DF, p-value: 0.002551 > 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.937815603 0.124368794 0.06218440 [2,] 0.881275279 0.237449443 0.11872472 [3,] 0.932026526 0.135946947 0.06797347 [4,] 0.885673873 0.228652254 0.11432613 [5,] 0.844268642 0.311462716 0.15573136 [6,] 0.776852444 0.446295112 0.22314756 [7,] 0.717361382 0.565277235 0.28263862 [8,] 0.745703050 0.508593899 0.25429695 [9,] 0.677085193 0.645829613 0.32291481 [10,] 0.612466273 0.775067453 0.38753373 [11,] 0.533319003 0.933361995 0.46668100 [12,] 0.460676046 0.921352091 0.53932395 [13,] 0.394208333 0.788416666 0.60579167 [14,] 0.323756936 0.647513871 0.67624306 [15,] 0.265478587 0.530957174 0.73452141 [16,] 0.227153912 0.454307823 0.77284609 [17,] 0.199414134 0.398828268 0.80058587 [18,] 0.168805444 0.337610889 0.83119456 [19,] 0.174069916 0.348139832 0.82593008 [20,] 0.159738924 0.319477847 0.84026108 [21,] 0.149067514 0.298135029 0.85093249 [22,] 0.115650177 0.231300353 0.88434982 [23,] 0.099838669 0.199677338 0.90016133 [24,] 0.077876487 0.155752973 0.92212351 [25,] 0.107231889 0.214463779 0.89276811 [26,] 0.084447608 0.168895216 0.91555239 [27,] 0.064736847 0.129473695 0.93526315 [28,] 0.053347588 0.106695175 0.94665241 [29,] 0.101428994 0.202857988 0.89857101 [30,] 0.097488543 0.194977085 0.90251146 [31,] 0.079205409 0.158410818 0.92079459 [32,] 0.061195457 0.122390914 0.93880454 [33,] 0.048326483 0.096652965 0.95167352 [34,] 0.037734184 0.075468367 0.96226582 [35,] 0.029092701 0.058185401 0.97090730 [36,] 0.083789262 0.167578524 0.91621074 [37,] 0.068428497 0.136856995 0.93157150 [38,] 0.053624662 0.107249324 0.94637534 [39,] 0.041829631 0.083659263 0.95817037 [40,] 0.033303223 0.066606446 0.96669678 [41,] 0.025072793 0.050145585 0.97492721 [42,] 0.020801080 0.041602161 0.97919892 [43,] 0.016079057 0.032158113 0.98392094 [44,] 0.017045798 0.034091597 0.98295420 [45,] 0.012604828 0.025209656 0.98739517 [46,] 0.010284885 0.020569771 0.98971511 [47,] 0.008346938 0.016693876 0.99165306 [48,] 0.047026334 0.094052668 0.95297367 [49,] 0.163786558 0.327573116 0.83621344 [50,] 0.139834397 0.279668793 0.86016560 [51,] 0.123486770 0.246973539 0.87651323 [52,] 0.104492079 0.208984158 0.89550792 [53,] 0.090546203 0.181092406 0.90945380 [54,] 0.090289617 0.180579233 0.90971038 [55,] 0.075263323 0.150526646 0.92473668 [56,] 0.081720418 0.163440835 0.91827958 [57,] 0.066963536 0.133927073 0.93303646 [58,] 0.064231876 0.128463753 0.93576812 [59,] 0.054962661 0.109925323 0.94503734 [60,] 0.064688428 0.129376855 0.93531157 [61,] 0.058055332 0.116110664 0.94194467 [62,] 0.048488004 0.096976008 0.95151200 [63,] 0.039602807 0.079205613 0.96039719 [64,] 0.058645949 0.117291897 0.94135405 [65,] 0.048230506 0.096461012 0.95176949 [66,] 0.045838376 0.091676753 0.95416162 [67,] 0.041799720 0.083599439 0.95820028 [68,] 0.039472716 0.078945431 0.96052728 [69,] 0.035474585 0.070949170 0.96452542 [70,] 0.031331794 0.062663588 0.96866821 [71,] 0.025523412 0.051046825 0.97447659 [72,] 0.022426304 0.044852608 0.97757370 [73,] 0.023548796 0.047097592 0.97645120 [74,] 0.018892292 0.037784584 0.98110771 [75,] 0.015070231 0.030140463 0.98492977 [76,] 0.012358497 0.024716993 0.98764150 [77,] 0.009622408 0.019244815 0.99037759 [78,] 0.007598145 0.015196289 0.99240186 [79,] 0.010557875 0.021115750 0.98944212 [80,] 0.008649349 0.017298697 0.99135065 [81,] 0.008014194 0.016028388 0.99198581 [82,] 0.007156955 0.014313911 0.99284304 [83,] 0.007766487 0.015532974 0.99223351 [84,] 0.019184883 0.038369767 0.98081512 [85,] 0.015532687 0.031065374 0.98446731 [86,] 0.014379231 0.028758461 0.98562077 [87,] 0.012656098 0.025312197 0.98734390 [88,] 0.011557519 0.023115038 0.98844248 [89,] 0.011245581 0.022491161 0.98875442 [90,] 0.010613016 0.021226033 0.98938698 [91,] 0.008581514 0.017163028 0.99141849 [92,] 0.007474239 0.014948477 0.99252576 [93,] 0.008416523 0.016833047 0.99158348 [94,] 0.006662102 0.013324204 0.99333790 [95,] 0.009951717 0.019903434 0.99004828 [96,] 0.008093153 0.016186306 0.99190685 [97,] 0.006592753 0.013185505 0.99340725 [98,] 0.005807625 0.011615249 0.99419238 [99,] 0.004682661 0.009365322 0.99531734 [100,] 0.003805077 0.007610154 0.99619492 [101,] 0.002998795 0.005997589 0.99700121 [102,] 0.006573553 0.013147106 0.99342645 [103,] 0.005369137 0.010738273 0.99463086 [104,] 0.007639772 0.015279544 0.99236023 [105,] 0.006567361 0.013134722 0.99343264 [106,] 0.005409907 0.010819815 0.99459009 [107,] 0.004569433 0.009138866 0.99543057 [108,] 0.004364746 0.008729492 0.99563525 [109,] 0.004237967 0.008475935 0.99576203 [110,] 0.006570378 0.013140755 0.99342962 [111,] 0.005216234 0.010432468 0.99478377 [112,] 0.004217112 0.008434223 0.99578289 [113,] 0.003315609 0.006631217 0.99668439 [114,] 0.003991209 0.007982418 0.99600879 [115,] 0.003156725 0.006313449 0.99684328 [116,] 0.003591507 0.007183013 0.99640849 [117,] 0.003867891 0.007735782 0.99613211 [118,] 0.007760072 0.015520144 0.99223993 [119,] 0.006972025 0.013944051 0.99302797 [120,] 0.005701529 0.011403058 0.99429847 [121,] 0.006120940 0.012241880 0.99387906 [122,] 0.004924683 0.009849366 0.99507532 [123,] 0.004079971 0.008159943 0.99592003 [124,] 0.003284650 0.006569299 0.99671535 [125,] 0.004749504 0.009499008 0.99525050 [126,] 0.003874250 0.007748500 0.99612575 [127,] 0.003197066 0.006394131 0.99680293 [128,] 0.002865112 0.005730224 0.99713489 [129,] 0.002248618 0.004497235 0.99775138 [130,] 0.001765557 0.003531114 0.99823444 [131,] 0.001379236 0.002758472 0.99862076 [132,] 0.001686921 0.003373842 0.99831308 [133,] 0.001608050 0.003216100 0.99839195 [134,] 0.001810802 0.003621605 0.99818920 [135,] 0.001861730 0.003723460 0.99813827 [136,] 0.003708558 0.007417115 0.99629144 [137,] 0.003225244 0.006450489 0.99677476 [138,] 0.004004372 0.008008745 0.99599563 [139,] 0.005158501 0.010317002 0.99484150 [140,] 0.004530314 0.009060628 0.99546969 [141,] 0.004177927 0.008355855 0.99582207 [142,] 0.003614010 0.007228019 0.99638599 [143,] 0.007692470 0.015384940 0.99230753 [144,] 0.008071644 0.016143287 0.99192836 [145,] 0.008041245 0.016082490 0.99195876 [146,] 0.022053616 0.044107231 0.97794638 [147,] 0.022564428 0.045128855 0.97743557 [148,] 0.022739856 0.045479712 0.97726014 [149,] 0.054365352 0.108730703 0.94563465 [150,] 0.101202140 0.202404279 0.89879786 [151,] 0.097722413 0.195444827 0.90227759 [152,] 0.085612734 0.171225468 0.91438727 [153,] 0.095326851 0.190653701 0.90467315 [154,] 0.099868753 0.199737506 0.90013125 [155,] 0.089914940 0.179829880 0.91008506 [156,] 0.086422190 0.172844381 0.91357781 [157,] 0.129816371 0.259632743 0.87018363 [158,] 0.113578082 0.227156165 0.88642192 [159,] 0.103409270 0.206818541 0.89659073 [160,] 0.089470140 0.178940280 0.91052986 [161,] 0.102949009 0.205898018 0.89705099 [162,] 0.091919112 0.183838224 0.90808089 [163,] 0.083131901 0.166263803 0.91686810 [164,] 0.133989991 0.267979981 0.86601001 [165,] 0.121319710 0.242639419 0.87868029 [166,] 0.106259193 0.212518386 0.89374081 [167,] 0.104587733 0.209175466 0.89541227 [168,] 0.118008368 0.236016736 0.88199163 [169,] 0.102056497 0.204112995 0.89794350 [170,] 0.098345164 0.196690328 0.90165484 [171,] 0.084962901 0.169925802 0.91503710 [172,] 0.073050393 0.146100785 0.92694961 [173,] 0.067052654 0.134105309 0.93294735 [174,] 0.060669932 0.121339864 0.93933007 [175,] 0.087312733 0.174625465 0.91268727 [176,] 0.138286828 0.276573657 0.86171317 [177,] 0.139268220 0.278536439 0.86073178 [178,] 0.152784309 0.305568618 0.84721569 [179,] 0.147081995 0.294163990 0.85291800 [180,] 0.131847237 0.263694475 0.86815276 [181,] 0.144916482 0.289832963 0.85508352 [182,] 0.146412509 0.292825018 0.85358749 [183,] 0.261831819 0.523663638 0.73816818 [184,] 0.245331878 0.490663756 0.75466812 [185,] 0.223167498 0.446334997 0.77683250 [186,] 0.537738798 0.924522404 0.46226120 [187,] 0.500177433 0.999645133 0.49982257 [188,] 0.463236739 0.926473479 0.53676326 [189,] 0.442172485 0.884344970 0.55782751 [190,] 0.405146206 0.810292412 0.59485379 [191,] 0.388709734 0.777419468 0.61129027 [192,] 0.354196081 0.708392162 0.64580392 [193,] 0.366404821 0.732809641 0.63359518 [194,] 0.391019569 0.782039139 0.60898043 [195,] 0.365626130 0.731252260 0.63437387 [196,] 0.333864771 0.667729541 0.66613523 [197,] 0.341406310 0.682812620 0.65859369 [198,] 0.331349639 0.662699279 0.66865036 [199,] 0.302236785 0.604473570 0.69776322 [200,] 0.274223307 0.548446614 0.72577669 [201,] 0.266164351 0.532328702 0.73383565 [202,] 0.234325340 0.468650680 0.76567466 [203,] 0.207130366 0.414260732 0.79286963 [204,] 0.213708952 0.427417903 0.78629105 [205,] 0.190794235 0.381588470 0.80920576 [206,] 0.168262547 0.336525095 0.83173745 [207,] 0.152282331 0.304564663 0.84771767 [208,] 0.154289958 0.308579915 0.84571004 [209,] 0.144163040 0.288326080 0.85583696 [210,] 0.134804371 0.269608743 0.86519563 [211,] 0.115102142 0.230204283 0.88489786 [212,] 0.106401333 0.212802665 0.89359867 [213,] 0.107283703 0.214567406 0.89271630 [214,] 0.125715164 0.251430328 0.87428484 [215,] 0.103940398 0.207880795 0.89605960 [216,] 0.123724590 0.247449179 0.87627541 [217,] 0.105846649 0.211693299 0.89415335 [218,] 0.093810454 0.187620909 0.90618955 [219,] 0.115441426 0.230882853 0.88455857 [220,] 0.094858472 0.189716944 0.90514153 [221,] 0.076642138 0.153284275 0.92335786 [222,] 0.059924572 0.119849143 0.94007543 [223,] 0.047070957 0.094141914 0.95292904 [224,] 0.052862461 0.105724922 0.94713754 [225,] 0.040244957 0.080489914 0.95975504 [226,] 0.065333783 0.130667566 0.93466622 [227,] 0.182930181 0.365860361 0.81706982 [228,] 0.153646578 0.307293157 0.84635342 [229,] 0.140310017 0.280620035 0.85968998 [230,] 0.124893029 0.249786059 0.87510697 [231,] 0.180514193 0.361028386 0.81948581 [232,] 0.237779544 0.475559088 0.76222046 [233,] 0.201033740 0.402067481 0.79896626 [234,] 0.163637226 0.327274453 0.83636277 [235,] 0.137605647 0.275211294 0.86239435 [236,] 0.388115482 0.776230964 0.61188452 [237,] 0.427907849 0.855815697 0.57209215 [238,] 0.547185561 0.905628879 0.45281444 [239,] 0.594370082 0.811259835 0.40562992 [240,] 0.543570095 0.912859811 0.45642991 [241,] 0.501541747 0.996916506 0.49845825 [242,] 0.439784414 0.879568828 0.56021559 [243,] 0.355726973 0.711453946 0.64427303 [244,] 0.466202303 0.932404606 0.53379770 [245,] 0.380236106 0.760472212 0.61976389 [246,] 0.395106996 0.790213992 0.60489300 [247,] 0.290410000 0.580819999 0.70959000 [248,] 0.281661895 0.563323791 0.71833810 [249,] 0.262324049 0.524648097 0.73767595 > postscript(file="/var/fisher/rcomp/tmp/10rbd1384895112.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/2jmk51384895112.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/3uzlm1384895112.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/4y59b1384895112.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/51vyr1384895112.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 = 264 Frequency = 1 1 2 3 4 5 6 0.94066136 0.13450602 4.51763510 -4.49424946 2.69840760 -0.33589403 7 8 9 10 11 12 2.50405918 2.90777509 0.94042715 -2.14412891 -0.78209282 1.10121414 13 14 15 16 17 18 1.39267834 0.14644163 3.67075152 1.75382736 -0.44633187 0.52356180 19 20 21 22 23 24 -0.30600671 1.77766623 0.28262278 1.85467741 1.97837100 0.07627708 25 26 27 28 29 30 1.09961390 1.95198717 -0.99879894 3.30028083 1.49654305 -0.48422466 31 32 33 34 35 36 1.29493234 -1.89602017 -0.66437700 0.76500879 1.72309082 -3.90158373 37 38 39 40 41 42 -0.53361682 1.33587686 -0.52516917 -0.78426219 -0.87954791 1.50676500 43 44 45 46 47 48 4.24436075 -0.25039890 -0.29302001 1.23764717 1.52675396 0.18308575 49 50 51 52 53 54 0.07187331 1.25222185 2.77363883 -0.06211858 2.03181509 2.17674682 55 56 57 58 59 60 -5.46018865 -4.72934551 1.21476607 1.20674146 -0.16885578 -0.47195979 61 62 63 64 65 66 -2.15324949 1.12050880 3.08805388 0.65579483 1.85946148 1.78686145 67 68 69 70 71 72 3.62172002 1.03809731 0.76524300 1.16690517 -2.87163576 0.42783830 73 74 75 76 77 78 2.77548459 2.37177950 1.72744354 -0.96583238 2.02189881 1.02114214 79 80 81 82 83 84 1.73997624 1.83428361 0.94407597 0.72346718 1.28794527 0.32668336 85 86 87 88 89 90 -0.38337461 -2.25341184 1.33690531 2.05463949 2.26187123 -1.76872881 91 92 93 94 95 96 4.88194830 0.60485030 2.03994308 1.73463977 -1.21557576 2.47812241 97 98 99 100 101 102 -1.61241629 1.01462082 -1.08039705 2.77158192 0.43159959 3.78807306 103 104 105 106 107 108 0.88989313 0.07552213 1.95657898 0.95186071 0.97120642 0.59321788 109 110 111 112 113 114 -3.40381414 1.39289513 3.67644153 -0.61714760 1.07047682 -0.84319032 115 116 117 118 119 120 2.06491892 2.10197570 -3.15792898 -0.01144411 1.02892860 0.47474144 121 122 123 124 125 126 3.14660565 0.41568762 2.43569451 2.42106708 4.28214673 -1.19901488 127 128 129 130 131 132 -0.64190811 -2.07918544 0.43295164 -0.64947778 1.35991776 -3.38563260 133 134 135 136 137 138 1.16852900 0.79509719 1.82477217 0.71402694 0.45384654 -0.17472579 139 140 141 142 143 144 -2.73831681 -1.70999783 -2.63203455 -1.88420458 4.11695032 1.35187821 145 146 147 148 149 150 -2.86370492 2.95386485 1.25911953 1.49648634 -0.97822370 -4.45375423 151 152 153 154 155 156 2.13001286 -2.34810612 -5.22854453 -2.19819833 -1.97482874 4.88194830 157 158 159 160 161 162 -4.75908431 -2.07918544 0.07815553 -2.69364713 -2.54411055 1.29819004 163 164 165 166 167 168 -1.81530441 3.83088126 -0.69966246 -0.95724018 0.40248293 2.48570487 169 170 171 172 173 174 1.11220331 1.65388497 -4.63793252 0.93927225 -1.06137589 -2.16173909 175 176 177 178 179 180 1.88949884 -0.09145031 -2.31775993 -0.69989839 -0.46983315 -1.96525887 181 182 183 184 185 186 1.16083314 -4.55630567 4.09809268 1.11003299 1.86908857 1.67592079 187 188 189 190 191 192 0.37281189 -3.73173802 -2.61975175 -4.98154797 1.61367577 0.39823873 193 194 195 196 197 198 -7.29007510 0.41639076 -0.31275906 0.84162002 -0.92709430 1.09092810 199 200 201 202 203 204 -0.89718906 1.69307311 2.21606630 -0.05608926 -1.55285400 1.84725333 205 206 207 208 209 210 -2.78202213 0.14562997 -0.18725677 1.54490599 -0.48442180 -0.76598200 211 212 213 214 215 216 1.88680873 -0.08138673 0.17521727 -2.42886899 1.63475949 0.45700558 217 218 219 220 221 222 -0.02946480 -0.97394562 -1.89994986 0.79854886 1.30239349 -0.85099471 223 224 225 226 227 228 1.91467671 -1.70826547 -0.76338205 -5.10365847 -0.33084211 -1.59331045 229 230 231 232 233 234 -0.63224079 -1.71160373 -4.32605238 -0.68866591 -4.76259269 3.62107188 235 236 237 238 239 240 -0.78227598 -0.29193486 -4.03803985 2.24161787 1.60538897 -3.41169360 241 242 243 244 245 246 -2.71164079 0.96566002 -6.49820395 -4.24515817 -0.45617351 -1.98837496 247 248 249 250 251 252 -1.47093134 -0.32946210 -0.24306542 0.50258857 -3.45731443 -3.15510753 253 254 255 256 257 258 -4.84440193 -1.42146455 -0.23372461 0.68384597 1.68536814 -1.83564056 259 260 261 262 263 264 0.51359199 -7.82643230 0.92805376 0.93889195 -3.10650473 -1.40681918 > postscript(file="/var/fisher/rcomp/tmp/6hun01384895112.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 = 264 Frequency = 1 lag(myerror, k = 1) myerror 0 0.94066136 NA 1 0.13450602 0.94066136 2 4.51763510 0.13450602 3 -4.49424946 4.51763510 4 2.69840760 -4.49424946 5 -0.33589403 2.69840760 6 2.50405918 -0.33589403 7 2.90777509 2.50405918 8 0.94042715 2.90777509 9 -2.14412891 0.94042715 10 -0.78209282 -2.14412891 11 1.10121414 -0.78209282 12 1.39267834 1.10121414 13 0.14644163 1.39267834 14 3.67075152 0.14644163 15 1.75382736 3.67075152 16 -0.44633187 1.75382736 17 0.52356180 -0.44633187 18 -0.30600671 0.52356180 19 1.77766623 -0.30600671 20 0.28262278 1.77766623 21 1.85467741 0.28262278 22 1.97837100 1.85467741 23 0.07627708 1.97837100 24 1.09961390 0.07627708 25 1.95198717 1.09961390 26 -0.99879894 1.95198717 27 3.30028083 -0.99879894 28 1.49654305 3.30028083 29 -0.48422466 1.49654305 30 1.29493234 -0.48422466 31 -1.89602017 1.29493234 32 -0.66437700 -1.89602017 33 0.76500879 -0.66437700 34 1.72309082 0.76500879 35 -3.90158373 1.72309082 36 -0.53361682 -3.90158373 37 1.33587686 -0.53361682 38 -0.52516917 1.33587686 39 -0.78426219 -0.52516917 40 -0.87954791 -0.78426219 41 1.50676500 -0.87954791 42 4.24436075 1.50676500 43 -0.25039890 4.24436075 44 -0.29302001 -0.25039890 45 1.23764717 -0.29302001 46 1.52675396 1.23764717 47 0.18308575 1.52675396 48 0.07187331 0.18308575 49 1.25222185 0.07187331 50 2.77363883 1.25222185 51 -0.06211858 2.77363883 52 2.03181509 -0.06211858 53 2.17674682 2.03181509 54 -5.46018865 2.17674682 55 -4.72934551 -5.46018865 56 1.21476607 -4.72934551 57 1.20674146 1.21476607 58 -0.16885578 1.20674146 59 -0.47195979 -0.16885578 60 -2.15324949 -0.47195979 61 1.12050880 -2.15324949 62 3.08805388 1.12050880 63 0.65579483 3.08805388 64 1.85946148 0.65579483 65 1.78686145 1.85946148 66 3.62172002 1.78686145 67 1.03809731 3.62172002 68 0.76524300 1.03809731 69 1.16690517 0.76524300 70 -2.87163576 1.16690517 71 0.42783830 -2.87163576 72 2.77548459 0.42783830 73 2.37177950 2.77548459 74 1.72744354 2.37177950 75 -0.96583238 1.72744354 76 2.02189881 -0.96583238 77 1.02114214 2.02189881 78 1.73997624 1.02114214 79 1.83428361 1.73997624 80 0.94407597 1.83428361 81 0.72346718 0.94407597 82 1.28794527 0.72346718 83 0.32668336 1.28794527 84 -0.38337461 0.32668336 85 -2.25341184 -0.38337461 86 1.33690531 -2.25341184 87 2.05463949 1.33690531 88 2.26187123 2.05463949 89 -1.76872881 2.26187123 90 4.88194830 -1.76872881 91 0.60485030 4.88194830 92 2.03994308 0.60485030 93 1.73463977 2.03994308 94 -1.21557576 1.73463977 95 2.47812241 -1.21557576 96 -1.61241629 2.47812241 97 1.01462082 -1.61241629 98 -1.08039705 1.01462082 99 2.77158192 -1.08039705 100 0.43159959 2.77158192 101 3.78807306 0.43159959 102 0.88989313 3.78807306 103 0.07552213 0.88989313 104 1.95657898 0.07552213 105 0.95186071 1.95657898 106 0.97120642 0.95186071 107 0.59321788 0.97120642 108 -3.40381414 0.59321788 109 1.39289513 -3.40381414 110 3.67644153 1.39289513 111 -0.61714760 3.67644153 112 1.07047682 -0.61714760 113 -0.84319032 1.07047682 114 2.06491892 -0.84319032 115 2.10197570 2.06491892 116 -3.15792898 2.10197570 117 -0.01144411 -3.15792898 118 1.02892860 -0.01144411 119 0.47474144 1.02892860 120 3.14660565 0.47474144 121 0.41568762 3.14660565 122 2.43569451 0.41568762 123 2.42106708 2.43569451 124 4.28214673 2.42106708 125 -1.19901488 4.28214673 126 -0.64190811 -1.19901488 127 -2.07918544 -0.64190811 128 0.43295164 -2.07918544 129 -0.64947778 0.43295164 130 1.35991776 -0.64947778 131 -3.38563260 1.35991776 132 1.16852900 -3.38563260 133 0.79509719 1.16852900 134 1.82477217 0.79509719 135 0.71402694 1.82477217 136 0.45384654 0.71402694 137 -0.17472579 0.45384654 138 -2.73831681 -0.17472579 139 -1.70999783 -2.73831681 140 -2.63203455 -1.70999783 141 -1.88420458 -2.63203455 142 4.11695032 -1.88420458 143 1.35187821 4.11695032 144 -2.86370492 1.35187821 145 2.95386485 -2.86370492 146 1.25911953 2.95386485 147 1.49648634 1.25911953 148 -0.97822370 1.49648634 149 -4.45375423 -0.97822370 150 2.13001286 -4.45375423 151 -2.34810612 2.13001286 152 -5.22854453 -2.34810612 153 -2.19819833 -5.22854453 154 -1.97482874 -2.19819833 155 4.88194830 -1.97482874 156 -4.75908431 4.88194830 157 -2.07918544 -4.75908431 158 0.07815553 -2.07918544 159 -2.69364713 0.07815553 160 -2.54411055 -2.69364713 161 1.29819004 -2.54411055 162 -1.81530441 1.29819004 163 3.83088126 -1.81530441 164 -0.69966246 3.83088126 165 -0.95724018 -0.69966246 166 0.40248293 -0.95724018 167 2.48570487 0.40248293 168 1.11220331 2.48570487 169 1.65388497 1.11220331 170 -4.63793252 1.65388497 171 0.93927225 -4.63793252 172 -1.06137589 0.93927225 173 -2.16173909 -1.06137589 174 1.88949884 -2.16173909 175 -0.09145031 1.88949884 176 -2.31775993 -0.09145031 177 -0.69989839 -2.31775993 178 -0.46983315 -0.69989839 179 -1.96525887 -0.46983315 180 1.16083314 -1.96525887 181 -4.55630567 1.16083314 182 4.09809268 -4.55630567 183 1.11003299 4.09809268 184 1.86908857 1.11003299 185 1.67592079 1.86908857 186 0.37281189 1.67592079 187 -3.73173802 0.37281189 188 -2.61975175 -3.73173802 189 -4.98154797 -2.61975175 190 1.61367577 -4.98154797 191 0.39823873 1.61367577 192 -7.29007510 0.39823873 193 0.41639076 -7.29007510 194 -0.31275906 0.41639076 195 0.84162002 -0.31275906 196 -0.92709430 0.84162002 197 1.09092810 -0.92709430 198 -0.89718906 1.09092810 199 1.69307311 -0.89718906 200 2.21606630 1.69307311 201 -0.05608926 2.21606630 202 -1.55285400 -0.05608926 203 1.84725333 -1.55285400 204 -2.78202213 1.84725333 205 0.14562997 -2.78202213 206 -0.18725677 0.14562997 207 1.54490599 -0.18725677 208 -0.48442180 1.54490599 209 -0.76598200 -0.48442180 210 1.88680873 -0.76598200 211 -0.08138673 1.88680873 212 0.17521727 -0.08138673 213 -2.42886899 0.17521727 214 1.63475949 -2.42886899 215 0.45700558 1.63475949 216 -0.02946480 0.45700558 217 -0.97394562 -0.02946480 218 -1.89994986 -0.97394562 219 0.79854886 -1.89994986 220 1.30239349 0.79854886 221 -0.85099471 1.30239349 222 1.91467671 -0.85099471 223 -1.70826547 1.91467671 224 -0.76338205 -1.70826547 225 -5.10365847 -0.76338205 226 -0.33084211 -5.10365847 227 -1.59331045 -0.33084211 228 -0.63224079 -1.59331045 229 -1.71160373 -0.63224079 230 -4.32605238 -1.71160373 231 -0.68866591 -4.32605238 232 -4.76259269 -0.68866591 233 3.62107188 -4.76259269 234 -0.78227598 3.62107188 235 -0.29193486 -0.78227598 236 -4.03803985 -0.29193486 237 2.24161787 -4.03803985 238 1.60538897 2.24161787 239 -3.41169360 1.60538897 240 -2.71164079 -3.41169360 241 0.96566002 -2.71164079 242 -6.49820395 0.96566002 243 -4.24515817 -6.49820395 244 -0.45617351 -4.24515817 245 -1.98837496 -0.45617351 246 -1.47093134 -1.98837496 247 -0.32946210 -1.47093134 248 -0.24306542 -0.32946210 249 0.50258857 -0.24306542 250 -3.45731443 0.50258857 251 -3.15510753 -3.45731443 252 -4.84440193 -3.15510753 253 -1.42146455 -4.84440193 254 -0.23372461 -1.42146455 255 0.68384597 -0.23372461 256 1.68536814 0.68384597 257 -1.83564056 1.68536814 258 0.51359199 -1.83564056 259 -7.82643230 0.51359199 260 0.92805376 -7.82643230 261 0.93889195 0.92805376 262 -3.10650473 0.93889195 263 -1.40681918 -3.10650473 264 NA -1.40681918 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 0.13450602 0.94066136 [2,] 4.51763510 0.13450602 [3,] -4.49424946 4.51763510 [4,] 2.69840760 -4.49424946 [5,] -0.33589403 2.69840760 [6,] 2.50405918 -0.33589403 [7,] 2.90777509 2.50405918 [8,] 0.94042715 2.90777509 [9,] -2.14412891 0.94042715 [10,] -0.78209282 -2.14412891 [11,] 1.10121414 -0.78209282 [12,] 1.39267834 1.10121414 [13,] 0.14644163 1.39267834 [14,] 3.67075152 0.14644163 [15,] 1.75382736 3.67075152 [16,] -0.44633187 1.75382736 [17,] 0.52356180 -0.44633187 [18,] -0.30600671 0.52356180 [19,] 1.77766623 -0.30600671 [20,] 0.28262278 1.77766623 [21,] 1.85467741 0.28262278 [22,] 1.97837100 1.85467741 [23,] 0.07627708 1.97837100 [24,] 1.09961390 0.07627708 [25,] 1.95198717 1.09961390 [26,] -0.99879894 1.95198717 [27,] 3.30028083 -0.99879894 [28,] 1.49654305 3.30028083 [29,] -0.48422466 1.49654305 [30,] 1.29493234 -0.48422466 [31,] -1.89602017 1.29493234 [32,] -0.66437700 -1.89602017 [33,] 0.76500879 -0.66437700 [34,] 1.72309082 0.76500879 [35,] -3.90158373 1.72309082 [36,] -0.53361682 -3.90158373 [37,] 1.33587686 -0.53361682 [38,] -0.52516917 1.33587686 [39,] -0.78426219 -0.52516917 [40,] -0.87954791 -0.78426219 [41,] 1.50676500 -0.87954791 [42,] 4.24436075 1.50676500 [43,] -0.25039890 4.24436075 [44,] -0.29302001 -0.25039890 [45,] 1.23764717 -0.29302001 [46,] 1.52675396 1.23764717 [47,] 0.18308575 1.52675396 [48,] 0.07187331 0.18308575 [49,] 1.25222185 0.07187331 [50,] 2.77363883 1.25222185 [51,] -0.06211858 2.77363883 [52,] 2.03181509 -0.06211858 [53,] 2.17674682 2.03181509 [54,] -5.46018865 2.17674682 [55,] -4.72934551 -5.46018865 [56,] 1.21476607 -4.72934551 [57,] 1.20674146 1.21476607 [58,] -0.16885578 1.20674146 [59,] -0.47195979 -0.16885578 [60,] -2.15324949 -0.47195979 [61,] 1.12050880 -2.15324949 [62,] 3.08805388 1.12050880 [63,] 0.65579483 3.08805388 [64,] 1.85946148 0.65579483 [65,] 1.78686145 1.85946148 [66,] 3.62172002 1.78686145 [67,] 1.03809731 3.62172002 [68,] 0.76524300 1.03809731 [69,] 1.16690517 0.76524300 [70,] -2.87163576 1.16690517 [71,] 0.42783830 -2.87163576 [72,] 2.77548459 0.42783830 [73,] 2.37177950 2.77548459 [74,] 1.72744354 2.37177950 [75,] -0.96583238 1.72744354 [76,] 2.02189881 -0.96583238 [77,] 1.02114214 2.02189881 [78,] 1.73997624 1.02114214 [79,] 1.83428361 1.73997624 [80,] 0.94407597 1.83428361 [81,] 0.72346718 0.94407597 [82,] 1.28794527 0.72346718 [83,] 0.32668336 1.28794527 [84,] -0.38337461 0.32668336 [85,] -2.25341184 -0.38337461 [86,] 1.33690531 -2.25341184 [87,] 2.05463949 1.33690531 [88,] 2.26187123 2.05463949 [89,] -1.76872881 2.26187123 [90,] 4.88194830 -1.76872881 [91,] 0.60485030 4.88194830 [92,] 2.03994308 0.60485030 [93,] 1.73463977 2.03994308 [94,] -1.21557576 1.73463977 [95,] 2.47812241 -1.21557576 [96,] -1.61241629 2.47812241 [97,] 1.01462082 -1.61241629 [98,] -1.08039705 1.01462082 [99,] 2.77158192 -1.08039705 [100,] 0.43159959 2.77158192 [101,] 3.78807306 0.43159959 [102,] 0.88989313 3.78807306 [103,] 0.07552213 0.88989313 [104,] 1.95657898 0.07552213 [105,] 0.95186071 1.95657898 [106,] 0.97120642 0.95186071 [107,] 0.59321788 0.97120642 [108,] -3.40381414 0.59321788 [109,] 1.39289513 -3.40381414 [110,] 3.67644153 1.39289513 [111,] -0.61714760 3.67644153 [112,] 1.07047682 -0.61714760 [113,] -0.84319032 1.07047682 [114,] 2.06491892 -0.84319032 [115,] 2.10197570 2.06491892 [116,] -3.15792898 2.10197570 [117,] -0.01144411 -3.15792898 [118,] 1.02892860 -0.01144411 [119,] 0.47474144 1.02892860 [120,] 3.14660565 0.47474144 [121,] 0.41568762 3.14660565 [122,] 2.43569451 0.41568762 [123,] 2.42106708 2.43569451 [124,] 4.28214673 2.42106708 [125,] -1.19901488 4.28214673 [126,] -0.64190811 -1.19901488 [127,] -2.07918544 -0.64190811 [128,] 0.43295164 -2.07918544 [129,] -0.64947778 0.43295164 [130,] 1.35991776 -0.64947778 [131,] -3.38563260 1.35991776 [132,] 1.16852900 -3.38563260 [133,] 0.79509719 1.16852900 [134,] 1.82477217 0.79509719 [135,] 0.71402694 1.82477217 [136,] 0.45384654 0.71402694 [137,] -0.17472579 0.45384654 [138,] -2.73831681 -0.17472579 [139,] -1.70999783 -2.73831681 [140,] -2.63203455 -1.70999783 [141,] -1.88420458 -2.63203455 [142,] 4.11695032 -1.88420458 [143,] 1.35187821 4.11695032 [144,] -2.86370492 1.35187821 [145,] 2.95386485 -2.86370492 [146,] 1.25911953 2.95386485 [147,] 1.49648634 1.25911953 [148,] -0.97822370 1.49648634 [149,] -4.45375423 -0.97822370 [150,] 2.13001286 -4.45375423 [151,] -2.34810612 2.13001286 [152,] -5.22854453 -2.34810612 [153,] -2.19819833 -5.22854453 [154,] -1.97482874 -2.19819833 [155,] 4.88194830 -1.97482874 [156,] -4.75908431 4.88194830 [157,] -2.07918544 -4.75908431 [158,] 0.07815553 -2.07918544 [159,] -2.69364713 0.07815553 [160,] -2.54411055 -2.69364713 [161,] 1.29819004 -2.54411055 [162,] -1.81530441 1.29819004 [163,] 3.83088126 -1.81530441 [164,] -0.69966246 3.83088126 [165,] -0.95724018 -0.69966246 [166,] 0.40248293 -0.95724018 [167,] 2.48570487 0.40248293 [168,] 1.11220331 2.48570487 [169,] 1.65388497 1.11220331 [170,] -4.63793252 1.65388497 [171,] 0.93927225 -4.63793252 [172,] -1.06137589 0.93927225 [173,] -2.16173909 -1.06137589 [174,] 1.88949884 -2.16173909 [175,] -0.09145031 1.88949884 [176,] -2.31775993 -0.09145031 [177,] -0.69989839 -2.31775993 [178,] -0.46983315 -0.69989839 [179,] -1.96525887 -0.46983315 [180,] 1.16083314 -1.96525887 [181,] -4.55630567 1.16083314 [182,] 4.09809268 -4.55630567 [183,] 1.11003299 4.09809268 [184,] 1.86908857 1.11003299 [185,] 1.67592079 1.86908857 [186,] 0.37281189 1.67592079 [187,] -3.73173802 0.37281189 [188,] -2.61975175 -3.73173802 [189,] -4.98154797 -2.61975175 [190,] 1.61367577 -4.98154797 [191,] 0.39823873 1.61367577 [192,] -7.29007510 0.39823873 [193,] 0.41639076 -7.29007510 [194,] -0.31275906 0.41639076 [195,] 0.84162002 -0.31275906 [196,] -0.92709430 0.84162002 [197,] 1.09092810 -0.92709430 [198,] -0.89718906 1.09092810 [199,] 1.69307311 -0.89718906 [200,] 2.21606630 1.69307311 [201,] -0.05608926 2.21606630 [202,] -1.55285400 -0.05608926 [203,] 1.84725333 -1.55285400 [204,] -2.78202213 1.84725333 [205,] 0.14562997 -2.78202213 [206,] -0.18725677 0.14562997 [207,] 1.54490599 -0.18725677 [208,] -0.48442180 1.54490599 [209,] -0.76598200 -0.48442180 [210,] 1.88680873 -0.76598200 [211,] -0.08138673 1.88680873 [212,] 0.17521727 -0.08138673 [213,] -2.42886899 0.17521727 [214,] 1.63475949 -2.42886899 [215,] 0.45700558 1.63475949 [216,] -0.02946480 0.45700558 [217,] -0.97394562 -0.02946480 [218,] -1.89994986 -0.97394562 [219,] 0.79854886 -1.89994986 [220,] 1.30239349 0.79854886 [221,] -0.85099471 1.30239349 [222,] 1.91467671 -0.85099471 [223,] -1.70826547 1.91467671 [224,] -0.76338205 -1.70826547 [225,] -5.10365847 -0.76338205 [226,] -0.33084211 -5.10365847 [227,] -1.59331045 -0.33084211 [228,] -0.63224079 -1.59331045 [229,] -1.71160373 -0.63224079 [230,] -4.32605238 -1.71160373 [231,] -0.68866591 -4.32605238 [232,] -4.76259269 -0.68866591 [233,] 3.62107188 -4.76259269 [234,] -0.78227598 3.62107188 [235,] -0.29193486 -0.78227598 [236,] -4.03803985 -0.29193486 [237,] 2.24161787 -4.03803985 [238,] 1.60538897 2.24161787 [239,] -3.41169360 1.60538897 [240,] -2.71164079 -3.41169360 [241,] 0.96566002 -2.71164079 [242,] -6.49820395 0.96566002 [243,] -4.24515817 -6.49820395 [244,] -0.45617351 -4.24515817 [245,] -1.98837496 -0.45617351 [246,] -1.47093134 -1.98837496 [247,] -0.32946210 -1.47093134 [248,] -0.24306542 -0.32946210 [249,] 0.50258857 -0.24306542 [250,] -3.45731443 0.50258857 [251,] -3.15510753 -3.45731443 [252,] -4.84440193 -3.15510753 [253,] -1.42146455 -4.84440193 [254,] -0.23372461 -1.42146455 [255,] 0.68384597 -0.23372461 [256,] 1.68536814 0.68384597 [257,] -1.83564056 1.68536814 [258,] 0.51359199 -1.83564056 [259,] -7.82643230 0.51359199 [260,] 0.92805376 -7.82643230 [261,] 0.93889195 0.92805376 [262,] -3.10650473 0.93889195 [263,] -1.40681918 -3.10650473 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 0.13450602 0.94066136 2 4.51763510 0.13450602 3 -4.49424946 4.51763510 4 2.69840760 -4.49424946 5 -0.33589403 2.69840760 6 2.50405918 -0.33589403 7 2.90777509 2.50405918 8 0.94042715 2.90777509 9 -2.14412891 0.94042715 10 -0.78209282 -2.14412891 11 1.10121414 -0.78209282 12 1.39267834 1.10121414 13 0.14644163 1.39267834 14 3.67075152 0.14644163 15 1.75382736 3.67075152 16 -0.44633187 1.75382736 17 0.52356180 -0.44633187 18 -0.30600671 0.52356180 19 1.77766623 -0.30600671 20 0.28262278 1.77766623 21 1.85467741 0.28262278 22 1.97837100 1.85467741 23 0.07627708 1.97837100 24 1.09961390 0.07627708 25 1.95198717 1.09961390 26 -0.99879894 1.95198717 27 3.30028083 -0.99879894 28 1.49654305 3.30028083 29 -0.48422466 1.49654305 30 1.29493234 -0.48422466 31 -1.89602017 1.29493234 32 -0.66437700 -1.89602017 33 0.76500879 -0.66437700 34 1.72309082 0.76500879 35 -3.90158373 1.72309082 36 -0.53361682 -3.90158373 37 1.33587686 -0.53361682 38 -0.52516917 1.33587686 39 -0.78426219 -0.52516917 40 -0.87954791 -0.78426219 41 1.50676500 -0.87954791 42 4.24436075 1.50676500 43 -0.25039890 4.24436075 44 -0.29302001 -0.25039890 45 1.23764717 -0.29302001 46 1.52675396 1.23764717 47 0.18308575 1.52675396 48 0.07187331 0.18308575 49 1.25222185 0.07187331 50 2.77363883 1.25222185 51 -0.06211858 2.77363883 52 2.03181509 -0.06211858 53 2.17674682 2.03181509 54 -5.46018865 2.17674682 55 -4.72934551 -5.46018865 56 1.21476607 -4.72934551 57 1.20674146 1.21476607 58 -0.16885578 1.20674146 59 -0.47195979 -0.16885578 60 -2.15324949 -0.47195979 61 1.12050880 -2.15324949 62 3.08805388 1.12050880 63 0.65579483 3.08805388 64 1.85946148 0.65579483 65 1.78686145 1.85946148 66 3.62172002 1.78686145 67 1.03809731 3.62172002 68 0.76524300 1.03809731 69 1.16690517 0.76524300 70 -2.87163576 1.16690517 71 0.42783830 -2.87163576 72 2.77548459 0.42783830 73 2.37177950 2.77548459 74 1.72744354 2.37177950 75 -0.96583238 1.72744354 76 2.02189881 -0.96583238 77 1.02114214 2.02189881 78 1.73997624 1.02114214 79 1.83428361 1.73997624 80 0.94407597 1.83428361 81 0.72346718 0.94407597 82 1.28794527 0.72346718 83 0.32668336 1.28794527 84 -0.38337461 0.32668336 85 -2.25341184 -0.38337461 86 1.33690531 -2.25341184 87 2.05463949 1.33690531 88 2.26187123 2.05463949 89 -1.76872881 2.26187123 90 4.88194830 -1.76872881 91 0.60485030 4.88194830 92 2.03994308 0.60485030 93 1.73463977 2.03994308 94 -1.21557576 1.73463977 95 2.47812241 -1.21557576 96 -1.61241629 2.47812241 97 1.01462082 -1.61241629 98 -1.08039705 1.01462082 99 2.77158192 -1.08039705 100 0.43159959 2.77158192 101 3.78807306 0.43159959 102 0.88989313 3.78807306 103 0.07552213 0.88989313 104 1.95657898 0.07552213 105 0.95186071 1.95657898 106 0.97120642 0.95186071 107 0.59321788 0.97120642 108 -3.40381414 0.59321788 109 1.39289513 -3.40381414 110 3.67644153 1.39289513 111 -0.61714760 3.67644153 112 1.07047682 -0.61714760 113 -0.84319032 1.07047682 114 2.06491892 -0.84319032 115 2.10197570 2.06491892 116 -3.15792898 2.10197570 117 -0.01144411 -3.15792898 118 1.02892860 -0.01144411 119 0.47474144 1.02892860 120 3.14660565 0.47474144 121 0.41568762 3.14660565 122 2.43569451 0.41568762 123 2.42106708 2.43569451 124 4.28214673 2.42106708 125 -1.19901488 4.28214673 126 -0.64190811 -1.19901488 127 -2.07918544 -0.64190811 128 0.43295164 -2.07918544 129 -0.64947778 0.43295164 130 1.35991776 -0.64947778 131 -3.38563260 1.35991776 132 1.16852900 -3.38563260 133 0.79509719 1.16852900 134 1.82477217 0.79509719 135 0.71402694 1.82477217 136 0.45384654 0.71402694 137 -0.17472579 0.45384654 138 -2.73831681 -0.17472579 139 -1.70999783 -2.73831681 140 -2.63203455 -1.70999783 141 -1.88420458 -2.63203455 142 4.11695032 -1.88420458 143 1.35187821 4.11695032 144 -2.86370492 1.35187821 145 2.95386485 -2.86370492 146 1.25911953 2.95386485 147 1.49648634 1.25911953 148 -0.97822370 1.49648634 149 -4.45375423 -0.97822370 150 2.13001286 -4.45375423 151 -2.34810612 2.13001286 152 -5.22854453 -2.34810612 153 -2.19819833 -5.22854453 154 -1.97482874 -2.19819833 155 4.88194830 -1.97482874 156 -4.75908431 4.88194830 157 -2.07918544 -4.75908431 158 0.07815553 -2.07918544 159 -2.69364713 0.07815553 160 -2.54411055 -2.69364713 161 1.29819004 -2.54411055 162 -1.81530441 1.29819004 163 3.83088126 -1.81530441 164 -0.69966246 3.83088126 165 -0.95724018 -0.69966246 166 0.40248293 -0.95724018 167 2.48570487 0.40248293 168 1.11220331 2.48570487 169 1.65388497 1.11220331 170 -4.63793252 1.65388497 171 0.93927225 -4.63793252 172 -1.06137589 0.93927225 173 -2.16173909 -1.06137589 174 1.88949884 -2.16173909 175 -0.09145031 1.88949884 176 -2.31775993 -0.09145031 177 -0.69989839 -2.31775993 178 -0.46983315 -0.69989839 179 -1.96525887 -0.46983315 180 1.16083314 -1.96525887 181 -4.55630567 1.16083314 182 4.09809268 -4.55630567 183 1.11003299 4.09809268 184 1.86908857 1.11003299 185 1.67592079 1.86908857 186 0.37281189 1.67592079 187 -3.73173802 0.37281189 188 -2.61975175 -3.73173802 189 -4.98154797 -2.61975175 190 1.61367577 -4.98154797 191 0.39823873 1.61367577 192 -7.29007510 0.39823873 193 0.41639076 -7.29007510 194 -0.31275906 0.41639076 195 0.84162002 -0.31275906 196 -0.92709430 0.84162002 197 1.09092810 -0.92709430 198 -0.89718906 1.09092810 199 1.69307311 -0.89718906 200 2.21606630 1.69307311 201 -0.05608926 2.21606630 202 -1.55285400 -0.05608926 203 1.84725333 -1.55285400 204 -2.78202213 1.84725333 205 0.14562997 -2.78202213 206 -0.18725677 0.14562997 207 1.54490599 -0.18725677 208 -0.48442180 1.54490599 209 -0.76598200 -0.48442180 210 1.88680873 -0.76598200 211 -0.08138673 1.88680873 212 0.17521727 -0.08138673 213 -2.42886899 0.17521727 214 1.63475949 -2.42886899 215 0.45700558 1.63475949 216 -0.02946480 0.45700558 217 -0.97394562 -0.02946480 218 -1.89994986 -0.97394562 219 0.79854886 -1.89994986 220 1.30239349 0.79854886 221 -0.85099471 1.30239349 222 1.91467671 -0.85099471 223 -1.70826547 1.91467671 224 -0.76338205 -1.70826547 225 -5.10365847 -0.76338205 226 -0.33084211 -5.10365847 227 -1.59331045 -0.33084211 228 -0.63224079 -1.59331045 229 -1.71160373 -0.63224079 230 -4.32605238 -1.71160373 231 -0.68866591 -4.32605238 232 -4.76259269 -0.68866591 233 3.62107188 -4.76259269 234 -0.78227598 3.62107188 235 -0.29193486 -0.78227598 236 -4.03803985 -0.29193486 237 2.24161787 -4.03803985 238 1.60538897 2.24161787 239 -3.41169360 1.60538897 240 -2.71164079 -3.41169360 241 0.96566002 -2.71164079 242 -6.49820395 0.96566002 243 -4.24515817 -6.49820395 244 -0.45617351 -4.24515817 245 -1.98837496 -0.45617351 246 -1.47093134 -1.98837496 247 -0.32946210 -1.47093134 248 -0.24306542 -0.32946210 249 0.50258857 -0.24306542 250 -3.45731443 0.50258857 251 -3.15510753 -3.45731443 252 -4.84440193 -3.15510753 253 -1.42146455 -4.84440193 254 -0.23372461 -1.42146455 255 0.68384597 -0.23372461 256 1.68536814 0.68384597 257 -1.83564056 1.68536814 258 0.51359199 -1.83564056 259 -7.82643230 0.51359199 260 0.92805376 -7.82643230 261 0.93889195 0.92805376 262 -3.10650473 0.93889195 263 -1.40681918 -3.10650473 > 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/7ovxd1384895113.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/8dhyo1384895113.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/933ye1384895113.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/105guh1384895113.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/112d6b1384895113.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/12m87s1384895113.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/133ou11384895113.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/14omrs1384895113.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/15ndt21384895113.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/16rg7o1384895113.tab") + } > > try(system("convert tmp/10rbd1384895112.ps tmp/10rbd1384895112.png",intern=TRUE)) character(0) > try(system("convert tmp/2jmk51384895112.ps tmp/2jmk51384895112.png",intern=TRUE)) character(0) > try(system("convert tmp/3uzlm1384895112.ps tmp/3uzlm1384895112.png",intern=TRUE)) character(0) > try(system("convert tmp/4y59b1384895112.ps tmp/4y59b1384895112.png",intern=TRUE)) character(0) > try(system("convert tmp/51vyr1384895112.ps tmp/51vyr1384895112.png",intern=TRUE)) character(0) > try(system("convert tmp/6hun01384895112.ps tmp/6hun01384895112.png",intern=TRUE)) character(0) > try(system("convert tmp/7ovxd1384895113.ps tmp/7ovxd1384895113.png",intern=TRUE)) character(0) > try(system("convert tmp/8dhyo1384895113.ps tmp/8dhyo1384895113.png",intern=TRUE)) character(0) > try(system("convert tmp/933ye1384895113.ps tmp/933ye1384895113.png",intern=TRUE)) character(0) > try(system("convert tmp/105guh1384895113.ps tmp/105guh1384895113.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 12.118 2.275 14.448