R version 2.13.0 (2011-04-13) Copyright (C) 2011 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i486-pc-linux-gnu (32-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > x <- array(list(146455 + ,1 + ,22 + ,68 + ,128 + ,95556 + ,84944 + ,4 + ,20 + ,72 + ,89 + ,54565 + ,113337 + ,9 + ,24 + ,37 + ,68 + ,63016 + ,128655 + ,2 + ,21 + ,70 + ,108 + ,79774 + ,74398 + ,1 + ,15 + ,30 + ,51 + ,31258 + ,35523 + ,2 + ,16 + ,53 + ,33 + ,52491 + ,293403 + ,0 + ,20 + ,74 + ,119 + ,91256 + ,32750 + ,0 + ,18 + ,22 + ,5 + ,22807 + ,106539 + ,5 + ,19 + ,68 + ,63 + ,77411 + ,130539 + ,0 + ,20 + ,47 + ,66 + ,48821 + ,154991 + ,0 + ,25 + ,87 + ,98 + ,52295 + ,126683 + ,7 + ,37 + ,123 + ,71 + ,63262 + ,100672 + ,6 + ,23 + ,69 + ,55 + ,50466 + ,179562 + ,3 + ,28 + ,89 + ,116 + ,62932 + ,125971 + ,4 + ,25 + ,45 + ,71 + ,38439 + ,234509 + ,0 + ,35 + ,122 + ,120 + ,70817 + ,158980 + ,4 + ,20 + ,75 + ,122 + ,105965 + ,184217 + ,3 + ,22 + ,45 + ,74 + ,73795 + ,107342 + ,0 + ,19 + ,53 + ,111 + ,82043 + ,141371 + ,5 + ,26 + ,96 + ,103 + ,74349 + ,154730 + ,0 + ,27 + ,82 + ,98 + ,82204 + ,264020 + ,1 + ,22 + ,76 + ,100 + ,55709 + ,90938 + ,3 + ,15 + ,51 + ,42 + ,37137 + ,101324 + ,5 + ,26 + ,104 + ,100 + ,70780 + ,130232 + ,0 + ,24 + ,83 + ,105 + ,55027 + ,137793 + ,0 + ,22 + ,78 + ,77 + ,56699 + ,161678 + ,4 + ,21 + ,59 + ,83 + ,65911 + ,151503 + ,0 + ,23 + ,83 + ,98 + ,56316 + ,105324 + ,0 + ,21 + ,71 + ,46 + ,26982 + ,175914 + ,0 + ,25 + ,81 + ,95 + ,54628 + ,181853 + ,3 + ,25 + ,93 + ,91 + ,96750 + ,114928 + ,4 + ,28 + ,72 + ,91 + ,53009 + ,190410 + ,1 + ,30 + ,107 + ,94 + ,64664 + ,61499 + ,4 + ,20 + ,75 + ,15 + ,36990 + ,223004 + ,1 + ,23 + ,84 + ,137 + ,85224 + ,167131 + ,0 + ,25 + ,69 + ,56 + ,37048 + ,233482 + ,0 + ,26 + ,90 + ,78 + ,59635 + ,121185 + ,2 + ,20 + ,51 + ,68 + ,42051 + ,78776 + ,1 + ,8 + ,18 + ,34 + ,26998 + ,188967 + ,2 + ,20 + ,75 + ,94 + ,63717 + ,199512 + ,8 + ,21 + ,59 + ,82 + ,55071 + ,102531 + ,5 + ,25 + ,63 + ,63 + ,40001 + ,118958 + ,3 + ,20 + ,68 + ,58 + ,54506 + ,68948 + ,4 + ,18 + ,47 + ,43 + ,35838 + ,93125 + ,1 + ,21 + ,29 + ,36 + ,50838 + ,277108 + ,2 + ,22 + ,69 + ,64 + ,86997 + ,78800 + ,2 + ,26 + ,66 + ,21 + ,33032 + ,157250 + ,0 + ,30 + ,106 + ,104 + ,61704 + ,210554 + ,6 + ,24 + ,73 + ,124 + ,117986 + ,127324 + ,3 + ,26 + ,87 + ,101 + ,56733 + ,114397 + ,0 + ,18 + ,65 + ,85 + ,55064 + ,24188 + ,0 + ,4 + ,7 + ,7 + ,5950 + ,246209 + ,6 + ,31 + ,111 + ,124 + ,84607 + ,65029 + ,5 + ,18 + ,61 + ,21 + ,32551 + ,98030 + ,3 + ,14 + ,41 + ,35 + ,31701 + ,173587 + ,1 + ,20 + ,70 + ,95 + ,71170 + ,172684 + ,5 + ,30 + ,112 + ,102 + ,101773 + ,191381 + ,5 + ,20 + ,71 + ,212 + ,101653 + ,191276 + ,0 + ,26 + ,90 + ,141 + ,81493 + ,134043 + ,9 + ,20 + ,69 + ,54 + ,55901 + ,233406 + ,6 + ,27 + ,85 + ,117 + ,109104 + ,195304 + ,6 + ,18 + ,47 + ,145 + ,114425 + ,127619 + ,5 + ,27 + ,50 + ,50 + ,36311 + ,162810 + ,6 + ,22 + ,76 + ,80 + ,70027 + ,129100 + ,2 + ,19 + ,60 + ,87 + ,73713 + ,108715 + ,0 + ,15 + ,35 + ,78 + ,40671 + ,106469 + ,3 + ,19 + ,72 + ,86 + ,89041 + ,142069 + ,8 + ,28 + ,88 + ,82 + ,57231 + ,143937 + ,2 + ,20 + ,66 + ,139 + ,78792 + ,84256 + ,5 + ,17 + ,58 + ,75 + ,59155 + ,118807 + ,11 + ,25 + ,81 + ,70 + ,55827 + ,69471 + ,6 + ,20 + ,63 + ,25 + ,22618 + ,122433 + ,5 + ,25 + ,91 + ,66 + ,58425 + ,131122 + ,1 + ,20 + ,50 + ,89 + ,65724 + ,94763 + ,0 + ,22 + ,75 + ,99 + ,56979 + ,188780 + ,3 + ,25 + ,85 + ,98 + ,72369 + ,191467 + ,3 + ,20 + ,75 + ,104 + ,79194 + ,105615 + ,6 + ,23 + ,70 + ,48 + ,202316 + ,89318 + ,1 + ,22 + ,78 + ,81 + ,44970 + ,107335 + ,0 + ,21 + ,61 + ,64 + ,49319 + ,98599 + ,1 + ,18 + ,55 + ,44 + ,36252 + ,260646 + ,0 + ,25 + ,60 + ,104 + ,75741 + ,131876 + ,5 + ,22 + ,83 + ,36 + ,38417 + ,119291 + ,2 + ,25 + ,38 + ,120 + ,64102 + ,80953 + ,0 + ,8 + ,27 + ,58 + ,56622 + ,99768 + ,0 + ,21 + ,62 + ,27 + ,15430 + ,84572 + ,5 + ,22 + ,82 + ,84 + ,72571 + ,202373 + ,1 + ,21 + ,79 + ,56 + ,67271 + ,166790 + ,0 + ,30 + ,59 + ,46 + ,43460 + ,99946 + ,1 + ,23 + ,80 + ,119 + ,99501 + ,116900 + ,1 + ,20 + ,36 + ,57 + ,28340 + ,142146 + ,2 + ,24 + ,88 + ,139 + ,76013 + ,99246 + ,4 + ,21 + ,63 + ,51 + ,37361 + ,156833 + ,1 + ,20 + ,73 + ,85 + ,48204 + ,175078 + ,4 + ,20 + ,71 + ,91 + ,76168 + ,130533 + ,0 + ,20 + ,76 + ,79 + ,85168 + ,142339 + ,2 + ,20 + ,67 + ,142 + ,125410 + ,176789 + ,0 + ,23 + ,66 + ,149 + ,123328 + ,181379 + ,7 + ,33 + ,123 + ,96 + ,83038 + ,228548 + ,7 + ,19 + ,65 + ,198 + ,120087 + ,142141 + ,6 + ,27 + ,87 + ,61 + ,91939 + ,167845 + ,0 + ,25 + ,77 + ,145 + ,103646 + ,103012 + ,0 + ,20 + ,37 + ,26 + ,29467 + ,43287 + ,4 + ,19 + ,64 + ,49 + ,43750 + ,125366 + ,4 + ,15 + ,22 + ,68 + ,34497 + ,118372 + ,0 + ,21 + ,35 + ,145 + ,66477 + ,135171 + ,0 + ,22 + ,61 + ,82 + ,71181 + ,175568 + ,0 + ,24 + ,80 + ,102 + ,74482 + ,74112 + ,0 + ,19 + ,54 + ,52 + ,174949 + ,88817 + ,0 + ,20 + ,60 + ,56 + ,46765 + ,164767 + ,4 + ,23 + ,87 + ,80 + ,90257 + ,141933 + ,0 + ,27 + ,75 + ,99 + ,51370 + ,22938 + ,0 + ,1 + ,0 + ,11 + ,1168 + ,115199 + ,0 + ,20 + ,54 + ,87 + ,51360 + ,61857 + ,4 + ,11 + ,30 + ,28 + ,25162 + ,91185 + ,0 + ,27 + ,66 + ,67 + ,21067 + ,213765 + ,1 + ,22 + ,56 + ,150 + ,58233 + ,21054 + ,0 + ,0 + ,0 + ,4 + ,855 + ,167105 + ,5 + ,17 + ,32 + ,71 + ,85903 + ,31414 + ,0 + ,8 + ,9 + ,39 + ,14116 + ,178863 + ,1 + ,23 + ,78 + ,87 + ,57637 + ,126681 + ,7 + ,26 + ,90 + ,66 + ,94137 + ,64320 + ,5 + ,20 + ,56 + ,23 + ,62147 + ,67746 + ,2 + ,16 + ,35 + ,56 + ,62832 + ,38214 + ,0 + ,8 + ,21 + ,16 + ,8773 + ,90961 + ,1 + ,22 + ,78 + ,49 + ,63785 + ,181510 + ,0 + ,33 + ,118 + ,108 + ,65196 + ,116775 + ,0 + ,28 + ,83 + ,112 + ,73087 + ,223914 + ,2 + ,26 + ,89 + ,110 + ,72631 + ,185139 + ,0 + ,27 + ,83 + ,126 + ,86281 + ,242879 + ,2 + ,35 + ,124 + ,155 + ,162365 + ,139144 + ,0 + ,21 + ,76 + ,75 + ,56530 + ,75812 + ,0 + ,20 + ,57 + ,30 + ,35606 + ,178218 + ,4 + ,24 + ,91 + ,78 + ,70111 + ,246834 + ,4 + ,26 + ,89 + ,135 + ,92046 + ,50999 + ,8 + ,20 + ,66 + ,8 + ,63989 + ,223842 + ,0 + ,22 + ,82 + ,114 + ,104911 + ,93577 + ,4 + ,24 + ,63 + ,60 + ,43448 + ,155383 + ,0 + ,23 + ,75 + ,99 + ,60029 + ,111664 + ,1 + ,22 + ,59 + ,98 + ,38650 + ,75426 + ,0 + ,12 + ,19 + ,33 + ,47261 + ,243551 + ,9 + ,21 + ,57 + ,93 + ,73586 + ,136548 + ,0 + ,21 + ,62 + ,157 + ,83042 + ,173260 + ,3 + ,21 + ,78 + ,15 + ,37238 + ,185039 + ,7 + ,25 + ,73 + ,98 + ,63958 + ,67507 + ,5 + ,32 + ,112 + ,49 + ,78956 + ,139350 + ,2 + ,24 + ,79 + ,88 + ,99518 + ,172964 + ,1 + ,28 + ,96 + ,151 + ,111436 + ,0 + ,9 + ,0 + ,0 + ,0 + ,0 + ,14688 + ,0 + ,0 + ,0 + ,5 + ,6023 + ,98 + ,0 + ,0 + ,0 + ,0 + ,0 + ,455 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,1 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,128066 + ,2 + ,20 + ,48 + ,80 + ,42564 + ,176460 + ,1 + ,27 + ,55 + ,122 + ,38885 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,203 + ,0 + ,0 + ,0 + ,0 + ,0 + ,7199 + ,0 + ,0 + ,0 + ,6 + ,1644 + ,46660 + ,0 + ,5 + ,13 + ,13 + ,6179 + ,17547 + ,0 + ,1 + ,4 + ,3 + ,3926 + ,73567 + ,0 + ,23 + ,31 + ,18 + ,23238 + ,969 + ,0 + ,0 + ,0 + ,0 + ,0 + ,101060 + ,2 + ,16 + ,29 + ,48 + ,49288) + ,dim=c(6 + ,164) + ,dimnames=list(c('Time_in_RFC' + ,'Shared_compendiums' + ,'Reviewed_compendiums' + ,'Long_feedback' + ,'Blogs' + ,'Characters') + ,1:164)) > y <- array(NA,dim=c(6,164),dimnames=list(c('Time_in_RFC','Shared_compendiums','Reviewed_compendiums','Long_feedback','Blogs','Characters'),1:164)) > 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 = '1' > library(lattice) > library(lmtest) Loading required package: zoo > n25 <- 25 #minimum number of obs. for Goldfeld-Quandt test > par1 <- as.numeric(par1) > x <- t(y) > k <- length(x[1,]) > n <- length(x[,1]) > x1 <- cbind(x[,par1], x[,1:k!=par1]) > mycolnames <- c(colnames(x)[par1], colnames(x)[1:k!=par1]) > colnames(x1) <- mycolnames #colnames(x)[par1] > x <- x1 > if (par3 == 'First Differences'){ + x2 <- array(0, dim=c(n-1,k), dimnames=list(1:(n-1), paste('(1-B)',colnames(x),sep=''))) + for (i in 1:n-1) { + for (j in 1:k) { + x2[i,j] <- x[i+1,j] - x[i,j] + } + } + x <- x2 + } > if (par2 == 'Include Monthly Dummies'){ + x2 <- array(0, dim=c(n,11), dimnames=list(1:n, paste('M', seq(1:11), sep =''))) + for (i in 1:11){ + x2[seq(i,n,12),i] <- 1 + } + x <- cbind(x, x2) + } > if (par2 == 'Include Quarterly Dummies'){ + x2 <- array(0, dim=c(n,3), dimnames=list(1:n, paste('Q', seq(1:3), sep =''))) + for (i in 1:3){ + x2[seq(i,n,4),i] <- 1 + } + x <- cbind(x, x2) + } > k <- length(x[1,]) > if (par3 == 'Linear Trend'){ + x <- cbind(x, c(1:n)) + colnames(x)[k+1] <- 't' + } > x Time_in_RFC Shared_compendiums Reviewed_compendiums Long_feedback Blogs 1 146455 1 22 68 128 2 84944 4 20 72 89 3 113337 9 24 37 68 4 128655 2 21 70 108 5 74398 1 15 30 51 6 35523 2 16 53 33 7 293403 0 20 74 119 8 32750 0 18 22 5 9 106539 5 19 68 63 10 130539 0 20 47 66 11 154991 0 25 87 98 12 126683 7 37 123 71 13 100672 6 23 69 55 14 179562 3 28 89 116 15 125971 4 25 45 71 16 234509 0 35 122 120 17 158980 4 20 75 122 18 184217 3 22 45 74 19 107342 0 19 53 111 20 141371 5 26 96 103 21 154730 0 27 82 98 22 264020 1 22 76 100 23 90938 3 15 51 42 24 101324 5 26 104 100 25 130232 0 24 83 105 26 137793 0 22 78 77 27 161678 4 21 59 83 28 151503 0 23 83 98 29 105324 0 21 71 46 30 175914 0 25 81 95 31 181853 3 25 93 91 32 114928 4 28 72 91 33 190410 1 30 107 94 34 61499 4 20 75 15 35 223004 1 23 84 137 36 167131 0 25 69 56 37 233482 0 26 90 78 38 121185 2 20 51 68 39 78776 1 8 18 34 40 188967 2 20 75 94 41 199512 8 21 59 82 42 102531 5 25 63 63 43 118958 3 20 68 58 44 68948 4 18 47 43 45 93125 1 21 29 36 46 277108 2 22 69 64 47 78800 2 26 66 21 48 157250 0 30 106 104 49 210554 6 24 73 124 50 127324 3 26 87 101 51 114397 0 18 65 85 52 24188 0 4 7 7 53 246209 6 31 111 124 54 65029 5 18 61 21 55 98030 3 14 41 35 56 173587 1 20 70 95 57 172684 5 30 112 102 58 191381 5 20 71 212 59 191276 0 26 90 141 60 134043 9 20 69 54 61 233406 6 27 85 117 62 195304 6 18 47 145 63 127619 5 27 50 50 64 162810 6 22 76 80 65 129100 2 19 60 87 66 108715 0 15 35 78 67 106469 3 19 72 86 68 142069 8 28 88 82 69 143937 2 20 66 139 70 84256 5 17 58 75 71 118807 11 25 81 70 72 69471 6 20 63 25 73 122433 5 25 91 66 74 131122 1 20 50 89 75 94763 0 22 75 99 76 188780 3 25 85 98 77 191467 3 20 75 104 78 105615 6 23 70 48 79 89318 1 22 78 81 80 107335 0 21 61 64 81 98599 1 18 55 44 82 260646 0 25 60 104 83 131876 5 22 83 36 84 119291 2 25 38 120 85 80953 0 8 27 58 86 99768 0 21 62 27 87 84572 5 22 82 84 88 202373 1 21 79 56 89 166790 0 30 59 46 90 99946 1 23 80 119 91 116900 1 20 36 57 92 142146 2 24 88 139 93 99246 4 21 63 51 94 156833 1 20 73 85 95 175078 4 20 71 91 96 130533 0 20 76 79 97 142339 2 20 67 142 98 176789 0 23 66 149 99 181379 7 33 123 96 100 228548 7 19 65 198 101 142141 6 27 87 61 102 167845 0 25 77 145 103 103012 0 20 37 26 104 43287 4 19 64 49 105 125366 4 15 22 68 106 118372 0 21 35 145 107 135171 0 22 61 82 108 175568 0 24 80 102 109 74112 0 19 54 52 110 88817 0 20 60 56 111 164767 4 23 87 80 112 141933 0 27 75 99 113 22938 0 1 0 11 114 115199 0 20 54 87 115 61857 4 11 30 28 116 91185 0 27 66 67 117 213765 1 22 56 150 118 21054 0 0 0 4 119 167105 5 17 32 71 120 31414 0 8 9 39 121 178863 1 23 78 87 122 126681 7 26 90 66 123 64320 5 20 56 23 124 67746 2 16 35 56 125 38214 0 8 21 16 126 90961 1 22 78 49 127 181510 0 33 118 108 128 116775 0 28 83 112 129 223914 2 26 89 110 130 185139 0 27 83 126 131 242879 2 35 124 155 132 139144 0 21 76 75 133 75812 0 20 57 30 134 178218 4 24 91 78 135 246834 4 26 89 135 136 50999 8 20 66 8 137 223842 0 22 82 114 138 93577 4 24 63 60 139 155383 0 23 75 99 140 111664 1 22 59 98 141 75426 0 12 19 33 142 243551 9 21 57 93 143 136548 0 21 62 157 144 173260 3 21 78 15 145 185039 7 25 73 98 146 67507 5 32 112 49 147 139350 2 24 79 88 148 172964 1 28 96 151 149 0 9 0 0 0 150 14688 0 0 0 5 151 98 0 0 0 0 152 455 0 0 0 0 153 0 1 0 0 0 154 0 0 0 0 0 155 128066 2 20 48 80 156 176460 1 27 55 122 157 0 0 0 0 0 158 203 0 0 0 0 159 7199 0 0 0 6 160 46660 0 5 13 13 161 17547 0 1 4 3 162 73567 0 23 31 18 163 969 0 0 0 0 164 101060 2 16 29 48 Characters 1 95556 2 54565 3 63016 4 79774 5 31258 6 52491 7 91256 8 22807 9 77411 10 48821 11 52295 12 63262 13 50466 14 62932 15 38439 16 70817 17 105965 18 73795 19 82043 20 74349 21 82204 22 55709 23 37137 24 70780 25 55027 26 56699 27 65911 28 56316 29 26982 30 54628 31 96750 32 53009 33 64664 34 36990 35 85224 36 37048 37 59635 38 42051 39 26998 40 63717 41 55071 42 40001 43 54506 44 35838 45 50838 46 86997 47 33032 48 61704 49 117986 50 56733 51 55064 52 5950 53 84607 54 32551 55 31701 56 71170 57 101773 58 101653 59 81493 60 55901 61 109104 62 114425 63 36311 64 70027 65 73713 66 40671 67 89041 68 57231 69 78792 70 59155 71 55827 72 22618 73 58425 74 65724 75 56979 76 72369 77 79194 78 202316 79 44970 80 49319 81 36252 82 75741 83 38417 84 64102 85 56622 86 15430 87 72571 88 67271 89 43460 90 99501 91 28340 92 76013 93 37361 94 48204 95 76168 96 85168 97 125410 98 123328 99 83038 100 120087 101 91939 102 103646 103 29467 104 43750 105 34497 106 66477 107 71181 108 74482 109 174949 110 46765 111 90257 112 51370 113 1168 114 51360 115 25162 116 21067 117 58233 118 855 119 85903 120 14116 121 57637 122 94137 123 62147 124 62832 125 8773 126 63785 127 65196 128 73087 129 72631 130 86281 131 162365 132 56530 133 35606 134 70111 135 92046 136 63989 137 104911 138 43448 139 60029 140 38650 141 47261 142 73586 143 83042 144 37238 145 63958 146 78956 147 99518 148 111436 149 0 150 6023 151 0 152 0 153 0 154 0 155 42564 156 38885 157 0 158 0 159 1644 160 6179 161 3926 162 23238 163 0 164 49288 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) Shared_compendiums Reviewed_compendiums 8265.6905 66.6081 2023.2066 Long_feedback Blogs Characters 261.8964 708.7474 0.1391 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -80876 -23464 -4364 19547 148669 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 8265.6905 8519.6487 0.970 0.3334 Shared_compendiums 66.6081 1221.1335 0.055 0.9566 Reviewed_compendiums 2023.2066 858.5866 2.356 0.0197 * Long_feedback 261.8964 235.4644 1.112 0.2677 Blogs 708.7474 107.2493 6.608 5.65e-10 *** Characters 0.1391 0.1365 1.019 0.3099 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 38130 on 158 degrees of freedom Multiple R-squared: 0.6554, Adjusted R-squared: 0.6445 F-statistic: 60.09 on 5 and 158 DF, p-value: < 2.2e-16 > if (n > n25) { + kp3 <- k + 3 + nmkm3 <- n - k - 3 + gqarr <- array(NA, dim=c(nmkm3-kp3+1,3)) + numgqtests <- 0 + numsignificant1 <- 0 + numsignificant5 <- 0 + numsignificant10 <- 0 + for (mypoint in kp3:nmkm3) { + j <- 0 + numgqtests <- numgqtests + 1 + for (myalt in c('greater', 'two.sided', 'less')) { + j <- j + 1 + gqarr[mypoint-kp3+1,j] <- gqtest(mylm, point=mypoint, alternative=myalt)$p.value + } + if (gqarr[mypoint-kp3+1,2] < 0.01) numsignificant1 <- numsignificant1 + 1 + if (gqarr[mypoint-kp3+1,2] < 0.05) numsignificant5 <- numsignificant5 + 1 + if (gqarr[mypoint-kp3+1,2] < 0.10) numsignificant10 <- numsignificant10 + 1 + } + gqarr + } [,1] [,2] [,3] [1,] 0.9895451 2.090976e-02 1.045488e-02 [2,] 0.9797638 4.047230e-02 2.023615e-02 [3,] 0.9629378 7.412447e-02 3.706223e-02 [4,] 0.9374259 1.251482e-01 6.257412e-02 [5,] 0.9151328 1.697344e-01 8.486719e-02 [6,] 0.8701897 2.596206e-01 1.298103e-01 [7,] 0.8188542 3.622917e-01 1.811458e-01 [8,] 0.7584936 4.830128e-01 2.415064e-01 [9,] 0.7049062 5.901876e-01 2.950938e-01 [10,] 0.7046154 5.907692e-01 2.953846e-01 [11,] 0.8289954 3.420093e-01 1.710046e-01 [12,] 0.7785273 4.429454e-01 2.214727e-01 [13,] 0.7583867 4.832266e-01 2.416133e-01 [14,] 0.9684782 6.304355e-02 3.152177e-02 [15,] 0.9584935 8.301301e-02 4.150650e-02 [16,] 0.9665532 6.689367e-02 3.344684e-02 [17,] 0.9653611 6.927787e-02 3.463894e-02 [18,] 0.9510036 9.799281e-02 4.899640e-02 [19,] 0.9450648 1.098703e-01 5.493517e-02 [20,] 0.9256592 1.486816e-01 7.434082e-02 [21,] 0.9027951 1.944098e-01 9.720491e-02 [22,] 0.8778105 2.443790e-01 1.221895e-01 [23,] 0.8602367 2.795266e-01 1.397633e-01 [24,] 0.8538699 2.922603e-01 1.461301e-01 [25,] 0.8254131 3.491738e-01 1.745869e-01 [26,] 0.7921841 4.156317e-01 2.078159e-01 [27,] 0.7696082 4.607837e-01 2.303918e-01 [28,] 0.7762872 4.474256e-01 2.237128e-01 [29,] 0.8768825 2.462350e-01 1.231175e-01 [30,] 0.8472554 3.054892e-01 1.527446e-01 [31,] 0.8269861 3.460277e-01 1.730139e-01 [32,] 0.8369499 3.261002e-01 1.630501e-01 [33,] 0.9295214 1.409572e-01 7.047862e-02 [34,] 0.9144836 1.710329e-01 8.551644e-02 [35,] 0.8926751 2.146498e-01 1.073249e-01 [36,] 0.8734682 2.530635e-01 1.265318e-01 [37,] 0.8445110 3.109781e-01 1.554890e-01 [38,] 0.9936679 1.266413e-02 6.332067e-03 [39,] 0.9916738 1.665241e-02 8.326207e-03 [40,] 0.9899345 2.013091e-02 1.006545e-02 [41,] 0.9872437 2.551261e-02 1.275630e-02 [42,] 0.9857808 2.843838e-02 1.421919e-02 [43,] 0.9825614 3.487728e-02 1.743864e-02 [44,] 0.9765746 4.685073e-02 2.342536e-02 [45,] 0.9807932 3.841356e-02 1.920678e-02 [46,] 0.9751412 4.971759e-02 2.485880e-02 [47,] 0.9708037 5.839266e-02 2.919633e-02 [48,] 0.9658607 6.827865e-02 3.413932e-02 [49,] 0.9588164 8.236730e-02 4.118365e-02 [50,] 0.9591350 8.172992e-02 4.086496e-02 [51,] 0.9493164 1.013672e-01 5.068360e-02 [52,] 0.9449315 1.101370e-01 5.506852e-02 [53,] 0.9471023 1.057954e-01 5.289770e-02 [54,] 0.9356724 1.286552e-01 6.432759e-02 [55,] 0.9229216 1.541568e-01 7.707841e-02 [56,] 0.9118163 1.763673e-01 8.818366e-02 [57,] 0.8958532 2.082936e-01 1.041468e-01 [58,] 0.8732778 2.534443e-01 1.267222e-01 [59,] 0.8814015 2.371970e-01 1.185985e-01 [60,] 0.8592559 2.814882e-01 1.407441e-01 [61,] 0.8503204 2.993592e-01 1.496796e-01 [62,] 0.8438036 3.123927e-01 1.561964e-01 [63,] 0.8256226 3.487549e-01 1.743774e-01 [64,] 0.8023128 3.953745e-01 1.976872e-01 [65,] 0.7752160 4.495680e-01 2.247840e-01 [66,] 0.7425204 5.149593e-01 2.574796e-01 [67,] 0.7809034 4.381932e-01 2.190966e-01 [68,] 0.7624219 4.751561e-01 2.375781e-01 [69,] 0.7602362 4.795276e-01 2.397638e-01 [70,] 0.8154662 3.690676e-01 1.845338e-01 [71,] 0.8317920 3.364159e-01 1.682080e-01 [72,] 0.8051438 3.897124e-01 1.948562e-01 [73,] 0.7720307 4.559385e-01 2.279693e-01 [74,] 0.9243657 1.512686e-01 7.563430e-02 [75,] 0.9167514 1.664972e-01 8.324861e-02 [76,] 0.9251220 1.497559e-01 7.487797e-02 [77,] 0.9083636 1.832728e-01 9.163639e-02 [78,] 0.8898351 2.203297e-01 1.101649e-01 [79,] 0.9214079 1.571843e-01 7.859213e-02 [80,] 0.9704219 5.915615e-02 2.957808e-02 [81,] 0.9750972 4.980557e-02 2.490279e-02 [82,] 0.9894868 2.102641e-02 1.051321e-02 [83,] 0.9867552 2.648968e-02 1.324484e-02 [84,] 0.9898240 2.035203e-02 1.017601e-02 [85,] 0.9865822 2.683560e-02 1.341780e-02 [86,] 0.9836574 3.268522e-02 1.634261e-02 [87,] 0.9819515 3.609695e-02 1.804848e-02 [88,] 0.9766141 4.677189e-02 2.338595e-02 [89,] 0.9788116 4.237677e-02 2.118838e-02 [90,] 0.9735611 5.287776e-02 2.643888e-02 [91,] 0.9667239 6.655227e-02 3.327613e-02 [92,] 0.9618007 7.639869e-02 3.819935e-02 [93,] 0.9506235 9.875305e-02 4.937653e-02 [94,] 0.9455599 1.088803e-01 5.444014e-02 [95,] 0.9483074 1.033852e-01 5.169258e-02 [96,] 0.9715657 5.686853e-02 2.843426e-02 [97,] 0.9671808 6.563844e-02 3.281922e-02 [98,] 0.9771602 4.567965e-02 2.283983e-02 [99,] 0.9701113 5.977739e-02 2.988869e-02 [100,] 0.9631068 7.378649e-02 3.689324e-02 [101,] 0.9626260 7.474792e-02 3.737396e-02 [102,] 0.9532179 9.356426e-02 4.678213e-02 [103,] 0.9411517 1.176966e-01 5.884830e-02 [104,] 0.9267023 1.465954e-01 7.329768e-02 [105,] 0.9073754 1.852492e-01 9.262459e-02 [106,] 0.8874684 2.250632e-01 1.125316e-01 [107,] 0.8612166 2.775669e-01 1.387834e-01 [108,] 0.8499203 3.001595e-01 1.500797e-01 [109,] 0.8294164 3.411671e-01 1.705836e-01 [110,] 0.7966924 4.066151e-01 2.033076e-01 [111,] 0.8296461 3.407077e-01 1.703539e-01 [112,] 0.8057739 3.884522e-01 1.942261e-01 [113,] 0.7984207 4.031585e-01 2.015793e-01 [114,] 0.7745999 4.508002e-01 2.254001e-01 [115,] 0.7470613 5.058774e-01 2.529387e-01 [116,] 0.7268652 5.462696e-01 2.731348e-01 [117,] 0.6782637 6.434726e-01 3.217363e-01 [118,] 0.6416829 7.166341e-01 3.583171e-01 [119,] 0.5880810 8.238380e-01 4.119190e-01 [120,] 0.6544438 6.911124e-01 3.455562e-01 [121,] 0.6836672 6.326655e-01 3.163328e-01 [122,] 0.6284012 7.431976e-01 3.715988e-01 [123,] 0.5711443 8.577115e-01 4.288557e-01 [124,] 0.5165403 9.669193e-01 4.834597e-01 [125,] 0.4566326 9.132653e-01 5.433674e-01 [126,] 0.4309903 8.619805e-01 5.690097e-01 [127,] 0.4700241 9.400482e-01 5.299759e-01 [128,] 0.5016417 9.967167e-01 4.983583e-01 [129,] 0.6485347 7.029306e-01 3.514653e-01 [130,] 0.6497618 7.004763e-01 3.502382e-01 [131,] 0.6140599 7.718802e-01 3.859401e-01 [132,] 0.5715098 8.569805e-01 4.284902e-01 [133,] 0.5072893 9.854215e-01 4.927107e-01 [134,] 0.8436918 3.126164e-01 1.563082e-01 [135,] 0.8312589 3.374821e-01 1.687411e-01 [136,] 0.9998832 2.335178e-04 1.167589e-04 [137,] 0.9999979 4.154530e-06 2.077265e-06 [138,] 0.9999946 1.081830e-05 5.409151e-06 [139,] 0.9999915 1.700628e-05 8.503140e-06 [140,] 0.9999995 9.173266e-07 4.586633e-07 [141,] 0.9999991 1.720362e-06 8.601808e-07 [142,] 0.9999947 1.061820e-05 5.309098e-06 [143,] 0.9999699 6.016695e-05 3.008347e-05 [144,] 0.9998360 3.280312e-04 1.640156e-04 [145,] 0.9999936 1.281108e-05 6.405540e-06 [146,] 0.9999084 1.831179e-04 9.155895e-05 [147,] 0.9997353 5.293953e-04 2.646976e-04 > postscript(file="/var/wessaorg/rcomp/tmp/13bvq1321542795.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/wessaorg/rcomp/tmp/2uc5c1321542795.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/wessaorg/rcomp/tmp/3zobm1321542795.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/wessaorg/rcomp/tmp/4cwgb1321542795.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/wessaorg/rcomp/tmp/55af61321542795.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 = 164 Frequency = 1 1 2 3 4 5 -28205.978368 -53575.975092 -10734.103649 -28203.332368 -12632.633164 6 7 8 9 10 -49816.606099 128260.416678 -24410.766540 -13726.683262 15932.906438 11 12 13 14 15 -3370.045810 -48240.115407 -18597.640352 170.916427 -593.619167 16 17 18 19 20 28581.112889 -10862.818686 56745.205953 -43326.269719 -28314.272577 21 22 23 24 25 -10527.592703 112650.526785 3835.427347 -67833.840142 -30399.440127 26 27 28 29 30 2129.846585 27214.002113 -2323.270518 -378.591086 20926.110805 31 32 33 34 35 20499.372699 -40978.721163 17743.147738 -22915.103562 37187.677200 36 37 38 39 40 45371.965316 85466.190062 4922.152679 21691.737367 44977.994262 41 42 43 44 45 66997.897872 -23361.619032 3531.592198 -23771.303241 2125.131416 46 47 48 49 50 148668.697556 -18965.082577 -21764.157378 29919.607473 -36003.536771 51 52 53 54 55 -15211.264317 207.476348 46102.307462 -15373.876447 21286.844687 56 57 58 59 60 29228.805500 -12389.705781 -40668.409716 -4430.810792 20596.026237 61 62 63 64 65 49755.733250 19229.706589 10811.525455 23291.147701 -5366.322956 66 67 68 69 70 -3.805391 -32629.692444 -12502.946558 -31685.136258 -35310.308616 71 72 73 74 75 -19361.645667 -17022.240961 -15481.290038 -2988.376826 -55745.847568 76 77 78 79 80 27951.116888 38171.437780 -30073.951662 -47615.531952 -11612.614197 81 82 83 84 85 3218.025406 101842.902590 26171.548507 -43604.849328 448.362634 86 87 88 89 90 11495.278673 -59640.420440 81817.935057 43729.615884 -74050.868702 91 92 93 94 95 14335.294200 -46944.191320 -9615.056132 21970.602822 32397.973981 96 97 98 99 100 -5936.788519 -42154.706143 -18050.889492 -5920.334193 7318.700408 101 102 103 104 105 44.027528 -28349.885145 22066.435906 -61260.599183 27731.542051 106 107 108 109 110 -53561.106466 -1597.746573 15142.773113 -47923.039421 -21820.332913 111 112 113 114 115 17663.795659 -17911.805129 4690.441370 -16477.175962 -131.635895 116 117 118 119 120 -39408.410995 31845.058614 9834.410265 53462.989082 -24998.750866 121 122 123 124 125 33892.105202 -18094.488213 -24353.387373 -30618.842955 -4297.236256 126 127 128 129 130 -25909.325749 -10037.175447 -59422.205570 51539.526670 -792.426949 131 132 133 134 135 -1244.156816 7468.844470 -14060.266504 32263.317558 53907.471494 136 137 138 139 140 -30118.142164 54202.490534 -28578.956190 2426.764874 -31463.247861 141 142 143 144 145 7944.278771 101122.874736 -53265.065654 86069.118018 28256.206685 146 147 148 149 150 -80876.218257 -14505.983034 -39679.027927 -8865.163215 2040.919633 151 152 153 154 155 -8167.690543 -7810.690543 -8332.298618 -8265.690543 4012.527536 156 157 158 159 160 7221.684806 -8265.690543 -8062.690543 -5547.815200 14800.559027 161 162 163 164 3538.264049 -5340.524358 -7296.690543 11820.155527 > postscript(file="/var/wessaorg/rcomp/tmp/6fiq31321542795.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 = 164 Frequency = 1 lag(myerror, k = 1) myerror 0 -28205.978368 NA 1 -53575.975092 -28205.978368 2 -10734.103649 -53575.975092 3 -28203.332368 -10734.103649 4 -12632.633164 -28203.332368 5 -49816.606099 -12632.633164 6 128260.416678 -49816.606099 7 -24410.766540 128260.416678 8 -13726.683262 -24410.766540 9 15932.906438 -13726.683262 10 -3370.045810 15932.906438 11 -48240.115407 -3370.045810 12 -18597.640352 -48240.115407 13 170.916427 -18597.640352 14 -593.619167 170.916427 15 28581.112889 -593.619167 16 -10862.818686 28581.112889 17 56745.205953 -10862.818686 18 -43326.269719 56745.205953 19 -28314.272577 -43326.269719 20 -10527.592703 -28314.272577 21 112650.526785 -10527.592703 22 3835.427347 112650.526785 23 -67833.840142 3835.427347 24 -30399.440127 -67833.840142 25 2129.846585 -30399.440127 26 27214.002113 2129.846585 27 -2323.270518 27214.002113 28 -378.591086 -2323.270518 29 20926.110805 -378.591086 30 20499.372699 20926.110805 31 -40978.721163 20499.372699 32 17743.147738 -40978.721163 33 -22915.103562 17743.147738 34 37187.677200 -22915.103562 35 45371.965316 37187.677200 36 85466.190062 45371.965316 37 4922.152679 85466.190062 38 21691.737367 4922.152679 39 44977.994262 21691.737367 40 66997.897872 44977.994262 41 -23361.619032 66997.897872 42 3531.592198 -23361.619032 43 -23771.303241 3531.592198 44 2125.131416 -23771.303241 45 148668.697556 2125.131416 46 -18965.082577 148668.697556 47 -21764.157378 -18965.082577 48 29919.607473 -21764.157378 49 -36003.536771 29919.607473 50 -15211.264317 -36003.536771 51 207.476348 -15211.264317 52 46102.307462 207.476348 53 -15373.876447 46102.307462 54 21286.844687 -15373.876447 55 29228.805500 21286.844687 56 -12389.705781 29228.805500 57 -40668.409716 -12389.705781 58 -4430.810792 -40668.409716 59 20596.026237 -4430.810792 60 49755.733250 20596.026237 61 19229.706589 49755.733250 62 10811.525455 19229.706589 63 23291.147701 10811.525455 64 -5366.322956 23291.147701 65 -3.805391 -5366.322956 66 -32629.692444 -3.805391 67 -12502.946558 -32629.692444 68 -31685.136258 -12502.946558 69 -35310.308616 -31685.136258 70 -19361.645667 -35310.308616 71 -17022.240961 -19361.645667 72 -15481.290038 -17022.240961 73 -2988.376826 -15481.290038 74 -55745.847568 -2988.376826 75 27951.116888 -55745.847568 76 38171.437780 27951.116888 77 -30073.951662 38171.437780 78 -47615.531952 -30073.951662 79 -11612.614197 -47615.531952 80 3218.025406 -11612.614197 81 101842.902590 3218.025406 82 26171.548507 101842.902590 83 -43604.849328 26171.548507 84 448.362634 -43604.849328 85 11495.278673 448.362634 86 -59640.420440 11495.278673 87 81817.935057 -59640.420440 88 43729.615884 81817.935057 89 -74050.868702 43729.615884 90 14335.294200 -74050.868702 91 -46944.191320 14335.294200 92 -9615.056132 -46944.191320 93 21970.602822 -9615.056132 94 32397.973981 21970.602822 95 -5936.788519 32397.973981 96 -42154.706143 -5936.788519 97 -18050.889492 -42154.706143 98 -5920.334193 -18050.889492 99 7318.700408 -5920.334193 100 44.027528 7318.700408 101 -28349.885145 44.027528 102 22066.435906 -28349.885145 103 -61260.599183 22066.435906 104 27731.542051 -61260.599183 105 -53561.106466 27731.542051 106 -1597.746573 -53561.106466 107 15142.773113 -1597.746573 108 -47923.039421 15142.773113 109 -21820.332913 -47923.039421 110 17663.795659 -21820.332913 111 -17911.805129 17663.795659 112 4690.441370 -17911.805129 113 -16477.175962 4690.441370 114 -131.635895 -16477.175962 115 -39408.410995 -131.635895 116 31845.058614 -39408.410995 117 9834.410265 31845.058614 118 53462.989082 9834.410265 119 -24998.750866 53462.989082 120 33892.105202 -24998.750866 121 -18094.488213 33892.105202 122 -24353.387373 -18094.488213 123 -30618.842955 -24353.387373 124 -4297.236256 -30618.842955 125 -25909.325749 -4297.236256 126 -10037.175447 -25909.325749 127 -59422.205570 -10037.175447 128 51539.526670 -59422.205570 129 -792.426949 51539.526670 130 -1244.156816 -792.426949 131 7468.844470 -1244.156816 132 -14060.266504 7468.844470 133 32263.317558 -14060.266504 134 53907.471494 32263.317558 135 -30118.142164 53907.471494 136 54202.490534 -30118.142164 137 -28578.956190 54202.490534 138 2426.764874 -28578.956190 139 -31463.247861 2426.764874 140 7944.278771 -31463.247861 141 101122.874736 7944.278771 142 -53265.065654 101122.874736 143 86069.118018 -53265.065654 144 28256.206685 86069.118018 145 -80876.218257 28256.206685 146 -14505.983034 -80876.218257 147 -39679.027927 -14505.983034 148 -8865.163215 -39679.027927 149 2040.919633 -8865.163215 150 -8167.690543 2040.919633 151 -7810.690543 -8167.690543 152 -8332.298618 -7810.690543 153 -8265.690543 -8332.298618 154 4012.527536 -8265.690543 155 7221.684806 4012.527536 156 -8265.690543 7221.684806 157 -8062.690543 -8265.690543 158 -5547.815200 -8062.690543 159 14800.559027 -5547.815200 160 3538.264049 14800.559027 161 -5340.524358 3538.264049 162 -7296.690543 -5340.524358 163 11820.155527 -7296.690543 164 NA 11820.155527 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -53575.975092 -28205.978368 [2,] -10734.103649 -53575.975092 [3,] -28203.332368 -10734.103649 [4,] -12632.633164 -28203.332368 [5,] -49816.606099 -12632.633164 [6,] 128260.416678 -49816.606099 [7,] -24410.766540 128260.416678 [8,] -13726.683262 -24410.766540 [9,] 15932.906438 -13726.683262 [10,] -3370.045810 15932.906438 [11,] -48240.115407 -3370.045810 [12,] -18597.640352 -48240.115407 [13,] 170.916427 -18597.640352 [14,] -593.619167 170.916427 [15,] 28581.112889 -593.619167 [16,] -10862.818686 28581.112889 [17,] 56745.205953 -10862.818686 [18,] -43326.269719 56745.205953 [19,] -28314.272577 -43326.269719 [20,] -10527.592703 -28314.272577 [21,] 112650.526785 -10527.592703 [22,] 3835.427347 112650.526785 [23,] -67833.840142 3835.427347 [24,] -30399.440127 -67833.840142 [25,] 2129.846585 -30399.440127 [26,] 27214.002113 2129.846585 [27,] -2323.270518 27214.002113 [28,] -378.591086 -2323.270518 [29,] 20926.110805 -378.591086 [30,] 20499.372699 20926.110805 [31,] -40978.721163 20499.372699 [32,] 17743.147738 -40978.721163 [33,] -22915.103562 17743.147738 [34,] 37187.677200 -22915.103562 [35,] 45371.965316 37187.677200 [36,] 85466.190062 45371.965316 [37,] 4922.152679 85466.190062 [38,] 21691.737367 4922.152679 [39,] 44977.994262 21691.737367 [40,] 66997.897872 44977.994262 [41,] -23361.619032 66997.897872 [42,] 3531.592198 -23361.619032 [43,] -23771.303241 3531.592198 [44,] 2125.131416 -23771.303241 [45,] 148668.697556 2125.131416 [46,] -18965.082577 148668.697556 [47,] -21764.157378 -18965.082577 [48,] 29919.607473 -21764.157378 [49,] -36003.536771 29919.607473 [50,] -15211.264317 -36003.536771 [51,] 207.476348 -15211.264317 [52,] 46102.307462 207.476348 [53,] -15373.876447 46102.307462 [54,] 21286.844687 -15373.876447 [55,] 29228.805500 21286.844687 [56,] -12389.705781 29228.805500 [57,] -40668.409716 -12389.705781 [58,] -4430.810792 -40668.409716 [59,] 20596.026237 -4430.810792 [60,] 49755.733250 20596.026237 [61,] 19229.706589 49755.733250 [62,] 10811.525455 19229.706589 [63,] 23291.147701 10811.525455 [64,] -5366.322956 23291.147701 [65,] -3.805391 -5366.322956 [66,] -32629.692444 -3.805391 [67,] -12502.946558 -32629.692444 [68,] -31685.136258 -12502.946558 [69,] -35310.308616 -31685.136258 [70,] -19361.645667 -35310.308616 [71,] -17022.240961 -19361.645667 [72,] -15481.290038 -17022.240961 [73,] -2988.376826 -15481.290038 [74,] -55745.847568 -2988.376826 [75,] 27951.116888 -55745.847568 [76,] 38171.437780 27951.116888 [77,] -30073.951662 38171.437780 [78,] -47615.531952 -30073.951662 [79,] -11612.614197 -47615.531952 [80,] 3218.025406 -11612.614197 [81,] 101842.902590 3218.025406 [82,] 26171.548507 101842.902590 [83,] -43604.849328 26171.548507 [84,] 448.362634 -43604.849328 [85,] 11495.278673 448.362634 [86,] -59640.420440 11495.278673 [87,] 81817.935057 -59640.420440 [88,] 43729.615884 81817.935057 [89,] -74050.868702 43729.615884 [90,] 14335.294200 -74050.868702 [91,] -46944.191320 14335.294200 [92,] -9615.056132 -46944.191320 [93,] 21970.602822 -9615.056132 [94,] 32397.973981 21970.602822 [95,] -5936.788519 32397.973981 [96,] -42154.706143 -5936.788519 [97,] -18050.889492 -42154.706143 [98,] -5920.334193 -18050.889492 [99,] 7318.700408 -5920.334193 [100,] 44.027528 7318.700408 [101,] -28349.885145 44.027528 [102,] 22066.435906 -28349.885145 [103,] -61260.599183 22066.435906 [104,] 27731.542051 -61260.599183 [105,] -53561.106466 27731.542051 [106,] -1597.746573 -53561.106466 [107,] 15142.773113 -1597.746573 [108,] -47923.039421 15142.773113 [109,] -21820.332913 -47923.039421 [110,] 17663.795659 -21820.332913 [111,] -17911.805129 17663.795659 [112,] 4690.441370 -17911.805129 [113,] -16477.175962 4690.441370 [114,] -131.635895 -16477.175962 [115,] -39408.410995 -131.635895 [116,] 31845.058614 -39408.410995 [117,] 9834.410265 31845.058614 [118,] 53462.989082 9834.410265 [119,] -24998.750866 53462.989082 [120,] 33892.105202 -24998.750866 [121,] -18094.488213 33892.105202 [122,] -24353.387373 -18094.488213 [123,] -30618.842955 -24353.387373 [124,] -4297.236256 -30618.842955 [125,] -25909.325749 -4297.236256 [126,] -10037.175447 -25909.325749 [127,] -59422.205570 -10037.175447 [128,] 51539.526670 -59422.205570 [129,] -792.426949 51539.526670 [130,] -1244.156816 -792.426949 [131,] 7468.844470 -1244.156816 [132,] -14060.266504 7468.844470 [133,] 32263.317558 -14060.266504 [134,] 53907.471494 32263.317558 [135,] -30118.142164 53907.471494 [136,] 54202.490534 -30118.142164 [137,] -28578.956190 54202.490534 [138,] 2426.764874 -28578.956190 [139,] -31463.247861 2426.764874 [140,] 7944.278771 -31463.247861 [141,] 101122.874736 7944.278771 [142,] -53265.065654 101122.874736 [143,] 86069.118018 -53265.065654 [144,] 28256.206685 86069.118018 [145,] -80876.218257 28256.206685 [146,] -14505.983034 -80876.218257 [147,] -39679.027927 -14505.983034 [148,] -8865.163215 -39679.027927 [149,] 2040.919633 -8865.163215 [150,] -8167.690543 2040.919633 [151,] -7810.690543 -8167.690543 [152,] -8332.298618 -7810.690543 [153,] -8265.690543 -8332.298618 [154,] 4012.527536 -8265.690543 [155,] 7221.684806 4012.527536 [156,] -8265.690543 7221.684806 [157,] -8062.690543 -8265.690543 [158,] -5547.815200 -8062.690543 [159,] 14800.559027 -5547.815200 [160,] 3538.264049 14800.559027 [161,] -5340.524358 3538.264049 [162,] -7296.690543 -5340.524358 [163,] 11820.155527 -7296.690543 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -53575.975092 -28205.978368 2 -10734.103649 -53575.975092 3 -28203.332368 -10734.103649 4 -12632.633164 -28203.332368 5 -49816.606099 -12632.633164 6 128260.416678 -49816.606099 7 -24410.766540 128260.416678 8 -13726.683262 -24410.766540 9 15932.906438 -13726.683262 10 -3370.045810 15932.906438 11 -48240.115407 -3370.045810 12 -18597.640352 -48240.115407 13 170.916427 -18597.640352 14 -593.619167 170.916427 15 28581.112889 -593.619167 16 -10862.818686 28581.112889 17 56745.205953 -10862.818686 18 -43326.269719 56745.205953 19 -28314.272577 -43326.269719 20 -10527.592703 -28314.272577 21 112650.526785 -10527.592703 22 3835.427347 112650.526785 23 -67833.840142 3835.427347 24 -30399.440127 -67833.840142 25 2129.846585 -30399.440127 26 27214.002113 2129.846585 27 -2323.270518 27214.002113 28 -378.591086 -2323.270518 29 20926.110805 -378.591086 30 20499.372699 20926.110805 31 -40978.721163 20499.372699 32 17743.147738 -40978.721163 33 -22915.103562 17743.147738 34 37187.677200 -22915.103562 35 45371.965316 37187.677200 36 85466.190062 45371.965316 37 4922.152679 85466.190062 38 21691.737367 4922.152679 39 44977.994262 21691.737367 40 66997.897872 44977.994262 41 -23361.619032 66997.897872 42 3531.592198 -23361.619032 43 -23771.303241 3531.592198 44 2125.131416 -23771.303241 45 148668.697556 2125.131416 46 -18965.082577 148668.697556 47 -21764.157378 -18965.082577 48 29919.607473 -21764.157378 49 -36003.536771 29919.607473 50 -15211.264317 -36003.536771 51 207.476348 -15211.264317 52 46102.307462 207.476348 53 -15373.876447 46102.307462 54 21286.844687 -15373.876447 55 29228.805500 21286.844687 56 -12389.705781 29228.805500 57 -40668.409716 -12389.705781 58 -4430.810792 -40668.409716 59 20596.026237 -4430.810792 60 49755.733250 20596.026237 61 19229.706589 49755.733250 62 10811.525455 19229.706589 63 23291.147701 10811.525455 64 -5366.322956 23291.147701 65 -3.805391 -5366.322956 66 -32629.692444 -3.805391 67 -12502.946558 -32629.692444 68 -31685.136258 -12502.946558 69 -35310.308616 -31685.136258 70 -19361.645667 -35310.308616 71 -17022.240961 -19361.645667 72 -15481.290038 -17022.240961 73 -2988.376826 -15481.290038 74 -55745.847568 -2988.376826 75 27951.116888 -55745.847568 76 38171.437780 27951.116888 77 -30073.951662 38171.437780 78 -47615.531952 -30073.951662 79 -11612.614197 -47615.531952 80 3218.025406 -11612.614197 81 101842.902590 3218.025406 82 26171.548507 101842.902590 83 -43604.849328 26171.548507 84 448.362634 -43604.849328 85 11495.278673 448.362634 86 -59640.420440 11495.278673 87 81817.935057 -59640.420440 88 43729.615884 81817.935057 89 -74050.868702 43729.615884 90 14335.294200 -74050.868702 91 -46944.191320 14335.294200 92 -9615.056132 -46944.191320 93 21970.602822 -9615.056132 94 32397.973981 21970.602822 95 -5936.788519 32397.973981 96 -42154.706143 -5936.788519 97 -18050.889492 -42154.706143 98 -5920.334193 -18050.889492 99 7318.700408 -5920.334193 100 44.027528 7318.700408 101 -28349.885145 44.027528 102 22066.435906 -28349.885145 103 -61260.599183 22066.435906 104 27731.542051 -61260.599183 105 -53561.106466 27731.542051 106 -1597.746573 -53561.106466 107 15142.773113 -1597.746573 108 -47923.039421 15142.773113 109 -21820.332913 -47923.039421 110 17663.795659 -21820.332913 111 -17911.805129 17663.795659 112 4690.441370 -17911.805129 113 -16477.175962 4690.441370 114 -131.635895 -16477.175962 115 -39408.410995 -131.635895 116 31845.058614 -39408.410995 117 9834.410265 31845.058614 118 53462.989082 9834.410265 119 -24998.750866 53462.989082 120 33892.105202 -24998.750866 121 -18094.488213 33892.105202 122 -24353.387373 -18094.488213 123 -30618.842955 -24353.387373 124 -4297.236256 -30618.842955 125 -25909.325749 -4297.236256 126 -10037.175447 -25909.325749 127 -59422.205570 -10037.175447 128 51539.526670 -59422.205570 129 -792.426949 51539.526670 130 -1244.156816 -792.426949 131 7468.844470 -1244.156816 132 -14060.266504 7468.844470 133 32263.317558 -14060.266504 134 53907.471494 32263.317558 135 -30118.142164 53907.471494 136 54202.490534 -30118.142164 137 -28578.956190 54202.490534 138 2426.764874 -28578.956190 139 -31463.247861 2426.764874 140 7944.278771 -31463.247861 141 101122.874736 7944.278771 142 -53265.065654 101122.874736 143 86069.118018 -53265.065654 144 28256.206685 86069.118018 145 -80876.218257 28256.206685 146 -14505.983034 -80876.218257 147 -39679.027927 -14505.983034 148 -8865.163215 -39679.027927 149 2040.919633 -8865.163215 150 -8167.690543 2040.919633 151 -7810.690543 -8167.690543 152 -8332.298618 -7810.690543 153 -8265.690543 -8332.298618 154 4012.527536 -8265.690543 155 7221.684806 4012.527536 156 -8265.690543 7221.684806 157 -8062.690543 -8265.690543 158 -5547.815200 -8062.690543 159 14800.559027 -5547.815200 160 3538.264049 14800.559027 161 -5340.524358 3538.264049 162 -7296.690543 -5340.524358 163 11820.155527 -7296.690543 > 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/wessaorg/rcomp/tmp/70fpy1321542795.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/wessaorg/rcomp/tmp/80u931321542795.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/wessaorg/rcomp/tmp/955tz1321542795.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/wessaorg/rcomp/tmp/10hzbg1321542795.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/wessaorg/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/wessaorg/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/wessaorg/rcomp/tmp/11nn301321542795.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/wessaorg/rcomp/tmp/12jkbo1321542795.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/wessaorg/rcomp/tmp/13urua1321542795.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/wessaorg/rcomp/tmp/149lda1321542795.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/wessaorg/rcomp/tmp/1502901321542795.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/wessaorg/rcomp/tmp/16wj311321542795.tab") + } > > try(system("convert tmp/13bvq1321542795.ps tmp/13bvq1321542795.png",intern=TRUE)) character(0) > try(system("convert tmp/2uc5c1321542795.ps tmp/2uc5c1321542795.png",intern=TRUE)) character(0) > try(system("convert tmp/3zobm1321542795.ps tmp/3zobm1321542795.png",intern=TRUE)) character(0) > try(system("convert tmp/4cwgb1321542795.ps tmp/4cwgb1321542795.png",intern=TRUE)) character(0) > try(system("convert tmp/55af61321542795.ps tmp/55af61321542795.png",intern=TRUE)) character(0) > try(system("convert tmp/6fiq31321542795.ps tmp/6fiq31321542795.png",intern=TRUE)) character(0) > try(system("convert tmp/70fpy1321542795.ps tmp/70fpy1321542795.png",intern=TRUE)) character(0) > try(system("convert tmp/80u931321542795.ps tmp/80u931321542795.png",intern=TRUE)) character(0) > try(system("convert tmp/955tz1321542795.ps tmp/955tz1321542795.png",intern=TRUE)) character(0) > try(system("convert tmp/10hzbg1321542795.ps tmp/10hzbg1321542795.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 5.730 0.571 6.368