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(65 + ,146455 + ,1 + ,95556 + ,114468 + ,127 + ,54 + ,84944 + ,4 + ,54565 + ,88594 + ,90 + ,58 + ,113337 + ,9 + ,63016 + ,74151 + ,68 + ,75 + ,128655 + ,2 + ,79774 + ,77921 + ,111 + ,41 + ,74398 + ,1 + ,31258 + ,53212 + ,51 + ,0 + ,35523 + ,2 + ,52491 + ,34956 + ,33 + ,111 + ,293403 + ,0 + ,91256 + ,149703 + ,123 + ,1 + ,32750 + ,0 + ,22807 + ,6853 + ,5 + ,36 + ,106539 + ,5 + ,77411 + ,58907 + ,63 + ,60 + ,130539 + ,0 + ,48821 + ,67067 + ,66 + ,63 + ,154991 + ,0 + ,52295 + ,110563 + ,99 + ,71 + ,126683 + ,7 + ,63262 + ,58126 + ,72 + ,38 + ,100672 + ,6 + ,50466 + ,57113 + ,55 + ,76 + ,179562 + ,3 + ,62932 + ,77993 + ,116 + ,61 + ,125971 + ,4 + ,38439 + ,68091 + ,71 + ,125 + ,234509 + ,0 + ,70817 + ,124676 + ,125 + ,84 + ,158980 + ,4 + ,105965 + ,109522 + ,123 + ,69 + ,184217 + ,3 + ,73795 + ,75865 + ,74 + ,77 + ,107342 + ,0 + ,82043 + ,79746 + ,116 + ,95 + ,141371 + ,5 + ,74349 + ,77844 + ,117 + ,78 + ,154730 + ,0 + ,82204 + ,98681 + ,98 + ,76 + ,264020 + ,1 + ,55709 + ,105531 + ,101 + ,40 + ,90938 + ,3 + ,37137 + ,51428 + ,43 + ,81 + ,101324 + ,5 + ,70780 + ,65703 + ,103 + ,102 + ,130232 + ,0 + ,55027 + ,72562 + ,107 + ,70 + ,137793 + ,0 + ,56699 + ,81728 + ,77 + ,75 + ,161678 + ,4 + ,65911 + ,95580 + ,87 + ,93 + ,151503 + ,0 + ,56316 + ,98278 + ,99 + ,42 + ,105324 + ,0 + ,26982 + ,46629 + ,46 + ,95 + ,175914 + ,0 + ,54628 + ,115189 + ,96 + ,87 + ,181853 + ,3 + ,96750 + ,124865 + ,92 + ,44 + ,114928 + ,4 + ,53009 + ,59392 + ,96 + ,84 + ,190410 + ,1 + ,64664 + ,127818 + ,96 + ,28 + ,61499 + ,4 + ,36990 + ,17821 + ,15 + ,87 + ,223004 + ,1 + ,85224 + ,154076 + ,147 + ,71 + ,167131 + ,0 + ,37048 + ,64881 + ,56 + ,68 + ,233482 + ,0 + ,59635 + ,136506 + ,81 + ,50 + ,121185 + ,2 + ,42051 + ,66524 + ,69 + ,30 + ,78776 + ,1 + ,26998 + ,45988 + ,34 + ,86 + ,188967 + ,2 + ,63717 + ,107445 + ,98 + ,75 + ,199512 + ,8 + ,55071 + ,102772 + ,82 + ,46 + ,102531 + ,5 + ,40001 + ,46657 + ,64 + ,52 + ,118958 + ,3 + ,54506 + ,97563 + ,61 + ,31 + ,68948 + ,4 + ,35838 + ,36663 + ,45 + ,30 + ,93125 + ,1 + ,50838 + ,55369 + ,37 + ,70 + ,277108 + ,2 + ,86997 + ,77921 + ,64 + ,20 + ,78800 + ,2 + ,33032 + ,56968 + ,21 + ,84 + ,157250 + ,0 + ,61704 + ,77519 + ,104 + ,81 + ,210554 + ,6 + ,117986 + ,129805 + ,126 + ,79 + ,127324 + ,3 + ,56733 + ,72761 + ,104 + ,70 + ,114397 + ,0 + ,55064 + ,81278 + ,87 + ,8 + ,24188 + ,0 + ,5950 + ,15049 + ,7 + ,67 + ,246209 + ,6 + ,84607 + ,113935 + ,130 + ,21 + ,65029 + ,5 + ,32551 + ,25109 + ,21 + ,30 + ,98030 + ,3 + ,31701 + ,45824 + ,35 + ,70 + ,173587 + ,1 + ,71170 + ,89644 + ,97 + ,87 + ,172684 + ,5 + ,101773 + ,109011 + ,103 + ,87 + ,191381 + ,5 + ,101653 + ,134245 + ,210 + ,112 + ,191276 + ,0 + ,81493 + ,136692 + ,151 + ,54 + ,134043 + ,9 + ,55901 + ,50741 + ,57 + ,96 + ,233406 + ,6 + ,109104 + ,149510 + ,117 + ,93 + ,195304 + ,6 + ,114425 + ,147888 + ,152 + ,49 + ,127619 + ,5 + ,36311 + ,54987 + ,52 + ,49 + ,162810 + ,6 + ,70027 + ,74467 + ,83 + ,38 + ,129100 + ,2 + ,73713 + ,100033 + ,87 + ,64 + ,108715 + ,0 + ,40671 + ,85505 + ,80 + ,62 + ,106469 + ,3 + ,89041 + ,62426 + ,88 + ,66 + ,142069 + ,8 + ,57231 + ,82932 + ,83 + ,98 + ,143937 + ,2 + ,78792 + ,79169 + ,140 + ,97 + ,84256 + ,5 + ,59155 + ,65469 + ,76 + ,56 + ,118807 + ,11 + ,55827 + ,63572 + ,70 + ,22 + ,69471 + ,6 + ,22618 + ,23824 + ,26 + ,51 + ,122433 + ,5 + ,58425 + ,73831 + ,66 + ,56 + ,131122 + ,1 + ,65724 + ,63551 + ,89 + ,94 + ,94763 + ,0 + ,56979 + ,56756 + ,100 + ,98 + ,188780 + ,3 + ,72369 + ,81399 + ,98 + ,76 + ,191467 + ,3 + ,79194 + ,117881 + ,109 + ,57 + ,105615 + ,6 + ,202316 + ,70711 + ,51 + ,75 + ,89318 + ,1 + ,44970 + ,50495 + ,82 + ,48 + ,107335 + ,0 + ,49319 + ,53845 + ,65 + ,48 + ,98599 + ,1 + ,36252 + ,51390 + ,46 + ,109 + ,260646 + ,0 + ,75741 + ,104953 + ,104 + ,27 + ,131876 + ,5 + ,38417 + ,65983 + ,36 + ,83 + ,119291 + ,2 + ,64102 + ,76839 + ,123 + ,49 + ,80953 + ,0 + ,56622 + ,55792 + ,59 + ,24 + ,99768 + ,0 + ,15430 + ,25155 + ,27 + ,43 + ,84572 + ,5 + ,72571 + ,55291 + ,84 + ,44 + ,202373 + ,1 + ,67271 + ,84279 + ,61 + ,49 + ,166790 + ,0 + ,43460 + ,99692 + ,46 + ,106 + ,99946 + ,1 + ,99501 + ,59633 + ,125 + ,42 + ,116900 + ,1 + ,28340 + ,63249 + ,58 + ,108 + ,142146 + ,2 + ,76013 + ,82928 + ,152 + ,27 + ,99246 + ,4 + ,37361 + ,50000 + ,52 + ,79 + ,156833 + ,1 + ,48204 + ,69455 + ,85 + ,49 + ,175078 + ,4 + ,76168 + ,84068 + ,95 + ,64 + ,130533 + ,0 + ,85168 + ,76195 + ,78 + ,75 + ,142339 + ,2 + ,125410 + ,114634 + ,144 + ,115 + ,176789 + ,0 + ,123328 + ,139357 + ,149 + ,92 + ,181379 + ,7 + ,83038 + ,110044 + ,101 + ,106 + ,228548 + ,7 + ,120087 + ,155118 + ,205 + ,73 + ,142141 + ,6 + ,91939 + ,83061 + ,61 + ,105 + ,167845 + ,0 + ,103646 + ,127122 + ,145 + ,30 + ,103012 + ,0 + ,29467 + ,45653 + ,28 + ,13 + ,43287 + ,4 + ,43750 + ,19630 + ,49 + ,69 + ,125366 + ,4 + ,34497 + ,67229 + ,68 + ,72 + ,118372 + ,0 + ,66477 + ,86060 + ,142 + ,80 + ,135171 + ,0 + ,71181 + ,88003 + ,82 + ,106 + ,175568 + ,0 + ,74482 + ,95815 + ,105 + ,28 + ,74112 + ,0 + ,174949 + ,85499 + ,52 + ,70 + ,88817 + ,0 + ,46765 + ,27220 + ,56 + ,51 + ,164767 + ,4 + ,90257 + ,109882 + ,81 + ,90 + ,141933 + ,0 + ,51370 + ,72579 + ,100 + ,12 + ,22938 + ,0 + ,1168 + ,5841 + ,11 + ,84 + ,115199 + ,0 + ,51360 + ,68369 + ,87 + ,23 + ,61857 + ,4 + ,25162 + ,24610 + ,31 + ,57 + ,91185 + ,0 + ,21067 + ,30995 + ,67 + ,84 + ,213765 + ,1 + ,58233 + ,150662 + ,150 + ,4 + ,21054 + ,0 + ,855 + ,6622 + ,4 + ,56 + ,167105 + ,5 + ,85903 + ,93694 + ,75 + ,18 + ,31414 + ,0 + ,14116 + ,13155 + ,39 + ,86 + ,178863 + ,1 + ,57637 + ,111908 + ,88 + ,39 + ,126681 + ,7 + ,94137 + ,57550 + ,67 + ,16 + ,64320 + ,5 + ,62147 + ,16356 + ,24 + ,18 + ,67746 + ,2 + ,62832 + ,40174 + ,58 + ,16 + ,38214 + ,0 + ,8773 + ,13983 + ,16 + ,42 + ,90961 + ,1 + ,63785 + ,52316 + ,49 + ,75 + ,181510 + ,0 + ,65196 + ,99585 + ,109 + ,30 + ,116775 + ,0 + ,73087 + ,86271 + ,124 + ,104 + ,223914 + ,2 + ,72631 + ,131012 + ,115 + ,121 + ,185139 + ,0 + ,86281 + ,130274 + ,128 + ,106 + ,242879 + ,2 + ,162365 + ,159051 + ,159 + ,57 + ,139144 + ,0 + ,56530 + ,76506 + ,75 + ,28 + ,75812 + ,0 + ,35606 + ,49145 + ,30 + ,56 + ,178218 + ,4 + ,70111 + ,66398 + ,83 + ,81 + ,246834 + ,4 + ,92046 + ,127546 + ,135 + ,2 + ,50999 + ,8 + ,63989 + ,6802 + ,8 + ,88 + ,223842 + ,0 + ,104911 + ,99509 + ,115 + ,41 + ,93577 + ,4 + ,43448 + ,43106 + ,60 + ,83 + ,155383 + ,0 + ,60029 + ,108303 + ,99 + ,55 + ,111664 + ,1 + ,38650 + ,64167 + ,98 + ,3 + ,75426 + ,0 + ,47261 + ,8579 + ,36 + ,54 + ,243551 + ,9 + ,73586 + ,97811 + ,93 + ,89 + ,136548 + ,0 + ,83042 + ,84365 + ,158 + ,41 + ,173260 + ,3 + ,37238 + ,10901 + ,16 + ,94 + ,185039 + ,7 + ,63958 + ,91346 + ,100 + ,101 + ,67507 + ,5 + ,78956 + ,33660 + ,49 + ,70 + ,139350 + ,2 + ,99518 + ,93634 + ,89 + ,111 + ,172964 + ,1 + ,111436 + ,109348 + ,153 + ,0 + ,0 + ,9 + ,0 + ,0 + ,0 + ,4 + ,14688 + ,0 + ,6023 + ,7953 + ,5 + ,0 + ,98 + ,0 + ,0 + ,0 + ,0 + ,0 + ,455 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,1 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,42 + ,128066 + ,2 + ,42564 + ,63538 + ,80 + ,97 + ,176460 + ,1 + ,38885 + ,108281 + ,122 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,203 + ,0 + ,0 + ,0 + ,0 + ,7 + ,7199 + ,0 + ,1644 + ,4245 + ,6 + ,12 + ,46660 + ,0 + ,6179 + ,21509 + ,13 + ,0 + ,17547 + ,0 + ,3926 + ,7670 + ,3 + ,37 + ,73567 + ,0 + ,23238 + ,10641 + ,18 + ,0 + ,969 + ,0 + ,0 + ,0 + ,0 + ,39 + ,101060 + ,2 + ,49288 + ,41243 + ,49) + ,dim=c(6 + ,164) + ,dimnames=list(c('BlogdComputations' + ,'TotalTime' + ,'Shared' + ,'Caracters' + ,'Writing' + ,'Hyperlink') + ,1:164)) > y <- array(NA,dim=c(6,164),dimnames=list(c('BlogdComputations','TotalTime','Shared','Caracters','Writing','Hyperlink'),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' > #'GNU S' R Code compiled by R2WASP v. 1.0.44 () > #Author: Prof. Dr. P. Wessa > #To cite this work: AUTHOR(S), (YEAR), YOUR SOFTWARE TITLE (vNUMBER) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_YOURPAGE.wasp/ > #Source of accompanying publication: Office for Research, Development, and Education > #Technical description: Write here your technical program description (don't use hard returns!) > library(lattice) > library(lmtest) Loading required package: zoo > n25 <- 25 #minimum number of obs. for Goldfeld-Quandt test > par1 <- as.numeric(par1) > x <- t(y) > k <- length(x[1,]) > n <- length(x[,1]) > x1 <- cbind(x[,par1], x[,1:k!=par1]) > mycolnames <- c(colnames(x)[par1], colnames(x)[1:k!=par1]) > colnames(x1) <- mycolnames #colnames(x)[par1] > x <- x1 > if (par3 == 'First Differences'){ + x2 <- array(0, dim=c(n-1,k), dimnames=list(1:(n-1), paste('(1-B)',colnames(x),sep=''))) + for (i in 1:n-1) { + for (j in 1:k) { + x2[i,j] <- x[i+1,j] - x[i,j] + } + } + x <- x2 + } > if (par2 == 'Include Monthly Dummies'){ + x2 <- array(0, dim=c(n,11), dimnames=list(1:n, paste('M', seq(1:11), sep =''))) + for (i in 1:11){ + x2[seq(i,n,12),i] <- 1 + } + x <- cbind(x, x2) + } > if (par2 == 'Include Quarterly Dummies'){ + x2 <- array(0, dim=c(n,3), dimnames=list(1:n, paste('Q', seq(1:3), sep =''))) + for (i in 1:3){ + x2[seq(i,n,4),i] <- 1 + } + x <- cbind(x, x2) + } > k <- length(x[1,]) > if (par3 == 'Linear Trend'){ + x <- cbind(x, c(1:n)) + colnames(x)[k+1] <- 't' + } > x BlogdComputations TotalTime Shared Caracters Writing Hyperlink 1 65 146455 1 95556 114468 127 2 54 84944 4 54565 88594 90 3 58 113337 9 63016 74151 68 4 75 128655 2 79774 77921 111 5 41 74398 1 31258 53212 51 6 0 35523 2 52491 34956 33 7 111 293403 0 91256 149703 123 8 1 32750 0 22807 6853 5 9 36 106539 5 77411 58907 63 10 60 130539 0 48821 67067 66 11 63 154991 0 52295 110563 99 12 71 126683 7 63262 58126 72 13 38 100672 6 50466 57113 55 14 76 179562 3 62932 77993 116 15 61 125971 4 38439 68091 71 16 125 234509 0 70817 124676 125 17 84 158980 4 105965 109522 123 18 69 184217 3 73795 75865 74 19 77 107342 0 82043 79746 116 20 95 141371 5 74349 77844 117 21 78 154730 0 82204 98681 98 22 76 264020 1 55709 105531 101 23 40 90938 3 37137 51428 43 24 81 101324 5 70780 65703 103 25 102 130232 0 55027 72562 107 26 70 137793 0 56699 81728 77 27 75 161678 4 65911 95580 87 28 93 151503 0 56316 98278 99 29 42 105324 0 26982 46629 46 30 95 175914 0 54628 115189 96 31 87 181853 3 96750 124865 92 32 44 114928 4 53009 59392 96 33 84 190410 1 64664 127818 96 34 28 61499 4 36990 17821 15 35 87 223004 1 85224 154076 147 36 71 167131 0 37048 64881 56 37 68 233482 0 59635 136506 81 38 50 121185 2 42051 66524 69 39 30 78776 1 26998 45988 34 40 86 188967 2 63717 107445 98 41 75 199512 8 55071 102772 82 42 46 102531 5 40001 46657 64 43 52 118958 3 54506 97563 61 44 31 68948 4 35838 36663 45 45 30 93125 1 50838 55369 37 46 70 277108 2 86997 77921 64 47 20 78800 2 33032 56968 21 48 84 157250 0 61704 77519 104 49 81 210554 6 117986 129805 126 50 79 127324 3 56733 72761 104 51 70 114397 0 55064 81278 87 52 8 24188 0 5950 15049 7 53 67 246209 6 84607 113935 130 54 21 65029 5 32551 25109 21 55 30 98030 3 31701 45824 35 56 70 173587 1 71170 89644 97 57 87 172684 5 101773 109011 103 58 87 191381 5 101653 134245 210 59 112 191276 0 81493 136692 151 60 54 134043 9 55901 50741 57 61 96 233406 6 109104 149510 117 62 93 195304 6 114425 147888 152 63 49 127619 5 36311 54987 52 64 49 162810 6 70027 74467 83 65 38 129100 2 73713 100033 87 66 64 108715 0 40671 85505 80 67 62 106469 3 89041 62426 88 68 66 142069 8 57231 82932 83 69 98 143937 2 78792 79169 140 70 97 84256 5 59155 65469 76 71 56 118807 11 55827 63572 70 72 22 69471 6 22618 23824 26 73 51 122433 5 58425 73831 66 74 56 131122 1 65724 63551 89 75 94 94763 0 56979 56756 100 76 98 188780 3 72369 81399 98 77 76 191467 3 79194 117881 109 78 57 105615 6 202316 70711 51 79 75 89318 1 44970 50495 82 80 48 107335 0 49319 53845 65 81 48 98599 1 36252 51390 46 82 109 260646 0 75741 104953 104 83 27 131876 5 38417 65983 36 84 83 119291 2 64102 76839 123 85 49 80953 0 56622 55792 59 86 24 99768 0 15430 25155 27 87 43 84572 5 72571 55291 84 88 44 202373 1 67271 84279 61 89 49 166790 0 43460 99692 46 90 106 99946 1 99501 59633 125 91 42 116900 1 28340 63249 58 92 108 142146 2 76013 82928 152 93 27 99246 4 37361 50000 52 94 79 156833 1 48204 69455 85 95 49 175078 4 76168 84068 95 96 64 130533 0 85168 76195 78 97 75 142339 2 125410 114634 144 98 115 176789 0 123328 139357 149 99 92 181379 7 83038 110044 101 100 106 228548 7 120087 155118 205 101 73 142141 6 91939 83061 61 102 105 167845 0 103646 127122 145 103 30 103012 0 29467 45653 28 104 13 43287 4 43750 19630 49 105 69 125366 4 34497 67229 68 106 72 118372 0 66477 86060 142 107 80 135171 0 71181 88003 82 108 106 175568 0 74482 95815 105 109 28 74112 0 174949 85499 52 110 70 88817 0 46765 27220 56 111 51 164767 4 90257 109882 81 112 90 141933 0 51370 72579 100 113 12 22938 0 1168 5841 11 114 84 115199 0 51360 68369 87 115 23 61857 4 25162 24610 31 116 57 91185 0 21067 30995 67 117 84 213765 1 58233 150662 150 118 4 21054 0 855 6622 4 119 56 167105 5 85903 93694 75 120 18 31414 0 14116 13155 39 121 86 178863 1 57637 111908 88 122 39 126681 7 94137 57550 67 123 16 64320 5 62147 16356 24 124 18 67746 2 62832 40174 58 125 16 38214 0 8773 13983 16 126 42 90961 1 63785 52316 49 127 75 181510 0 65196 99585 109 128 30 116775 0 73087 86271 124 129 104 223914 2 72631 131012 115 130 121 185139 0 86281 130274 128 131 106 242879 2 162365 159051 159 132 57 139144 0 56530 76506 75 133 28 75812 0 35606 49145 30 134 56 178218 4 70111 66398 83 135 81 246834 4 92046 127546 135 136 2 50999 8 63989 6802 8 137 88 223842 0 104911 99509 115 138 41 93577 4 43448 43106 60 139 83 155383 0 60029 108303 99 140 55 111664 1 38650 64167 98 141 3 75426 0 47261 8579 36 142 54 243551 9 73586 97811 93 143 89 136548 0 83042 84365 158 144 41 173260 3 37238 10901 16 145 94 185039 7 63958 91346 100 146 101 67507 5 78956 33660 49 147 70 139350 2 99518 93634 89 148 111 172964 1 111436 109348 153 149 0 0 9 0 0 0 150 4 14688 0 6023 7953 5 151 0 98 0 0 0 0 152 0 455 0 0 0 0 153 0 0 1 0 0 0 154 0 0 0 0 0 0 155 42 128066 2 42564 63538 80 156 97 176460 1 38885 108281 122 157 0 0 0 0 0 0 158 0 203 0 0 0 0 159 7 7199 0 1644 4245 6 160 12 46660 0 6179 21509 13 161 0 17547 0 3926 7670 3 162 37 73567 0 23238 10641 18 163 0 969 0 0 0 0 164 39 101060 2 49288 41243 49 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) TotalTime Shared Caracters Writing Hyperlink 4.731e+00 1.570e-04 -8.591e-01 3.151e-05 -2.089e-06 4.441e-01 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -50.256 -8.848 -0.969 8.366 65.787 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 4.731e+00 2.901e+00 1.631 0.104891 TotalTime 1.570e-04 3.967e-05 3.959 0.000114 *** Shared -8.591e-01 4.887e-01 -1.758 0.080703 . Caracters 3.151e-05 5.600e-05 0.563 0.574496 Writing -2.089e-06 8.538e-05 -0.024 0.980513 Hyperlink 4.441e-01 5.614e-02 7.910 4.21e-13 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 15.42 on 158 degrees of freedom Multiple R-squared: 0.7784, Adjusted R-squared: 0.7714 F-statistic: 111 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.0009745993 0.0019491985 0.9990254007 [2,] 0.0005533760 0.0011067520 0.9994466240 [3,] 0.0084934621 0.0169869242 0.9915065379 [4,] 0.0025917630 0.0051835260 0.9974082370 [5,] 0.0056112936 0.0112225872 0.9943887064 [6,] 0.0896274017 0.1792548035 0.9103725983 [7,] 0.0510776454 0.1021552908 0.9489223546 [8,] 0.1232226542 0.2464453084 0.8767773458 [9,] 0.0993525845 0.1987051691 0.9006474155 [10,] 0.0632176559 0.1264353119 0.9367823441 [11,] 0.0687836543 0.1375673086 0.9312163457 [12,] 0.0559866106 0.1119732211 0.9440133894 [13,] 0.0492428628 0.0984857256 0.9507571372 [14,] 0.1460858684 0.2921717368 0.8539141316 [15,] 0.1124480034 0.2248960068 0.8875519966 [16,] 0.0995589557 0.1991179113 0.9004410443 [17,] 0.1627991319 0.3255982637 0.8372008681 [18,] 0.1474378989 0.2948757978 0.8525621011 [19,] 0.1162638747 0.2325277495 0.8837361253 [20,] 0.1264367025 0.2528734050 0.8735632975 [21,] 0.0942323615 0.1884647229 0.9057676385 [22,] 0.0980787256 0.1961574513 0.9019212744 [23,] 0.1105973042 0.2211946085 0.8894026958 [24,] 0.1914252290 0.3828504580 0.8085747710 [25,] 0.1533122055 0.3066244110 0.8466877945 [26,] 0.1505770470 0.3011540940 0.8494229530 [27,] 0.2351657851 0.4703315702 0.7648342149 [28,] 0.2160286403 0.4320572807 0.7839713597 [29,] 0.2042552718 0.4085105436 0.7957447282 [30,] 0.1721247137 0.3442494274 0.8278752863 [31,] 0.1379887588 0.2759775176 0.8620112412 [32,] 0.1124671422 0.2249342845 0.8875328578 [33,] 0.0894788289 0.1789576578 0.9105211711 [34,] 0.0709311091 0.1418622181 0.9290688909 [35,] 0.0546369228 0.1092738457 0.9453630772 [36,] 0.0416155225 0.0832310449 0.9583844775 [37,] 0.0313498905 0.0626997810 0.9686501095 [38,] 0.0248480616 0.0496961232 0.9751519384 [39,] 0.0182307628 0.0364615255 0.9817692372 [40,] 0.0134256782 0.0268513564 0.9865743218 [41,] 0.0115180397 0.0230360793 0.9884819603 [42,] 0.0084357199 0.0168714397 0.9915642801 [43,] 0.0062731054 0.0125462109 0.9937268946 [44,] 0.0043766209 0.0087532417 0.9956233791 [45,] 0.0245165345 0.0490330689 0.9754834655 [46,] 0.0179724807 0.0359449614 0.9820275193 [47,] 0.0134243090 0.0268486180 0.9865756910 [48,] 0.0102352554 0.0204705107 0.9897647446 [49,] 0.0095738560 0.0191477120 0.9904261440 [50,] 0.0607464099 0.1214928197 0.9392535901 [51,] 0.0514648311 0.1029296622 0.9485351689 [52,] 0.0435835488 0.0871670977 0.9564164512 [53,] 0.0345122223 0.0690244446 0.9654877777 [54,] 0.0274893159 0.0549786318 0.9725106841 [55,] 0.0208786396 0.0417572791 0.9791213604 [56,] 0.0206288879 0.0412577758 0.9793711121 [57,] 0.0351635452 0.0703270904 0.9648364548 [58,] 0.0274580549 0.0549161098 0.9725419451 [59,] 0.0212985080 0.0425970160 0.9787014920 [60,] 0.0168412055 0.0336824110 0.9831587945 [61,] 0.0141346504 0.0282693008 0.9858653496 [62,] 0.1237019249 0.2474038498 0.8762980751 [63,] 0.1083062926 0.2166125853 0.8916937074 [64,] 0.0899030316 0.1798060631 0.9100969684 [65,] 0.0726622261 0.1453244521 0.9273377739 [66,] 0.0632499807 0.1264999614 0.9367500193 [67,] 0.1035892755 0.2071785510 0.8964107245 [68,] 0.1209907997 0.2419815993 0.8790092003 [69,] 0.1024944321 0.2049888642 0.8975055679 [70,] 0.0983386376 0.1966772753 0.9016613624 [71,] 0.1065042969 0.2130085938 0.8934957031 [72,] 0.0891530902 0.1783061804 0.9108469098 [73,] 0.0746195541 0.1492391081 0.9253804459 [74,] 0.0730474851 0.1460949703 0.9269525149 [75,] 0.0660562349 0.1321124697 0.9339437651 [76,] 0.0535971186 0.1071942373 0.9464028814 [77,] 0.0426107217 0.0852214433 0.9573892783 [78,] 0.0374645951 0.0749291902 0.9625354049 [79,] 0.0329185013 0.0658370026 0.9670814987 [80,] 0.0406927699 0.0813855398 0.9593072301 [81,] 0.0321381150 0.0642762301 0.9678618850 [82,] 0.0563580448 0.1127160897 0.9436419552 [83,] 0.0471750882 0.0943501764 0.9528249118 [84,] 0.0480786964 0.0961573928 0.9519213036 [85,] 0.0464069450 0.0928138900 0.9535930550 [86,] 0.0410530268 0.0821060535 0.9589469732 [87,] 0.0575609444 0.1151218887 0.9424390556 [88,] 0.0455140533 0.0910281066 0.9544859467 [89,] 0.0475555045 0.0951110089 0.9524444955 [90,] 0.0447945458 0.0895890916 0.9552054542 [91,] 0.0486486691 0.0972973382 0.9513513309 [92,] 0.0556388714 0.1112777428 0.9443611286 [93,] 0.0674539762 0.1349079524 0.9325460238 [94,] 0.0567973163 0.1135946327 0.9432026837 [95,] 0.0461650489 0.0923300977 0.9538349511 [96,] 0.0488434691 0.0976869382 0.9511565309 [97,] 0.0508787055 0.1017574110 0.9491212945 [98,] 0.0491983424 0.0983966848 0.9508016576 [99,] 0.0489665302 0.0979330604 0.9510334698 [100,] 0.0714103195 0.1428206389 0.9285896805 [101,] 0.0725958969 0.1451917938 0.9274041031 [102,] 0.1058907917 0.2117815834 0.8941092083 [103,] 0.1059071900 0.2118143801 0.8940928100 [104,] 0.1218295176 0.2436590353 0.8781704824 [105,] 0.1000752321 0.2001504642 0.8999247679 [106,] 0.1308844227 0.2617688453 0.8691155773 [107,] 0.1070979042 0.2141958085 0.8929020958 [108,] 0.1082391970 0.2164783939 0.8917608030 [109,] 0.1252513697 0.2505027394 0.8747486303 [110,] 0.1043586197 0.2087172393 0.8956413803 [111,] 0.0921015069 0.1842030138 0.9078984931 [112,] 0.0772287513 0.1544575026 0.9227712487 [113,] 0.0670600684 0.1341201369 0.9329399316 [114,] 0.0616528062 0.1233056124 0.9383471938 [115,] 0.0502954575 0.1005909151 0.9497045425 [116,] 0.0654184160 0.1308368320 0.9345815840 [117,] 0.0505674331 0.1011348663 0.9494325669 [118,] 0.0380585906 0.0761171812 0.9619414094 [119,] 0.0292714998 0.0585429996 0.9707285002 [120,] 0.2148642187 0.4297284375 0.7851357813 [121,] 0.2026404615 0.4052809230 0.7973595385 [122,] 0.3015123988 0.6030247976 0.6984876012 [123,] 0.3189344730 0.6378689461 0.6810655270 [124,] 0.2688829787 0.5377659574 0.7311170213 [125,] 0.2240016668 0.4480033336 0.7759983332 [126,] 0.1933452535 0.3866905069 0.8066547465 [127,] 0.2252789071 0.4505578142 0.7747210929 [128,] 0.2979703211 0.5959406422 0.7020296789 [129,] 0.2551849410 0.5103698821 0.7448150590 [130,] 0.2098496730 0.4196993460 0.7901503270 [131,] 0.1762185066 0.3524370132 0.8237814934 [132,] 0.1393681162 0.2787362325 0.8606318838 [133,] 0.3283529976 0.6567059953 0.6716470024 [134,] 0.6134605813 0.7730788373 0.3865394187 [135,] 0.6166562798 0.7666874404 0.3833437202 [136,] 0.5720591833 0.8558816334 0.4279408167 [137,] 0.5124773469 0.9750453062 0.4875226531 [138,] 0.9970182025 0.0059635949 0.0029817975 [139,] 0.9946237271 0.0107525458 0.0053762729 [140,] 0.9970570139 0.0058859722 0.0029429861 [141,] 0.9972227723 0.0055544553 0.0027772277 [142,] 0.9929773772 0.0140452455 0.0070226228 [143,] 0.9828208614 0.0343582773 0.0171791386 [144,] 0.9604563863 0.0790872273 0.0395436137 [145,] 0.9995888706 0.0008222589 0.0004111294 [146,] 0.9974789991 0.0050420018 0.0025210009 [147,] 0.9995581035 0.0008837929 0.0004418965 > postscript(file="/var/wessaorg/rcomp/tmp/1z8dn1321543012.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/2jzcl1321543012.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/3hmf51321543012.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/40inf1321543012.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/5rl891321543012.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 -21.038875989 -2.134343352 11.175817010 0.141421589 1.923546658 6 7 8 9 10 -24.826573639 3.012007910 -11.798837021 -11.458166394 4.063093064 11 12 13 14 15 -11.449583760 18.544340837 -3.279998232 -7.683012586 7.325752749 16 17 18 19 20 25.963708473 0.009674896 2.890322199 1.481951841 18.228298290 21 22 23 24 25 3.068344341 -15.717590520 3.408114707 16.820996707 27.720318912 26 27 28 29 30 7.821624551 7.805398009 18.945793784 -0.450577505 18.533235451 31 32 33 34 35 12.647386853 -19.519157014 5.826220326 9.258498918 -19.532605556 36 37 38 39 40 14.124091418 -10.958862197 -3.869861141 -2.095591425 8.011070981 41 42 43 44 45 7.877667724 -0.119810791 2.563963742 -2.157719297 -6.412546411 46 47 48 49 50 -7.526471240 -5.634484374 6.609865327 -11.039376885 9.033196739 51 52 53 54 55 7.105373001 -3.794268255 -31.396109412 0.053945415 -3.993414404 56 57 58 59 60 -6.260836770 10.729279067 -39.665895803 7.895500841 8.984391252 61 62 63 64 65 4.689794676 -8.040554823 4.403116275 -15.051619127 -26.033594891 66 67 68 69 70 5.568416497 1.373739135 7.344421088 7.897146921 47.856897955 71 72 73 74 75 9.351348129 -0.694562302 0.343115404 -9.922873489 28.304029961 76 77 78 79 80 20.572559472 -6.872994567 11.964318752 19.376744418 -3.892400915 81 82 83 84 85 7.182456533 14.988566291 -11.203601642 4.774499061 3.688793911 86 87 88 89 90 -8.821652794 -10.189239024 -20.682912618 -3.510948608 27.913782819 91 92 93 94 95 -6.746177322 12.944936638 -14.044064350 11.380309829 -24.198588998 96 97 98 99 100 1.609098033 -18.022867323 12.746066576 17.562694141 -23.100847393 101 102 103 104 105 21.291218734 6.521378927 -4.174564646 -18.189291564 16.875366809 106 107 108 109 110 -16.292349565 15.569840118 24.924937949 -16.794403602 25.036991633 111 112 113 114 115 -14.752409279 17.106655399 -1.242838405 21.069168109 -2.516031043 116 117 118 119 120 7.597878839 -21.570768549 -5.826998663 -6.492637239 -9.400496538 121 122 123 124 125 13.380186829 -12.208934679 -7.117665897 -23.303269143 -2.084593959 126 127 128 129 130 0.184125410 -8.483986881 -50.256096130 12.742482174 27.908589150 131 132 133 134 135 -10.543338477 -4.507963965 -2.977591285 -12.208884171 -21.638787501 136 137 138 139 140 -9.421352649 -6.047258459 -2.912605908 8.240472985 -11.009735689 141 142 143 144 145 -31.033341382 -24.657175127 -9.777121858 3.383125718 19.994109500 146 147 148 149 150 65.786649147 2.642320888 8.741525890 3.000572201 -5.431454587 151 152 153 154 155 -4.746869687 -4.802929674 -3.872363685 -4.731480670 -17.857576944 156 157 158 159 160 10.242320443 -4.731480670 -4.763357918 -1.569303563 -5.981214751 161 162 163 164 -8.926785691 12.013040373 -4.883643495 -3.108999578 > postscript(file="/var/wessaorg/rcomp/tmp/6l2ay1321543012.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 -21.038875989 NA 1 -2.134343352 -21.038875989 2 11.175817010 -2.134343352 3 0.141421589 11.175817010 4 1.923546658 0.141421589 5 -24.826573639 1.923546658 6 3.012007910 -24.826573639 7 -11.798837021 3.012007910 8 -11.458166394 -11.798837021 9 4.063093064 -11.458166394 10 -11.449583760 4.063093064 11 18.544340837 -11.449583760 12 -3.279998232 18.544340837 13 -7.683012586 -3.279998232 14 7.325752749 -7.683012586 15 25.963708473 7.325752749 16 0.009674896 25.963708473 17 2.890322199 0.009674896 18 1.481951841 2.890322199 19 18.228298290 1.481951841 20 3.068344341 18.228298290 21 -15.717590520 3.068344341 22 3.408114707 -15.717590520 23 16.820996707 3.408114707 24 27.720318912 16.820996707 25 7.821624551 27.720318912 26 7.805398009 7.821624551 27 18.945793784 7.805398009 28 -0.450577505 18.945793784 29 18.533235451 -0.450577505 30 12.647386853 18.533235451 31 -19.519157014 12.647386853 32 5.826220326 -19.519157014 33 9.258498918 5.826220326 34 -19.532605556 9.258498918 35 14.124091418 -19.532605556 36 -10.958862197 14.124091418 37 -3.869861141 -10.958862197 38 -2.095591425 -3.869861141 39 8.011070981 -2.095591425 40 7.877667724 8.011070981 41 -0.119810791 7.877667724 42 2.563963742 -0.119810791 43 -2.157719297 2.563963742 44 -6.412546411 -2.157719297 45 -7.526471240 -6.412546411 46 -5.634484374 -7.526471240 47 6.609865327 -5.634484374 48 -11.039376885 6.609865327 49 9.033196739 -11.039376885 50 7.105373001 9.033196739 51 -3.794268255 7.105373001 52 -31.396109412 -3.794268255 53 0.053945415 -31.396109412 54 -3.993414404 0.053945415 55 -6.260836770 -3.993414404 56 10.729279067 -6.260836770 57 -39.665895803 10.729279067 58 7.895500841 -39.665895803 59 8.984391252 7.895500841 60 4.689794676 8.984391252 61 -8.040554823 4.689794676 62 4.403116275 -8.040554823 63 -15.051619127 4.403116275 64 -26.033594891 -15.051619127 65 5.568416497 -26.033594891 66 1.373739135 5.568416497 67 7.344421088 1.373739135 68 7.897146921 7.344421088 69 47.856897955 7.897146921 70 9.351348129 47.856897955 71 -0.694562302 9.351348129 72 0.343115404 -0.694562302 73 -9.922873489 0.343115404 74 28.304029961 -9.922873489 75 20.572559472 28.304029961 76 -6.872994567 20.572559472 77 11.964318752 -6.872994567 78 19.376744418 11.964318752 79 -3.892400915 19.376744418 80 7.182456533 -3.892400915 81 14.988566291 7.182456533 82 -11.203601642 14.988566291 83 4.774499061 -11.203601642 84 3.688793911 4.774499061 85 -8.821652794 3.688793911 86 -10.189239024 -8.821652794 87 -20.682912618 -10.189239024 88 -3.510948608 -20.682912618 89 27.913782819 -3.510948608 90 -6.746177322 27.913782819 91 12.944936638 -6.746177322 92 -14.044064350 12.944936638 93 11.380309829 -14.044064350 94 -24.198588998 11.380309829 95 1.609098033 -24.198588998 96 -18.022867323 1.609098033 97 12.746066576 -18.022867323 98 17.562694141 12.746066576 99 -23.100847393 17.562694141 100 21.291218734 -23.100847393 101 6.521378927 21.291218734 102 -4.174564646 6.521378927 103 -18.189291564 -4.174564646 104 16.875366809 -18.189291564 105 -16.292349565 16.875366809 106 15.569840118 -16.292349565 107 24.924937949 15.569840118 108 -16.794403602 24.924937949 109 25.036991633 -16.794403602 110 -14.752409279 25.036991633 111 17.106655399 -14.752409279 112 -1.242838405 17.106655399 113 21.069168109 -1.242838405 114 -2.516031043 21.069168109 115 7.597878839 -2.516031043 116 -21.570768549 7.597878839 117 -5.826998663 -21.570768549 118 -6.492637239 -5.826998663 119 -9.400496538 -6.492637239 120 13.380186829 -9.400496538 121 -12.208934679 13.380186829 122 -7.117665897 -12.208934679 123 -23.303269143 -7.117665897 124 -2.084593959 -23.303269143 125 0.184125410 -2.084593959 126 -8.483986881 0.184125410 127 -50.256096130 -8.483986881 128 12.742482174 -50.256096130 129 27.908589150 12.742482174 130 -10.543338477 27.908589150 131 -4.507963965 -10.543338477 132 -2.977591285 -4.507963965 133 -12.208884171 -2.977591285 134 -21.638787501 -12.208884171 135 -9.421352649 -21.638787501 136 -6.047258459 -9.421352649 137 -2.912605908 -6.047258459 138 8.240472985 -2.912605908 139 -11.009735689 8.240472985 140 -31.033341382 -11.009735689 141 -24.657175127 -31.033341382 142 -9.777121858 -24.657175127 143 3.383125718 -9.777121858 144 19.994109500 3.383125718 145 65.786649147 19.994109500 146 2.642320888 65.786649147 147 8.741525890 2.642320888 148 3.000572201 8.741525890 149 -5.431454587 3.000572201 150 -4.746869687 -5.431454587 151 -4.802929674 -4.746869687 152 -3.872363685 -4.802929674 153 -4.731480670 -3.872363685 154 -17.857576944 -4.731480670 155 10.242320443 -17.857576944 156 -4.731480670 10.242320443 157 -4.763357918 -4.731480670 158 -1.569303563 -4.763357918 159 -5.981214751 -1.569303563 160 -8.926785691 -5.981214751 161 12.013040373 -8.926785691 162 -4.883643495 12.013040373 163 -3.108999578 -4.883643495 164 NA -3.108999578 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -2.134343352 -21.038875989 [2,] 11.175817010 -2.134343352 [3,] 0.141421589 11.175817010 [4,] 1.923546658 0.141421589 [5,] -24.826573639 1.923546658 [6,] 3.012007910 -24.826573639 [7,] -11.798837021 3.012007910 [8,] -11.458166394 -11.798837021 [9,] 4.063093064 -11.458166394 [10,] -11.449583760 4.063093064 [11,] 18.544340837 -11.449583760 [12,] -3.279998232 18.544340837 [13,] -7.683012586 -3.279998232 [14,] 7.325752749 -7.683012586 [15,] 25.963708473 7.325752749 [16,] 0.009674896 25.963708473 [17,] 2.890322199 0.009674896 [18,] 1.481951841 2.890322199 [19,] 18.228298290 1.481951841 [20,] 3.068344341 18.228298290 [21,] -15.717590520 3.068344341 [22,] 3.408114707 -15.717590520 [23,] 16.820996707 3.408114707 [24,] 27.720318912 16.820996707 [25,] 7.821624551 27.720318912 [26,] 7.805398009 7.821624551 [27,] 18.945793784 7.805398009 [28,] -0.450577505 18.945793784 [29,] 18.533235451 -0.450577505 [30,] 12.647386853 18.533235451 [31,] -19.519157014 12.647386853 [32,] 5.826220326 -19.519157014 [33,] 9.258498918 5.826220326 [34,] -19.532605556 9.258498918 [35,] 14.124091418 -19.532605556 [36,] -10.958862197 14.124091418 [37,] -3.869861141 -10.958862197 [38,] -2.095591425 -3.869861141 [39,] 8.011070981 -2.095591425 [40,] 7.877667724 8.011070981 [41,] -0.119810791 7.877667724 [42,] 2.563963742 -0.119810791 [43,] -2.157719297 2.563963742 [44,] -6.412546411 -2.157719297 [45,] -7.526471240 -6.412546411 [46,] -5.634484374 -7.526471240 [47,] 6.609865327 -5.634484374 [48,] -11.039376885 6.609865327 [49,] 9.033196739 -11.039376885 [50,] 7.105373001 9.033196739 [51,] -3.794268255 7.105373001 [52,] -31.396109412 -3.794268255 [53,] 0.053945415 -31.396109412 [54,] -3.993414404 0.053945415 [55,] -6.260836770 -3.993414404 [56,] 10.729279067 -6.260836770 [57,] -39.665895803 10.729279067 [58,] 7.895500841 -39.665895803 [59,] 8.984391252 7.895500841 [60,] 4.689794676 8.984391252 [61,] -8.040554823 4.689794676 [62,] 4.403116275 -8.040554823 [63,] -15.051619127 4.403116275 [64,] -26.033594891 -15.051619127 [65,] 5.568416497 -26.033594891 [66,] 1.373739135 5.568416497 [67,] 7.344421088 1.373739135 [68,] 7.897146921 7.344421088 [69,] 47.856897955 7.897146921 [70,] 9.351348129 47.856897955 [71,] -0.694562302 9.351348129 [72,] 0.343115404 -0.694562302 [73,] -9.922873489 0.343115404 [74,] 28.304029961 -9.922873489 [75,] 20.572559472 28.304029961 [76,] -6.872994567 20.572559472 [77,] 11.964318752 -6.872994567 [78,] 19.376744418 11.964318752 [79,] -3.892400915 19.376744418 [80,] 7.182456533 -3.892400915 [81,] 14.988566291 7.182456533 [82,] -11.203601642 14.988566291 [83,] 4.774499061 -11.203601642 [84,] 3.688793911 4.774499061 [85,] -8.821652794 3.688793911 [86,] -10.189239024 -8.821652794 [87,] -20.682912618 -10.189239024 [88,] -3.510948608 -20.682912618 [89,] 27.913782819 -3.510948608 [90,] -6.746177322 27.913782819 [91,] 12.944936638 -6.746177322 [92,] -14.044064350 12.944936638 [93,] 11.380309829 -14.044064350 [94,] -24.198588998 11.380309829 [95,] 1.609098033 -24.198588998 [96,] -18.022867323 1.609098033 [97,] 12.746066576 -18.022867323 [98,] 17.562694141 12.746066576 [99,] -23.100847393 17.562694141 [100,] 21.291218734 -23.100847393 [101,] 6.521378927 21.291218734 [102,] -4.174564646 6.521378927 [103,] -18.189291564 -4.174564646 [104,] 16.875366809 -18.189291564 [105,] -16.292349565 16.875366809 [106,] 15.569840118 -16.292349565 [107,] 24.924937949 15.569840118 [108,] -16.794403602 24.924937949 [109,] 25.036991633 -16.794403602 [110,] -14.752409279 25.036991633 [111,] 17.106655399 -14.752409279 [112,] -1.242838405 17.106655399 [113,] 21.069168109 -1.242838405 [114,] -2.516031043 21.069168109 [115,] 7.597878839 -2.516031043 [116,] -21.570768549 7.597878839 [117,] -5.826998663 -21.570768549 [118,] -6.492637239 -5.826998663 [119,] -9.400496538 -6.492637239 [120,] 13.380186829 -9.400496538 [121,] -12.208934679 13.380186829 [122,] -7.117665897 -12.208934679 [123,] -23.303269143 -7.117665897 [124,] -2.084593959 -23.303269143 [125,] 0.184125410 -2.084593959 [126,] -8.483986881 0.184125410 [127,] -50.256096130 -8.483986881 [128,] 12.742482174 -50.256096130 [129,] 27.908589150 12.742482174 [130,] -10.543338477 27.908589150 [131,] -4.507963965 -10.543338477 [132,] -2.977591285 -4.507963965 [133,] -12.208884171 -2.977591285 [134,] -21.638787501 -12.208884171 [135,] -9.421352649 -21.638787501 [136,] -6.047258459 -9.421352649 [137,] -2.912605908 -6.047258459 [138,] 8.240472985 -2.912605908 [139,] -11.009735689 8.240472985 [140,] -31.033341382 -11.009735689 [141,] -24.657175127 -31.033341382 [142,] -9.777121858 -24.657175127 [143,] 3.383125718 -9.777121858 [144,] 19.994109500 3.383125718 [145,] 65.786649147 19.994109500 [146,] 2.642320888 65.786649147 [147,] 8.741525890 2.642320888 [148,] 3.000572201 8.741525890 [149,] -5.431454587 3.000572201 [150,] -4.746869687 -5.431454587 [151,] -4.802929674 -4.746869687 [152,] -3.872363685 -4.802929674 [153,] -4.731480670 -3.872363685 [154,] -17.857576944 -4.731480670 [155,] 10.242320443 -17.857576944 [156,] -4.731480670 10.242320443 [157,] -4.763357918 -4.731480670 [158,] -1.569303563 -4.763357918 [159,] -5.981214751 -1.569303563 [160,] -8.926785691 -5.981214751 [161,] 12.013040373 -8.926785691 [162,] -4.883643495 12.013040373 [163,] -3.108999578 -4.883643495 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -2.134343352 -21.038875989 2 11.175817010 -2.134343352 3 0.141421589 11.175817010 4 1.923546658 0.141421589 5 -24.826573639 1.923546658 6 3.012007910 -24.826573639 7 -11.798837021 3.012007910 8 -11.458166394 -11.798837021 9 4.063093064 -11.458166394 10 -11.449583760 4.063093064 11 18.544340837 -11.449583760 12 -3.279998232 18.544340837 13 -7.683012586 -3.279998232 14 7.325752749 -7.683012586 15 25.963708473 7.325752749 16 0.009674896 25.963708473 17 2.890322199 0.009674896 18 1.481951841 2.890322199 19 18.228298290 1.481951841 20 3.068344341 18.228298290 21 -15.717590520 3.068344341 22 3.408114707 -15.717590520 23 16.820996707 3.408114707 24 27.720318912 16.820996707 25 7.821624551 27.720318912 26 7.805398009 7.821624551 27 18.945793784 7.805398009 28 -0.450577505 18.945793784 29 18.533235451 -0.450577505 30 12.647386853 18.533235451 31 -19.519157014 12.647386853 32 5.826220326 -19.519157014 33 9.258498918 5.826220326 34 -19.532605556 9.258498918 35 14.124091418 -19.532605556 36 -10.958862197 14.124091418 37 -3.869861141 -10.958862197 38 -2.095591425 -3.869861141 39 8.011070981 -2.095591425 40 7.877667724 8.011070981 41 -0.119810791 7.877667724 42 2.563963742 -0.119810791 43 -2.157719297 2.563963742 44 -6.412546411 -2.157719297 45 -7.526471240 -6.412546411 46 -5.634484374 -7.526471240 47 6.609865327 -5.634484374 48 -11.039376885 6.609865327 49 9.033196739 -11.039376885 50 7.105373001 9.033196739 51 -3.794268255 7.105373001 52 -31.396109412 -3.794268255 53 0.053945415 -31.396109412 54 -3.993414404 0.053945415 55 -6.260836770 -3.993414404 56 10.729279067 -6.260836770 57 -39.665895803 10.729279067 58 7.895500841 -39.665895803 59 8.984391252 7.895500841 60 4.689794676 8.984391252 61 -8.040554823 4.689794676 62 4.403116275 -8.040554823 63 -15.051619127 4.403116275 64 -26.033594891 -15.051619127 65 5.568416497 -26.033594891 66 1.373739135 5.568416497 67 7.344421088 1.373739135 68 7.897146921 7.344421088 69 47.856897955 7.897146921 70 9.351348129 47.856897955 71 -0.694562302 9.351348129 72 0.343115404 -0.694562302 73 -9.922873489 0.343115404 74 28.304029961 -9.922873489 75 20.572559472 28.304029961 76 -6.872994567 20.572559472 77 11.964318752 -6.872994567 78 19.376744418 11.964318752 79 -3.892400915 19.376744418 80 7.182456533 -3.892400915 81 14.988566291 7.182456533 82 -11.203601642 14.988566291 83 4.774499061 -11.203601642 84 3.688793911 4.774499061 85 -8.821652794 3.688793911 86 -10.189239024 -8.821652794 87 -20.682912618 -10.189239024 88 -3.510948608 -20.682912618 89 27.913782819 -3.510948608 90 -6.746177322 27.913782819 91 12.944936638 -6.746177322 92 -14.044064350 12.944936638 93 11.380309829 -14.044064350 94 -24.198588998 11.380309829 95 1.609098033 -24.198588998 96 -18.022867323 1.609098033 97 12.746066576 -18.022867323 98 17.562694141 12.746066576 99 -23.100847393 17.562694141 100 21.291218734 -23.100847393 101 6.521378927 21.291218734 102 -4.174564646 6.521378927 103 -18.189291564 -4.174564646 104 16.875366809 -18.189291564 105 -16.292349565 16.875366809 106 15.569840118 -16.292349565 107 24.924937949 15.569840118 108 -16.794403602 24.924937949 109 25.036991633 -16.794403602 110 -14.752409279 25.036991633 111 17.106655399 -14.752409279 112 -1.242838405 17.106655399 113 21.069168109 -1.242838405 114 -2.516031043 21.069168109 115 7.597878839 -2.516031043 116 -21.570768549 7.597878839 117 -5.826998663 -21.570768549 118 -6.492637239 -5.826998663 119 -9.400496538 -6.492637239 120 13.380186829 -9.400496538 121 -12.208934679 13.380186829 122 -7.117665897 -12.208934679 123 -23.303269143 -7.117665897 124 -2.084593959 -23.303269143 125 0.184125410 -2.084593959 126 -8.483986881 0.184125410 127 -50.256096130 -8.483986881 128 12.742482174 -50.256096130 129 27.908589150 12.742482174 130 -10.543338477 27.908589150 131 -4.507963965 -10.543338477 132 -2.977591285 -4.507963965 133 -12.208884171 -2.977591285 134 -21.638787501 -12.208884171 135 -9.421352649 -21.638787501 136 -6.047258459 -9.421352649 137 -2.912605908 -6.047258459 138 8.240472985 -2.912605908 139 -11.009735689 8.240472985 140 -31.033341382 -11.009735689 141 -24.657175127 -31.033341382 142 -9.777121858 -24.657175127 143 3.383125718 -9.777121858 144 19.994109500 3.383125718 145 65.786649147 19.994109500 146 2.642320888 65.786649147 147 8.741525890 2.642320888 148 3.000572201 8.741525890 149 -5.431454587 3.000572201 150 -4.746869687 -5.431454587 151 -4.802929674 -4.746869687 152 -3.872363685 -4.802929674 153 -4.731480670 -3.872363685 154 -17.857576944 -4.731480670 155 10.242320443 -17.857576944 156 -4.731480670 10.242320443 157 -4.763357918 -4.731480670 158 -1.569303563 -4.763357918 159 -5.981214751 -1.569303563 160 -8.926785691 -5.981214751 161 12.013040373 -8.926785691 162 -4.883643495 12.013040373 163 -3.108999578 -4.883643495 > 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/7ku8m1321543012.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/8u2lu1321543012.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/9azht1321543012.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/10yufg1321543012.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/11hulh1321543013.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/12d9x41321543013.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/13u5ef1321543013.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/148pes1321543013.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/15jmed1321543013.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/16o07z1321543013.tab") + } > > try(system("convert tmp/1z8dn1321543012.ps tmp/1z8dn1321543012.png",intern=TRUE)) character(0) > try(system("convert tmp/2jzcl1321543012.ps tmp/2jzcl1321543012.png",intern=TRUE)) character(0) > try(system("convert tmp/3hmf51321543012.ps tmp/3hmf51321543012.png",intern=TRUE)) character(0) > try(system("convert tmp/40inf1321543012.ps tmp/40inf1321543012.png",intern=TRUE)) character(0) > try(system("convert tmp/5rl891321543012.ps tmp/5rl891321543012.png",intern=TRUE)) character(0) > try(system("convert tmp/6l2ay1321543012.ps tmp/6l2ay1321543012.png",intern=TRUE)) character(0) > try(system("convert tmp/7ku8m1321543012.ps tmp/7ku8m1321543012.png",intern=TRUE)) character(0) > try(system("convert tmp/8u2lu1321543012.ps tmp/8u2lu1321543012.png",intern=TRUE)) character(0) > try(system("convert tmp/9azht1321543012.ps tmp/9azht1321543012.png",intern=TRUE)) character(0) > try(system("convert tmp/10yufg1321543012.ps tmp/10yufg1321543012.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 5.414 0.596 6.203