Send output to:
Browser Blue - Charts White
Browser Black/White
CSV
Data X:
1 162556 162556 807 807 213118 213118 6282154 1 29790 29790 444 444 81767 81767 4321023 1 87550 87550 412 412 153198 153198 4111912 0 84738 0 428 0 -26007 0 223193 1 54660 54660 315 315 126942 126942 1491348 1 42634 42634 168 168 157214 157214 1629616 0 40949 0 263 0 129352 0 1398893 1 45187 45187 267 267 234817 234817 1926517 1 37704 37704 228 228 60448 60448 983660 1 16275 16275 129 129 47818 47818 1443586 0 25830 0 104 0 245546 0 1073089 0 12679 0 122 0 48020 0 984885 1 18014 18014 393 393 -1710 -1710 1405225 0 43556 0 190 0 32648 0 227132 1 24811 24811 280 280 95350 95350 929118 0 6575 0 63 0 151352 0 1071292 0 7123 0 102 0 288170 0 638830 1 21950 21950 265 265 114337 114337 856956 1 37597 37597 234 234 37884 37884 992426 0 17821 0 277 0 122844 0 444477 1 12988 12988 73 73 82340 82340 857217 1 22330 22330 67 67 79801 79801 711969 0 13326 0 103 0 165548 0 702380 0 16189 0 290 0 116384 0 358589 0 7146 0 83 0 134028 0 297978 0 15824 0 56 0 63838 0 585715 1 27664 27664 236 236 74996 74996 657954 0 11920 0 73 0 31080 0 209458 0 8568 0 34 0 32168 0 786690 0 14416 0 139 0 49857 0 439798 1 3369 3369 26 26 87161 87161 688779 1 11819 11819 70 70 106113 106113 574339 1 6984 6984 40 40 80570 80570 741409 1 4519 4519 42 42 102129 102129 597793 0 2220 0 12 0 301670 0 644190 0 18562 0 211 0 102313 0 377934 0 10327 0 74 0 88577 0 640273 1 5336 5336 80 80 112477 112477 697458 1 2365 2365 83 83 191778 191778 550608 0 4069 0 131 0 79804 0 207393 0 8636 0 203 0 128294 0 301607 0 13718 0 56 0 96448 0 345783 0 4525 0 89 0 93811 0 501749 0 6869 0 88 0 117520 0 379983 0 4628 0 39 0 69159 0 387475 1 3689 3689 25 25 101792 101792 377305 1 4891 4891 49 49 210568 210568 370837 1 7489 7489 149 149 136996 136996 430866 0 4901 0 58 0 121920 0 469107 0 2284 0 41 0 76403 0 194493 1 3160 3160 90 90 108094 108094 530670 1 4150 4150 136 136 134759 134759 518365 1 7285 7285 97 97 188873 188873 491303 1 1134 1134 63 63 146216 146216 527021 1 4658 4658 114 114 156608 156608 233773 0 2384 0 77 0 61348 0 405972 0 3748 0 6 0 50350 0 652925 0 5371 0 47 0 87720 0 446211 0 1285 0 51 0 99489 0 341340 1 9327 9327 85 85 87419 87419 387699 1 5565 5565 43 43 94355 94355 493408 0 1528 0 32 0 60326 0 146494 1 3122 3122 25 25 94670 94670 414462 1 7561 7561 77 77 82425 82425 364304 0 2675 0 54 0 59017 0 355178 0 13253 0 251 0 90829 0 357760 0 880 0 15 0 80791 0 261216 1 2053 2053 44 44 100423 100423 397144 0 1424 0 73 0 131116 0 374943 1 4036 4036 85 85 100269 100269 424898 1 3045 3045 49 49 27330 27330 202055 0 5119 0 38 0 39039 0 378525 0 1431 0 35 0 106885 0 310768 0 554 0 9 0 79285 0 325738 0 1975 0 34 0 118881 0 394510 1 1765 1765 20 20 77623 77623 247060 0 1012 0 29 0 114768 0 368078 0 810 0 11 0 74015 0 236761 0 1280 0 52 0 69465 0 312378 1 666 666 13 13 117869 117869 339836 0 1380 0 29 0 60982 0 347385 1 4677 4677 66 66 90131 90131 426280 0 876 0 33 0 138971 0 352850 0 814 0 15 0 39625 0 301881 0 514 0 15 0 102725 0 377516 1 5692 5692 68 68 64239 64239 357312 0 3642 0 100 0 90262 0 458343 0 540 0 13 0 103960 0 354228 0 2099 0 45 0 106611 0 308636 0 567 0 14 0 103345 0 386212 0 2001 0 36 0 95551 0 393343 1 2949 2949 40 40 82903 82903 378509 0 2253 0 68 0 63593 0 452469 1 6533 6533 29 29 126910 126910 364839 0 1889 0 43 0 37527 0 358649 1 3055 3055 30 30 60247 60247 376641 0 272 0 9 0 112995 0 429112 1 1414 1414 22 22 70184 70184 330546 0 2564 0 19 0 130140 0 403560 1 1383 1383 9 9 73221 73221 317892 1 1261 1261 31 31 76114 76114 307528 0 975 0 19 0 90534 0 235133 0 3366 0 55 0 108479 0 299243 0 576 0 8 0 113761 0 314073 0 1686 0 28 0 68696 0 368186 0 746 0 29 0 71561 0 269661 1 3192 3192 48 48 59831 59831 125390 1 2045 2045 16 16 97890 97890 510834 0 5702 0 47 0 101481 0 321896 1 1932 1932 20 20 72954 72954 249898 0 936 0 22 0 67939 0 408881 1 3437 3437 33 33 48022 48022 158492 0 5131 0 44 0 86111 0 292154 1 2397 2397 13 13 74020 74020 289513 1 1389 1389 6 6 57530 57530 378049 0 1503 0 35 0 56364 0 343466 0 402 0 8 0 84990 0 332743 0 2239 0 17 0 88590 0 442882 1 2234 2234 11 11 77200 77200 214215 0 837 0 21 0 61262 0 315688 0 10579 0 92 0 110309 0 375195 0 875 0 12 0 67000 0 334280 0 1585 0 112 0 93099 0 355864 1 1659 1659 25 25 107577 107577 480382 1 2647 2647 17 17 62920 62920 353058 1 3294 3294 23 23 75832 75832 217193 0 0 0 0 0 60720 0 315380 0 94 0 10 0 60793 0 314533 0 422 0 23 0 57935 0 318056 0 0 0 0 0 60720 0 315380 0 34 0 7 0 60630 0 314353 0 1558 0 25 0 55637 0 369448 0 0 0 0 0 60720 0 315380 0 43 0 20 0 60887 0 312846 0 645 0 4 0 60720 0 312075 0 316 0 4 0 60505 0 315009 0 115 0 10 0 60945 0 318903 0 5 0 1 0 60720 0 314887 0 897 0 4 0 60720 0 314913 0 0 0 0 0 60720 0 315380 0 389 0 8 0 58990 0 325506 0 0 0 0 0 60720 0 315380 0 1002 0 11 0 56750 0 298568 0 36 0 4 0 60894 0 315834 0 460 0 15 0 63346 0 329784 0 309 0 9 0 56535 0 312878 0 0 0 0 0 60720 0 315380 0 9 0 7 0 60835 0 314987 0 271 0 2 0 60720 0 325249 0 14 0 0 0 61016 0 315877 0 520 0 7 0 58650 0 291650 0 1766 0 46 0 60438 0 305959 0 0 0 5 0 60720 0 315380 0 458 0 7 0 58625 0 297765 0 20 0 2 0 60938 0 315245 0 0 0 0 0 60720 0 315380 0 0 0 0 0 60720 0 315380 0 98 0 2 0 61490 0 315236 0 405 0 5 0 60845 0 336425 0 0 0 0 0 60720 0 315380 0 0 0 0 0 60720 0 315380 0 0 0 0 0 60720 0 315380 0 0 0 0 0 60720 0 315380 0 483 0 7 0 60830 0 306268 0 454 0 24 0 63261 0 302187 0 47 0 1 0 60720 0 314882 0 0 0 0 0 60720 0 315380 0 757 0 18 0 45689 0 382712 0 4655 0 55 0 60720 0 341570 0 0 0 0 0 60720 0 315380 0 0 0 0 0 60720 0 315380 0 36 0 3 0 61564 0 312412 0 0 0 0 0 60720 0 315380 0 203 0 9 0 61938 0 309596 0 0 0 0 0 60720 0 315380 0 126 0 8 0 60951 0 315547 0 400 0 113 0 60720 0 313267 1 71 71 0 0 60745 60745 316176 0 0 0 0 0 60720 0 315380 0 0 0 0 0 60720 0 315380 0 972 0 19 0 71642 0 359335 1 531 531 11 11 71641 71641 330068 0 2461 0 25 0 55792 0 314289 1 378 378 16 16 71873 71873 297413 1 23 23 5 5 62555 62555 314806 1 638 638 11 11 60370 60370 333210 1 2300 2300 23 23 64873 64873 352108 0 149 0 6 0 62041 0 313332 0 226 0 5 0 65745 0 291787 0 0 0 0 0 60720 0 315380 0 275 0 7 0 59500 0 318745 0 0 0 0 0 60720 0 315380 0 141 0 7 0 61630 0 315366 0 0 0 0 0 60720 0 315380 0 28 0 3 0 60890 0 315688 1 0 0 0 0 60720 60720 315380 1 4980 4980 89 89 113521 113521 409642 1 0 0 0 0 60720 60720 315380 1 0 0 0 0 60720 60720 315380 1 472 472 19 19 80045 80045 269587 1 0 0 0 0 60720 60720 315380 1 0 0 0 0 60720 60720 315380 1 0 0 0 0 60720 60720 315380 1 203 203 12 12 50804 50804 300962 1 496 496 12 12 87390 87390 325479 1 10 10 5 5 61656 61656 316155 1 63 63 2 2 65688 65688 318574 1 0 0 0 0 60720 60720 315380 1 1136 1136 26 26 48522 48522 343613 1 265 265 3 3 60720 60720 306948 0 0 0 0 0 60720 0 315380 0 0 0 0 0 60720 0 315380 0 267 0 11 0 57640 0 330059 0 474 0 10 0 61977 0 288985 0 534 0 5 0 62620 0 304485 0 0 0 2 0 60720 0 315380 0 15 0 6 0 60831 0 315688 0 397 0 7 0 60646 0 317736 0 0 0 2 0 60720 0 315380 0 1866 0 28 0 56225 0 322331 0 288 0 3 0 60510 0 296656 0 0 0 0 0 60720 0 315380 0 3 0 1 0 60698 0 315354 0 468 0 20 0 60720 0 312161 0 20 0 1 0 60805 0 315576 0 278 0 22 0 61404 0 314922 0 61 0 9 0 60720 0 314551 0 0 0 0 0 60720 0 315380 0 192 0 2 0 65276 0 312339 0 0 0 0 0 60720 0 315380 0 317 0 7 0 63915 0 298700 0 738 0 9 0 60720 0 321376 0 0 0 0 0 60720 0 315380 0 368 0 13 0 61686 0 303230 0 0 0 0 0 60720 0 315380 0 2 0 0 0 60743 0 315487 0 0 0 0 0 60720 0 315380 0 53 0 6 0 60349 0 315793 0 0 0 0 0 60720 0 315380 0 0 0 0 0 60720 0 315380 0 0 0 0 0 60720 0 315380 0 94 0 3 0 61360 0 312887 0 0 0 0 0 60720 0 315380 0 24 0 7 0 59818 0 315637 0 2332 0 2 0 72680 0 324385 1 0 0 0 0 60720 60720 315380 1 0 0 0 0 60720 60720 315380 0 131 0 15 0 61808 0 308989 1 0 0 0 0 60720 60720 315380 1 0 0 0 0 60720 60720 315380 0 206 0 9 0 53110 0 296702 1 0 0 0 0 60720 60720 315380 0 167 0 1 0 64245 0 307322 0 622 0 38 0 73007 0 304376 0 2328 0 57 0 82732 0 253588 0 0 0 0 0 60720 0 315380 0 365 0 7 0 54820 0 309560 0 364 0 26 0 47705 0 298466 1 0 0 0 0 60720 60720 315380 0 0 0 0 0 60720 0 315380 1 0 0 0 0 60720 60720 315380 1 0 0 0 0 60720 60720 315380 0 226 0 13 0 72835 0 343929 0 307 0 10 0 58856 0 331955 1 0 0 0 0 60720 60720 315380 0 0 0 0 0 60720 0 315380 1 0 0 0 0 60720 60720 315380 0 188 0 9 0 77655 0 381180 1 0 0 0 0 60720 60720 315380 0 138 0 26 0 69817 0 331420 1 0 0 0 0 60720 60720 315380 1 0 0 0 0 60720 60720 315380 1 0 0 0 0 60720 60720 315380 0 125 0 19 0 60798 0 310201 0 0 0 0 0 60720 0 315380 0 282 0 12 0 62452 0 320016 0 335 0 23 0 64175 0 320398 0 0 0 0 0 60720 0 315380 1 1324 1324 29 29 67440 67440 291841 0 176 0 8 0 68136 0 310670 1 0 0 0 0 60720 60720 315380 0 0 0 0 0 60720 0 315380 0 249 0 26 0 56726 0 313491 0 0 0 0 0 60720 0 315380 0 333 0 9 0 70811 0 331323 0 0 0 0 0 60720 0 315380 1 601 601 5 5 60720 60720 319210 0 30 0 3 0 62045 0 318098 1 0 0 0 0 60720 60720 315380 0 249 0 13 0 54323 0 292754 1 0 0 0 0 60720 60720 315380 0 165 0 12 0 62841 0 325176 0 453 0 19 0 81125 0 365959 0 0 0 0 0 60720 0 315380 0 53 0 10 0 59506 0 302409 1 382 382 9 9 59365 59365 340968 0 0 0 0 0 60720 0 315380 1 0 0 0 0 60720 60720 315380 0 0 0 0 0 60720 0 315380 0 0 0 9 0 60720 0 315380 1 30 30 4 4 60798 60798 313164 0 290 0 1 0 58790 0 301164 0 0 0 1 0 60720 0 315380 1 0 0 0 0 60720 60720 315380 0 366 0 14 0 61808 0 344425 0 2 0 12 0 60735 0 315394 1 0 0 0 0 60720 60720 315380 1 209 209 19 19 64016 64016 316647 0 384 0 17 0 54683 0 309836 1 0 0 0 0 60720 60720 315380 1 0 0 0 0 60720 60720 315380 0 365 0 32 0 87192 0 346611 1 0 0 0 0 60720 60720 315380 1 49 49 14 14 64107 64107 322031 0 3 0 8 0 60761 0 315656 0 133 0 4 0 65990 0 339445 0 32 0 0 0 59988 0 314964 0 368 0 20 0 61167 0 297141 0 1 0 5 0 60719 0 315372 0 0 0 0 0 60720 0 315380 0 0 0 0 0 60720 0 315380 0 0 0 0 0 60720 0 315380 0 0 0 0 0 60720 0 315380 1 0 0 0 0 60720 60720 315380 0 0 0 0 0 60720 0 315380 0 22 0 1 0 60722 0 312502 1 0 0 0 0 60720 60720 315380 1 0 0 0 0 60720 60720 315380 0 0 0 0 0 60720 0 315380 0 0 0 0 0 60720 0 315380 0 0 0 0 0 60720 0 315380 0 0 0 0 0 60720 0 315380 0 0 0 0 0 60720 0 315380 0 96 0 4 0 60379 0 313729 0 1 0 1 0 60727 0 315388 0 314 0 4 0 60720 0 315371 0 844 0 20 0 60925 0 296139 0 0 0 0 0 60720 0 315380 0 26 0 1 0 60896 0 313880 0 125 0 10 0 59734 0 317698 0 304 0 12 0 62969 0 295580 0 0 0 0 0 60720 0 315380 0 0 0 0 0 60720 0 315380 0 0 0 0 0 60720 0 315380 0 621 0 13 0 60720 0 308256 0 0 0 0 0 60720 0 315380 0 119 0 3 0 59118 0 303677 0 0 0 0 0 60720 0 315380 0 0 0 0 0 60720 0 315380 0 1595 0 10 0 60720 0 319369 0 312 0 3 0 58598 0 318690 0 60 0 7 0 61124 0 314049 0 587 0 10 0 59595 0 325699 0 135 0 1 0 62065 0 314210 0 0 0 0 0 60720 0 315380 0 0 0 0 0 60720 0 315380 0 514 0 15 0 78780 0 322378 0 0 0 0 0 60720 0 315380 0 0 0 0 0 60720 0 315380 0 0 0 0 0 60720 0 315380 0 1 0 4 0 60722 0 315398 0 0 0 0 0 60720 0 315380 0 0 0 0 0 60720 0 315380 1 1763 1763 28 28 61600 61600 308336 0 180 0 9 0 59635 0 316386 0 0 0 0 0 60720 0 315380 0 0 0 0 0 60720 0 315380 0 0 0 0 0 60720 0 315380 0 0 0 0 0 60720 0 315380 0 218 0 7 0 60720 0 315553 0 0 0 0 0 60720 0 315380 0 448 0 7 0 59781 0 323361 0 227 0 7 0 76644 0 336639 0 174 0 3 0 64820 0 307424 0 0 0 0 0 60720 0 315380 0 0 0 0 0 60720 0 315380 0 121 0 11 0 56178 0 295370 0 607 0 7 0 60436 0 322340 0 2212 0 10 0 60720 0 319864 0 0 0 0 0 60720 0 315380 0 0 0 0 0 60720 0 315380 0 530 0 18 0 73433 0 317291 0 571 0 14 0 41477 0 280398 0 0 0 0 0 60720 0 315380 0 78 0 12 0 62700 0 317330 0 2489 0 29 0 67804 0 238125 0 131 0 3 0 59661 0 327071 0 923 0 6 0 58620 0 309038 0 72 0 3 0 60398 0 314210 0 572 0 8 0 58580 0 307930 0 397 0 10 0 62710 0 322327 0 450 0 6 0 59325 0 292136 0 622 0 8 0 60950 0 263276 0 694 0 6 0 68060 0 367655 1 3425 3425 9 9 83620 83620 283910 0 562 0 8 0 58456 0 283587 0 4917 0 26 0 52811 0 243650 1 1442 1442 239 239 121173 121173 438493 0 529 0 7 0 63870 0 296261 1 2126 2126 41 41 21001 21001 230621 0 1061 0 3 0 70415 0 304252 0 776 0 8 0 64230 0 333505 0 611 0 6 0 59190 0 296919 1 1526 1526 21 21 69351 69351 278990 0 592 0 7 0 64270 0 276898 0 1182 0 11 0 70694 0 327007 0 621 0 11 0 68005 0 317046 0 989 0 12 0 58930 0 304555 0 438 0 9 0 58320 0 298096 0 726 0 3 0 69980 0 231861 0 1303 0 57 0 69863 0 309422 1 7419 7419 21 21 63255 63255 286963 1 1164 1164 15 15 57320 57320 269753 1 3310 3310 32 32 75230 75230 448243 0 1920 0 11 0 79420 0 165404 0 965 0 2 0 73490 0 204325 0 3256 0 23 0 35250 0 407159 1 1135 1135 20 20 62285 62285 290476 0 1270 0 24 0 69206 0 275311 0 661 0 1 0 65920 0 246541 0 1013 0 1 0 69770 0 253468 0 2844 0 74 0 72683 0 240897 1 11528 11528 68 68 -14545 -14545 -83265 0 6526 0 20 0 55830 0 -42143 0 2264 0 20 0 55174 0 272713 1 5109 5109 82 82 67038 67038 215362 0 3999 0 21 0 51252 0 42754 0 35624 0 244 0 157278 0 306275 0 9252 0 32 0 79510 0 253537 0 15236 0 86 0 77440 0 372631 0 18073 0 69 0 27284 0 -7170
Names of X columns:
Group Costs Costs_g Orders Orders_g Dividends Dividends_g Wealth
Sample Range:
(leave blank to include all observations)
From:
To:
Column Number of Endogenous Series
(?)
Fixed Seasonal Effects
Do not include Seasonal Dummies
Do not include Seasonal Dummies
Include Seasonal Dummies
Type of Equation
No Linear Trend
No Linear Trend
Linear Trend
First Differences
Seasonal Differences (s)
First and Seasonal Differences (s)
Degree of Predetermination (lagged endogenous variables)
Degree of Seasonal Predetermination
Seasonality
12
1
2
3
4
5
6
7
8
9
10
11
12
Chart options
R Code
library(lattice) library(lmtest) 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 k <- length(x[1,]) df <- as.data.frame(x) (mylm <- lm(df)) (mysum <- summary(mylm)) 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 } bitmap(file='test0.png') 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() bitmap(file='test1.png') plot(mysum$resid, type='b', pch=19, main='Residuals', ylab='value of Residuals', xlab='time or index') grid() dev.off() bitmap(file='test2.png') hist(mysum$resid, main='Residual Histogram', xlab='values of Residuals') grid() dev.off() bitmap(file='test3.png') densityplot(~mysum$resid,col='black',main='Residual Density Plot', xlab='values of Residuals') dev.off() bitmap(file='test4.png') qqnorm(mysum$resid, main='Residual Normal Q-Q Plot') qqline(mysum$resid) grid() dev.off() (myerror <- as.ts(mysum$resid)) bitmap(file='test5.png') dum <- cbind(lag(myerror,k=1),myerror) dum dum1 <- dum[2:length(myerror),] dum1 z <- as.data.frame(dum1) z 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() bitmap(file='test6.png') acf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Autocorrelation Function') grid() dev.off() bitmap(file='test7.png') pacf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Partial Autocorrelation Function') grid() dev.off() bitmap(file='test8.png') opar <- par(mfrow = c(2,2), oma = c(0, 0, 1.1, 0)) plot(mylm, las = 1, sub='Residual Diagnostics') par(opar) dev.off() if (n > n25) { bitmap(file='test9.png') plot(kp3:nmkm3,gqarr[,2], main='Goldfeld-Quandt test',ylab='2-sided p-value',xlab='breakpoint') grid() dev.off() } load(file='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='mytable1.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<br />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='mytable2.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='mytable3.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<br />Forecast', 1, TRUE) a<-table.element(a, 'Residuals<br />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='mytable4.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='mytable5.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='mytable6.tab') }
Compute
Summary of computational transaction
Raw Input
view raw input (R code)
Raw Output
view raw output of R engine
Computing time
0 seconds
R Server
Big Analytics Cloud Computing Center
Click here to blog (archive) this computation