R version 2.12.0 (2010-10-15) Copyright (C) 2010 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(140824 + ,279055 + ,73 + ,1818 + ,504 + ,130 + ,110459 + ,212408 + ,75 + ,1433 + ,510 + ,143 + ,105079 + ,233939 + ,83 + ,2059 + ,710 + ,118 + ,112098 + ,222117 + ,106 + ,2733 + ,1154 + ,146 + ,43929 + ,189911 + ,56 + ,1399 + ,415 + ,73 + ,76173 + ,70849 + ,28 + ,631 + ,179 + ,89 + ,187326 + ,605767 + ,135 + ,5460 + ,2563 + ,146 + ,22807 + ,33186 + ,19 + ,381 + ,111 + ,22 + ,144408 + ,227332 + ,62 + ,2150 + ,763 + ,132 + ,66485 + ,267925 + ,49 + ,2042 + ,661 + ,92 + ,79089 + ,371987 + ,122 + ,2536 + ,981 + ,147 + ,81625 + ,264989 + ,131 + ,2377 + ,733 + ,203 + ,68788 + ,212638 + ,87 + ,2100 + ,785 + ,113 + ,103297 + ,368577 + ,85 + ,3020 + ,1186 + ,171 + ,69446 + ,269455 + ,88 + ,2265 + ,724 + ,87 + ,114948 + ,398124 + ,191 + ,5139 + ,1774 + ,208 + ,167949 + ,335567 + ,77 + ,2363 + ,845 + ,153 + ,125081 + ,432711 + ,173 + ,3564 + ,1390 + ,97 + ,125818 + ,182016 + ,58 + ,1477 + ,514 + ,95 + ,136588 + ,267365 + ,89 + ,2398 + ,692 + ,197 + ,112431 + ,279428 + ,73 + ,2546 + ,847 + ,160 + ,103037 + ,508849 + ,111 + ,3150 + ,1397 + ,148 + ,82317 + ,220142 + ,49 + ,1705 + ,569 + ,84 + ,118906 + ,200004 + ,58 + ,1787 + ,636 + ,227 + ,83515 + ,257139 + ,133 + ,3792 + ,1370 + ,154 + ,104581 + ,270941 + ,138 + ,3108 + ,1092 + ,151 + ,103129 + ,324969 + ,134 + ,3230 + ,1201 + ,142 + ,83243 + ,329962 + ,92 + ,2348 + ,763 + ,148 + ,37110 + ,190867 + ,60 + ,1780 + ,652 + ,110 + ,113344 + ,393860 + ,79 + ,3218 + ,1213 + ,149 + ,139165 + ,327660 + ,89 + ,2692 + ,1111 + ,179 + ,86652 + ,269239 + ,83 + ,2187 + ,758 + ,149 + ,112302 + ,396136 + ,106 + ,2577 + ,906 + ,187 + ,69652 + ,130446 + ,49 + ,1293 + ,456 + ,153 + ,119442 + ,430118 + ,104 + ,3567 + ,1293 + ,163 + ,69867 + ,273950 + ,56 + ,2764 + ,1186 + ,127 + ,101629 + ,428077 + ,128 + ,3755 + ,1348 + ,151 + ,70168 + ,254312 + ,93 + ,2075 + ,695 + ,100 + ,31081 + ,120351 + ,35 + ,995 + ,306 + ,46 + ,103925 + ,395658 + ,212 + ,3750 + ,1319 + ,156 + ,92622 + ,345875 + ,86 + ,3413 + ,1566 + ,128 + ,79011 + ,216827 + ,82 + ,2053 + ,784 + ,111 + ,93487 + ,224524 + ,83 + ,1984 + ,730 + ,119 + ,64520 + ,182485 + ,69 + ,1825 + ,488 + ,148 + ,93473 + ,157164 + ,85 + ,2599 + ,1051 + ,65 + ,114360 + ,459455 + ,157 + ,5572 + ,2089 + ,134 + ,33032 + ,78800 + ,42 + ,918 + ,330 + ,66 + ,96125 + ,255072 + ,85 + ,2685 + ,764 + ,201 + ,151911 + ,368086 + ,123 + ,4145 + ,1410 + ,177 + ,89256 + ,230299 + ,70 + ,2841 + ,1187 + ,156 + ,95676 + ,244782 + ,81 + ,2175 + ,691 + ,158 + ,5950 + ,24188 + ,24 + ,496 + ,218 + ,7 + ,149695 + ,400109 + ,334 + ,2699 + ,865 + ,175 + ,32551 + ,65029 + ,17 + ,744 + ,255 + ,61 + ,31701 + ,101097 + ,64 + ,1161 + ,454 + ,41 + ,100087 + ,309810 + ,67 + ,3333 + ,1229 + ,133 + ,169707 + ,375638 + ,91 + ,2970 + ,790 + ,228 + ,150491 + ,367127 + ,204 + ,3968 + ,1208 + ,140 + ,120192 + ,381998 + ,155 + ,2878 + ,1102 + ,155 + ,95893 + ,280106 + ,90 + ,2399 + ,919 + ,141 + ,151715 + ,400971 + ,153 + ,4121 + ,1352 + ,181 + ,176225 + ,315924 + ,122 + ,3294 + ,1190 + ,75 + ,59900 + ,291391 + ,124 + ,3132 + ,1257 + ,97 + ,104767 + ,295075 + ,93 + ,2868 + ,1030 + ,142 + ,114799 + ,280018 + ,81 + ,1778 + ,669 + ,136 + ,72128 + ,267432 + ,71 + ,2109 + ,542 + ,87 + ,143592 + ,217181 + ,141 + ,2148 + ,652 + ,140 + ,89626 + ,258166 + ,159 + ,3009 + ,894 + ,169 + ,131072 + ,264771 + ,88 + ,2562 + ,917 + ,129 + ,126817 + ,182961 + ,73 + ,1737 + ,637 + ,92 + ,81351 + ,256967 + ,74 + ,2680 + ,900 + ,160 + ,22618 + ,73566 + ,32 + ,893 + ,385 + ,67 + ,88977 + ,272362 + ,93 + ,2389 + ,784 + ,179 + ,92059 + ,229056 + ,62 + ,2197 + ,910 + ,90 + ,81897 + ,229851 + ,70 + ,2227 + ,781 + ,144 + ,108146 + ,371391 + ,91 + ,2370 + ,1001 + ,144 + ,126372 + ,398210 + ,104 + ,3226 + ,1265 + ,144 + ,249771 + ,220419 + ,111 + ,1978 + ,587 + ,134 + ,71154 + ,231884 + ,72 + ,2516 + ,767 + ,146 + ,71571 + ,219381 + ,73 + ,2147 + ,746 + ,121 + ,55918 + ,206169 + ,54 + ,2150 + ,795 + ,112 + ,160141 + ,483074 + ,132 + ,4229 + ,1272 + ,145 + ,38692 + ,146100 + ,72 + ,1380 + ,657 + ,99 + ,102812 + ,295224 + ,109 + ,2449 + ,703 + ,96 + ,56622 + ,80953 + ,25 + ,870 + ,437 + ,27 + ,15986 + ,217384 + ,63 + ,2700 + ,1060 + ,77 + ,123534 + ,179344 + ,62 + ,1574 + ,459 + ,137 + ,108535 + ,415550 + ,222 + ,4046 + ,1586 + ,151 + ,93879 + ,389059 + ,129 + ,3259 + ,1084 + ,126 + ,144551 + ,180679 + ,106 + ,3098 + ,1051 + ,159 + ,56750 + ,299505 + ,104 + ,2615 + ,846 + ,101 + ,127654 + ,292260 + ,84 + ,2404 + ,732 + ,144 + ,65594 + ,199481 + ,68 + ,1932 + ,632 + ,102 + ,59938 + ,282361 + ,78 + ,3147 + ,1128 + ,135 + ,146975 + ,329281 + ,89 + ,2598 + ,971 + ,147 + ,165904 + ,234577 + ,48 + ,2108 + ,711 + ,155 + ,169265 + ,297995 + ,67 + ,2193 + ,738 + ,138 + ,183500 + ,342490 + ,90 + ,2478 + ,898 + ,113 + ,165986 + ,416463 + ,163 + ,4198 + ,1369 + ,248 + ,184923 + ,429565 + ,120 + ,4165 + ,1538 + ,116 + ,140358 + ,297080 + ,142 + ,2842 + ,893 + ,176 + ,149959 + ,331792 + ,71 + ,2562 + ,926 + ,140 + ,57224 + ,229772 + ,202 + ,2449 + ,800 + ,59 + ,43750 + ,43287 + ,14 + ,602 + ,214 + ,64 + ,48029 + ,238089 + ,87 + ,2579 + ,833 + ,40 + ,104978 + ,263322 + ,160 + ,2591 + ,906 + ,98 + ,100046 + ,302082 + ,61 + ,2957 + ,1288 + ,139 + ,101047 + ,321797 + ,95 + ,2786 + ,1079 + ,135 + ,197426 + ,193926 + ,96 + ,1477 + ,490 + ,97 + ,160902 + ,175138 + ,105 + ,3350 + ,990 + ,142 + ,147172 + ,354041 + ,78 + ,2107 + ,677 + ,155 + ,109432 + ,303273 + ,91 + ,2332 + ,696 + ,115 + ,1168 + ,23668 + ,13 + ,400 + ,156 + ,0 + ,83248 + ,196743 + ,79 + ,2233 + ,785 + ,103 + ,25162 + ,61857 + ,25 + ,530 + ,192 + ,30 + ,45724 + ,217543 + ,54 + ,2033 + ,641 + ,130 + ,110529 + ,440711 + ,128 + ,3246 + ,1251 + ,102 + ,855 + ,21054 + ,16 + ,387 + ,146 + ,0 + ,101382 + ,252805 + ,52 + ,2137 + ,866 + ,77 + ,14116 + ,31961 + ,22 + ,492 + ,200 + ,9 + ,89506 + ,360436 + ,125 + ,3838 + ,1351 + ,150 + ,135356 + ,251948 + ,77 + ,2193 + ,740 + ,163 + ,116066 + ,187320 + ,97 + ,1796 + ,524 + ,148 + ,144244 + ,180842 + ,58 + ,1907 + ,724 + ,94 + ,8773 + ,38214 + ,34 + ,568 + ,276 + ,21 + ,102153 + ,280392 + ,56 + ,2602 + ,862 + ,151 + ,117440 + ,358276 + ,84 + ,2819 + ,1031 + ,187 + ,104128 + ,211775 + ,67 + ,1464 + ,511 + ,171 + ,134238 + ,447335 + ,90 + ,3946 + ,1716 + ,170 + ,134047 + ,348017 + ,99 + ,2554 + ,884 + ,145 + ,279488 + ,441946 + ,133 + ,3506 + ,1201 + ,198 + ,79756 + ,215177 + ,43 + ,1552 + ,575 + ,152 + ,66089 + ,130177 + ,47 + ,1389 + ,481 + ,112 + ,102070 + ,318037 + ,365 + ,3101 + ,1031 + ,173 + ,146760 + ,466139 + ,198 + ,4541 + ,1574 + ,177 + ,154771 + ,162279 + ,62 + ,1872 + ,575 + ,153 + ,165933 + ,416643 + ,140 + ,4403 + ,1827 + ,161 + ,64593 + ,178322 + ,86 + ,2113 + ,790 + ,115 + ,92280 + ,292443 + ,54 + ,2046 + ,668 + ,147 + ,67150 + ,283913 + ,100 + ,2564 + ,905 + ,124 + ,128692 + ,244931 + ,127 + ,2073 + ,689 + ,57 + ,124089 + ,387072 + ,125 + ,4112 + ,1613 + ,144 + ,125386 + ,246963 + ,93 + ,2340 + ,811 + ,126 + ,37238 + ,173260 + ,63 + ,2035 + ,716 + ,78 + ,140015 + ,346748 + ,108 + ,3241 + ,1034 + ,153 + ,150047 + ,178402 + ,60 + ,1991 + ,739 + ,196 + ,154451 + ,268750 + ,96 + ,2828 + ,1086 + ,130 + ,156349 + ,314070 + ,112 + ,2748 + ,852 + ,159 + ,0 + ,1 + ,0 + ,2 + ,0 + ,0 + ,6023 + ,14688 + ,10 + ,207 + ,85 + ,0 + ,0 + ,98 + ,1 + ,5 + ,0 + ,0 + ,0 + ,455 + ,2 + ,8 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,84601 + ,291847 + ,95 + ,2449 + ,816 + ,94 + ,68946 + ,415421 + ,168 + ,3490 + ,1142 + ,129 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,203 + ,4 + ,4 + ,0 + ,0 + ,1644 + ,7199 + ,5 + ,151 + ,74 + ,0 + ,6179 + ,46660 + ,21 + ,475 + ,259 + ,13 + ,3926 + ,17547 + ,5 + ,141 + ,69 + ,4 + ,52789 + ,121550 + ,46 + ,1145 + ,309 + ,89 + ,0 + ,969 + ,2 + ,29 + ,0 + ,0 + ,100350 + ,242774 + ,75 + ,2080 + ,695 + ,71) + ,dim=c(6 + ,164) + ,dimnames=list(c('Totalsize' + ,'TotalTime' + ,'Logins' + ,'Pageviews' + ,'CompendiumViews' + ,'LongPR') + ,1:164)) > y <- array(NA,dim=c(6,164),dimnames=list(c('Totalsize','TotalTime','Logins','Pageviews','CompendiumViews','LongPR'),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 Totalsize TotalTime Logins Pageviews CompendiumViews LongPR 1 140824 279055 73 1818 504 130 2 110459 212408 75 1433 510 143 3 105079 233939 83 2059 710 118 4 112098 222117 106 2733 1154 146 5 43929 189911 56 1399 415 73 6 76173 70849 28 631 179 89 7 187326 605767 135 5460 2563 146 8 22807 33186 19 381 111 22 9 144408 227332 62 2150 763 132 10 66485 267925 49 2042 661 92 11 79089 371987 122 2536 981 147 12 81625 264989 131 2377 733 203 13 68788 212638 87 2100 785 113 14 103297 368577 85 3020 1186 171 15 69446 269455 88 2265 724 87 16 114948 398124 191 5139 1774 208 17 167949 335567 77 2363 845 153 18 125081 432711 173 3564 1390 97 19 125818 182016 58 1477 514 95 20 136588 267365 89 2398 692 197 21 112431 279428 73 2546 847 160 22 103037 508849 111 3150 1397 148 23 82317 220142 49 1705 569 84 24 118906 200004 58 1787 636 227 25 83515 257139 133 3792 1370 154 26 104581 270941 138 3108 1092 151 27 103129 324969 134 3230 1201 142 28 83243 329962 92 2348 763 148 29 37110 190867 60 1780 652 110 30 113344 393860 79 3218 1213 149 31 139165 327660 89 2692 1111 179 32 86652 269239 83 2187 758 149 33 112302 396136 106 2577 906 187 34 69652 130446 49 1293 456 153 35 119442 430118 104 3567 1293 163 36 69867 273950 56 2764 1186 127 37 101629 428077 128 3755 1348 151 38 70168 254312 93 2075 695 100 39 31081 120351 35 995 306 46 40 103925 395658 212 3750 1319 156 41 92622 345875 86 3413 1566 128 42 79011 216827 82 2053 784 111 43 93487 224524 83 1984 730 119 44 64520 182485 69 1825 488 148 45 93473 157164 85 2599 1051 65 46 114360 459455 157 5572 2089 134 47 33032 78800 42 918 330 66 48 96125 255072 85 2685 764 201 49 151911 368086 123 4145 1410 177 50 89256 230299 70 2841 1187 156 51 95676 244782 81 2175 691 158 52 5950 24188 24 496 218 7 53 149695 400109 334 2699 865 175 54 32551 65029 17 744 255 61 55 31701 101097 64 1161 454 41 56 100087 309810 67 3333 1229 133 57 169707 375638 91 2970 790 228 58 150491 367127 204 3968 1208 140 59 120192 381998 155 2878 1102 155 60 95893 280106 90 2399 919 141 61 151715 400971 153 4121 1352 181 62 176225 315924 122 3294 1190 75 63 59900 291391 124 3132 1257 97 64 104767 295075 93 2868 1030 142 65 114799 280018 81 1778 669 136 66 72128 267432 71 2109 542 87 67 143592 217181 141 2148 652 140 68 89626 258166 159 3009 894 169 69 131072 264771 88 2562 917 129 70 126817 182961 73 1737 637 92 71 81351 256967 74 2680 900 160 72 22618 73566 32 893 385 67 73 88977 272362 93 2389 784 179 74 92059 229056 62 2197 910 90 75 81897 229851 70 2227 781 144 76 108146 371391 91 2370 1001 144 77 126372 398210 104 3226 1265 144 78 249771 220419 111 1978 587 134 79 71154 231884 72 2516 767 146 80 71571 219381 73 2147 746 121 81 55918 206169 54 2150 795 112 82 160141 483074 132 4229 1272 145 83 38692 146100 72 1380 657 99 84 102812 295224 109 2449 703 96 85 56622 80953 25 870 437 27 86 15986 217384 63 2700 1060 77 87 123534 179344 62 1574 459 137 88 108535 415550 222 4046 1586 151 89 93879 389059 129 3259 1084 126 90 144551 180679 106 3098 1051 159 91 56750 299505 104 2615 846 101 92 127654 292260 84 2404 732 144 93 65594 199481 68 1932 632 102 94 59938 282361 78 3147 1128 135 95 146975 329281 89 2598 971 147 96 165904 234577 48 2108 711 155 97 169265 297995 67 2193 738 138 98 183500 342490 90 2478 898 113 99 165986 416463 163 4198 1369 248 100 184923 429565 120 4165 1538 116 101 140358 297080 142 2842 893 176 102 149959 331792 71 2562 926 140 103 57224 229772 202 2449 800 59 104 43750 43287 14 602 214 64 105 48029 238089 87 2579 833 40 106 104978 263322 160 2591 906 98 107 100046 302082 61 2957 1288 139 108 101047 321797 95 2786 1079 135 109 197426 193926 96 1477 490 97 110 160902 175138 105 3350 990 142 111 147172 354041 78 2107 677 155 112 109432 303273 91 2332 696 115 113 1168 23668 13 400 156 0 114 83248 196743 79 2233 785 103 115 25162 61857 25 530 192 30 116 45724 217543 54 2033 641 130 117 110529 440711 128 3246 1251 102 118 855 21054 16 387 146 0 119 101382 252805 52 2137 866 77 120 14116 31961 22 492 200 9 121 89506 360436 125 3838 1351 150 122 135356 251948 77 2193 740 163 123 116066 187320 97 1796 524 148 124 144244 180842 58 1907 724 94 125 8773 38214 34 568 276 21 126 102153 280392 56 2602 862 151 127 117440 358276 84 2819 1031 187 128 104128 211775 67 1464 511 171 129 134238 447335 90 3946 1716 170 130 134047 348017 99 2554 884 145 131 279488 441946 133 3506 1201 198 132 79756 215177 43 1552 575 152 133 66089 130177 47 1389 481 112 134 102070 318037 365 3101 1031 173 135 146760 466139 198 4541 1574 177 136 154771 162279 62 1872 575 153 137 165933 416643 140 4403 1827 161 138 64593 178322 86 2113 790 115 139 92280 292443 54 2046 668 147 140 67150 283913 100 2564 905 124 141 128692 244931 127 2073 689 57 142 124089 387072 125 4112 1613 144 143 125386 246963 93 2340 811 126 144 37238 173260 63 2035 716 78 145 140015 346748 108 3241 1034 153 146 150047 178402 60 1991 739 196 147 154451 268750 96 2828 1086 130 148 156349 314070 112 2748 852 159 149 0 1 0 2 0 0 150 6023 14688 10 207 85 0 151 0 98 1 5 0 0 152 0 455 2 8 0 0 153 0 0 0 0 0 0 154 0 0 0 0 0 0 155 84601 291847 95 2449 816 94 156 68946 415421 168 3490 1142 129 157 0 0 0 0 0 0 158 0 203 4 4 0 0 159 1644 7199 5 151 74 0 160 6179 46660 21 475 259 13 161 3926 17547 5 141 69 4 162 52789 121550 46 1145 309 89 163 0 969 2 29 0 0 164 100350 242774 75 2080 695 71 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) TotalTime Logins Pageviews 7728.1307 0.1756 -4.9022 12.2503 CompendiumViews LongPR -35.6397 383.2472 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -62387 -20738 -7728 12969 149222 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 7728.13075 6513.82100 1.186 0.23724 TotalTime 0.17557 0.05538 3.170 0.00183 ** Logins -4.90218 76.92366 -0.064 0.94927 Pageviews 12.25026 12.22909 1.002 0.31800 CompendiumViews -35.63972 26.71519 -1.334 0.18410 LongPR 383.24719 77.16203 4.967 1.75e-06 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 34060 on 158 degrees of freedom Multiple R-squared: 0.5869, Adjusted R-squared: 0.5738 F-statistic: 44.89 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.1335832873 2.671666e-01 8.664167e-01 [2,] 0.2940452917 5.880906e-01 7.059547e-01 [3,] 0.2646155561 5.292311e-01 7.353844e-01 [4,] 0.3112737508 6.225475e-01 6.887262e-01 [5,] 0.2103407660 4.206815e-01 7.896592e-01 [6,] 0.4538772943 9.077546e-01 5.461227e-01 [7,] 0.3582467408 7.164935e-01 6.417533e-01 [8,] 0.2749607137 5.499214e-01 7.250393e-01 [9,] 0.3173521391 6.347043e-01 6.826479e-01 [10,] 0.4351109277 8.702219e-01 5.648891e-01 [11,] 0.4957650292 9.915301e-01 5.042350e-01 [12,] 0.4270851042 8.541702e-01 5.729149e-01 [13,] 0.3546393062 7.092786e-01 6.453607e-01 [14,] 0.4084532641 8.169065e-01 5.915467e-01 [15,] 0.3380339657 6.760679e-01 6.619660e-01 [16,] 0.2855859471 5.711719e-01 7.144141e-01 [17,] 0.2503297162 5.006594e-01 7.496703e-01 [18,] 0.2014394871 4.028790e-01 7.985605e-01 [19,] 0.1559328817 3.118658e-01 8.440671e-01 [20,] 0.1467183870 2.934368e-01 8.532816e-01 [21,] 0.2136855226 4.273710e-01 7.863145e-01 [22,] 0.1784600771 3.569202e-01 8.215399e-01 [23,] 0.1435406221 2.870812e-01 8.564594e-01 [24,] 0.1204318608 2.408637e-01 8.795681e-01 [25,] 0.1004677213 2.009354e-01 8.995323e-01 [26,] 0.0874412136 1.748824e-01 9.125588e-01 [27,] 0.0686789745 1.373579e-01 9.313210e-01 [28,] 0.0791816091 1.583632e-01 9.208184e-01 [29,] 0.0678328233 1.356656e-01 9.321672e-01 [30,] 0.0530774052 1.061548e-01 9.469226e-01 [31,] 0.0446806198 8.936124e-02 9.553194e-01 [32,] 0.0346509113 6.930182e-02 9.653491e-01 [33,] 0.0285743494 5.714870e-02 9.714257e-01 [34,] 0.0204870130 4.097403e-02 9.795130e-01 [35,] 0.0147393356 2.947867e-02 9.852607e-01 [36,] 0.0132018225 2.640365e-02 9.867982e-01 [37,] 0.0138708700 2.774174e-02 9.861291e-01 [38,] 0.0098599031 1.971981e-02 9.901401e-01 [39,] 0.0079848674 1.596973e-02 9.920151e-01 [40,] 0.0067257426 1.345149e-02 9.932743e-01 [41,] 0.0068794934 1.375899e-02 9.931205e-01 [42,] 0.0051674840 1.033497e-02 9.948325e-01 [43,] 0.0036688441 7.337688e-03 9.963312e-01 [44,] 0.0028586666 5.717333e-03 9.971413e-01 [45,] 0.0028192390 5.638478e-03 9.971808e-01 [46,] 0.0019874752 3.974950e-03 9.980125e-01 [47,] 0.0013816850 2.763370e-03 9.986183e-01 [48,] 0.0009109368 1.821874e-03 9.990891e-01 [49,] 0.0009442528 1.888506e-03 9.990557e-01 [50,] 0.0011006922 2.201384e-03 9.988993e-01 [51,] 0.0007321552 1.464310e-03 9.992678e-01 [52,] 0.0004863103 9.726206e-04 9.995137e-01 [53,] 0.0003572257 7.144515e-04 9.996428e-01 [54,] 0.0060334041 1.206681e-02 9.939666e-01 [55,] 0.0058954911 1.179098e-02 9.941045e-01 [56,] 0.0041948966 8.389793e-03 9.958051e-01 [57,] 0.0031914779 6.382956e-03 9.968085e-01 [58,] 0.0025242402 5.048480e-03 9.974758e-01 [59,] 0.0037729741 7.545948e-03 9.962270e-01 [60,] 0.0035485336 7.097067e-03 9.964515e-01 [61,] 0.0036261413 7.252283e-03 9.963739e-01 [62,] 0.0066593079 1.331862e-02 9.933407e-01 [63,] 0.0063622308 1.272446e-02 9.936378e-01 [64,] 0.0054415223 1.088304e-02 9.945585e-01 [65,] 0.0056849058 1.136981e-02 9.943151e-01 [66,] 0.0043539510 8.707902e-03 9.956460e-01 [67,] 0.0035259021 7.051804e-03 9.964741e-01 [68,] 0.0026251337 5.250267e-03 9.973749e-01 [69,] 0.0018414432 3.682886e-03 9.981586e-01 [70,] 0.2691797728 5.383595e-01 7.308202e-01 [71,] 0.2776428604 5.552857e-01 7.223571e-01 [72,] 0.2565442934 5.130886e-01 7.434557e-01 [73,] 0.2497823230 4.995646e-01 7.502177e-01 [74,] 0.2189953467 4.379907e-01 7.810047e-01 [75,] 0.2104967483 4.209935e-01 7.895033e-01 [76,] 0.1787936524 3.575873e-01 8.212063e-01 [77,] 0.1680973661 3.361947e-01 8.319026e-01 [78,] 0.2233326797 4.466654e-01 7.766673e-01 [79,] 0.2150959867 4.301920e-01 7.849040e-01 [80,] 0.1988465933 3.976932e-01 8.011534e-01 [81,] 0.1961609755 3.923220e-01 8.038390e-01 [82,] 0.2177637194 4.355274e-01 7.822363e-01 [83,] 0.2470296046 4.940592e-01 7.529704e-01 [84,] 0.2178189203 4.356378e-01 7.821811e-01 [85,] 0.1966060738 3.932121e-01 8.033939e-01 [86,] 0.2409591137 4.819182e-01 7.590409e-01 [87,] 0.2293252492 4.586505e-01 7.706748e-01 [88,] 0.2898979423 5.797959e-01 7.101021e-01 [89,] 0.3500361180 7.000722e-01 6.499639e-01 [90,] 0.5105934481 9.788131e-01 4.894066e-01 [91,] 0.4962551482 9.925103e-01 5.037449e-01 [92,] 0.5914743907 8.170512e-01 4.085256e-01 [93,] 0.5497231117 9.005538e-01 4.502769e-01 [94,] 0.5386642580 9.226715e-01 4.613357e-01 [95,] 0.4995418569 9.990837e-01 5.004581e-01 [96,] 0.4518106453 9.036213e-01 5.481894e-01 [97,] 0.4191481836 8.382964e-01 5.808518e-01 [98,] 0.3794049107 7.588098e-01 6.205951e-01 [99,] 0.3379764700 6.759529e-01 6.620235e-01 [100,] 0.3015533599 6.031067e-01 6.984466e-01 [101,] 0.8026503692 3.946993e-01 1.973496e-01 [102,] 0.8459872244 3.080256e-01 1.540128e-01 [103,] 0.8201556387 3.596887e-01 1.798444e-01 [104,] 0.7853023289 4.293953e-01 2.146977e-01 [105,] 0.7505201709 4.989597e-01 2.494798e-01 [106,] 0.7081002343 5.837995e-01 2.918998e-01 [107,] 0.6638323121 6.723354e-01 3.361677e-01 [108,] 0.7474454537 5.051091e-01 2.525545e-01 [109,] 0.7048894163 5.902212e-01 2.951106e-01 [110,] 0.6615486085 6.769028e-01 3.384514e-01 [111,] 0.6364073105 7.271854e-01 3.635927e-01 [112,] 0.5865366347 8.269267e-01 4.134634e-01 [113,] 0.6412966849 7.174066e-01 3.587033e-01 [114,] 0.5980236620 8.039527e-01 4.019763e-01 [115,] 0.5482086548 9.035827e-01 4.517913e-01 [116,] 0.6967078898 6.065842e-01 3.032921e-01 [117,] 0.6490437780 7.019124e-01 3.509562e-01 [118,] 0.6309134272 7.381731e-01 3.690866e-01 [119,] 0.6291658642 7.416683e-01 3.708341e-01 [120,] 0.5890594841 8.218810e-01 4.109405e-01 [121,] 0.5624743385 8.750513e-01 4.375257e-01 [122,] 0.5055136676 9.889727e-01 4.944863e-01 [123,] 0.9593636115 8.127278e-02 4.063639e-02 [124,] 0.9507100411 9.857992e-02 4.928996e-02 [125,] 0.9395062227 1.209876e-01 6.049378e-02 [126,] 0.9362100284 1.275799e-01 6.378997e-02 [127,] 0.9261081371 1.477837e-01 7.389186e-02 [128,] 0.9421758518 1.156483e-01 5.782415e-02 [129,] 0.9273076698 1.453847e-01 7.269233e-02 [130,] 0.9409005184 1.181990e-01 5.909948e-02 [131,] 0.9170014426 1.659971e-01 8.299856e-02 [132,] 0.9466351003 1.067298e-01 5.336490e-02 [133,] 0.9989635128 2.072974e-03 1.036487e-03 [134,] 0.9992782174 1.443565e-03 7.217826e-04 [135,] 0.9993266790 1.346642e-03 6.733210e-04 [136,] 0.9998142214 3.715572e-04 1.857786e-04 [137,] 0.9999791948 4.161033e-05 2.080517e-05 [138,] 0.9999777298 4.454045e-05 2.227022e-05 [139,] 0.9999291057 1.417887e-04 7.089433e-05 [140,] 0.9999999212 1.575917e-07 7.879587e-08 [141,] 0.9999994381 1.123833e-06 5.619166e-07 [142,] 0.9999960747 7.850554e-06 3.925277e-06 [143,] 0.9999741768 5.164647e-05 2.582324e-05 [144,] 0.9998473409 3.053183e-04 1.526591e-04 [145,] 0.9991209234 1.758153e-03 8.790766e-04 [146,] 0.9953483352 9.303330e-03 4.651665e-03 [147,] 0.9956242483 8.751503e-03 4.375752e-03 > postscript(file="/var/www/rcomp/tmp/1nuan1324656821.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/www/rcomp/tmp/2tvf51324656821.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/www/rcomp/tmp/3rlre1324656821.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/www/rcomp/tmp/45evy1324656821.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/www/rcomp/tmp/539gd1324656821.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 30328.4115 11622.6299 11542.0374 17585.8549 -27192.5990 20683.5279 7 8 9 10 11 12 42407.2002 202.6541 47336.7756 -24759.3383 -45793.5084 -52780.0918 13 14 15 16 17 18 -16902.5112 -28989.1002 -20446.0504 -41188.4297 44213.0854 10932.7223 19 20 21 22 23 24 50233.7311 2140.8532 -6321.2590 -39007.5381 3377.5453 -9874.6468 25 26 27 28 29 30 -25354.5417 -7066.2165 -12184.2806 -40257.7606 -44560.7200 -16442.3760 31 32 33 34 35 36 12361.5733 -24820.6922 -35403.9921 -18963.4627 -23377.3849 -25948.3390 37 38 39 40 41 42 -36458.2856 -20729.0476 -16518.6111 -30947.1258 -10464.9606 -6132.8819 43 44 45 46 47 48 2851.3776 -36594.5139 39275.5920 -18428.7530 -13104.3671 -38666.1861 49 50 51 52 53 54 11799.6590 -10848.5543 -17202.5817 -6896.6478 4052.3582 -9915.2985 55 56 57 58 59 60 -7218.5868 -9707.8502 864.6824 20094.3291 -9229.5621 -11246.4154 61 62 63 64 65 66 2670.9079 86942.4623 -29124.4262 -7158.4775 8244.6335 -22067.5913 67 68 69 70 71 72 41692.8070 -32417.6595 29146.0919 53488.7063 -33205.4332 -20765.2438 73 74 75 76 77 78 -36040.3219 15444.7460 -20477.9977 -12887.7548 -384.0661 149221.6807 79 80 81 82 83 84 -36373.9103 -20403.7220 -28671.3678 6201.5546 -25765.9783 2046.8382 85 86 87 88 89 90 29372.3897 -54407.7695 29193.6297 -21974.6451 -31104.4388 44189.8134 91 92 93 94 95 96 -43644.6014 10475.6317 -17058.7483 -47071.1705 28312.8423 57338.6761 97 98 99 100 101 102 56094.5082 74422.3320 -11744.0095 61697.8353 10726.1652 32287.6906 103 104 105 106 107 108 -13956.4317 4214.8782 -18310.1530 14792.8232 -4012.0732 -10126.7464 109 110 111 112 113 114 118315.0875 62762.8763 16579.5444 1067.5148 -9992.1809 2512.1971 115 116 117 118 119 120 -4451.2458 -51816.0253 -8219.0369 -10028.6694 24698.1137 -1464.1923 121 122 123 124 125 126 -37246.6394 20809.2565 15878.1376 71465.8304 -10667.5936 -13554.0429 127 128 129 130 131 132 -22236.2305 -5711.4893 -3922.8391 10349.1716 118788.8564 -22313.8265 133 134 135 136 137 138 -7060.9351 -27252.9338 -9205.3620 57778.4639 35212.8320 -15824.9868 139 140 141 142 143 144 -24122.6536 -36613.8486 55898.9717 940.3071 26702.7025 -29905.6577 145 146 147 148 149 150 10448.1446 38121.3943 54246.9992 29792.6064 -7752.8068 -3741.3584 151 152 153 154 155 156 -7801.6861 -7896.2144 -7728.1307 -7728.1307 -10846.0981 -62387.1670 157 158 159 160 161 162 -7728.1307 -7793.1645 -6536.0226 -11208.8380 -7659.5406 -13177.4489 163 164 -8243.7146 22443.3958 > postscript(file="/var/www/rcomp/tmp/6l5m21324656821.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 30328.4115 NA 1 11622.6299 30328.4115 2 11542.0374 11622.6299 3 17585.8549 11542.0374 4 -27192.5990 17585.8549 5 20683.5279 -27192.5990 6 42407.2002 20683.5279 7 202.6541 42407.2002 8 47336.7756 202.6541 9 -24759.3383 47336.7756 10 -45793.5084 -24759.3383 11 -52780.0918 -45793.5084 12 -16902.5112 -52780.0918 13 -28989.1002 -16902.5112 14 -20446.0504 -28989.1002 15 -41188.4297 -20446.0504 16 44213.0854 -41188.4297 17 10932.7223 44213.0854 18 50233.7311 10932.7223 19 2140.8532 50233.7311 20 -6321.2590 2140.8532 21 -39007.5381 -6321.2590 22 3377.5453 -39007.5381 23 -9874.6468 3377.5453 24 -25354.5417 -9874.6468 25 -7066.2165 -25354.5417 26 -12184.2806 -7066.2165 27 -40257.7606 -12184.2806 28 -44560.7200 -40257.7606 29 -16442.3760 -44560.7200 30 12361.5733 -16442.3760 31 -24820.6922 12361.5733 32 -35403.9921 -24820.6922 33 -18963.4627 -35403.9921 34 -23377.3849 -18963.4627 35 -25948.3390 -23377.3849 36 -36458.2856 -25948.3390 37 -20729.0476 -36458.2856 38 -16518.6111 -20729.0476 39 -30947.1258 -16518.6111 40 -10464.9606 -30947.1258 41 -6132.8819 -10464.9606 42 2851.3776 -6132.8819 43 -36594.5139 2851.3776 44 39275.5920 -36594.5139 45 -18428.7530 39275.5920 46 -13104.3671 -18428.7530 47 -38666.1861 -13104.3671 48 11799.6590 -38666.1861 49 -10848.5543 11799.6590 50 -17202.5817 -10848.5543 51 -6896.6478 -17202.5817 52 4052.3582 -6896.6478 53 -9915.2985 4052.3582 54 -7218.5868 -9915.2985 55 -9707.8502 -7218.5868 56 864.6824 -9707.8502 57 20094.3291 864.6824 58 -9229.5621 20094.3291 59 -11246.4154 -9229.5621 60 2670.9079 -11246.4154 61 86942.4623 2670.9079 62 -29124.4262 86942.4623 63 -7158.4775 -29124.4262 64 8244.6335 -7158.4775 65 -22067.5913 8244.6335 66 41692.8070 -22067.5913 67 -32417.6595 41692.8070 68 29146.0919 -32417.6595 69 53488.7063 29146.0919 70 -33205.4332 53488.7063 71 -20765.2438 -33205.4332 72 -36040.3219 -20765.2438 73 15444.7460 -36040.3219 74 -20477.9977 15444.7460 75 -12887.7548 -20477.9977 76 -384.0661 -12887.7548 77 149221.6807 -384.0661 78 -36373.9103 149221.6807 79 -20403.7220 -36373.9103 80 -28671.3678 -20403.7220 81 6201.5546 -28671.3678 82 -25765.9783 6201.5546 83 2046.8382 -25765.9783 84 29372.3897 2046.8382 85 -54407.7695 29372.3897 86 29193.6297 -54407.7695 87 -21974.6451 29193.6297 88 -31104.4388 -21974.6451 89 44189.8134 -31104.4388 90 -43644.6014 44189.8134 91 10475.6317 -43644.6014 92 -17058.7483 10475.6317 93 -47071.1705 -17058.7483 94 28312.8423 -47071.1705 95 57338.6761 28312.8423 96 56094.5082 57338.6761 97 74422.3320 56094.5082 98 -11744.0095 74422.3320 99 61697.8353 -11744.0095 100 10726.1652 61697.8353 101 32287.6906 10726.1652 102 -13956.4317 32287.6906 103 4214.8782 -13956.4317 104 -18310.1530 4214.8782 105 14792.8232 -18310.1530 106 -4012.0732 14792.8232 107 -10126.7464 -4012.0732 108 118315.0875 -10126.7464 109 62762.8763 118315.0875 110 16579.5444 62762.8763 111 1067.5148 16579.5444 112 -9992.1809 1067.5148 113 2512.1971 -9992.1809 114 -4451.2458 2512.1971 115 -51816.0253 -4451.2458 116 -8219.0369 -51816.0253 117 -10028.6694 -8219.0369 118 24698.1137 -10028.6694 119 -1464.1923 24698.1137 120 -37246.6394 -1464.1923 121 20809.2565 -37246.6394 122 15878.1376 20809.2565 123 71465.8304 15878.1376 124 -10667.5936 71465.8304 125 -13554.0429 -10667.5936 126 -22236.2305 -13554.0429 127 -5711.4893 -22236.2305 128 -3922.8391 -5711.4893 129 10349.1716 -3922.8391 130 118788.8564 10349.1716 131 -22313.8265 118788.8564 132 -7060.9351 -22313.8265 133 -27252.9338 -7060.9351 134 -9205.3620 -27252.9338 135 57778.4639 -9205.3620 136 35212.8320 57778.4639 137 -15824.9868 35212.8320 138 -24122.6536 -15824.9868 139 -36613.8486 -24122.6536 140 55898.9717 -36613.8486 141 940.3071 55898.9717 142 26702.7025 940.3071 143 -29905.6577 26702.7025 144 10448.1446 -29905.6577 145 38121.3943 10448.1446 146 54246.9992 38121.3943 147 29792.6064 54246.9992 148 -7752.8068 29792.6064 149 -3741.3584 -7752.8068 150 -7801.6861 -3741.3584 151 -7896.2144 -7801.6861 152 -7728.1307 -7896.2144 153 -7728.1307 -7728.1307 154 -10846.0981 -7728.1307 155 -62387.1670 -10846.0981 156 -7728.1307 -62387.1670 157 -7793.1645 -7728.1307 158 -6536.0226 -7793.1645 159 -11208.8380 -6536.0226 160 -7659.5406 -11208.8380 161 -13177.4489 -7659.5406 162 -8243.7146 -13177.4489 163 22443.3958 -8243.7146 164 NA 22443.3958 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 11622.6299 30328.4115 [2,] 11542.0374 11622.6299 [3,] 17585.8549 11542.0374 [4,] -27192.5990 17585.8549 [5,] 20683.5279 -27192.5990 [6,] 42407.2002 20683.5279 [7,] 202.6541 42407.2002 [8,] 47336.7756 202.6541 [9,] -24759.3383 47336.7756 [10,] -45793.5084 -24759.3383 [11,] -52780.0918 -45793.5084 [12,] -16902.5112 -52780.0918 [13,] -28989.1002 -16902.5112 [14,] -20446.0504 -28989.1002 [15,] -41188.4297 -20446.0504 [16,] 44213.0854 -41188.4297 [17,] 10932.7223 44213.0854 [18,] 50233.7311 10932.7223 [19,] 2140.8532 50233.7311 [20,] -6321.2590 2140.8532 [21,] -39007.5381 -6321.2590 [22,] 3377.5453 -39007.5381 [23,] -9874.6468 3377.5453 [24,] -25354.5417 -9874.6468 [25,] -7066.2165 -25354.5417 [26,] -12184.2806 -7066.2165 [27,] -40257.7606 -12184.2806 [28,] -44560.7200 -40257.7606 [29,] -16442.3760 -44560.7200 [30,] 12361.5733 -16442.3760 [31,] -24820.6922 12361.5733 [32,] -35403.9921 -24820.6922 [33,] -18963.4627 -35403.9921 [34,] -23377.3849 -18963.4627 [35,] -25948.3390 -23377.3849 [36,] -36458.2856 -25948.3390 [37,] -20729.0476 -36458.2856 [38,] -16518.6111 -20729.0476 [39,] -30947.1258 -16518.6111 [40,] -10464.9606 -30947.1258 [41,] -6132.8819 -10464.9606 [42,] 2851.3776 -6132.8819 [43,] -36594.5139 2851.3776 [44,] 39275.5920 -36594.5139 [45,] -18428.7530 39275.5920 [46,] -13104.3671 -18428.7530 [47,] -38666.1861 -13104.3671 [48,] 11799.6590 -38666.1861 [49,] -10848.5543 11799.6590 [50,] -17202.5817 -10848.5543 [51,] -6896.6478 -17202.5817 [52,] 4052.3582 -6896.6478 [53,] -9915.2985 4052.3582 [54,] -7218.5868 -9915.2985 [55,] -9707.8502 -7218.5868 [56,] 864.6824 -9707.8502 [57,] 20094.3291 864.6824 [58,] -9229.5621 20094.3291 [59,] -11246.4154 -9229.5621 [60,] 2670.9079 -11246.4154 [61,] 86942.4623 2670.9079 [62,] -29124.4262 86942.4623 [63,] -7158.4775 -29124.4262 [64,] 8244.6335 -7158.4775 [65,] -22067.5913 8244.6335 [66,] 41692.8070 -22067.5913 [67,] -32417.6595 41692.8070 [68,] 29146.0919 -32417.6595 [69,] 53488.7063 29146.0919 [70,] -33205.4332 53488.7063 [71,] -20765.2438 -33205.4332 [72,] -36040.3219 -20765.2438 [73,] 15444.7460 -36040.3219 [74,] -20477.9977 15444.7460 [75,] -12887.7548 -20477.9977 [76,] -384.0661 -12887.7548 [77,] 149221.6807 -384.0661 [78,] -36373.9103 149221.6807 [79,] -20403.7220 -36373.9103 [80,] -28671.3678 -20403.7220 [81,] 6201.5546 -28671.3678 [82,] -25765.9783 6201.5546 [83,] 2046.8382 -25765.9783 [84,] 29372.3897 2046.8382 [85,] -54407.7695 29372.3897 [86,] 29193.6297 -54407.7695 [87,] -21974.6451 29193.6297 [88,] -31104.4388 -21974.6451 [89,] 44189.8134 -31104.4388 [90,] -43644.6014 44189.8134 [91,] 10475.6317 -43644.6014 [92,] -17058.7483 10475.6317 [93,] -47071.1705 -17058.7483 [94,] 28312.8423 -47071.1705 [95,] 57338.6761 28312.8423 [96,] 56094.5082 57338.6761 [97,] 74422.3320 56094.5082 [98,] -11744.0095 74422.3320 [99,] 61697.8353 -11744.0095 [100,] 10726.1652 61697.8353 [101,] 32287.6906 10726.1652 [102,] -13956.4317 32287.6906 [103,] 4214.8782 -13956.4317 [104,] -18310.1530 4214.8782 [105,] 14792.8232 -18310.1530 [106,] -4012.0732 14792.8232 [107,] -10126.7464 -4012.0732 [108,] 118315.0875 -10126.7464 [109,] 62762.8763 118315.0875 [110,] 16579.5444 62762.8763 [111,] 1067.5148 16579.5444 [112,] -9992.1809 1067.5148 [113,] 2512.1971 -9992.1809 [114,] -4451.2458 2512.1971 [115,] -51816.0253 -4451.2458 [116,] -8219.0369 -51816.0253 [117,] -10028.6694 -8219.0369 [118,] 24698.1137 -10028.6694 [119,] -1464.1923 24698.1137 [120,] -37246.6394 -1464.1923 [121,] 20809.2565 -37246.6394 [122,] 15878.1376 20809.2565 [123,] 71465.8304 15878.1376 [124,] -10667.5936 71465.8304 [125,] -13554.0429 -10667.5936 [126,] -22236.2305 -13554.0429 [127,] -5711.4893 -22236.2305 [128,] -3922.8391 -5711.4893 [129,] 10349.1716 -3922.8391 [130,] 118788.8564 10349.1716 [131,] -22313.8265 118788.8564 [132,] -7060.9351 -22313.8265 [133,] -27252.9338 -7060.9351 [134,] -9205.3620 -27252.9338 [135,] 57778.4639 -9205.3620 [136,] 35212.8320 57778.4639 [137,] -15824.9868 35212.8320 [138,] -24122.6536 -15824.9868 [139,] -36613.8486 -24122.6536 [140,] 55898.9717 -36613.8486 [141,] 940.3071 55898.9717 [142,] 26702.7025 940.3071 [143,] -29905.6577 26702.7025 [144,] 10448.1446 -29905.6577 [145,] 38121.3943 10448.1446 [146,] 54246.9992 38121.3943 [147,] 29792.6064 54246.9992 [148,] -7752.8068 29792.6064 [149,] -3741.3584 -7752.8068 [150,] -7801.6861 -3741.3584 [151,] -7896.2144 -7801.6861 [152,] -7728.1307 -7896.2144 [153,] -7728.1307 -7728.1307 [154,] -10846.0981 -7728.1307 [155,] -62387.1670 -10846.0981 [156,] -7728.1307 -62387.1670 [157,] -7793.1645 -7728.1307 [158,] -6536.0226 -7793.1645 [159,] -11208.8380 -6536.0226 [160,] -7659.5406 -11208.8380 [161,] -13177.4489 -7659.5406 [162,] -8243.7146 -13177.4489 [163,] 22443.3958 -8243.7146 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 11622.6299 30328.4115 2 11542.0374 11622.6299 3 17585.8549 11542.0374 4 -27192.5990 17585.8549 5 20683.5279 -27192.5990 6 42407.2002 20683.5279 7 202.6541 42407.2002 8 47336.7756 202.6541 9 -24759.3383 47336.7756 10 -45793.5084 -24759.3383 11 -52780.0918 -45793.5084 12 -16902.5112 -52780.0918 13 -28989.1002 -16902.5112 14 -20446.0504 -28989.1002 15 -41188.4297 -20446.0504 16 44213.0854 -41188.4297 17 10932.7223 44213.0854 18 50233.7311 10932.7223 19 2140.8532 50233.7311 20 -6321.2590 2140.8532 21 -39007.5381 -6321.2590 22 3377.5453 -39007.5381 23 -9874.6468 3377.5453 24 -25354.5417 -9874.6468 25 -7066.2165 -25354.5417 26 -12184.2806 -7066.2165 27 -40257.7606 -12184.2806 28 -44560.7200 -40257.7606 29 -16442.3760 -44560.7200 30 12361.5733 -16442.3760 31 -24820.6922 12361.5733 32 -35403.9921 -24820.6922 33 -18963.4627 -35403.9921 34 -23377.3849 -18963.4627 35 -25948.3390 -23377.3849 36 -36458.2856 -25948.3390 37 -20729.0476 -36458.2856 38 -16518.6111 -20729.0476 39 -30947.1258 -16518.6111 40 -10464.9606 -30947.1258 41 -6132.8819 -10464.9606 42 2851.3776 -6132.8819 43 -36594.5139 2851.3776 44 39275.5920 -36594.5139 45 -18428.7530 39275.5920 46 -13104.3671 -18428.7530 47 -38666.1861 -13104.3671 48 11799.6590 -38666.1861 49 -10848.5543 11799.6590 50 -17202.5817 -10848.5543 51 -6896.6478 -17202.5817 52 4052.3582 -6896.6478 53 -9915.2985 4052.3582 54 -7218.5868 -9915.2985 55 -9707.8502 -7218.5868 56 864.6824 -9707.8502 57 20094.3291 864.6824 58 -9229.5621 20094.3291 59 -11246.4154 -9229.5621 60 2670.9079 -11246.4154 61 86942.4623 2670.9079 62 -29124.4262 86942.4623 63 -7158.4775 -29124.4262 64 8244.6335 -7158.4775 65 -22067.5913 8244.6335 66 41692.8070 -22067.5913 67 -32417.6595 41692.8070 68 29146.0919 -32417.6595 69 53488.7063 29146.0919 70 -33205.4332 53488.7063 71 -20765.2438 -33205.4332 72 -36040.3219 -20765.2438 73 15444.7460 -36040.3219 74 -20477.9977 15444.7460 75 -12887.7548 -20477.9977 76 -384.0661 -12887.7548 77 149221.6807 -384.0661 78 -36373.9103 149221.6807 79 -20403.7220 -36373.9103 80 -28671.3678 -20403.7220 81 6201.5546 -28671.3678 82 -25765.9783 6201.5546 83 2046.8382 -25765.9783 84 29372.3897 2046.8382 85 -54407.7695 29372.3897 86 29193.6297 -54407.7695 87 -21974.6451 29193.6297 88 -31104.4388 -21974.6451 89 44189.8134 -31104.4388 90 -43644.6014 44189.8134 91 10475.6317 -43644.6014 92 -17058.7483 10475.6317 93 -47071.1705 -17058.7483 94 28312.8423 -47071.1705 95 57338.6761 28312.8423 96 56094.5082 57338.6761 97 74422.3320 56094.5082 98 -11744.0095 74422.3320 99 61697.8353 -11744.0095 100 10726.1652 61697.8353 101 32287.6906 10726.1652 102 -13956.4317 32287.6906 103 4214.8782 -13956.4317 104 -18310.1530 4214.8782 105 14792.8232 -18310.1530 106 -4012.0732 14792.8232 107 -10126.7464 -4012.0732 108 118315.0875 -10126.7464 109 62762.8763 118315.0875 110 16579.5444 62762.8763 111 1067.5148 16579.5444 112 -9992.1809 1067.5148 113 2512.1971 -9992.1809 114 -4451.2458 2512.1971 115 -51816.0253 -4451.2458 116 -8219.0369 -51816.0253 117 -10028.6694 -8219.0369 118 24698.1137 -10028.6694 119 -1464.1923 24698.1137 120 -37246.6394 -1464.1923 121 20809.2565 -37246.6394 122 15878.1376 20809.2565 123 71465.8304 15878.1376 124 -10667.5936 71465.8304 125 -13554.0429 -10667.5936 126 -22236.2305 -13554.0429 127 -5711.4893 -22236.2305 128 -3922.8391 -5711.4893 129 10349.1716 -3922.8391 130 118788.8564 10349.1716 131 -22313.8265 118788.8564 132 -7060.9351 -22313.8265 133 -27252.9338 -7060.9351 134 -9205.3620 -27252.9338 135 57778.4639 -9205.3620 136 35212.8320 57778.4639 137 -15824.9868 35212.8320 138 -24122.6536 -15824.9868 139 -36613.8486 -24122.6536 140 55898.9717 -36613.8486 141 940.3071 55898.9717 142 26702.7025 940.3071 143 -29905.6577 26702.7025 144 10448.1446 -29905.6577 145 38121.3943 10448.1446 146 54246.9992 38121.3943 147 29792.6064 54246.9992 148 -7752.8068 29792.6064 149 -3741.3584 -7752.8068 150 -7801.6861 -3741.3584 151 -7896.2144 -7801.6861 152 -7728.1307 -7896.2144 153 -7728.1307 -7728.1307 154 -10846.0981 -7728.1307 155 -62387.1670 -10846.0981 156 -7728.1307 -62387.1670 157 -7793.1645 -7728.1307 158 -6536.0226 -7793.1645 159 -11208.8380 -6536.0226 160 -7659.5406 -11208.8380 161 -13177.4489 -7659.5406 162 -8243.7146 -13177.4489 163 22443.3958 -8243.7146 > 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/www/rcomp/tmp/7mgkt1324656821.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/www/rcomp/tmp/8d0h01324656821.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/www/rcomp/tmp/9vsno1324656821.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/www/rcomp/tmp/10n3uf1324656821.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/www/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/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/www/rcomp/tmp/11oluu1324656821.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/www/rcomp/tmp/12zps31324656821.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/www/rcomp/tmp/13z9gl1324656821.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/www/rcomp/tmp/14f3n11324656821.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/www/rcomp/tmp/15j7vw1324656821.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/www/rcomp/tmp/168dx31324656821.tab") + } > > try(system("convert tmp/1nuan1324656821.ps tmp/1nuan1324656821.png",intern=TRUE)) character(0) > try(system("convert tmp/2tvf51324656821.ps tmp/2tvf51324656821.png",intern=TRUE)) character(0) > try(system("convert tmp/3rlre1324656821.ps tmp/3rlre1324656821.png",intern=TRUE)) character(0) > try(system("convert tmp/45evy1324656821.ps tmp/45evy1324656821.png",intern=TRUE)) character(0) > try(system("convert tmp/539gd1324656821.ps tmp/539gd1324656821.png",intern=TRUE)) character(0) > try(system("convert tmp/6l5m21324656821.ps tmp/6l5m21324656821.png",intern=TRUE)) character(0) > try(system("convert tmp/7mgkt1324656821.ps tmp/7mgkt1324656821.png",intern=TRUE)) character(0) > try(system("convert tmp/8d0h01324656821.ps tmp/8d0h01324656821.png",intern=TRUE)) character(0) > try(system("convert tmp/9vsno1324656821.ps tmp/9vsno1324656821.png",intern=TRUE)) character(0) > try(system("convert tmp/10n3uf1324656821.ps tmp/10n3uf1324656821.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 6.03 0.36 6.40