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('BloggedComputation' + ,'TotalTime' + ,'Shared' + ,'Charachters' + ,'Writing' + ,'Hyperlinks') + ,1:164)) > y <- array(NA,dim=c(6,164),dimnames=list(c('BloggedComputation','TotalTime','Shared','Charachters','Writing','Hyperlinks'),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 = 'Linear Trend' > par2 = 'Do not include Seasonal Dummies' > par1 = '6' > #'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 Hyperlinks BloggedComputation TotalTime Shared Charachters Writing t 1 127 65 146455 1 95556 114468 1 2 90 54 84944 4 54565 88594 2 3 68 58 113337 9 63016 74151 3 4 111 75 128655 2 79774 77921 4 5 51 41 74398 1 31258 53212 5 6 33 0 35523 2 52491 34956 6 7 123 111 293403 0 91256 149703 7 8 5 1 32750 0 22807 6853 8 9 63 36 106539 5 77411 58907 9 10 66 60 130539 0 48821 67067 10 11 99 63 154991 0 52295 110563 11 12 72 71 126683 7 63262 58126 12 13 55 38 100672 6 50466 57113 13 14 116 76 179562 3 62932 77993 14 15 71 61 125971 4 38439 68091 15 16 125 125 234509 0 70817 124676 16 17 123 84 158980 4 105965 109522 17 18 74 69 184217 3 73795 75865 18 19 116 77 107342 0 82043 79746 19 20 117 95 141371 5 74349 77844 20 21 98 78 154730 0 82204 98681 21 22 101 76 264020 1 55709 105531 22 23 43 40 90938 3 37137 51428 23 24 103 81 101324 5 70780 65703 24 25 107 102 130232 0 55027 72562 25 26 77 70 137793 0 56699 81728 26 27 87 75 161678 4 65911 95580 27 28 99 93 151503 0 56316 98278 28 29 46 42 105324 0 26982 46629 29 30 96 95 175914 0 54628 115189 30 31 92 87 181853 3 96750 124865 31 32 96 44 114928 4 53009 59392 32 33 96 84 190410 1 64664 127818 33 34 15 28 61499 4 36990 17821 34 35 147 87 223004 1 85224 154076 35 36 56 71 167131 0 37048 64881 36 37 81 68 233482 0 59635 136506 37 38 69 50 121185 2 42051 66524 38 39 34 30 78776 1 26998 45988 39 40 98 86 188967 2 63717 107445 40 41 82 75 199512 8 55071 102772 41 42 64 46 102531 5 40001 46657 42 43 61 52 118958 3 54506 97563 43 44 45 31 68948 4 35838 36663 44 45 37 30 93125 1 50838 55369 45 46 64 70 277108 2 86997 77921 46 47 21 20 78800 2 33032 56968 47 48 104 84 157250 0 61704 77519 48 49 126 81 210554 6 117986 129805 49 50 104 79 127324 3 56733 72761 50 51 87 70 114397 0 55064 81278 51 52 7 8 24188 0 5950 15049 52 53 130 67 246209 6 84607 113935 53 54 21 21 65029 5 32551 25109 54 55 35 30 98030 3 31701 45824 55 56 97 70 173587 1 71170 89644 56 57 103 87 172684 5 101773 109011 57 58 210 87 191381 5 101653 134245 58 59 151 112 191276 0 81493 136692 59 60 57 54 134043 9 55901 50741 60 61 117 96 233406 6 109104 149510 61 62 152 93 195304 6 114425 147888 62 63 52 49 127619 5 36311 54987 63 64 83 49 162810 6 70027 74467 64 65 87 38 129100 2 73713 100033 65 66 80 64 108715 0 40671 85505 66 67 88 62 106469 3 89041 62426 67 68 83 66 142069 8 57231 82932 68 69 140 98 143937 2 78792 79169 69 70 76 97 84256 5 59155 65469 70 71 70 56 118807 11 55827 63572 71 72 26 22 69471 6 22618 23824 72 73 66 51 122433 5 58425 73831 73 74 89 56 131122 1 65724 63551 74 75 100 94 94763 0 56979 56756 75 76 98 98 188780 3 72369 81399 76 77 109 76 191467 3 79194 117881 77 78 51 57 105615 6 202316 70711 78 79 82 75 89318 1 44970 50495 79 80 65 48 107335 0 49319 53845 80 81 46 48 98599 1 36252 51390 81 82 104 109 260646 0 75741 104953 82 83 36 27 131876 5 38417 65983 83 84 123 83 119291 2 64102 76839 84 85 59 49 80953 0 56622 55792 85 86 27 24 99768 0 15430 25155 86 87 84 43 84572 5 72571 55291 87 88 61 44 202373 1 67271 84279 88 89 46 49 166790 0 43460 99692 89 90 125 106 99946 1 99501 59633 90 91 58 42 116900 1 28340 63249 91 92 152 108 142146 2 76013 82928 92 93 52 27 99246 4 37361 50000 93 94 85 79 156833 1 48204 69455 94 95 95 49 175078 4 76168 84068 95 96 78 64 130533 0 85168 76195 96 97 144 75 142339 2 125410 114634 97 98 149 115 176789 0 123328 139357 98 99 101 92 181379 7 83038 110044 99 100 205 106 228548 7 120087 155118 100 101 61 73 142141 6 91939 83061 101 102 145 105 167845 0 103646 127122 102 103 28 30 103012 0 29467 45653 103 104 49 13 43287 4 43750 19630 104 105 68 69 125366 4 34497 67229 105 106 142 72 118372 0 66477 86060 106 107 82 80 135171 0 71181 88003 107 108 105 106 175568 0 74482 95815 108 109 52 28 74112 0 174949 85499 109 110 56 70 88817 0 46765 27220 110 111 81 51 164767 4 90257 109882 111 112 100 90 141933 0 51370 72579 112 113 11 12 22938 0 1168 5841 113 114 87 84 115199 0 51360 68369 114 115 31 23 61857 4 25162 24610 115 116 67 57 91185 0 21067 30995 116 117 150 84 213765 1 58233 150662 117 118 4 4 21054 0 855 6622 118 119 75 56 167105 5 85903 93694 119 120 39 18 31414 0 14116 13155 120 121 88 86 178863 1 57637 111908 121 122 67 39 126681 7 94137 57550 122 123 24 16 64320 5 62147 16356 123 124 58 18 67746 2 62832 40174 124 125 16 16 38214 0 8773 13983 125 126 49 42 90961 1 63785 52316 126 127 109 75 181510 0 65196 99585 127 128 124 30 116775 0 73087 86271 128 129 115 104 223914 2 72631 131012 129 130 128 121 185139 0 86281 130274 130 131 159 106 242879 2 162365 159051 131 132 75 57 139144 0 56530 76506 132 133 30 28 75812 0 35606 49145 133 134 83 56 178218 4 70111 66398 134 135 135 81 246834 4 92046 127546 135 136 8 2 50999 8 63989 6802 136 137 115 88 223842 0 104911 99509 137 138 60 41 93577 4 43448 43106 138 139 99 83 155383 0 60029 108303 139 140 98 55 111664 1 38650 64167 140 141 36 3 75426 0 47261 8579 141 142 93 54 243551 9 73586 97811 142 143 158 89 136548 0 83042 84365 143 144 16 41 173260 3 37238 10901 144 145 100 94 185039 7 63958 91346 145 146 49 101 67507 5 78956 33660 146 147 89 70 139350 2 99518 93634 147 148 153 111 172964 1 111436 109348 148 149 0 0 0 9 0 0 149 150 5 4 14688 0 6023 7953 150 151 0 0 98 0 0 0 151 152 0 0 455 0 0 0 152 153 0 0 0 1 0 0 153 154 0 0 0 0 0 0 154 155 80 42 128066 2 42564 63538 155 156 122 97 176460 1 38885 108281 156 157 0 0 0 0 0 0 157 158 0 0 203 0 0 0 158 159 6 7 7199 0 1644 4245 159 160 13 12 46660 0 6179 21509 160 161 3 0 17547 0 3926 7670 161 162 18 37 73567 0 23238 10641 162 163 0 0 969 0 0 0 163 164 49 39 101060 2 49288 41243 164 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) BloggedComputation TotalTime Shared -2.7209106 0.6431806 -0.0001005 0.1717732 Charachters Writing t 0.0001467 0.0005940 0.0379900 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -47.998 -10.459 -3.000 8.224 78.286 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) -2.721e+00 5.025e+00 -0.541 0.5890 BloggedComputation 6.432e-01 8.075e-02 7.965 3.14e-13 *** TotalTime -1.005e-04 4.922e-05 -2.042 0.0428 * Shared 1.718e-01 5.990e-01 0.287 0.7747 Charachters 1.467e-04 6.638e-05 2.210 0.0286 * Writing 5.940e-04 9.269e-05 6.408 1.64e-09 *** t 3.799e-02 3.246e-02 1.170 0.2437 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 18.47 on 157 degrees of freedom Multiple R-squared: 0.8299, Adjusted R-squared: 0.8234 F-statistic: 127.7 on 6 and 157 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.001061716 2.123433e-03 9.989383e-01 [2,] 0.005289433 1.057887e-02 9.947106e-01 [3,] 0.001043034 2.086069e-03 9.989570e-01 [4,] 0.000537576 1.075152e-03 9.994624e-01 [5,] 0.141199752 2.823995e-01 8.588002e-01 [6,] 0.084088234 1.681765e-01 9.159118e-01 [7,] 0.129726587 2.594532e-01 8.702734e-01 [8,] 0.109718896 2.194378e-01 8.902811e-01 [9,] 0.076282400 1.525648e-01 9.237176e-01 [10,] 0.048638823 9.727765e-02 9.513612e-01 [11,] 0.032498313 6.499663e-02 9.675017e-01 [12,] 0.030153004 6.030601e-02 9.698470e-01 [13,] 0.043449876 8.689975e-02 9.565501e-01 [14,] 0.033066450 6.613290e-02 9.669336e-01 [15,] 0.022177352 4.435470e-02 9.778226e-01 [16,] 0.013494005 2.698801e-02 9.865060e-01 [17,] 0.010662790 2.132558e-02 9.893372e-01 [18,] 0.006959717 1.391943e-02 9.930403e-01 [19,] 0.004429182 8.858363e-03 9.955708e-01 [20,] 0.002590166 5.180331e-03 9.974098e-01 [21,] 0.002030559 4.061117e-03 9.979694e-01 [22,] 0.004790914 9.581827e-03 9.952091e-01 [23,] 0.050360959 1.007219e-01 9.496390e-01 [24,] 0.039210331 7.842066e-02 9.607897e-01 [25,] 0.041418579 8.283716e-02 9.585814e-01 [26,] 0.064002923 1.280058e-01 9.359971e-01 [27,] 0.052338115 1.046762e-01 9.476619e-01 [28,] 0.049010241 9.802048e-02 9.509898e-01 [29,] 0.040815707 8.163141e-02 9.591843e-01 [30,] 0.029561157 5.912231e-02 9.704388e-01 [31,] 0.021483157 4.296631e-02 9.785168e-01 [32,] 0.015848403 3.169681e-02 9.841516e-01 [33,] 0.014751323 2.950265e-02 9.852487e-01 [34,] 0.014972893 2.994579e-02 9.850271e-01 [35,] 0.011105411 2.221082e-02 9.888946e-01 [36,] 0.009064181 1.812836e-02 9.909358e-01 [37,] 0.007611128 1.522226e-02 9.923889e-01 [38,] 0.006995480 1.399096e-02 9.930045e-01 [39,] 0.006880778 1.376156e-02 9.931192e-01 [40,] 0.004878708 9.757416e-03 9.951213e-01 [41,] 0.005234912 1.046982e-02 9.947651e-01 [42,] 0.003584101 7.168201e-03 9.964159e-01 [43,] 0.002421707 4.843414e-03 9.975783e-01 [44,] 0.011476501 2.295300e-02 9.885235e-01 [45,] 0.008495672 1.699134e-02 9.915043e-01 [46,] 0.006056543 1.211309e-02 9.939435e-01 [47,] 0.004499156 8.998312e-03 9.955008e-01 [48,] 0.004732087 9.464174e-03 9.952679e-01 [49,] 0.371922126 7.438443e-01 6.280779e-01 [50,] 0.330756254 6.615125e-01 6.692437e-01 [51,] 0.295253975 5.905079e-01 7.047460e-01 [52,] 0.369644423 7.392888e-01 6.303556e-01 [53,] 0.326778751 6.535575e-01 6.732212e-01 [54,] 0.286528615 5.730572e-01 7.134714e-01 [55,] 0.260176913 5.203538e-01 7.398231e-01 [56,] 0.224264184 4.485284e-01 7.757358e-01 [57,] 0.193961452 3.879229e-01 8.060385e-01 [58,] 0.168986720 3.379734e-01 8.310133e-01 [59,] 0.141117535 2.822351e-01 8.588825e-01 [60,] 0.180408398 3.608168e-01 8.195916e-01 [61,] 0.228596264 4.571925e-01 7.714037e-01 [62,] 0.194445406 3.888908e-01 8.055546e-01 [63,] 0.164668620 3.293372e-01 8.353314e-01 [64,] 0.142111995 2.842240e-01 8.578880e-01 [65,] 0.133839547 2.676791e-01 8.661605e-01 [66,] 0.112115984 2.242320e-01 8.878840e-01 [67,] 0.094646624 1.892932e-01 9.053534e-01 [68,] 0.077078213 1.541564e-01 9.229218e-01 [69,] 0.365296948 7.305939e-01 6.347031e-01 [70,] 0.326812234 6.536245e-01 6.731878e-01 [71,] 0.290574500 5.811490e-01 7.094255e-01 [72,] 0.264907597 5.298152e-01 7.350924e-01 [73,] 0.247453020 4.949060e-01 7.525470e-01 [74,] 0.233216795 4.664336e-01 7.667832e-01 [75,] 0.265665566 5.313311e-01 7.343344e-01 [76,] 0.233075223 4.661504e-01 7.669248e-01 [77,] 0.201793267 4.035865e-01 7.982067e-01 [78,] 0.206708871 4.134177e-01 7.932911e-01 [79,] 0.185581265 3.711625e-01 8.144187e-01 [80,] 0.297252204 5.945044e-01 7.027478e-01 [81,] 0.300041150 6.000823e-01 6.999588e-01 [82,] 0.267716749 5.354335e-01 7.322833e-01 [83,] 0.401143231 8.022865e-01 5.988568e-01 [84,] 0.364103093 7.282062e-01 6.358969e-01 [85,] 0.321096387 6.421928e-01 6.789036e-01 [86,] 0.312623218 6.252464e-01 6.873768e-01 [87,] 0.282593161 5.651863e-01 7.174068e-01 [88,] 0.305154132 6.103083e-01 6.948459e-01 [89,] 0.272989533 5.459791e-01 7.270105e-01 [90,] 0.273219095 5.464382e-01 7.267809e-01 [91,] 0.554101806 8.917964e-01 4.458982e-01 [92,] 0.656085401 6.878292e-01 3.439146e-01 [93,] 0.615444265 7.691115e-01 3.845557e-01 [94,] 0.623881624 7.522368e-01 3.761184e-01 [95,] 0.670703121 6.585938e-01 3.292969e-01 [96,] 0.637141006 7.257180e-01 3.628590e-01 [97,] 0.860776808 2.784464e-01 1.392232e-01 [98,] 0.859501737 2.809965e-01 1.404983e-01 [99,] 0.845692798 3.086144e-01 1.543072e-01 [100,] 0.921683645 1.566327e-01 7.831635e-02 [101,] 0.901998065 1.960039e-01 9.800193e-02 [102,] 0.914753153 1.704937e-01 8.524685e-02 [103,] 0.897730003 2.045400e-01 1.022700e-01 [104,] 0.872789670 2.544207e-01 1.272103e-01 [105,] 0.844801270 3.103975e-01 1.551987e-01 [106,] 0.812714574 3.745709e-01 1.872854e-01 [107,] 0.835494456 3.290111e-01 1.645055e-01 [108,] 0.822763867 3.544723e-01 1.772361e-01 [109,] 0.785742547 4.285149e-01 2.142575e-01 [110,] 0.791913464 4.161731e-01 2.080865e-01 [111,] 0.818421981 3.631560e-01 1.815780e-01 [112,] 0.847800709 3.043986e-01 1.521993e-01 [113,] 0.813200180 3.735996e-01 1.867998e-01 [114,] 0.773197762 4.536045e-01 2.268022e-01 [115,] 0.753324018 4.933520e-01 2.466760e-01 [116,] 0.706519597 5.869608e-01 2.934804e-01 [117,] 0.682039783 6.359204e-01 3.179602e-01 [118,] 0.632532746 7.349345e-01 3.674673e-01 [119,] 0.844143482 3.117130e-01 1.558565e-01 [120,] 0.854580986 2.908380e-01 1.454190e-01 [121,] 0.870614238 2.587715e-01 1.293858e-01 [122,] 0.878874560 2.422509e-01 1.211254e-01 [123,] 0.861611685 2.767766e-01 1.383883e-01 [124,] 0.916159286 1.676814e-01 8.384071e-02 [125,] 0.889725610 2.205488e-01 1.102744e-01 [126,] 0.862239834 2.755203e-01 1.377602e-01 [127,] 0.823729528 3.525409e-01 1.762705e-01 [128,] 0.816981504 3.660370e-01 1.830185e-01 [129,] 0.768362225 4.632755e-01 2.316378e-01 [130,] 0.934358498 1.312830e-01 6.564150e-02 [131,] 0.915741229 1.685175e-01 8.425877e-02 [132,] 0.905969226 1.880615e-01 9.403077e-02 [133,] 0.868164303 2.636714e-01 1.318357e-01 [134,] 0.998918632 2.162735e-03 1.081368e-03 [135,] 0.997608589 4.782822e-03 2.391411e-03 [136,] 0.996170356 7.659289e-03 3.829644e-03 [137,] 0.997785894 4.428213e-03 2.214106e-03 [138,] 0.999997264 5.471054e-06 2.735527e-06 [139,] 0.999986343 2.731438e-05 1.365719e-05 [140,] 0.999958946 8.210851e-05 4.105426e-05 [141,] 0.999880118 2.397647e-04 1.198823e-04 [142,] 0.999458495 1.083011e-03 5.415054e-04 [143,] 0.997803745 4.392509e-03 2.196255e-03 [144,] 0.998468472 3.063056e-03 1.531528e-03 [145,] 0.991173254 1.765349e-02 8.826746e-03 > postscript(file="/var/wessaorg/rcomp/tmp/1dmc81321619737.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/280of1321619737.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/3ddju1321619737.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/4jnze1321619737.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/5jw321321619737.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 6 20.4144968 5.1356000 -10.1408447 19.9315388 -1.7261610 10.2563539 7 8 9 10 11 12 -18.7566640 2.6493334 5.7282026 -4.1280838 3.0162124 -3.6765137 13 14 15 16 17 18 0.5466141 31.2811753 -0.1927441 -14.1585373 5.7407796 -6.2301313 19 20 21 22 23 24 19.8598153 14.0643946 -5.3671950 9.5119351 -8.2506160 12.6270040 25 26 27 28 29 30 5.0832797 -9.3027647 -10.4223394 -10.5682739 -0.4634431 -22.2744269 31 32 33 34 35 36 -33.0117271 37.0154044 -23.0018888 -12.0972091 10.6556426 -15.4874720 37 38 39 40 41 42 -27.7848847 4.2719115 -7.5869040 -10.6306855 -15.5204342 11.4039741 43 44 45 46 47 48 -25.8639447 5.3190523 -12.4419582 -11.5865867 -22.0355380 11.5784845 49 50 51 52 53 54 0.4835290 14.7506184 -2.0969264 -4.7806533 31.2428361 -5.8495668 55 56 57 58 59 60 -6.1955317 6.1586395 -15.5842826 78.2857957 5.5203915 -3.7033372 61 62 63 64 65 66 -26.7248871 6.5199225 -5.2084089 12.6021185 5.2113065 -6.7782777 67 68 69 70 71 72 8.3423273 -4.0632317 32.6077851 -26.2826685 -1.8931644 0.3184846 73 74 75 76 77 78 -7.8330123 18.5090613 6.8665006 -5.7051281 -2.9942354 -47.9984250 79 80 81 82 83 84 5.6965070 5.3792354 -11.3335320 -13.7549565 -14.2308249 25.7473451 85 86 87 88 89 90 -6.3333498 3.8398818 19.9126551 -7.6823378 -35.0032647 15.9811610 91 92 93 94 95 96 0.1015673 35.2970335 7.9300582 0.6034311 18.3972977 -8.7222741 97 98 99 100 101 102 22.2722654 -9.0666519 -19.7307168 47.7594337 -36.6363497 2.4688790 103 104 105 106 107 108 -13.5737108 24.9945374 -10.7278260 45.4121415 -19.9269740 -14.7518192 109 110 111 112 113 114 -36.4290882 -4.5820221 -15.9332906 4.1987372 0.3745422 -5.2030389 115 116 117 118 119 120 1.7799324 16.3167339 17.5285990 -2.2773187 -15.1356676 18.8576514 121 122 123 124 125 126 -26.3107695 3.5392219 -1.4684896 17.8186557 -2.0705221 -11.5405718 127 128 129 130 131 132 8.1850232 52.3344707 -20.3827037 -23.4724779 -5.6569323 -3.7059579 133 134 135 136 137 138 -17.1356919 12.1133606 15.3534399 -5.4072632 3.9179124 7.8482549 139 140 141 142 143 144 -14.4628092 27.2947691 26.9872832 9.6347898 49.4762052 -8.1584807 145 146 147 148 149 150 -9.4914396 -44.4364334 -15.4398232 14.6198784 -4.4855645 -4.6815508 151 152 153 154 155 156 -3.0057359 -3.0078436 -3.2633392 -3.1295560 18.3625406 3.9482171 157 158 159 160 161 162 -3.2435262 -3.2611126 -3.8608477 -7.0684031 -3.7636492 -11.5663555 163 164 -3.3740717 -1.5075255 > postscript(file="/var/wessaorg/rcomp/tmp/628641321619737.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 20.4144968 NA 1 5.1356000 20.4144968 2 -10.1408447 5.1356000 3 19.9315388 -10.1408447 4 -1.7261610 19.9315388 5 10.2563539 -1.7261610 6 -18.7566640 10.2563539 7 2.6493334 -18.7566640 8 5.7282026 2.6493334 9 -4.1280838 5.7282026 10 3.0162124 -4.1280838 11 -3.6765137 3.0162124 12 0.5466141 -3.6765137 13 31.2811753 0.5466141 14 -0.1927441 31.2811753 15 -14.1585373 -0.1927441 16 5.7407796 -14.1585373 17 -6.2301313 5.7407796 18 19.8598153 -6.2301313 19 14.0643946 19.8598153 20 -5.3671950 14.0643946 21 9.5119351 -5.3671950 22 -8.2506160 9.5119351 23 12.6270040 -8.2506160 24 5.0832797 12.6270040 25 -9.3027647 5.0832797 26 -10.4223394 -9.3027647 27 -10.5682739 -10.4223394 28 -0.4634431 -10.5682739 29 -22.2744269 -0.4634431 30 -33.0117271 -22.2744269 31 37.0154044 -33.0117271 32 -23.0018888 37.0154044 33 -12.0972091 -23.0018888 34 10.6556426 -12.0972091 35 -15.4874720 10.6556426 36 -27.7848847 -15.4874720 37 4.2719115 -27.7848847 38 -7.5869040 4.2719115 39 -10.6306855 -7.5869040 40 -15.5204342 -10.6306855 41 11.4039741 -15.5204342 42 -25.8639447 11.4039741 43 5.3190523 -25.8639447 44 -12.4419582 5.3190523 45 -11.5865867 -12.4419582 46 -22.0355380 -11.5865867 47 11.5784845 -22.0355380 48 0.4835290 11.5784845 49 14.7506184 0.4835290 50 -2.0969264 14.7506184 51 -4.7806533 -2.0969264 52 31.2428361 -4.7806533 53 -5.8495668 31.2428361 54 -6.1955317 -5.8495668 55 6.1586395 -6.1955317 56 -15.5842826 6.1586395 57 78.2857957 -15.5842826 58 5.5203915 78.2857957 59 -3.7033372 5.5203915 60 -26.7248871 -3.7033372 61 6.5199225 -26.7248871 62 -5.2084089 6.5199225 63 12.6021185 -5.2084089 64 5.2113065 12.6021185 65 -6.7782777 5.2113065 66 8.3423273 -6.7782777 67 -4.0632317 8.3423273 68 32.6077851 -4.0632317 69 -26.2826685 32.6077851 70 -1.8931644 -26.2826685 71 0.3184846 -1.8931644 72 -7.8330123 0.3184846 73 18.5090613 -7.8330123 74 6.8665006 18.5090613 75 -5.7051281 6.8665006 76 -2.9942354 -5.7051281 77 -47.9984250 -2.9942354 78 5.6965070 -47.9984250 79 5.3792354 5.6965070 80 -11.3335320 5.3792354 81 -13.7549565 -11.3335320 82 -14.2308249 -13.7549565 83 25.7473451 -14.2308249 84 -6.3333498 25.7473451 85 3.8398818 -6.3333498 86 19.9126551 3.8398818 87 -7.6823378 19.9126551 88 -35.0032647 -7.6823378 89 15.9811610 -35.0032647 90 0.1015673 15.9811610 91 35.2970335 0.1015673 92 7.9300582 35.2970335 93 0.6034311 7.9300582 94 18.3972977 0.6034311 95 -8.7222741 18.3972977 96 22.2722654 -8.7222741 97 -9.0666519 22.2722654 98 -19.7307168 -9.0666519 99 47.7594337 -19.7307168 100 -36.6363497 47.7594337 101 2.4688790 -36.6363497 102 -13.5737108 2.4688790 103 24.9945374 -13.5737108 104 -10.7278260 24.9945374 105 45.4121415 -10.7278260 106 -19.9269740 45.4121415 107 -14.7518192 -19.9269740 108 -36.4290882 -14.7518192 109 -4.5820221 -36.4290882 110 -15.9332906 -4.5820221 111 4.1987372 -15.9332906 112 0.3745422 4.1987372 113 -5.2030389 0.3745422 114 1.7799324 -5.2030389 115 16.3167339 1.7799324 116 17.5285990 16.3167339 117 -2.2773187 17.5285990 118 -15.1356676 -2.2773187 119 18.8576514 -15.1356676 120 -26.3107695 18.8576514 121 3.5392219 -26.3107695 122 -1.4684896 3.5392219 123 17.8186557 -1.4684896 124 -2.0705221 17.8186557 125 -11.5405718 -2.0705221 126 8.1850232 -11.5405718 127 52.3344707 8.1850232 128 -20.3827037 52.3344707 129 -23.4724779 -20.3827037 130 -5.6569323 -23.4724779 131 -3.7059579 -5.6569323 132 -17.1356919 -3.7059579 133 12.1133606 -17.1356919 134 15.3534399 12.1133606 135 -5.4072632 15.3534399 136 3.9179124 -5.4072632 137 7.8482549 3.9179124 138 -14.4628092 7.8482549 139 27.2947691 -14.4628092 140 26.9872832 27.2947691 141 9.6347898 26.9872832 142 49.4762052 9.6347898 143 -8.1584807 49.4762052 144 -9.4914396 -8.1584807 145 -44.4364334 -9.4914396 146 -15.4398232 -44.4364334 147 14.6198784 -15.4398232 148 -4.4855645 14.6198784 149 -4.6815508 -4.4855645 150 -3.0057359 -4.6815508 151 -3.0078436 -3.0057359 152 -3.2633392 -3.0078436 153 -3.1295560 -3.2633392 154 18.3625406 -3.1295560 155 3.9482171 18.3625406 156 -3.2435262 3.9482171 157 -3.2611126 -3.2435262 158 -3.8608477 -3.2611126 159 -7.0684031 -3.8608477 160 -3.7636492 -7.0684031 161 -11.5663555 -3.7636492 162 -3.3740717 -11.5663555 163 -1.5075255 -3.3740717 164 NA -1.5075255 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 5.1356000 20.4144968 [2,] -10.1408447 5.1356000 [3,] 19.9315388 -10.1408447 [4,] -1.7261610 19.9315388 [5,] 10.2563539 -1.7261610 [6,] -18.7566640 10.2563539 [7,] 2.6493334 -18.7566640 [8,] 5.7282026 2.6493334 [9,] -4.1280838 5.7282026 [10,] 3.0162124 -4.1280838 [11,] -3.6765137 3.0162124 [12,] 0.5466141 -3.6765137 [13,] 31.2811753 0.5466141 [14,] -0.1927441 31.2811753 [15,] -14.1585373 -0.1927441 [16,] 5.7407796 -14.1585373 [17,] -6.2301313 5.7407796 [18,] 19.8598153 -6.2301313 [19,] 14.0643946 19.8598153 [20,] -5.3671950 14.0643946 [21,] 9.5119351 -5.3671950 [22,] -8.2506160 9.5119351 [23,] 12.6270040 -8.2506160 [24,] 5.0832797 12.6270040 [25,] -9.3027647 5.0832797 [26,] -10.4223394 -9.3027647 [27,] -10.5682739 -10.4223394 [28,] -0.4634431 -10.5682739 [29,] -22.2744269 -0.4634431 [30,] -33.0117271 -22.2744269 [31,] 37.0154044 -33.0117271 [32,] -23.0018888 37.0154044 [33,] -12.0972091 -23.0018888 [34,] 10.6556426 -12.0972091 [35,] -15.4874720 10.6556426 [36,] -27.7848847 -15.4874720 [37,] 4.2719115 -27.7848847 [38,] -7.5869040 4.2719115 [39,] -10.6306855 -7.5869040 [40,] -15.5204342 -10.6306855 [41,] 11.4039741 -15.5204342 [42,] -25.8639447 11.4039741 [43,] 5.3190523 -25.8639447 [44,] -12.4419582 5.3190523 [45,] -11.5865867 -12.4419582 [46,] -22.0355380 -11.5865867 [47,] 11.5784845 -22.0355380 [48,] 0.4835290 11.5784845 [49,] 14.7506184 0.4835290 [50,] -2.0969264 14.7506184 [51,] -4.7806533 -2.0969264 [52,] 31.2428361 -4.7806533 [53,] -5.8495668 31.2428361 [54,] -6.1955317 -5.8495668 [55,] 6.1586395 -6.1955317 [56,] -15.5842826 6.1586395 [57,] 78.2857957 -15.5842826 [58,] 5.5203915 78.2857957 [59,] -3.7033372 5.5203915 [60,] -26.7248871 -3.7033372 [61,] 6.5199225 -26.7248871 [62,] -5.2084089 6.5199225 [63,] 12.6021185 -5.2084089 [64,] 5.2113065 12.6021185 [65,] -6.7782777 5.2113065 [66,] 8.3423273 -6.7782777 [67,] -4.0632317 8.3423273 [68,] 32.6077851 -4.0632317 [69,] -26.2826685 32.6077851 [70,] -1.8931644 -26.2826685 [71,] 0.3184846 -1.8931644 [72,] -7.8330123 0.3184846 [73,] 18.5090613 -7.8330123 [74,] 6.8665006 18.5090613 [75,] -5.7051281 6.8665006 [76,] -2.9942354 -5.7051281 [77,] -47.9984250 -2.9942354 [78,] 5.6965070 -47.9984250 [79,] 5.3792354 5.6965070 [80,] -11.3335320 5.3792354 [81,] -13.7549565 -11.3335320 [82,] -14.2308249 -13.7549565 [83,] 25.7473451 -14.2308249 [84,] -6.3333498 25.7473451 [85,] 3.8398818 -6.3333498 [86,] 19.9126551 3.8398818 [87,] -7.6823378 19.9126551 [88,] -35.0032647 -7.6823378 [89,] 15.9811610 -35.0032647 [90,] 0.1015673 15.9811610 [91,] 35.2970335 0.1015673 [92,] 7.9300582 35.2970335 [93,] 0.6034311 7.9300582 [94,] 18.3972977 0.6034311 [95,] -8.7222741 18.3972977 [96,] 22.2722654 -8.7222741 [97,] -9.0666519 22.2722654 [98,] -19.7307168 -9.0666519 [99,] 47.7594337 -19.7307168 [100,] -36.6363497 47.7594337 [101,] 2.4688790 -36.6363497 [102,] -13.5737108 2.4688790 [103,] 24.9945374 -13.5737108 [104,] -10.7278260 24.9945374 [105,] 45.4121415 -10.7278260 [106,] -19.9269740 45.4121415 [107,] -14.7518192 -19.9269740 [108,] -36.4290882 -14.7518192 [109,] -4.5820221 -36.4290882 [110,] -15.9332906 -4.5820221 [111,] 4.1987372 -15.9332906 [112,] 0.3745422 4.1987372 [113,] -5.2030389 0.3745422 [114,] 1.7799324 -5.2030389 [115,] 16.3167339 1.7799324 [116,] 17.5285990 16.3167339 [117,] -2.2773187 17.5285990 [118,] -15.1356676 -2.2773187 [119,] 18.8576514 -15.1356676 [120,] -26.3107695 18.8576514 [121,] 3.5392219 -26.3107695 [122,] -1.4684896 3.5392219 [123,] 17.8186557 -1.4684896 [124,] -2.0705221 17.8186557 [125,] -11.5405718 -2.0705221 [126,] 8.1850232 -11.5405718 [127,] 52.3344707 8.1850232 [128,] -20.3827037 52.3344707 [129,] -23.4724779 -20.3827037 [130,] -5.6569323 -23.4724779 [131,] -3.7059579 -5.6569323 [132,] -17.1356919 -3.7059579 [133,] 12.1133606 -17.1356919 [134,] 15.3534399 12.1133606 [135,] -5.4072632 15.3534399 [136,] 3.9179124 -5.4072632 [137,] 7.8482549 3.9179124 [138,] -14.4628092 7.8482549 [139,] 27.2947691 -14.4628092 [140,] 26.9872832 27.2947691 [141,] 9.6347898 26.9872832 [142,] 49.4762052 9.6347898 [143,] -8.1584807 49.4762052 [144,] -9.4914396 -8.1584807 [145,] -44.4364334 -9.4914396 [146,] -15.4398232 -44.4364334 [147,] 14.6198784 -15.4398232 [148,] -4.4855645 14.6198784 [149,] -4.6815508 -4.4855645 [150,] -3.0057359 -4.6815508 [151,] -3.0078436 -3.0057359 [152,] -3.2633392 -3.0078436 [153,] -3.1295560 -3.2633392 [154,] 18.3625406 -3.1295560 [155,] 3.9482171 18.3625406 [156,] -3.2435262 3.9482171 [157,] -3.2611126 -3.2435262 [158,] -3.8608477 -3.2611126 [159,] -7.0684031 -3.8608477 [160,] -3.7636492 -7.0684031 [161,] -11.5663555 -3.7636492 [162,] -3.3740717 -11.5663555 [163,] -1.5075255 -3.3740717 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 5.1356000 20.4144968 2 -10.1408447 5.1356000 3 19.9315388 -10.1408447 4 -1.7261610 19.9315388 5 10.2563539 -1.7261610 6 -18.7566640 10.2563539 7 2.6493334 -18.7566640 8 5.7282026 2.6493334 9 -4.1280838 5.7282026 10 3.0162124 -4.1280838 11 -3.6765137 3.0162124 12 0.5466141 -3.6765137 13 31.2811753 0.5466141 14 -0.1927441 31.2811753 15 -14.1585373 -0.1927441 16 5.7407796 -14.1585373 17 -6.2301313 5.7407796 18 19.8598153 -6.2301313 19 14.0643946 19.8598153 20 -5.3671950 14.0643946 21 9.5119351 -5.3671950 22 -8.2506160 9.5119351 23 12.6270040 -8.2506160 24 5.0832797 12.6270040 25 -9.3027647 5.0832797 26 -10.4223394 -9.3027647 27 -10.5682739 -10.4223394 28 -0.4634431 -10.5682739 29 -22.2744269 -0.4634431 30 -33.0117271 -22.2744269 31 37.0154044 -33.0117271 32 -23.0018888 37.0154044 33 -12.0972091 -23.0018888 34 10.6556426 -12.0972091 35 -15.4874720 10.6556426 36 -27.7848847 -15.4874720 37 4.2719115 -27.7848847 38 -7.5869040 4.2719115 39 -10.6306855 -7.5869040 40 -15.5204342 -10.6306855 41 11.4039741 -15.5204342 42 -25.8639447 11.4039741 43 5.3190523 -25.8639447 44 -12.4419582 5.3190523 45 -11.5865867 -12.4419582 46 -22.0355380 -11.5865867 47 11.5784845 -22.0355380 48 0.4835290 11.5784845 49 14.7506184 0.4835290 50 -2.0969264 14.7506184 51 -4.7806533 -2.0969264 52 31.2428361 -4.7806533 53 -5.8495668 31.2428361 54 -6.1955317 -5.8495668 55 6.1586395 -6.1955317 56 -15.5842826 6.1586395 57 78.2857957 -15.5842826 58 5.5203915 78.2857957 59 -3.7033372 5.5203915 60 -26.7248871 -3.7033372 61 6.5199225 -26.7248871 62 -5.2084089 6.5199225 63 12.6021185 -5.2084089 64 5.2113065 12.6021185 65 -6.7782777 5.2113065 66 8.3423273 -6.7782777 67 -4.0632317 8.3423273 68 32.6077851 -4.0632317 69 -26.2826685 32.6077851 70 -1.8931644 -26.2826685 71 0.3184846 -1.8931644 72 -7.8330123 0.3184846 73 18.5090613 -7.8330123 74 6.8665006 18.5090613 75 -5.7051281 6.8665006 76 -2.9942354 -5.7051281 77 -47.9984250 -2.9942354 78 5.6965070 -47.9984250 79 5.3792354 5.6965070 80 -11.3335320 5.3792354 81 -13.7549565 -11.3335320 82 -14.2308249 -13.7549565 83 25.7473451 -14.2308249 84 -6.3333498 25.7473451 85 3.8398818 -6.3333498 86 19.9126551 3.8398818 87 -7.6823378 19.9126551 88 -35.0032647 -7.6823378 89 15.9811610 -35.0032647 90 0.1015673 15.9811610 91 35.2970335 0.1015673 92 7.9300582 35.2970335 93 0.6034311 7.9300582 94 18.3972977 0.6034311 95 -8.7222741 18.3972977 96 22.2722654 -8.7222741 97 -9.0666519 22.2722654 98 -19.7307168 -9.0666519 99 47.7594337 -19.7307168 100 -36.6363497 47.7594337 101 2.4688790 -36.6363497 102 -13.5737108 2.4688790 103 24.9945374 -13.5737108 104 -10.7278260 24.9945374 105 45.4121415 -10.7278260 106 -19.9269740 45.4121415 107 -14.7518192 -19.9269740 108 -36.4290882 -14.7518192 109 -4.5820221 -36.4290882 110 -15.9332906 -4.5820221 111 4.1987372 -15.9332906 112 0.3745422 4.1987372 113 -5.2030389 0.3745422 114 1.7799324 -5.2030389 115 16.3167339 1.7799324 116 17.5285990 16.3167339 117 -2.2773187 17.5285990 118 -15.1356676 -2.2773187 119 18.8576514 -15.1356676 120 -26.3107695 18.8576514 121 3.5392219 -26.3107695 122 -1.4684896 3.5392219 123 17.8186557 -1.4684896 124 -2.0705221 17.8186557 125 -11.5405718 -2.0705221 126 8.1850232 -11.5405718 127 52.3344707 8.1850232 128 -20.3827037 52.3344707 129 -23.4724779 -20.3827037 130 -5.6569323 -23.4724779 131 -3.7059579 -5.6569323 132 -17.1356919 -3.7059579 133 12.1133606 -17.1356919 134 15.3534399 12.1133606 135 -5.4072632 15.3534399 136 3.9179124 -5.4072632 137 7.8482549 3.9179124 138 -14.4628092 7.8482549 139 27.2947691 -14.4628092 140 26.9872832 27.2947691 141 9.6347898 26.9872832 142 49.4762052 9.6347898 143 -8.1584807 49.4762052 144 -9.4914396 -8.1584807 145 -44.4364334 -9.4914396 146 -15.4398232 -44.4364334 147 14.6198784 -15.4398232 148 -4.4855645 14.6198784 149 -4.6815508 -4.4855645 150 -3.0057359 -4.6815508 151 -3.0078436 -3.0057359 152 -3.2633392 -3.0078436 153 -3.1295560 -3.2633392 154 18.3625406 -3.1295560 155 3.9482171 18.3625406 156 -3.2435262 3.9482171 157 -3.2611126 -3.2435262 158 -3.8608477 -3.2611126 159 -7.0684031 -3.8608477 160 -3.7636492 -7.0684031 161 -11.5663555 -3.7636492 162 -3.3740717 -11.5663555 163 -1.5075255 -3.3740717 > 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/7nfot1321619737.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/8at8n1321619737.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/9flwo1321619737.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/10lk3z1321619737.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/11ymth1321619737.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/12atwt1321619737.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/13p0vs1321619737.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/1482ww1321619738.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/15hlqr1321619738.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/16fyfv1321619738.tab") + } > > try(system("convert tmp/1dmc81321619737.ps tmp/1dmc81321619737.png",intern=TRUE)) character(0) > try(system("convert tmp/280of1321619737.ps tmp/280of1321619737.png",intern=TRUE)) character(0) > try(system("convert tmp/3ddju1321619737.ps tmp/3ddju1321619737.png",intern=TRUE)) character(0) > try(system("convert tmp/4jnze1321619737.ps tmp/4jnze1321619737.png",intern=TRUE)) character(0) > try(system("convert tmp/5jw321321619737.ps tmp/5jw321321619737.png",intern=TRUE)) character(0) > try(system("convert tmp/628641321619737.ps tmp/628641321619737.png",intern=TRUE)) character(0) > try(system("convert tmp/7nfot1321619737.ps tmp/7nfot1321619737.png",intern=TRUE)) character(0) > try(system("convert tmp/8at8n1321619737.ps tmp/8at8n1321619737.png",intern=TRUE)) character(0) > try(system("convert tmp/9flwo1321619737.ps tmp/9flwo1321619737.png",intern=TRUE)) character(0) > try(system("convert tmp/10lk3z1321619737.ps tmp/10lk3z1321619737.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 5.017 0.476 5.575