Send output to:
Browser Blue - Charts White
Browser Black/White
CSV
Data X:
102750 2.75 42.6 6623.30985915 45.498 95276 2.73 42.9 6053.03030303 46.1773 112053 2.82 43.3 7304.45727483 46.1937 98841 2.83 43.6 6421.05504587 46.1272 123102 2.9 43.9 8133.07517084 46.4199 118152 3.05 44.2 8145.24886878 46.4535 101752 3.15 44.3 7236.81715576 46.648 148219 3.26 45.1 10711.41906874 46.5669 124966 3.38 45.2 9333.09734513 46.9866 134741 3.54 45.6 10455.32894737 47.2997 132168 3.81 45.9 10963.94335512 47.548 100950 5.27 46.2 11519.09090909 47.4375 96418 6.71 46.6 13885.70815451 47.1083 86891 9.09 47.2 16725.80508475 46.9634 89796 11.08 47.8 20809.87447699 46.9733 119663 11.91 48 29682.04166667 46.83 130539 11.81 48.6 31719.42386831 47.1848 120851 11.81 49 29118.55102041 47.1292 145422 12.09 49.4 35594.67611336 47.1505 150583 11.95 50 36001.7 46.6882 127054 11.67 50.6 29308.30039526 46.7161 137473 11.6 51.1 31197.00587084 46.536 127094 11.71 51.5 28887.37864078 45.0062 132080 11.62 51.9 29574.18111753 43.4204 188311 11.64 52.1 42086.52591171 42.8246 107487 11.66 52.5 23880.64761905 41.8301 84669 11.67 52.7 18741.63187856 41.3862 149184 11.69 52.9 32957.18336484 41.4258 121026 11.58 53.2 26339.98120301 41.3326 81073 11.4 53.6 17247.85447761 41.6042 132947 11.44 54.2 28063.61623616 42.0025 141294 11.38 54.3 29617.84530387 42.4426 155077 11.31 54.6 32134.54212454 42.9708 145154 11.45 54.9 30284.99089253 43.1611 127094 11.73 55.3 26964.55696203 43.2561 151414 12.11 55.5 33034.72072072 43.7944 167858 12.23 55.6 36908.30935252 44.4309 127070 12.39 55.8 28211.57706093 44.8644 154692 12.34 55.9 34148.33631485 44.916 170905 12.42 56.1 37848.96613191 45.1733 127751 12.37 56.5 27972.74336283 45.3729 173795 12.37 56.8 37835.59859155 45.3841 190181 12.39 57.1 41279.50963222 45.6491 198417 12.43 57.4 42962.97909408 45.9698 183018 12.48 57.6 39648.57638889 46.1015 171608 12.45 57.9 36906.28670121 46.1172 188087 12.58 58 40803.94827586 46.7939 197042 12.59 58.2 42636.39175258 47.2798 208788 12.54 58.5 44760.97435897 47.023 178111 13.01 59.1 39198.59560068 47.7335 236455 13.31 59.5 52903.68067227 48.3415 233219 13.45 60 52275.56666667 48.7789 188106 13.28 60.3 41421.54228856 49.2046 238876 13.38 60.7 52662.47116969 49.5627 205148 13.36 61 44923.31147541 49.6389 214727 13.4 61.2 47027.85947712 49.6517 213428 13.49 61.4 46887.58957655 49.8872 195128 13.47 61.6 42658.03571429 49.9859 206047 13.62 61.9 45321.42164782 50.0357 201773 13.57 62.1 44095.52334944 50.1135 192772 13.59 62.5 41922.208 49.4201 198230 13.48 62.9 42497.77424483 49.6618 181172 13.47 63.4 38501.68769716 50.6053 189079 13.47 63.9 39863.23943662 51.6639 179073 13.36 64.5 37087.36434109 51.8472 197421 13.37 65.2 40492.79141104 52.2056 195244 13.4 65.7 39808.24961948 52.1834 219826 13.41 66 44678.13636364 52.3807 211793 13.37 66.5 42591.71428571 52.5124 203394 13.42 67.1 40677.22801788 52.9384 209578 13.41 67.4 41699.16913947 53.3363 214769 13.46 67.7 42690.31019202 53.6296 226177 13.64 68.3 45153.14787701 53.2837 191449 13.93 69.1 38608.07525326 53.5675 200989 14.46 69.8 41648.2234957 53.7364 216707 14.92 70.6 45802.90368272 53.1571 192882 16.27 71.5 43898.48951049 53.5566 199736 17.36 72.3 47968.69986169 53.5534 202349 19.07 73.1 52789.15184679 53.4808 204137 21.1 73.8 58372.83197832 53.1195 215588 22.39 74.6 64700.09383378 53.1786 229454 23.13 75.2 70564.2287234 53.4617 175048 23.27 75.9 53665.03293808 53.409 212799 24.57 76.7 68155.89308996 53.4536 181727 26.32 77.8 61489.8714653 53.7071 211607 28.57 78.9 76616.67934094 53.7262 185853 30.44 80.1 70627.86516854 53.5481 158277 31.4 81 61353.60493827 52.4571 180695 31.84 81.8 70323.59413203 51.1904 175959 31.86 82.7 67789.04474002 50.5575 139550 32.3 82.7 54505.47762999 50.166 155810 32.93 83.3 61589.65186074 50.353 138305 32.73 84 53892.72619048 51.1727 147014 33.1 84.8 57387.99528302 51.8129 135994 33.23 85.5 52849.83625731 52.7175 166455 33.94 86.3 65464.94785632 53.0142 177737 34.27 87 70022.17241379 52.7119 167021 35.96 87.9 68337.95221843 52.4633 132134 36.25 88.5 54116.80225989 52.7501 169834 36.92 89.1 70377.47474747 52.5233 130599 36.16 89.8 52583.27394209 52.8211 156836 36.59 90.6 63332.16335541 53.0699 119749 35.05 91.6 45827.33624454 53.4044 148996 34.53 92.3 55740.19501625 53.3959 147491 34.07 93.2 53912.92918455 53.0761 147216 33.65 93.4 53040.95289079 52.6972 153455 33.84 93.7 55422.30522946 52.0996 112004 33.99 94 40502.19148936 51.5219 158512 35.41 94.3 59520.46659597 50.4933 104139 35.53 94.6 39112.7589852 51.4979 102536 34.71 94.5 37660.84656085 51.1159 93017 33.2 94.9 32544.1938883 50.6623 91988 32.25 95.8 30964.65553236 50.3505 123616 32.92 97 41954.86597938 50.1943 134498 33.27 97.5 45889.07692308 50.0395 149812 32.91 97.7 50471.07471853 49.6075 110334 32.39 97.9 36508.26353422 49.4584 136639 32.44 98.2 45142.62729124 49.011 102712 32.84 98 34414.2244898 48.8232 112951 32.44 97.6 37543.125 48.4682 107897 32.5 97.8 35856.41104294 49.3992 73242 31.12 97.9 23278.95812053 49.089 72800 30.28 97.9 22513.85086823 49.4906 78767 28.76 98.6 22977.6673428 50.0805 114791 28.59 99.2 33085.77620968 50.4295 109351 28.83 99.5 31681.01507538 50.7333 122520 28.93 99.9 35486.04604605 51.5016 137338 29.31 100.2 40167.63473054 52.0679 132061 29.27 100.7 38385.25322741 52.8472 130607 29.36 101 37961.85148515 53.2874 118570 29.05 101.2 34036.17588933 53.4759 95873 29 101.3 27446.13030602 53.7593 103116 27.65 101.9 27979.85279686 54.8216 98619 27.64 102.4 26619.48242188 55.0698 104178 27.8 102.6 28227.69005848 55.3384 123468 27.84 103.1 33339.83511154 55.6911 99651 27.85 103.4 26840.15473888 55.9506 120264 27.76 103.7 32194.15621986 56.1549 122795 28.05 104.1 33087.48318924 56.3326 108524 27.66 104.5 28725.03349282 56.3847 105760 27.39 105 27588.25714286 56.2832 117191 27.56 105.3 30672.30769231 56.1943 122882 27.55 105.3 32149.98100665 56.4108 93275 27.3 105.3 24182.41215575 56.4759 99842 27.38 105.5 25911.66824645 56.3801 83803 26.91 106 21274.8490566 56.5796 61132 26.05 106.4 14967.0112782 56.6645 118563 26.52 106.9 29413.49859682 56.5122 106993 26.79 107.3 26713.36439888 56.5982 118108 26.52 107.6 29109.77695167 56.6317 99017 25.91 107.8 23798.97959184 56.2637 99852 25.76 108 23816.62962963 56.496 112720 25.42 108.3 26457.53462604 56.7412 113636 25.65 108.7 26814.86660534 56.508 118220 25.69 109 27862.93577982 56.6984 128854 26.04 109.3 30698.61848124 57.2954 123898 25.8 109.6 29165.67518248 57.5555 100823 23.13 109.3 21336.03842635 57.1707 115107 18.1 108.8 19149.27389706 56.7784 90624 12.78 108.6 10664.56721915 56.8228 132001 12.24 108.9 14836.4738292 56.938 157969 12.04 109.5 17369.38812785 56.7427 169333 11.03 109.5 17057.05022831 57.0569 144907 10.09 109.7 13328.24065634 56.9807 169346 11.08 110.2 17026.76043557 57.0954 144666 11.79 110.3 15463.36355394 57.3542 158829 12.23 110.4 17594.9365942 57.623 127286 12.4 110.5 14283.6561086 58.1006 120578 13.86 111.2 15025.79136691 57.9173 129293 15.47 111.6 17925.54659498 58.663 122371 15.87 112.1 17322.14094558 58.7602 115176 16.57 112.7 16937.58651287 59.1416 142168 16.92 113.1 21269.47833775 59.517 153260 17.31 113.5 23380.44052863 59.7996 173906 17.77 113.8 27162.65377856 60.2152 178446 18.07 114.4 28190.27972028 60.7146 155962 17.49 115 23717.05217391 60.8781 168257 17.21 115.3 25114.74414571 61.7569 149456 17.12 115.4 22178.44887348 62.091 136105 16.46 115.4 19415.58058925 62.394 141507 22.4 115.7 27396.30942092 62.4207 152084 15.2 116 19934.55172414 62.6908 145138 14.24 116.5 17741.13304721 62.8421 146548 14.21 117.1 17778.41161401 63.1885 173098 14.69 117.5 21643.38723404 63.1203 165471 14.68 118 20583.70338983 63.2843 152271 14.02 118.5 18010.31223629 63.3155 163201 13.38 119 18351.95798319 63.5859 157823 13.08 119.8 17236.43572621 63.405 166167 11.92 120.2 16471.74708819 63.7184 154253 11.52 120.3 14772.1446384 63.8175 170299 12.34 120.5 17437.43568465 64.1273 166388 13.91 121.1 19107.00247729 64.3162 141051 14.84 121.6 17212.28618421 64.026 160254 15.54 122.3 20363.01717089 64.166 164995 17.33 123.1 23231.89277011 64.222 195971 17.97 123.8 28440.10500808 63.7707 182635 17.27 124.1 25410.58823529 63.8022 189829 16.93 124.4 25836.06913183 63.236 209476 15.95 124.6 26807.58426966 63.8059 189848 16.14 125 24517.152 63.576 183746 16.61 125.6 24299.26751592 63.5346 192682 17.08 125.9 26142.66878475 63.7465 169677 17.72 126.1 23842.48215702 64.1419 201823 18.85 127.4 29858.08477237 63.7117 172643 18.79 128 25338.6015625 64.3504 202931 17.75 128.7 27986.34032634 64.6721 175863 16.02 128.9 21862.82389449 64.5975 222061 14.61 129.2 25102.22136223 64.7028 199797 13.83 129.9 21264.41878368 64.9174 214638 13.92 130.4 22918.76533742 64.8436 200106 19.57 131.6 29753.06231003 65.043 166077 25.63 132.7 32073.51921628 65.1372 160586 30.08 133.5 36178.21722846 64.6442 158330 29.51 133.8 34918.44544096 63.8853 141749 25.75 133.8 27279.6038864 63.4658 170795 22.98 134.6 29158.08320951 63.1915 153286 18.39 134.8 20908.76854599 62.7585 163426 16.75 135 20272.04444444 62.4265 172562 16.39 135.2 20918.16568047 62.5503 197474 16.57 135.6 24123.97492625 63.1756 189822 16.4 136 22885.13235294 63.742 188511 16.15 136.2 22348.41409692 63.8029 207437 16.8 136.6 25513.31625183 63.8503 192128 17.14 137.2 24003.62244898 64.4151 175716 17.97 137.4 22982.56914119 64.2992 159108 18.06 137.8 20854.09288824 64.2209 175801 16.6 137.9 21160.74691806 63.9602 186723 14.87 138.1 20102.19406227 63.596 154970 14.42 138.6 16122.15007215 64.0409 172446 14.48 139.3 17922.90739411 64.5973 185965 15.5 139.5 20664.40860215 65.0756 195525 16.74 139.7 23432.09019327 65.2831 193156 18.27 140.2 25170.92724679 65.2957 212705 18.2 140.5 27552.25622776 65.8801 201357 18.03 140.9 25772.68985096 65.5581 189971 17.86 141.3 24009.35598018 65.715 216523 18.22 141.8 27820.56417489 66.2013 193233 17.63 142 23985.67605634 66.4879 191996 16.22 141.9 21950.18322763 66.5431 211974 15.5 142.6 23040.25245442 66.8264 175907 15.71 143.1 19314.72396925 67.1172 206109 16.49 143.6 23673.83704735 67.0479 220275 16.69 144 25536.94444444 67.2498 211342 16.71 144.2 24491.3037448 67.0325 222528 16.07 144.4 24759.70914127 67.1532 229523 14.96 144.4 23784.75069252 67.3586 204153 14.51 144.8 20451.26381215 67.2888 206735 14.37 145.1 20472.26740179 67.6092 223416 14.59 145.7 22377.92038435 68.1214 228292 13.72 145.8 21477.25651578 68.4089 203121 12.2 145.8 16994.74622771 68.7737 205957 11.64 146.2 16400.32147743 69.0299 176918 12.09 146.7 14574.8125426 69.0418 219839 11.76 147.2 17563.97418478 69.7582 217213 12.85 147.4 18940.82767978 70.125 216618 14.05 147.5 20637.56610169 70.4978 248057 15.18 148 25449.46621622 70.948 245642 16.09 148.4 26630.3638814 71.0595 242485 15.97 149 25994.23489933 71.4749 260423 15 149.4 26139.18340027 71.7333 221030 14.8 149.5 21874.1270903 72.3479 229157 15.31 149.7 23431.69672679 72.8018 220858 14.7 149.7 21693.52037408 73.5563 212270 15.06 150.3 21264.94344644 73.6891 195944 15.53 150.9 20166.66003976 73.5889 239741 15.78 151.4 24981.96169089 73.6895 212013 16.76 151.9 23390.46741277 73.676 240514 17.4 152.2 27491.07752957 73.8858 241982 16.78 152.5 26627.42295082 74.1391 245447 15.51 152.5 24960.8852459 73.8447 240839 15.22 152.9 23967.44277305 74.7803 244875 15.44 153.2 24675.37859008 75.0755 226375 15.25 153.7 22455.53025374 74.9925 231567 15.1 153.6 22770.61197917 75.1822 235746 15.82 153.5 24298.84039088 75.4725 238990 16.43 154.4 25431.03626943 74.9823 198120 16.1 154.9 20588.9477082 76.153 201663 17.31 155.7 22425.60051381 76.0724 238198 19.27 156.3 29362.93666027 76.7608 261641 18.9 156.6 31575.4916986 77.3269 253014 17.96 156.7 28999.68091895 77.9694 275225 18.16 157 31835.37579618 77.8351 250957 18.65 157.3 29757.71773681 78.3005 260375 19.97 157.8 32951.50190114 78.8378 250694 21.41 158.3 33906.94251421 78.7843 216953 21.38 158.6 29242.33291299 79.4683 247816 21.63 158.6 33801.50693569 79.9829 224135 21.86 159.1 30798.91263356 80.0837 211073 20.48 159.6 27091.43483709 81.0483 245623 18.76 160 28799.36875 81.6195 250947 17.13 160.2 26829.60049938 81.6408 278223 17.06 160.1 29639.86883198 82.1311 254232 16.85 160.3 26729.23268871 82.5332 266293 16.41 160.5 27220.28037383 83.1538 280897 16.95 160.8 29611.67910448 84.0293 274565 16.73 161.2 28493.98883375 84.7873 280555 17.71 161.6 30740.16089109 85.5125 252757 17.25 161.5 27001.85139319 86.2601 250131 16.05 161.3 24884.77371358 86.5262 271208 14.31 161.6 24013.90470297 86.9662 230593 13.02 161.9 18540.43236566 87.0687 263407 11.88 162.2 19290.62885327 87.1414 289968 11.77 162.5 20998.33230769 87.4497 282846 11.8 162.8 20499.20761671 88.0124 271314 11.12 163 18517.43558282 87.4571 289718 10.78 163.2 19131.00490196 87.1484 300227 10.55 163.4 19378.67197062 88.936 259951 10.99 163.6 17465.50733496 88.778 263149 11.66 164 18712.80487805 89.4857 267953 10.79 164 17624.22560976 89.4358 252378 9.38 163.9 14446.68700427 89.7761 280356 9.21 164.3 15709.82958004 90.1893 234298 9.48 164.5 13501.94528875 90.6683 271574 10.5 165 17277.1030303 90.831 262378 12.88 166.2 20330.31287605 91.0632 289457 14.6 166.2 25425.03610108 91.7311 278274 14.52 166.2 24310.04211793 91.5818 288932 16.11 166.7 27916.83263347 92.1587 283813 17.88 167.1 30361.90903651 92.5363 267600 19.69 167.9 31387.44490768 92.1699 267574 20.76 168.2 33031.97978597 93.3786 254862 21.05 168.3 31880.32085561 93.824 248974 22.79 168.3 33709.06714201 94.5441 256840 23.31 168.8 35467.72511848 94.5458 250914 25.14 169.8 37142.6442874 94.8185 279334 26.41 171.2 43085.64836449 95.1983 286549 24.41 171.3 40838.32457677 95.8921 302266 24.28 171.5 42798.75801749 96.0691 298205 26.78 172.4 46326.14849188 96.1568 300843 27.73 172.8 48279.57175926 96.0239 312955 26.59 172.8 48150.66550926 95.7182 275962 29.03 173.7 46127.36902706 96.1105 299561 28.57 174 49179.31034483 95.8225 260975 28.34 174.1 42478.01838024 95.8391 274836 26.4 174 41701.63793103 95.5791 284112 23.19 175.1 37621.50199886 94.9499 247331 23.85 175.8 33550.83617747 94.369 298120 22.75 176.2 38486.71963678 94.1259 306008 21.66 176.9 37460.24872809 93.9061 306813 22.65 177.7 39099.72425436 93.2803 288550 23.09 178 37432.96067416 92.7057 301636 22.33 177.5 37945.63380282 92.1721 293215 22.14 177.5 36575.82535211 92.0023 270713 23.02 178.3 34952.05832866 91.6795 311803 19.88 177.7 34874.11930219 91.2682 281316 17 177.4 26950.85118377 90.7894 281450 15.46 176.7 24619.37181664 90.8311 295494 16.29 177.1 27179.39017504 91.3471 246411 16.58 177.8 22981.93475816 91.3672 267037 19.27 178.8 28775.04474273 92.1054 296134 22.53 179.8 37100.22246941 92.479 296505 23.75 179.8 39159.69410456 92.8824 270677 23.35 179.9 35134.30794886 93.7637 290855 23.73 180.1 38327.81787896 93.5461 296068 24.58 180.7 40266.72385169 93.5765 272653 25.49 181 38403.35359116 93.7116 315720 26.25 181.3 45713.3701048 93.4006 286298 24.19 181.3 38205.10755654 93.8758 284170 24.15 180.9 37932.75843007 93.4191 273338 27.76 181.7 41754.63951569 93.9571 250262 30.37 183.1 41510.39868924 94.2558 294768 30.39 184.2 48630.67861021 94.0416 318088 26.01 183.8 45010.04352557 93.3666 319111 24.05 183.5 41817.06811989 93.3852 312982 25.5 183.7 43438.56831791 93.5219 335511 26.75 183.9 48804.3610658 93.9144 319674 27.56 184.6 47717.51895991 93.7371 316796 26.43 185.2 45206.54427646 94.3262 329992 26.28 185 46876.11351351 94.4442 291352 26.54 184.5 41914.61246612 95.2224 314131 27.17 184.3 46308.90938687 95.1545 309876 28.57 185.2 47799.65982721 95.3434 288494 29.17 186.2 45188.49087003 95.9228 329991 30.66 187.4 53993.19103522 95.4538 311663 31 188 51391.85106383 95.8653 317854 33.14 189.1 55710.05817028 96.6472 344729 33.74 189.7 61312.83078545 95.8588 324108 33.38 189.4 57116.3093981 96.5901 333756 36.54 189.5 64360.28496042 96.6687 297013 37.52 189.9 58676.59294365 96.745 313249 41.84 190.9 68659.38711367 97.6604 329660 41.19 191 71085.27225131 97.8427 320586 36.46 190.3 61424.65055176 98.5495 325786 35.27 190.7 60257.0844258 99.002 293425 36.93 191.8 56494.16579771 99.6741 324180 41.28 193.3 69236.56492499 99.5181 315528 44.78 194.6 72603.61767729 99.6518 319982 43.04 194.4 70851.77469136 99.8158 327865 44.41 194.5 74854.01542416 100.2232 312106 49.07 195.4 78375.05117707 99.8997 329039 52.85 196.4 88549.97454175 100.1025 277589 57.42 198.8 80172.16297787 98.2644 300884 56.21 199.2 84897.32429719 99.4949 314028 52.16 197.6 82899.44838057 100.5129 314259 49.79 196.8 79509.89329268 101.1118 303472 51.8 198.3 79270.03530005 101.2313 290744 53.86 198.7 78810.58882738 101.2755 313340 52.32 199.8 82048.98898899 101.4651 294281 56.65 201.5 82728.9528536 101.9012 325796 62.04 202.5 99815.03209877 101.7589 329839 62.12 202.9 100977.38294726 102.1304 322588 64.93 203.5 102922.31449631 102.0989 336528 66.13 203.9 109147.71947033 102.4526 316381 62.4 202.9 97292.69590931 102.2753 308602 55.47 201.8 84834.92071358 102.2299 299010 52.22 201.5 77494.67990074 102.1419 293645 53.84 201.8 78339.08820614 103.2191 320108 52.23 202.4 82612.73715415 102.7129 252869 50.71 203.5 63011.15970516 103.7659 324248 53 205.4 83673.73904576 103.9538 304775 57.28 206.7 84451.60135462 104.7077 320208 59.36 207.9 91419.61519962 104.7507 321260 60.95 208.4 93956.29078695 104.7581 310320 65.56 208.3 97667.65242439 104.7111 319197 68.21 207.9 104732.78980279 104.9122 297503 68.51 208.5 97760.90167866 105.2764 316184 72.49 208.9 109713.30780278 104.772 303411 79.65 210.2 114977.10275928 105.3295 300841 82.76 210 118552.97142857 105.3213
Names of X columns:
barrels_purchased unit_price cpi defl_tval US_IND_PROD
Sample Range:
(leave blank to include all observations)
From:
To:
Column Number of Endogenous Series
(?)
Fixed Seasonal Effects
Include Seasonal Dummies
Do not include Seasonal Dummies
Include Seasonal Dummies
Type of Equation
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
12
1
2
3
4
5
6
7
8
9
10
11
12
Chart options
R Code
library(lattice) library(lmtest) library(car) library(MASS) n25 <- 25 #minimum number of obs. for Goldfeld-Quandt test mywarning <- '' par6 <- as.numeric(par6) if(is.na(par6)) { par6 <- 12 mywarning = 'Warning: you did not specify the seasonality. The seasonal period was set to s = 12.' } par1 <- as.numeric(par1) if(is.na(par1)) { par1 <- 1 mywarning = 'Warning: you did not specify the column number of the endogenous series! The first column was selected by default.' } if (par4=='') par4 <- 0 par4 <- as.numeric(par4) if (!is.numeric(par4)) par4 <- 0 if (par5=='') par5 <- 0 par5 <- as.numeric(par5) if (!is.numeric(par5)) par5 <- 0 x <- na.omit(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'){ (n <- n -1) x2 <- array(0, dim=c(n,k), dimnames=list(1:n, paste('(1-B)',colnames(x),sep=''))) for (i in 1:n) { for (j in 1:k) { x2[i,j] <- x[i+1,j] - x[i,j] } } x <- x2 } if (par3 == 'Seasonal Differences (s)'){ (n <- n - par6) x2 <- array(0, dim=c(n,k), dimnames=list(1:n, paste('(1-Bs)',colnames(x),sep=''))) for (i in 1:n) { for (j in 1:k) { x2[i,j] <- x[i+par6,j] - x[i,j] } } x <- x2 } if (par3 == 'First and Seasonal Differences (s)'){ (n <- n -1) x2 <- array(0, dim=c(n,k), dimnames=list(1:n, paste('(1-B)',colnames(x),sep=''))) for (i in 1:n) { for (j in 1:k) { x2[i,j] <- x[i+1,j] - x[i,j] } } x <- x2 (n <- n - par6) x2 <- array(0, dim=c(n,k), dimnames=list(1:n, paste('(1-Bs)',colnames(x),sep=''))) for (i in 1:n) { for (j in 1:k) { x2[i,j] <- x[i+par6,j] - x[i,j] } } x <- x2 } if(par4 > 0) { x2 <- array(0, dim=c(n-par4,par4), dimnames=list(1:(n-par4), paste(colnames(x)[par1],'(t-',1:par4,')',sep=''))) for (i in 1:(n-par4)) { for (j in 1:par4) { x2[i,j] <- x[i+par4-j,par1] } } x <- cbind(x[(par4+1):n,], x2) n <- n - par4 } if(par5 > 0) { x2 <- array(0, dim=c(n-par5*par6,par5), dimnames=list(1:(n-par5*par6), paste(colnames(x)[par1],'(t-',1:par5,'s)',sep=''))) for (i in 1:(n-par5*par6)) { for (j in 1:par5) { x2[i,j] <- x[i+par5*par6-j*par6,par1] } } x <- cbind(x[(par5*par6+1):n,], x2) n <- n - par5*par6 } if (par2 == 'Include Seasonal Dummies'){ x2 <- array(0, dim=c(n,par6-1), dimnames=list(1:n, paste('M', seq(1:(par6-1)), sep =''))) for (i in 1:(par6-1)){ x2[seq(i,n,par6),i] <- 1 } x <- cbind(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[n,])) if (par3 == 'Linear Trend'){ x <- cbind(x, c(1:n)) colnames(x)[k+1] <- 't' } print(x) (k <- length(x[n,])) head(x) 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') sresid <- studres(mylm) hist(sresid, freq=FALSE, main='Distribution of Studentized Residuals') xfit<-seq(min(sresid),max(sresid),length=40) yfit<-dnorm(xfit) lines(xfit, yfit) 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') qqPlot(mylm, main='QQ Plot') 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) print(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, signif(mysum$coefficients[i,1],6), 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.row.start(a) a<-table.element(a, mywarning) 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,'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,formatC(signif(mysum$coefficients[i,1],5),format='g',flag='+')) a<-table.element(a,formatC(signif(mysum$coefficients[i,2],5),format='g',flag=' ')) a<-table.element(a,formatC(signif(mysum$coefficients[i,3],4),format='e',flag='+')) a<-table.element(a,formatC(signif(mysum$coefficients[i,4],4),format='g',flag=' ')) a<-table.element(a,formatC(signif(mysum$coefficients[i,4]/2,4),format='g',flag=' ')) 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,formatC(signif(sqrt(mysum$r.squared),6),format='g',flag=' ')) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a, 'R-squared',1,TRUE) a<-table.element(a,formatC(signif(mysum$r.squared,6),format='g',flag=' ')) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a, 'Adjusted R-squared',1,TRUE) a<-table.element(a,formatC(signif(mysum$adj.r.squared,6),format='g',flag=' ')) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a, 'F-TEST (value)',1,TRUE) a<-table.element(a,formatC(signif(mysum$fstatistic[1],6),format='g',flag=' ')) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a, 'F-TEST (DF numerator)',1,TRUE) a<-table.element(a, signif(mysum$fstatistic[2],6)) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a, 'F-TEST (DF denominator)',1,TRUE) a<-table.element(a, signif(mysum$fstatistic[3],6)) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a, 'p-value',1,TRUE) a<-table.element(a,formatC(signif(1-pf(mysum$fstatistic[1],mysum$fstatistic[2],mysum$fstatistic[3]),6),format='g',flag=' ')) 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,formatC(signif(mysum$sigma,6),format='g',flag=' ')) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a, 'Sum Squared Residuals',1,TRUE) a<-table.element(a,formatC(signif(sum(myerror*myerror),6),format='g',flag=' ')) a<-table.row.end(a) a<-table.end(a) table.save(a,file='mytable3.tab') myr <- as.numeric(mysum$resid) myr a <-table.start() a <- table.row.start(a) a <- table.element(a,'Menu of Residual Diagnostics',2,TRUE) a <- table.row.end(a) a <- table.row.start(a) a <- table.element(a,'Description',1,TRUE) a <- table.element(a,'Link',1,TRUE) a <- table.row.end(a) a <- table.row.start(a) a <-table.element(a,'Histogram',1,header=TRUE) a <- table.element(a,hyperlink( paste('https://supernova.wessa.net/rwasp_histogram.wasp?convertgetintopost=1&data=',paste(as.character(mysum$resid),sep='',collapse=' '),sep='') ,'Compute','Click here to examine the Residuals.'),1) a <- table.row.end(a) a <- table.row.start(a) a <-table.element(a,'Central Tendency',1,header=TRUE) a <- table.element(a,hyperlink( paste('https://supernova.wessa.net/rwasp_centraltendency.wasp?convertgetintopost=1&data=',paste(as.character(mysum$resid),sep='',collapse=' '),sep='') ,'Compute','Click here to examine the Residuals.'),1) a <- table.row.end(a) a <- table.row.start(a) a <-table.element(a,'QQ Plot',1,header=TRUE) a <- table.element(a,hyperlink( paste('https://supernova.wessa.net/rwasp_fitdistrnorm.wasp?convertgetintopost=1&data=',paste(as.character(mysum$resid),sep='',collapse=' '),sep='') ,'Compute','Click here to examine the Residuals.'),1) a <- table.row.end(a) a <- table.row.start(a) a <-table.element(a,'Kernel Density Plot',1,header=TRUE) a <- table.element(a,hyperlink( paste('https://supernova.wessa.net/rwasp_density.wasp?convertgetintopost=1&data=',paste(as.character(mysum$resid),sep='',collapse=' '),sep='') ,'Compute','Click here to examine the Residuals.'),1) a <- table.row.end(a) a <- table.row.start(a) a <-table.element(a,'Skewness/Kurtosis Test',1,header=TRUE) a <- table.element(a,hyperlink( paste('https://supernova.wessa.net/rwasp_skewness_kurtosis.wasp?convertgetintopost=1&data=',paste(as.character(mysum$resid),sep='',collapse=' '),sep='') ,'Compute','Click here to examine the Residuals.'),1) a <- table.row.end(a) a <- table.row.start(a) a <-table.element(a,'Skewness-Kurtosis Plot',1,header=TRUE) a <- table.element(a,hyperlink( paste('https://supernova.wessa.net/rwasp_skewness_kurtosis_plot.wasp?convertgetintopost=1&data=',paste(as.character(mysum$resid),sep='',collapse=' '),sep='') ,'Compute','Click here to examine the Residuals.'),1) a <- table.row.end(a) a <- table.row.start(a) a <-table.element(a,'Harrell-Davis Plot',1,header=TRUE) a <- table.element(a,hyperlink( paste('https://supernova.wessa.net/rwasp_harrell_davis.wasp?convertgetintopost=1&data=',paste(as.character(mysum$resid),sep='',collapse=' '),sep='') ,'Compute','Click here to examine the Residuals.'),1) a <- table.row.end(a) a <- table.row.start(a) a <-table.element(a,'Bootstrap Plot -- Central Tendency',1,header=TRUE) a <- table.element(a,hyperlink( paste('https://supernova.wessa.net/rwasp_bootstrapplot1.wasp?convertgetintopost=1&data=',paste(as.character(mysum$resid),sep='',collapse=' '),sep='') ,'Compute','Click here to examine the Residuals.'),1) a <- table.row.end(a) a <- table.row.start(a) a <-table.element(a,'Blocked Bootstrap Plot -- Central Tendency',1,header=TRUE) a <- table.element(a,hyperlink( paste('https://supernova.wessa.net/rwasp_bootstrapplot.wasp?convertgetintopost=1&data=',paste(as.character(mysum$resid),sep='',collapse=' '),sep='') ,'Compute','Click here to examine the Residuals.'),1) a <- table.row.end(a) a <- table.row.start(a) a <-table.element(a,'(Partial) Autocorrelation Plot',1,header=TRUE) a <- table.element(a,hyperlink( paste('https://supernova.wessa.net/rwasp_autocorrelation.wasp?convertgetintopost=1&data=',paste(as.character(mysum$resid),sep='',collapse=' '),sep='') ,'Compute','Click here to examine the Residuals.'),1) a <- table.row.end(a) a <- table.row.start(a) a <-table.element(a,'Spectral Analysis',1,header=TRUE) a <- table.element(a,hyperlink( paste('https://supernova.wessa.net/rwasp_spectrum.wasp?convertgetintopost=1&data=',paste(as.character(mysum$resid),sep='',collapse=' '),sep='') ,'Compute','Click here to examine the Residuals.'),1) a <- table.row.end(a) a <- table.row.start(a) a <-table.element(a,'Tukey lambda PPCC Plot',1,header=TRUE) a <- table.element(a,hyperlink( paste('https://supernova.wessa.net/rwasp_tukeylambda.wasp?convertgetintopost=1&data=',paste(as.character(mysum$resid),sep='',collapse=' '),sep='') ,'Compute','Click here to examine the Residuals.'),1) a <- table.row.end(a) a <- table.row.start(a) a <-table.element(a,'Box-Cox Normality Plot',1,header=TRUE) a <- table.element(a,hyperlink( paste('https://supernova.wessa.net/rwasp_boxcoxnorm.wasp?convertgetintopost=1&data=',paste(as.character(mysum$resid),sep='',collapse=' '),sep='') ,'Compute','Click here to examine the Residuals.'),1) a <- table.row.end(a) a <- table.row.start(a) a <- table.element(a,'Summary Statistics',1,header=TRUE) a <- table.element(a,hyperlink( paste('https://supernova.wessa.net/rwasp_summary1.wasp?convertgetintopost=1&data=',paste(as.character(mysum$resid),sep='',collapse=' '),sep='') ,'Compute','Click here to examine the Residuals.'),1) a <- table.row.end(a) a<-table.end(a) table.save(a,file='mytable7.tab') if(n < 200) { 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,formatC(signif(x[i],6),format='g',flag=' ')) a<-table.element(a,formatC(signif(x[i]-mysum$resid[i],6),format='g',flag=' ')) a<-table.element(a,formatC(signif(mysum$resid[i],6),format='g',flag=' ')) 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,formatC(signif(gqarr[mypoint-kp3+1,1],6),format='g',flag=' ')) a<-table.element(a,formatC(signif(gqarr[mypoint-kp3+1,2],6),format='g',flag=' ')) a<-table.element(a,formatC(signif(gqarr[mypoint-kp3+1,3],6),format='g',flag=' ')) 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,signif(numsignificant1,6)) a<-table.element(a,formatC(signif(numsignificant1/numgqtests,6),format='g',flag=' ')) 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,signif(numsignificant5,6)) a<-table.element(a,signif(numsignificant5/numgqtests,6)) 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,signif(numsignificant10,6)) a<-table.element(a,signif(numsignificant10/numgqtests,6)) 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') } } a<-table.start() a<-table.row.start(a) a<-table.element(a,'Ramsey RESET F-Test for powers (2 and 3) of fitted values',1,TRUE) a<-table.row.end(a) a<-table.row.start(a) reset_test_fitted <- resettest(mylm,power=2:3,type='fitted') a<-table.element(a,paste('<pre>',RC.texteval('reset_test_fitted'),'</pre>',sep='')) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a,'Ramsey RESET F-Test for powers (2 and 3) of regressors',1,TRUE) a<-table.row.end(a) a<-table.row.start(a) reset_test_regressors <- resettest(mylm,power=2:3,type='regressor') a<-table.element(a,paste('<pre>',RC.texteval('reset_test_regressors'),'</pre>',sep='')) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a,'Ramsey RESET F-Test for powers (2 and 3) of principal components',1,TRUE) a<-table.row.end(a) a<-table.row.start(a) reset_test_principal_components <- resettest(mylm,power=2:3,type='princomp') a<-table.element(a,paste('<pre>',RC.texteval('reset_test_principal_components'),'</pre>',sep='')) a<-table.row.end(a) a<-table.end(a) table.save(a,file='mytable8.tab') a<-table.start() a<-table.row.start(a) a<-table.element(a,'Variance Inflation Factors (Multicollinearity)',1,TRUE) a<-table.row.end(a) a<-table.row.start(a) vif <- vif(mylm) a<-table.element(a,paste('<pre>',RC.texteval('vif'),'</pre>',sep='')) a<-table.row.end(a) a<-table.end(a) table.save(a,file='mytable9.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