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(84 + ,65 + ,170588 + ,95556 + ,47 + ,1168 + ,72 + ,54 + ,86621 + ,54565 + ,48 + ,669 + ,41 + ,58 + ,118522 + ,63016 + ,40 + ,1098 + ,85 + ,99 + ,152510 + ,79774 + ,75 + ,1939 + ,30 + ,41 + ,86206 + ,31258 + ,32 + ,679 + ,53 + ,0 + ,37257 + ,52491 + ,18 + ,321 + ,74 + ,111 + ,306055 + ,91256 + ,80 + ,2667 + ,22 + ,1 + ,32750 + ,22807 + ,16 + ,345 + ,68 + ,37 + ,116502 + ,77411 + ,38 + ,1367 + ,47 + ,60 + ,130539 + ,48821 + ,25 + ,1159 + ,102 + ,64 + ,161876 + ,52295 + ,65 + ,1385 + ,123 + ,71 + ,128274 + ,63262 + ,74 + ,1155 + ,69 + ,38 + ,104367 + ,50466 + ,45 + ,1154 + ,108 + ,76 + ,193024 + ,62932 + ,42 + ,1703 + ,59 + ,62 + ,141574 + ,38439 + ,56 + ,1190 + ,122 + ,126 + ,254150 + ,70817 + ,124 + ,3103 + ,91 + ,85 + ,181110 + ,105965 + ,42 + ,1357 + ,45 + ,74 + ,198432 + ,73795 + ,102 + ,1892 + ,53 + ,78 + ,113853 + ,82043 + ,36 + ,883 + ,112 + ,100 + ,159940 + ,74349 + ,51 + ,1627 + ,82 + ,79 + ,166822 + ,82204 + ,49 + ,1412 + ,92 + ,76 + ,286675 + ,55709 + ,57 + ,1901 + ,51 + ,42 + ,95297 + ,37137 + ,21 + ,825 + ,120 + ,81 + ,108278 + ,70780 + ,32 + ,904 + ,99 + ,103 + ,146342 + ,55027 + ,77 + ,2115 + ,86 + ,70 + ,145142 + ,56699 + ,90 + ,1858 + ,59 + ,75 + ,161740 + ,65911 + ,82 + ,1781 + ,98 + ,93 + ,162716 + ,56316 + ,56 + ,1304 + ,71 + ,42 + ,106888 + ,26982 + ,34 + ,1035 + ,100 + ,95 + ,188150 + ,54628 + ,39 + ,1557 + ,113 + ,87 + ,189401 + ,96750 + ,53 + ,1527 + ,92 + ,44 + ,129484 + ,53009 + ,48 + ,1220 + ,107 + ,88 + ,204030 + ,64664 + ,64 + ,1368 + ,75 + ,29 + ,68538 + ,36990 + ,27 + ,564 + ,100 + ,89 + ,243625 + ,85224 + ,56 + ,1990 + ,69 + ,71 + ,167255 + ,37048 + ,37 + ,1557 + ,106 + ,70 + ,264528 + ,59635 + ,83 + ,2057 + ,51 + ,50 + ,122024 + ,42051 + ,50 + ,1111 + ,18 + ,30 + ,80964 + ,26998 + ,26 + ,686 + ,91 + ,87 + ,209795 + ,63717 + ,109 + ,2012 + ,75 + ,78 + ,224205 + ,55071 + ,56 + ,2232 + ,63 + ,48 + ,115971 + ,40001 + ,42 + ,1033 + ,72 + ,57 + ,138191 + ,54506 + ,49 + ,1166 + ,59 + ,31 + ,81106 + ,35838 + ,31 + ,1020 + ,29 + ,30 + ,93125 + ,50838 + ,49 + ,1735 + ,85 + ,70 + ,307743 + ,86997 + ,97 + ,3644 + ,66 + ,20 + ,78800 + ,33032 + ,42 + ,918 + ,106 + ,84 + ,158835 + ,61704 + ,55 + ,1579 + ,113 + ,81 + ,223590 + ,117986 + ,71 + ,2805 + ,101 + ,79 + ,131108 + ,56733 + ,39 + ,1496 + ,65 + ,72 + ,128734 + ,55064 + ,54 + ,1108 + ,7 + ,8 + ,24188 + ,5950 + ,24 + ,496 + ,111 + ,67 + ,257677 + ,84607 + ,213 + ,1753 + ,61 + ,21 + ,65029 + ,32551 + ,17 + ,744 + ,41 + ,30 + ,98066 + ,31701 + ,58 + ,1101 + ,70 + ,70 + ,173587 + ,71170 + ,27 + ,1612 + ,136 + ,87 + ,180042 + ,101773 + ,59 + ,1806 + ,87 + ,87 + ,197266 + ,101653 + ,114 + ,2460 + ,90 + ,116 + ,212060 + ,81493 + ,76 + ,1653 + ,76 + ,54 + ,141582 + ,55901 + ,51 + ,1234 + ,101 + ,96 + ,245107 + ,109104 + ,87 + ,2368 + ,57 + ,94 + ,206879 + ,114425 + ,78 + ,2204 + ,61 + ,51 + ,145696 + ,36311 + ,62 + ,1633 + ,92 + ,51 + ,173535 + ,70027 + ,61 + ,1664 + ,80 + ,38 + ,142064 + ,73713 + ,39 + ,958 + ,35 + ,65 + ,117926 + ,40671 + ,37 + ,1118 + ,72 + ,64 + ,113461 + ,89041 + ,87 + ,1258 + ,88 + ,66 + ,145285 + ,57231 + ,102 + ,1964 + ,80 + ,98 + ,150999 + ,68608 + ,50 + ,1483 + ,62 + ,100 + ,91838 + ,59155 + ,37 + ,1034 + ,81 + ,56 + ,118807 + ,55827 + ,33 + ,1348 + ,63 + ,22 + ,69471 + ,22618 + ,28 + ,837 + ,91 + ,51 + ,126630 + ,58425 + ,44 + ,1310 + ,65 + ,61 + ,145908 + ,65724 + ,38 + ,1144 + ,79 + ,94 + ,98393 + ,56979 + ,34 + ,987 + ,85 + ,98 + ,190926 + ,72369 + ,45 + ,1334 + ,75 + ,76 + ,198797 + ,79194 + ,58 + ,1452 + ,70 + ,57 + ,106193 + ,202316 + ,59 + ,957 + ,78 + ,75 + ,89318 + ,44970 + ,36 + ,911 + ,75 + ,48 + ,120362 + ,49319 + ,43 + ,1114 + ,55 + ,48 + ,98791 + ,36252 + ,30 + ,1209 + ,80 + ,109 + ,283982 + ,75741 + ,68 + ,2541 + ,83 + ,27 + ,132798 + ,38417 + ,53 + ,1176 + ,38 + ,85 + ,135251 + ,64102 + ,59 + ,1253 + ,27 + ,49 + ,80953 + ,56622 + ,25 + ,870 + ,62 + ,24 + ,109237 + ,15430 + ,39 + ,1473 + ,82 + ,46 + ,96634 + ,72571 + ,36 + ,811 + ,88 + ,44 + ,226191 + ,67271 + ,115 + ,2435 + ,59 + ,49 + ,172071 + ,43460 + ,55 + ,1410 + ,92 + ,108 + ,117815 + ,99501 + ,71 + ,1982 + ,40 + ,42 + ,133561 + ,28340 + ,52 + ,1214 + ,91 + ,110 + ,152193 + ,76013 + ,49 + ,1356 + ,63 + ,28 + ,112004 + ,37361 + ,43 + ,1197 + ,88 + ,79 + ,169613 + ,48204 + ,52 + ,1971 + ,85 + ,49 + ,187483 + ,76168 + ,51 + ,1432 + ,76 + ,64 + ,130533 + ,85168 + ,27 + ,1030 + ,67 + ,75 + ,142339 + ,125410 + ,29 + ,1145 + ,69 + ,122 + ,199232 + ,123328 + ,56 + ,1509 + ,150 + ,95 + ,201744 + ,83038 + ,94 + ,2230 + ,77 + ,106 + ,247024 + ,120087 + ,74 + ,2236 + ,103 + ,73 + ,158054 + ,91939 + ,66 + ,1324 + ,81 + ,108 + ,182581 + ,103646 + ,42 + ,1599 + ,37 + ,30 + ,106351 + ,29467 + ,112 + ,999 + ,64 + ,13 + ,43287 + ,43750 + ,14 + ,602 + ,22 + ,69 + ,127493 + ,34497 + ,45 + ,1379 + ,35 + ,75 + ,127930 + ,66477 + ,92 + ,1172 + ,61 + ,82 + ,149006 + ,71181 + ,29 + ,1337 + ,80 + ,108 + ,187714 + ,74482 + ,66 + ,1709 + ,54 + ,28 + ,74112 + ,174949 + ,32 + ,668 + ,76 + ,83 + ,94006 + ,46765 + ,66 + ,1128 + ,87 + ,51 + ,176625 + ,90257 + ,43 + ,1209 + ,75 + ,90 + ,141933 + ,51370 + ,56 + ,1324 + ,0 + ,12 + ,22938 + ,1168 + ,10 + ,391 + ,61 + ,87 + ,125927 + ,51360 + ,53 + ,1264 + ,30 + ,23 + ,61857 + ,25162 + ,25 + ,530 + ,66 + ,57 + ,91290 + ,21067 + ,34 + ,983 + ,56 + ,93 + ,255100 + ,58233 + ,66 + ,1926 + ,0 + ,4 + ,21054 + ,855 + ,16 + ,387 + ,40 + ,56 + ,174150 + ,85903 + ,38 + ,1481 + ,9 + ,18 + ,31414 + ,14116 + ,19 + ,449 + ,82 + ,86 + ,189461 + ,57637 + ,77 + ,2135 + ,110 + ,40 + ,137544 + ,94137 + ,35 + ,1128 + ,71 + ,16 + ,77166 + ,62147 + ,46 + ,800 + ,50 + ,18 + ,74567 + ,62832 + ,30 + ,964 + ,21 + ,16 + ,38214 + ,8773 + ,34 + ,568 + ,78 + ,42 + ,90961 + ,63785 + ,25 + ,901 + ,118 + ,78 + ,194652 + ,65196 + ,50 + ,1568 + ,102 + ,31 + ,135261 + ,73087 + ,38 + ,859 + ,109 + ,104 + ,244272 + ,72631 + ,51 + ,2229 + ,104 + ,121 + ,201748 + ,86281 + ,66 + ,1566 + ,124 + ,111 + ,256402 + ,162365 + ,73 + ,2153 + ,76 + ,57 + ,139144 + ,56530 + ,23 + ,828 + ,57 + ,28 + ,76470 + ,35606 + ,29 + ,809 + ,91 + ,56 + ,193518 + ,70111 + ,196 + ,1848 + ,101 + ,82 + ,280334 + ,92046 + ,115 + ,2914 + ,66 + ,2 + ,50999 + ,63989 + ,16 + ,589 + ,98 + ,91 + ,254825 + ,104911 + ,88 + ,2613 + ,63 + ,41 + ,103239 + ,43448 + ,51 + ,1298 + ,85 + ,84 + ,168059 + ,60029 + ,33 + ,1109 + ,74 + ,55 + ,129762 + ,38650 + ,53 + ,1437 + ,19 + ,3 + ,78256 + ,47261 + ,74 + ,682 + ,57 + ,68 + ,249232 + ,73586 + ,82 + ,2799 + ,74 + ,93 + ,152366 + ,83042 + ,54 + ,1281 + ,78 + ,41 + ,173260 + ,37238 + ,63 + ,2035 + ,91 + ,94 + ,197197 + ,63958 + ,70 + ,1752 + ,112 + ,105 + ,68388 + ,78956 + ,41 + ,1133 + ,79 + ,70 + ,139409 + ,99518 + ,49 + ,1667 + ,100 + ,114 + ,185366 + ,111436 + ,68 + ,1558 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,4 + ,14688 + ,6023 + ,10 + ,207 + ,0 + ,0 + ,98 + ,0 + ,1 + ,5 + ,0 + ,0 + ,455 + ,0 + ,2 + ,8 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,48 + ,42 + ,137885 + ,42564 + ,58 + ,1300 + ,55 + ,97 + ,185288 + ,38885 + ,72 + ,1718 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,203 + ,0 + ,4 + ,4 + ,0 + ,7 + ,7199 + ,1644 + ,5 + ,151 + ,13 + ,12 + ,46660 + ,6179 + ,20 + ,474 + ,4 + ,0 + ,17547 + ,3926 + ,5 + ,141 + ,31 + ,37 + ,73567 + ,23238 + ,27 + ,705 + ,0 + ,0 + ,969 + ,0 + ,2 + ,29 + ,29 + ,39 + ,105477 + ,49288 + ,33 + ,1020) + ,dim=c(6 + ,164) + ,dimnames=list(c('Feedback_messages' + ,'Blogged_Computations' + ,'Time_Rfc' + ,'Aantal_karakters' + ,'Logins' + ,'Pageviews ') + ,1:164)) > y <- array(NA,dim=c(6,164),dimnames=list(c('Feedback_messages','Blogged_Computations','Time_Rfc','Aantal_karakters','Logins','Pageviews '),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 Feedback_messages Blogged_Computations Time_Rfc Aantal_karakters Logins 1 84 65 170588 95556 47 2 72 54 86621 54565 48 3 41 58 118522 63016 40 4 85 99 152510 79774 75 5 30 41 86206 31258 32 6 53 0 37257 52491 18 7 74 111 306055 91256 80 8 22 1 32750 22807 16 9 68 37 116502 77411 38 10 47 60 130539 48821 25 11 102 64 161876 52295 65 12 123 71 128274 63262 74 13 69 38 104367 50466 45 14 108 76 193024 62932 42 15 59 62 141574 38439 56 16 122 126 254150 70817 124 17 91 85 181110 105965 42 18 45 74 198432 73795 102 19 53 78 113853 82043 36 20 112 100 159940 74349 51 21 82 79 166822 82204 49 22 92 76 286675 55709 57 23 51 42 95297 37137 21 24 120 81 108278 70780 32 25 99 103 146342 55027 77 26 86 70 145142 56699 90 27 59 75 161740 65911 82 28 98 93 162716 56316 56 29 71 42 106888 26982 34 30 100 95 188150 54628 39 31 113 87 189401 96750 53 32 92 44 129484 53009 48 33 107 88 204030 64664 64 34 75 29 68538 36990 27 35 100 89 243625 85224 56 36 69 71 167255 37048 37 37 106 70 264528 59635 83 38 51 50 122024 42051 50 39 18 30 80964 26998 26 40 91 87 209795 63717 109 41 75 78 224205 55071 56 42 63 48 115971 40001 42 43 72 57 138191 54506 49 44 59 31 81106 35838 31 45 29 30 93125 50838 49 46 85 70 307743 86997 97 47 66 20 78800 33032 42 48 106 84 158835 61704 55 49 113 81 223590 117986 71 50 101 79 131108 56733 39 51 65 72 128734 55064 54 52 7 8 24188 5950 24 53 111 67 257677 84607 213 54 61 21 65029 32551 17 55 41 30 98066 31701 58 56 70 70 173587 71170 27 57 136 87 180042 101773 59 58 87 87 197266 101653 114 59 90 116 212060 81493 76 60 76 54 141582 55901 51 61 101 96 245107 109104 87 62 57 94 206879 114425 78 63 61 51 145696 36311 62 64 92 51 173535 70027 61 65 80 38 142064 73713 39 66 35 65 117926 40671 37 67 72 64 113461 89041 87 68 88 66 145285 57231 102 69 80 98 150999 68608 50 70 62 100 91838 59155 37 71 81 56 118807 55827 33 72 63 22 69471 22618 28 73 91 51 126630 58425 44 74 65 61 145908 65724 38 75 79 94 98393 56979 34 76 85 98 190926 72369 45 77 75 76 198797 79194 58 78 70 57 106193 202316 59 79 78 75 89318 44970 36 80 75 48 120362 49319 43 81 55 48 98791 36252 30 82 80 109 283982 75741 68 83 83 27 132798 38417 53 84 38 85 135251 64102 59 85 27 49 80953 56622 25 86 62 24 109237 15430 39 87 82 46 96634 72571 36 88 88 44 226191 67271 115 89 59 49 172071 43460 55 90 92 108 117815 99501 71 91 40 42 133561 28340 52 92 91 110 152193 76013 49 93 63 28 112004 37361 43 94 88 79 169613 48204 52 95 85 49 187483 76168 51 96 76 64 130533 85168 27 97 67 75 142339 125410 29 98 69 122 199232 123328 56 99 150 95 201744 83038 94 100 77 106 247024 120087 74 101 103 73 158054 91939 66 102 81 108 182581 103646 42 103 37 30 106351 29467 112 104 64 13 43287 43750 14 105 22 69 127493 34497 45 106 35 75 127930 66477 92 107 61 82 149006 71181 29 108 80 108 187714 74482 66 109 54 28 74112 174949 32 110 76 83 94006 46765 66 111 87 51 176625 90257 43 112 75 90 141933 51370 56 113 0 12 22938 1168 10 114 61 87 125927 51360 53 115 30 23 61857 25162 25 116 66 57 91290 21067 34 117 56 93 255100 58233 66 118 0 4 21054 855 16 119 40 56 174150 85903 38 120 9 18 31414 14116 19 121 82 86 189461 57637 77 122 110 40 137544 94137 35 123 71 16 77166 62147 46 124 50 18 74567 62832 30 125 21 16 38214 8773 34 126 78 42 90961 63785 25 127 118 78 194652 65196 50 128 102 31 135261 73087 38 129 109 104 244272 72631 51 130 104 121 201748 86281 66 131 124 111 256402 162365 73 132 76 57 139144 56530 23 133 57 28 76470 35606 29 134 91 56 193518 70111 196 135 101 82 280334 92046 115 136 66 2 50999 63989 16 137 98 91 254825 104911 88 138 63 41 103239 43448 51 139 85 84 168059 60029 33 140 74 55 129762 38650 53 141 19 3 78256 47261 74 142 57 68 249232 73586 82 143 74 93 152366 83042 54 144 78 41 173260 37238 63 145 91 94 197197 63958 70 146 112 105 68388 78956 41 147 79 70 139409 99518 49 148 100 114 185366 111436 68 149 0 0 0 0 0 150 0 4 14688 6023 10 151 0 0 98 0 1 152 0 0 455 0 2 153 0 0 0 0 0 154 0 0 0 0 0 155 48 42 137885 42564 58 156 55 97 185288 38885 72 157 0 0 0 0 0 158 0 0 203 0 4 159 0 7 7199 1644 5 160 13 12 46660 6179 20 161 4 0 17547 3926 5 162 31 37 73567 23238 27 163 0 0 969 0 2 164 29 39 105477 49288 33 Pageviews\r 1 1168 2 669 3 1098 4 1939 5 679 6 321 7 2667 8 345 9 1367 10 1159 11 1385 12 1155 13 1154 14 1703 15 1190 16 3103 17 1357 18 1892 19 883 20 1627 21 1412 22 1901 23 825 24 904 25 2115 26 1858 27 1781 28 1304 29 1035 30 1557 31 1527 32 1220 33 1368 34 564 35 1990 36 1557 37 2057 38 1111 39 686 40 2012 41 2232 42 1033 43 1166 44 1020 45 1735 46 3644 47 918 48 1579 49 2805 50 1496 51 1108 52 496 53 1753 54 744 55 1101 56 1612 57 1806 58 2460 59 1653 60 1234 61 2368 62 2204 63 1633 64 1664 65 958 66 1118 67 1258 68 1964 69 1483 70 1034 71 1348 72 837 73 1310 74 1144 75 987 76 1334 77 1452 78 957 79 911 80 1114 81 1209 82 2541 83 1176 84 1253 85 870 86 1473 87 811 88 2435 89 1410 90 1982 91 1214 92 1356 93 1197 94 1971 95 1432 96 1030 97 1145 98 1509 99 2230 100 2236 101 1324 102 1599 103 999 104 602 105 1379 106 1172 107 1337 108 1709 109 668 110 1128 111 1209 112 1324 113 391 114 1264 115 530 116 983 117 1926 118 387 119 1481 120 449 121 2135 122 1128 123 800 124 964 125 568 126 901 127 1568 128 859 129 2229 130 1566 131 2153 132 828 133 809 134 1848 135 2914 136 589 137 2613 138 1298 139 1109 140 1437 141 682 142 2799 143 1281 144 2035 145 1752 146 1133 147 1667 148 1558 149 0 150 207 151 5 152 8 153 0 154 0 155 1300 156 1718 157 0 158 4 159 151 160 474 161 141 162 705 163 29 164 1020 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) Blogged_Computations Time_Rfc 1.483e+01 2.819e-01 1.121e-04 Aantal_karakters Logins `Pageviews\r` 2.449e-04 6.802e-02 2.331e-03 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -45.978 -14.926 -0.421 14.314 53.853 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 1.483e+01 3.908e+00 3.795 0.000210 *** Blogged_Computations 2.819e-01 8.382e-02 3.363 0.000968 *** Time_Rfc 1.121e-04 6.408e-05 1.749 0.082192 . Aantal_karakters 2.449e-04 6.660e-05 3.677 0.000323 *** Logins 6.802e-02 7.847e-02 0.867 0.387366 `Pageviews\r` 2.331e-03 6.367e-03 0.366 0.714808 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 21.08 on 158 degrees of freedom Multiple R-squared: 0.5952, Adjusted R-squared: 0.5824 F-statistic: 46.46 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.01718346 3.436693e-02 9.828165e-01 [2,] 0.11828139 2.365628e-01 8.817186e-01 [3,] 0.37081752 7.416350e-01 6.291825e-01 [4,] 0.35699603 7.139921e-01 6.430040e-01 [5,] 0.25514335 5.102867e-01 7.448566e-01 [6,] 0.82416231 3.516754e-01 1.758377e-01 [7,] 0.77903907 4.419219e-01 2.209609e-01 [8,] 0.70528923 5.894215e-01 2.947108e-01 [9,] 0.62707381 7.458524e-01 3.729262e-01 [10,] 0.90903989 1.819202e-01 9.096011e-02 [11,] 0.92086446 1.582711e-01 7.913554e-02 [12,] 0.92145355 1.570929e-01 7.854645e-02 [13,] 0.89027665 2.194467e-01 1.097234e-01 [14,] 0.87661226 2.467755e-01 1.233877e-01 [15,] 0.83699371 3.260126e-01 1.630063e-01 [16,] 0.90685999 1.862800e-01 9.314001e-02 [17,] 0.87921367 2.415727e-01 1.207863e-01 [18,] 0.84783168 3.043366e-01 1.521683e-01 [19,] 0.84693309 3.061338e-01 1.530669e-01 [20,] 0.81337112 3.732578e-01 1.866289e-01 [21,] 0.79009533 4.198093e-01 2.099047e-01 [22,] 0.75218262 4.956348e-01 2.478174e-01 [23,] 0.75076174 4.984765e-01 2.492383e-01 [24,] 0.79504342 4.099132e-01 2.049566e-01 [25,] 0.77440138 4.511972e-01 2.255986e-01 [26,] 0.78141863 4.371627e-01 2.185814e-01 [27,] 0.74175842 5.164832e-01 2.582416e-01 [28,] 0.69952604 6.009479e-01 3.004740e-01 [29,] 0.70173694 5.965261e-01 2.982631e-01 [30,] 0.67896675 6.420665e-01 3.210332e-01 [31,] 0.73616790 5.276642e-01 2.638321e-01 [32,] 0.69047699 6.190460e-01 3.095230e-01 [33,] 0.64447483 7.110503e-01 3.555252e-01 [34,] 0.59497981 8.100404e-01 4.050202e-01 [35,] 0.54415677 9.116865e-01 4.558432e-01 [36,] 0.50557046 9.888591e-01 4.944295e-01 [37,] 0.49229252 9.845850e-01 5.077075e-01 [38,] 0.48234605 9.646921e-01 5.176540e-01 [39,] 0.48689422 9.737884e-01 5.131058e-01 [40,] 0.49585908 9.917182e-01 5.041409e-01 [41,] 0.48740576 9.748115e-01 5.125942e-01 [42,] 0.49960726 9.992145e-01 5.003927e-01 [43,] 0.47150358 9.430072e-01 5.284964e-01 [44,] 0.47256541 9.451308e-01 5.274346e-01 [45,] 0.43931179 8.786236e-01 5.606882e-01 [46,] 0.43520019 8.704004e-01 5.647998e-01 [47,] 0.39572307 7.914461e-01 6.042769e-01 [48,] 0.35863171 7.172634e-01 6.413683e-01 [49,] 0.47645581 9.529116e-01 5.235442e-01 [50,] 0.45425839 9.085168e-01 5.457416e-01 [51,] 0.45248397 9.049679e-01 5.475160e-01 [52,] 0.41341126 8.268225e-01 5.865887e-01 [53,] 0.37342136 7.468427e-01 6.265786e-01 [54,] 0.57700740 8.459852e-01 4.229926e-01 [55,] 0.53042726 9.391455e-01 4.695727e-01 [56,] 0.52207801 9.558440e-01 4.779220e-01 [57,] 0.50026345 9.994731e-01 4.997366e-01 [58,] 0.55624168 8.875166e-01 4.437583e-01 [59,] 0.51753900 9.649220e-01 4.824610e-01 [60,] 0.48690387 9.738077e-01 5.130961e-01 [61,] 0.44929585 8.985917e-01 5.507041e-01 [62,] 0.43618194 8.723639e-01 5.638181e-01 [63,] 0.41697167 8.339433e-01 5.830283e-01 [64,] 0.42367051 8.473410e-01 5.763295e-01 [65,] 0.44694736 8.938947e-01 5.530526e-01 [66,] 0.40956253 8.191251e-01 5.904375e-01 [67,] 0.37548683 7.509737e-01 6.245132e-01 [68,] 0.33961982 6.792396e-01 6.603802e-01 [69,] 0.31036618 6.207324e-01 6.896338e-01 [70,] 0.34181459 6.836292e-01 6.581854e-01 [71,] 0.32755304 6.551061e-01 6.724470e-01 [72,] 0.30837110 6.167422e-01 6.916289e-01 [73,] 0.27124334 5.424867e-01 7.287567e-01 [74,] 0.28563738 5.712748e-01 7.143626e-01 [75,] 0.32394562 6.478912e-01 6.760544e-01 [76,] 0.43581311 8.716262e-01 5.641869e-01 [77,] 0.48581394 9.716279e-01 5.141861e-01 [78,] 0.46671798 9.334360e-01 5.332820e-01 [79,] 0.46886498 9.377300e-01 5.311350e-01 [80,] 0.42607265 8.521453e-01 5.739274e-01 [81,] 0.38930996 7.786199e-01 6.106900e-01 [82,] 0.34832892 6.966578e-01 6.516711e-01 [83,] 0.33380851 6.676170e-01 6.661915e-01 [84,] 0.29644312 5.928862e-01 7.035569e-01 [85,] 0.27131552 5.426310e-01 7.286845e-01 [86,] 0.24668673 4.933735e-01 7.533133e-01 [87,] 0.22332304 4.466461e-01 7.766770e-01 [88,] 0.19230134 3.846027e-01 8.076987e-01 [89,] 0.18733833 3.746767e-01 8.126617e-01 [90,] 0.26724144 5.344829e-01 7.327586e-01 [91,] 0.54816993 9.036601e-01 4.518301e-01 [92,] 0.62381312 7.523738e-01 3.761869e-01 [93,] 0.62303327 7.539335e-01 3.769667e-01 [94,] 0.60892845 7.821431e-01 3.910716e-01 [95,] 0.59544671 8.091066e-01 4.045533e-01 [96,] 0.63478445 7.304311e-01 3.652155e-01 [97,] 0.75212875 4.957425e-01 2.478712e-01 [98,] 0.84954729 3.009054e-01 1.504527e-01 [99,] 0.83950272 3.209946e-01 1.604973e-01 [100,] 0.82313531 3.537294e-01 1.768647e-01 [101,] 0.92265680 1.546864e-01 7.734320e-02 [102,] 0.90633288 1.873342e-01 9.366712e-02 [103,] 0.88610681 2.277864e-01 1.138932e-01 [104,] 0.86025232 2.794954e-01 1.397477e-01 [105,] 0.86188364 2.762327e-01 1.381164e-01 [106,] 0.84102732 3.179454e-01 1.589727e-01 [107,] 0.81272102 3.745580e-01 1.872790e-01 [108,] 0.82256231 3.548754e-01 1.774377e-01 [109,] 0.86027571 2.794486e-01 1.397243e-01 [110,] 0.85081654 2.983669e-01 1.491835e-01 [111,] 0.94266264 1.146747e-01 5.733736e-02 [112,] 0.93736974 1.252605e-01 6.263026e-02 [113,] 0.91983553 1.603289e-01 8.016447e-02 [114,] 0.94383957 1.123209e-01 5.616043e-02 [115,] 0.94534002 1.093200e-01 5.465998e-02 [116,] 0.92753353 1.449329e-01 7.246647e-02 [117,] 0.90855671 1.828866e-01 9.144329e-02 [118,] 0.90821380 1.835724e-01 9.178620e-02 [119,] 0.95908059 8.183882e-02 4.091941e-02 [120,] 0.99316773 1.366453e-02 6.832266e-03 [121,] 0.99304567 1.390867e-02 6.954335e-03 [122,] 0.98938433 2.123135e-02 1.061567e-02 [123,] 0.98615183 2.769634e-02 1.384817e-02 [124,] 0.99050258 1.899484e-02 9.497419e-03 [125,] 0.99187808 1.624384e-02 8.121918e-03 [126,] 0.99047460 1.905079e-02 9.525396e-03 [127,] 0.98591110 2.817779e-02 1.408890e-02 [128,] 0.99738506 5.229880e-03 2.614940e-03 [129,] 0.99540441 9.191172e-03 4.595586e-03 [130,] 0.99453389 1.093223e-02 5.466115e-03 [131,] 0.99848989 3.020224e-03 1.510112e-03 [132,] 0.99887581 2.248387e-03 1.124193e-03 [133,] 0.99900931 1.981373e-03 9.906865e-04 [134,] 0.99986119 2.776135e-04 1.388068e-04 [135,] 0.99966278 6.744489e-04 3.372244e-04 [136,] 0.99994744 1.051157e-04 5.255786e-05 [137,] 0.99999971 5.860842e-07 2.930421e-07 [138,] 0.99999976 4.847101e-07 2.423550e-07 [139,] 0.99999993 1.301396e-07 6.506979e-08 [140,] 0.99999974 5.293935e-07 2.646968e-07 [141,] 0.99999836 3.282164e-06 1.641082e-06 [142,] 0.99999550 9.007359e-06 4.503680e-06 [143,] 0.99997167 5.665753e-05 2.832877e-05 [144,] 0.99983702 3.259635e-04 1.629818e-04 [145,] 0.99908196 1.836075e-03 9.180375e-04 [146,] 0.99521434 9.571314e-03 4.785657e-03 [147,] 0.98078649 3.842703e-02 1.921351e-02 > postscript(file="/var/wessaorg/rcomp/tmp/19f6d1321960619.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/29jun1321960619.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/3e5sb1321960619.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/42ojd1321960619.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/55z601321960619.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 2.40801117 14.05435950 -24.17447742 -3.98531089 -17.46237114 19.16776677 7 8 9 10 11 12 -40.42853006 -4.25945565 4.95476629 -15.73097464 30.53052036 50.56249711 13 14 15 16 17 18 13.65213017 27.87492205 -5.17006817 10.15835636 -0.05809638 -42.34946190 19 20 21 22 23 24 -21.17450384 25.58813765 -0.55079954 1.66383740 1.20487227 48.58619816 25 26 27 28 29 30 15.09271043 10.83379377 -20.96839611 18.07881684 21.01867497 17.64396643 31 32 33 34 35 36 21.56099565 31.16477314 21.11919349 32.10488156 3.45820789 0.19199118 37 38 39 40 41 42 16.74408817 -7.88857273 -24.33931871 0.42481162 -9.44433854 6.58164788 43 44 45 46 47 48 6.21586131 13.07948060 -24.55022297 -20.45226905 23.61509694 27.15813160 49 50 51 52 53 54 10.01593207 29.17466462 -4.29340148 -17.04065457 9.10846778 22.10076918 55 56 57 58 59 60 -7.55203826 -7.04010719 43.32162227 -12.84516660 -10.27467268 10.04514424 61 62 63 64 65 66 -6.51851137 -45.97813079 -1.45128903 18.16705661 15.59835853 -26.45115351 67 68 69 70 71 72 -4.24133152 12.75161262 -3.03630311 -10.72241263 18.01120819 24.78849151 73 74 75 76 77 78 27.24768674 -4.72431845 8.08039905 -2.74570060 -10.25786424 -28.58740434 79 80 81 82 83 84 16.43493491 15.55072136 1.83157802 -26.48109522 29.92071779 -38.57944752 85 86 87 88 89 90 -28.30881362 18.29670595 21.26250855 5.44221610 -6.59898275 -0.29184622 91 92 93 94 95 96 -14.94544279 2.99821739 12.85967671 11.95557660 9.88429260 3.40591241 97 98 99 100 101 102 -20.27687315 -40.07676035 53.85310225 -35.04967026 19.78801633 -16.70183572 103 104 105 106 107 108 -15.36892601 27.58537451 -41.29157412 -40.57763569 -16.16461811 -13.02410384 109 110 111 112 113 114 -23.60535574 8.66865224 10.15142478 -0.58126617 -22.65989307 -11.59509572 115 116 117 118 119 120 -7.34321381 15.10908684 -36.87672935 -20.51599254 -37.20806289 -20.21935956 121 122 123 124 125 126 -2.63510554 40.41552881 22.79868979 2.06460276 -8.40711943 21.71588871 127 128 129 130 131 132 36.34480612 40.78602704 11.02476168 3.18244624 -0.60217779 12.16968206 133 134 135 136 137 138 13.12939948 3.88580469 -5.52126630 26.75921876 -8.81086655 7.90789365 139 140 141 142 143 144 8.12623477 12.70368472 -23.64341679 -35.05548691 -11.11624225 14.04533973 145 146 147 148 149 150 3.06376003 35.14512903 -2.77553921 -3.28576162 -14.82873043 -20.24029813 151 152 153 154 155 156 -14.91938866 -15.03441866 -14.82873043 -14.82873043 -11.52203360 -26.36348914 157 158 159 160 161 162 -14.82873043 -15.13288280 -18.70336588 -14.41988136 -14.42590422 -11.67463200 163 164 -15.14098555 -25.33711911 > postscript(file="/var/wessaorg/rcomp/tmp/6hk0d1321960619.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 2.40801117 NA 1 14.05435950 2.40801117 2 -24.17447742 14.05435950 3 -3.98531089 -24.17447742 4 -17.46237114 -3.98531089 5 19.16776677 -17.46237114 6 -40.42853006 19.16776677 7 -4.25945565 -40.42853006 8 4.95476629 -4.25945565 9 -15.73097464 4.95476629 10 30.53052036 -15.73097464 11 50.56249711 30.53052036 12 13.65213017 50.56249711 13 27.87492205 13.65213017 14 -5.17006817 27.87492205 15 10.15835636 -5.17006817 16 -0.05809638 10.15835636 17 -42.34946190 -0.05809638 18 -21.17450384 -42.34946190 19 25.58813765 -21.17450384 20 -0.55079954 25.58813765 21 1.66383740 -0.55079954 22 1.20487227 1.66383740 23 48.58619816 1.20487227 24 15.09271043 48.58619816 25 10.83379377 15.09271043 26 -20.96839611 10.83379377 27 18.07881684 -20.96839611 28 21.01867497 18.07881684 29 17.64396643 21.01867497 30 21.56099565 17.64396643 31 31.16477314 21.56099565 32 21.11919349 31.16477314 33 32.10488156 21.11919349 34 3.45820789 32.10488156 35 0.19199118 3.45820789 36 16.74408817 0.19199118 37 -7.88857273 16.74408817 38 -24.33931871 -7.88857273 39 0.42481162 -24.33931871 40 -9.44433854 0.42481162 41 6.58164788 -9.44433854 42 6.21586131 6.58164788 43 13.07948060 6.21586131 44 -24.55022297 13.07948060 45 -20.45226905 -24.55022297 46 23.61509694 -20.45226905 47 27.15813160 23.61509694 48 10.01593207 27.15813160 49 29.17466462 10.01593207 50 -4.29340148 29.17466462 51 -17.04065457 -4.29340148 52 9.10846778 -17.04065457 53 22.10076918 9.10846778 54 -7.55203826 22.10076918 55 -7.04010719 -7.55203826 56 43.32162227 -7.04010719 57 -12.84516660 43.32162227 58 -10.27467268 -12.84516660 59 10.04514424 -10.27467268 60 -6.51851137 10.04514424 61 -45.97813079 -6.51851137 62 -1.45128903 -45.97813079 63 18.16705661 -1.45128903 64 15.59835853 18.16705661 65 -26.45115351 15.59835853 66 -4.24133152 -26.45115351 67 12.75161262 -4.24133152 68 -3.03630311 12.75161262 69 -10.72241263 -3.03630311 70 18.01120819 -10.72241263 71 24.78849151 18.01120819 72 27.24768674 24.78849151 73 -4.72431845 27.24768674 74 8.08039905 -4.72431845 75 -2.74570060 8.08039905 76 -10.25786424 -2.74570060 77 -28.58740434 -10.25786424 78 16.43493491 -28.58740434 79 15.55072136 16.43493491 80 1.83157802 15.55072136 81 -26.48109522 1.83157802 82 29.92071779 -26.48109522 83 -38.57944752 29.92071779 84 -28.30881362 -38.57944752 85 18.29670595 -28.30881362 86 21.26250855 18.29670595 87 5.44221610 21.26250855 88 -6.59898275 5.44221610 89 -0.29184622 -6.59898275 90 -14.94544279 -0.29184622 91 2.99821739 -14.94544279 92 12.85967671 2.99821739 93 11.95557660 12.85967671 94 9.88429260 11.95557660 95 3.40591241 9.88429260 96 -20.27687315 3.40591241 97 -40.07676035 -20.27687315 98 53.85310225 -40.07676035 99 -35.04967026 53.85310225 100 19.78801633 -35.04967026 101 -16.70183572 19.78801633 102 -15.36892601 -16.70183572 103 27.58537451 -15.36892601 104 -41.29157412 27.58537451 105 -40.57763569 -41.29157412 106 -16.16461811 -40.57763569 107 -13.02410384 -16.16461811 108 -23.60535574 -13.02410384 109 8.66865224 -23.60535574 110 10.15142478 8.66865224 111 -0.58126617 10.15142478 112 -22.65989307 -0.58126617 113 -11.59509572 -22.65989307 114 -7.34321381 -11.59509572 115 15.10908684 -7.34321381 116 -36.87672935 15.10908684 117 -20.51599254 -36.87672935 118 -37.20806289 -20.51599254 119 -20.21935956 -37.20806289 120 -2.63510554 -20.21935956 121 40.41552881 -2.63510554 122 22.79868979 40.41552881 123 2.06460276 22.79868979 124 -8.40711943 2.06460276 125 21.71588871 -8.40711943 126 36.34480612 21.71588871 127 40.78602704 36.34480612 128 11.02476168 40.78602704 129 3.18244624 11.02476168 130 -0.60217779 3.18244624 131 12.16968206 -0.60217779 132 13.12939948 12.16968206 133 3.88580469 13.12939948 134 -5.52126630 3.88580469 135 26.75921876 -5.52126630 136 -8.81086655 26.75921876 137 7.90789365 -8.81086655 138 8.12623477 7.90789365 139 12.70368472 8.12623477 140 -23.64341679 12.70368472 141 -35.05548691 -23.64341679 142 -11.11624225 -35.05548691 143 14.04533973 -11.11624225 144 3.06376003 14.04533973 145 35.14512903 3.06376003 146 -2.77553921 35.14512903 147 -3.28576162 -2.77553921 148 -14.82873043 -3.28576162 149 -20.24029813 -14.82873043 150 -14.91938866 -20.24029813 151 -15.03441866 -14.91938866 152 -14.82873043 -15.03441866 153 -14.82873043 -14.82873043 154 -11.52203360 -14.82873043 155 -26.36348914 -11.52203360 156 -14.82873043 -26.36348914 157 -15.13288280 -14.82873043 158 -18.70336588 -15.13288280 159 -14.41988136 -18.70336588 160 -14.42590422 -14.41988136 161 -11.67463200 -14.42590422 162 -15.14098555 -11.67463200 163 -25.33711911 -15.14098555 164 NA -25.33711911 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 14.05435950 2.40801117 [2,] -24.17447742 14.05435950 [3,] -3.98531089 -24.17447742 [4,] -17.46237114 -3.98531089 [5,] 19.16776677 -17.46237114 [6,] -40.42853006 19.16776677 [7,] -4.25945565 -40.42853006 [8,] 4.95476629 -4.25945565 [9,] -15.73097464 4.95476629 [10,] 30.53052036 -15.73097464 [11,] 50.56249711 30.53052036 [12,] 13.65213017 50.56249711 [13,] 27.87492205 13.65213017 [14,] -5.17006817 27.87492205 [15,] 10.15835636 -5.17006817 [16,] -0.05809638 10.15835636 [17,] -42.34946190 -0.05809638 [18,] -21.17450384 -42.34946190 [19,] 25.58813765 -21.17450384 [20,] -0.55079954 25.58813765 [21,] 1.66383740 -0.55079954 [22,] 1.20487227 1.66383740 [23,] 48.58619816 1.20487227 [24,] 15.09271043 48.58619816 [25,] 10.83379377 15.09271043 [26,] -20.96839611 10.83379377 [27,] 18.07881684 -20.96839611 [28,] 21.01867497 18.07881684 [29,] 17.64396643 21.01867497 [30,] 21.56099565 17.64396643 [31,] 31.16477314 21.56099565 [32,] 21.11919349 31.16477314 [33,] 32.10488156 21.11919349 [34,] 3.45820789 32.10488156 [35,] 0.19199118 3.45820789 [36,] 16.74408817 0.19199118 [37,] -7.88857273 16.74408817 [38,] -24.33931871 -7.88857273 [39,] 0.42481162 -24.33931871 [40,] -9.44433854 0.42481162 [41,] 6.58164788 -9.44433854 [42,] 6.21586131 6.58164788 [43,] 13.07948060 6.21586131 [44,] -24.55022297 13.07948060 [45,] -20.45226905 -24.55022297 [46,] 23.61509694 -20.45226905 [47,] 27.15813160 23.61509694 [48,] 10.01593207 27.15813160 [49,] 29.17466462 10.01593207 [50,] -4.29340148 29.17466462 [51,] -17.04065457 -4.29340148 [52,] 9.10846778 -17.04065457 [53,] 22.10076918 9.10846778 [54,] -7.55203826 22.10076918 [55,] -7.04010719 -7.55203826 [56,] 43.32162227 -7.04010719 [57,] -12.84516660 43.32162227 [58,] -10.27467268 -12.84516660 [59,] 10.04514424 -10.27467268 [60,] -6.51851137 10.04514424 [61,] -45.97813079 -6.51851137 [62,] -1.45128903 -45.97813079 [63,] 18.16705661 -1.45128903 [64,] 15.59835853 18.16705661 [65,] -26.45115351 15.59835853 [66,] -4.24133152 -26.45115351 [67,] 12.75161262 -4.24133152 [68,] -3.03630311 12.75161262 [69,] -10.72241263 -3.03630311 [70,] 18.01120819 -10.72241263 [71,] 24.78849151 18.01120819 [72,] 27.24768674 24.78849151 [73,] -4.72431845 27.24768674 [74,] 8.08039905 -4.72431845 [75,] -2.74570060 8.08039905 [76,] -10.25786424 -2.74570060 [77,] -28.58740434 -10.25786424 [78,] 16.43493491 -28.58740434 [79,] 15.55072136 16.43493491 [80,] 1.83157802 15.55072136 [81,] -26.48109522 1.83157802 [82,] 29.92071779 -26.48109522 [83,] -38.57944752 29.92071779 [84,] -28.30881362 -38.57944752 [85,] 18.29670595 -28.30881362 [86,] 21.26250855 18.29670595 [87,] 5.44221610 21.26250855 [88,] -6.59898275 5.44221610 [89,] -0.29184622 -6.59898275 [90,] -14.94544279 -0.29184622 [91,] 2.99821739 -14.94544279 [92,] 12.85967671 2.99821739 [93,] 11.95557660 12.85967671 [94,] 9.88429260 11.95557660 [95,] 3.40591241 9.88429260 [96,] -20.27687315 3.40591241 [97,] -40.07676035 -20.27687315 [98,] 53.85310225 -40.07676035 [99,] -35.04967026 53.85310225 [100,] 19.78801633 -35.04967026 [101,] -16.70183572 19.78801633 [102,] -15.36892601 -16.70183572 [103,] 27.58537451 -15.36892601 [104,] -41.29157412 27.58537451 [105,] -40.57763569 -41.29157412 [106,] -16.16461811 -40.57763569 [107,] -13.02410384 -16.16461811 [108,] -23.60535574 -13.02410384 [109,] 8.66865224 -23.60535574 [110,] 10.15142478 8.66865224 [111,] -0.58126617 10.15142478 [112,] -22.65989307 -0.58126617 [113,] -11.59509572 -22.65989307 [114,] -7.34321381 -11.59509572 [115,] 15.10908684 -7.34321381 [116,] -36.87672935 15.10908684 [117,] -20.51599254 -36.87672935 [118,] -37.20806289 -20.51599254 [119,] -20.21935956 -37.20806289 [120,] -2.63510554 -20.21935956 [121,] 40.41552881 -2.63510554 [122,] 22.79868979 40.41552881 [123,] 2.06460276 22.79868979 [124,] -8.40711943 2.06460276 [125,] 21.71588871 -8.40711943 [126,] 36.34480612 21.71588871 [127,] 40.78602704 36.34480612 [128,] 11.02476168 40.78602704 [129,] 3.18244624 11.02476168 [130,] -0.60217779 3.18244624 [131,] 12.16968206 -0.60217779 [132,] 13.12939948 12.16968206 [133,] 3.88580469 13.12939948 [134,] -5.52126630 3.88580469 [135,] 26.75921876 -5.52126630 [136,] -8.81086655 26.75921876 [137,] 7.90789365 -8.81086655 [138,] 8.12623477 7.90789365 [139,] 12.70368472 8.12623477 [140,] -23.64341679 12.70368472 [141,] -35.05548691 -23.64341679 [142,] -11.11624225 -35.05548691 [143,] 14.04533973 -11.11624225 [144,] 3.06376003 14.04533973 [145,] 35.14512903 3.06376003 [146,] -2.77553921 35.14512903 [147,] -3.28576162 -2.77553921 [148,] -14.82873043 -3.28576162 [149,] -20.24029813 -14.82873043 [150,] -14.91938866 -20.24029813 [151,] -15.03441866 -14.91938866 [152,] -14.82873043 -15.03441866 [153,] -14.82873043 -14.82873043 [154,] -11.52203360 -14.82873043 [155,] -26.36348914 -11.52203360 [156,] -14.82873043 -26.36348914 [157,] -15.13288280 -14.82873043 [158,] -18.70336588 -15.13288280 [159,] -14.41988136 -18.70336588 [160,] -14.42590422 -14.41988136 [161,] -11.67463200 -14.42590422 [162,] -15.14098555 -11.67463200 [163,] -25.33711911 -15.14098555 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 14.05435950 2.40801117 2 -24.17447742 14.05435950 3 -3.98531089 -24.17447742 4 -17.46237114 -3.98531089 5 19.16776677 -17.46237114 6 -40.42853006 19.16776677 7 -4.25945565 -40.42853006 8 4.95476629 -4.25945565 9 -15.73097464 4.95476629 10 30.53052036 -15.73097464 11 50.56249711 30.53052036 12 13.65213017 50.56249711 13 27.87492205 13.65213017 14 -5.17006817 27.87492205 15 10.15835636 -5.17006817 16 -0.05809638 10.15835636 17 -42.34946190 -0.05809638 18 -21.17450384 -42.34946190 19 25.58813765 -21.17450384 20 -0.55079954 25.58813765 21 1.66383740 -0.55079954 22 1.20487227 1.66383740 23 48.58619816 1.20487227 24 15.09271043 48.58619816 25 10.83379377 15.09271043 26 -20.96839611 10.83379377 27 18.07881684 -20.96839611 28 21.01867497 18.07881684 29 17.64396643 21.01867497 30 21.56099565 17.64396643 31 31.16477314 21.56099565 32 21.11919349 31.16477314 33 32.10488156 21.11919349 34 3.45820789 32.10488156 35 0.19199118 3.45820789 36 16.74408817 0.19199118 37 -7.88857273 16.74408817 38 -24.33931871 -7.88857273 39 0.42481162 -24.33931871 40 -9.44433854 0.42481162 41 6.58164788 -9.44433854 42 6.21586131 6.58164788 43 13.07948060 6.21586131 44 -24.55022297 13.07948060 45 -20.45226905 -24.55022297 46 23.61509694 -20.45226905 47 27.15813160 23.61509694 48 10.01593207 27.15813160 49 29.17466462 10.01593207 50 -4.29340148 29.17466462 51 -17.04065457 -4.29340148 52 9.10846778 -17.04065457 53 22.10076918 9.10846778 54 -7.55203826 22.10076918 55 -7.04010719 -7.55203826 56 43.32162227 -7.04010719 57 -12.84516660 43.32162227 58 -10.27467268 -12.84516660 59 10.04514424 -10.27467268 60 -6.51851137 10.04514424 61 -45.97813079 -6.51851137 62 -1.45128903 -45.97813079 63 18.16705661 -1.45128903 64 15.59835853 18.16705661 65 -26.45115351 15.59835853 66 -4.24133152 -26.45115351 67 12.75161262 -4.24133152 68 -3.03630311 12.75161262 69 -10.72241263 -3.03630311 70 18.01120819 -10.72241263 71 24.78849151 18.01120819 72 27.24768674 24.78849151 73 -4.72431845 27.24768674 74 8.08039905 -4.72431845 75 -2.74570060 8.08039905 76 -10.25786424 -2.74570060 77 -28.58740434 -10.25786424 78 16.43493491 -28.58740434 79 15.55072136 16.43493491 80 1.83157802 15.55072136 81 -26.48109522 1.83157802 82 29.92071779 -26.48109522 83 -38.57944752 29.92071779 84 -28.30881362 -38.57944752 85 18.29670595 -28.30881362 86 21.26250855 18.29670595 87 5.44221610 21.26250855 88 -6.59898275 5.44221610 89 -0.29184622 -6.59898275 90 -14.94544279 -0.29184622 91 2.99821739 -14.94544279 92 12.85967671 2.99821739 93 11.95557660 12.85967671 94 9.88429260 11.95557660 95 3.40591241 9.88429260 96 -20.27687315 3.40591241 97 -40.07676035 -20.27687315 98 53.85310225 -40.07676035 99 -35.04967026 53.85310225 100 19.78801633 -35.04967026 101 -16.70183572 19.78801633 102 -15.36892601 -16.70183572 103 27.58537451 -15.36892601 104 -41.29157412 27.58537451 105 -40.57763569 -41.29157412 106 -16.16461811 -40.57763569 107 -13.02410384 -16.16461811 108 -23.60535574 -13.02410384 109 8.66865224 -23.60535574 110 10.15142478 8.66865224 111 -0.58126617 10.15142478 112 -22.65989307 -0.58126617 113 -11.59509572 -22.65989307 114 -7.34321381 -11.59509572 115 15.10908684 -7.34321381 116 -36.87672935 15.10908684 117 -20.51599254 -36.87672935 118 -37.20806289 -20.51599254 119 -20.21935956 -37.20806289 120 -2.63510554 -20.21935956 121 40.41552881 -2.63510554 122 22.79868979 40.41552881 123 2.06460276 22.79868979 124 -8.40711943 2.06460276 125 21.71588871 -8.40711943 126 36.34480612 21.71588871 127 40.78602704 36.34480612 128 11.02476168 40.78602704 129 3.18244624 11.02476168 130 -0.60217779 3.18244624 131 12.16968206 -0.60217779 132 13.12939948 12.16968206 133 3.88580469 13.12939948 134 -5.52126630 3.88580469 135 26.75921876 -5.52126630 136 -8.81086655 26.75921876 137 7.90789365 -8.81086655 138 8.12623477 7.90789365 139 12.70368472 8.12623477 140 -23.64341679 12.70368472 141 -35.05548691 -23.64341679 142 -11.11624225 -35.05548691 143 14.04533973 -11.11624225 144 3.06376003 14.04533973 145 35.14512903 3.06376003 146 -2.77553921 35.14512903 147 -3.28576162 -2.77553921 148 -14.82873043 -3.28576162 149 -20.24029813 -14.82873043 150 -14.91938866 -20.24029813 151 -15.03441866 -14.91938866 152 -14.82873043 -15.03441866 153 -14.82873043 -14.82873043 154 -11.52203360 -14.82873043 155 -26.36348914 -11.52203360 156 -14.82873043 -26.36348914 157 -15.13288280 -14.82873043 158 -18.70336588 -15.13288280 159 -14.41988136 -18.70336588 160 -14.42590422 -14.41988136 161 -11.67463200 -14.42590422 162 -15.14098555 -11.67463200 163 -25.33711911 -15.14098555 > 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/7slgy1321960619.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/8enlo1321960619.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/93s2c1321960619.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/10bw0p1321960619.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/112s141321960619.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/12gkhm1321960619.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/13jon01321960619.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/149ne21321960619.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/159u0o1321960619.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/16ildl1321960619.tab") + } > > try(system("convert tmp/19f6d1321960619.ps tmp/19f6d1321960619.png",intern=TRUE)) character(0) > try(system("convert tmp/29jun1321960619.ps tmp/29jun1321960619.png",intern=TRUE)) character(0) > try(system("convert tmp/3e5sb1321960619.ps tmp/3e5sb1321960619.png",intern=TRUE)) character(0) > try(system("convert tmp/42ojd1321960619.ps tmp/42ojd1321960619.png",intern=TRUE)) character(0) > try(system("convert tmp/55z601321960619.ps tmp/55z601321960619.png",intern=TRUE)) character(0) > try(system("convert tmp/6hk0d1321960619.ps tmp/6hk0d1321960619.png",intern=TRUE)) character(0) > try(system("convert tmp/7slgy1321960619.ps tmp/7slgy1321960619.png",intern=TRUE)) character(0) > try(system("convert tmp/8enlo1321960619.ps tmp/8enlo1321960619.png",intern=TRUE)) character(0) > try(system("convert tmp/93s2c1321960619.ps tmp/93s2c1321960619.png",intern=TRUE)) character(0) > try(system("convert tmp/10bw0p1321960619.ps tmp/10bw0p1321960619.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 5.428 0.669 6.247