Send output to:
Browser Blue - Charts White
Browser Black/White
CSV
Data X:
102750 0.06455399 NA NA 95276 0.06363636 0.06455399 NA 112053 0.06512702 0.06363636 0.06455399 98841 0.06490826 0.06512702 0.06363636 123102 0.06605923 0.06490826 0.06512702 118152 0.06900452 0.06605923 0.06490826 101752 0.07110609 0.06900452 0.06605923 148219 0.07228381 0.07110609 0.06900452 124966 0.07477876 0.07228381 0.07110609 134741 0.07763158 0.07477876 0.07228381 132168 0.08300654 0.07763158 0.07477876 100950 0.11406926 0.08300654 0.07763158 96418 0.14399142 0.11406926 0.08300654 86891 0.19258475 0.14399142 0.11406926 89796 0.23179916 0.19258475 0.14399142 119663 0.248125 0.23179916 0.19258475 130539 0.24300412 0.248125 0.23179916 120851 0.24102041 0.24300412 0.248125 145422 0.24473684 0.24102041 0.24300412 150583 0.239 0.24473684 0.24102041 127054 0.23063241 0.239 0.24473684 137473 0.22700587 0.23063241 0.239 127094 0.22737864 0.22700587 0.23063241 132080 0.2238921 0.22737864 0.22700587 188311 0.22341651 0.2238921 0.22737864 107487 0.22209524 0.22341651 0.2238921 84669 0.22144213 0.22209524 0.22341651 149184 0.22098299 0.22144213 0.22209524 121026 0.21766917 0.22098299 0.22144213 81073 0.21268657 0.21766917 0.22098299 132947 0.21107011 0.21268657 0.21766917 141294 0.20957643 0.21107011 0.21268657 155077 0.20714286 0.20957643 0.21107011 145154 0.20856102 0.20714286 0.20957643 127094 0.21211573 0.20856102 0.20714286 151414 0.2181982 0.21211573 0.20856102 167858 0.21996403 0.2181982 0.21211573 127070 0.22204301 0.21996403 0.2181982 154692 0.22075134 0.22204301 0.21996403 170905 0.22139037 0.22075134 0.22204301 127751 0.21893805 0.22139037 0.22075134 173795 0.21778169 0.21893805 0.22139037 190181 0.21698774 0.21778169 0.21893805 198417 0.21655052 0.21698774 0.21778169 183018 0.21666667 0.21655052 0.21698774 171608 0.21502591 0.21666667 0.21655052 188087 0.21689655 0.21502591 0.21666667 197042 0.21632302 0.21689655 0.21502591 208788 0.21435897 0.21632302 0.21689655 178111 0.22013536 0.21435897 0.21632302 236455 0.22369748 0.22013536 0.21435897 233219 0.22416667 0.22369748 0.22013536 188106 0.22023217 0.22416667 0.22369748 238876 0.22042834 0.22023217 0.22416667 205148 0.21901639 0.22042834 0.22023217 214727 0.21895425 0.21901639 0.22042834 213428 0.21970684 0.21895425 0.21901639 195128 0.21866883 0.21970684 0.21895425 206047 0.22003231 0.21866883 0.21970684 201773 0.21851852 0.22003231 0.21866883 192772 0.21744 0.21851852 0.22003231 198230 0.21430843 0.21744 0.21851852 181172 0.21246057 0.21430843 0.21744 189079 0.21079812 0.21246057 0.21430843 179073 0.20713178 0.21079812 0.21246057 197421 0.20506135 0.20713178 0.21079812 195244 0.20395738 0.20506135 0.20713178 219826 0.20318182 0.20395738 0.20506135 211793 0.20105263 0.20318182 0.20395738 203394 0.2 0.20105263 0.20318182 209578 0.19896142 0.2 0.20105263 214769 0.19881832 0.19896142 0.2 226177 0.19970717 0.19881832 0.19896142 191449 0.2015919 0.19970717 0.19881832 200989 0.20716332 0.2015919 0.19970717 216707 0.21133144 0.20716332 0.2015919 192882 0.22755245 0.21133144 0.20716332 199736 0.24011065 0.22755245 0.21133144 202349 0.26087551 0.24011065 0.22755245 204137 0.28590786 0.26087551 0.24011065 215588 0.30013405 0.28590786 0.26087551 229454 0.30757979 0.30013405 0.28590786 175048 0.30658762 0.30757979 0.30013405 212799 0.32033898 0.30658762 0.30757979 181727 0.33830334 0.32033898 0.30658762 211607 0.36210393 0.33830334 0.32033898 185853 0.38002497 0.36210393 0.33830334 158277 0.38765432 0.38002497 0.36210393 180695 0.38924205 0.38765432 0.38002497 175959 0.38524788 0.38924205 0.38765432 139550 0.39056832 0.38524788 0.38924205 155810 0.39531813 0.39056832 0.38524788 138305 0.38964286 0.39531813 0.39056832 147014 0.39033019 0.38964286 0.39531813 135994 0.38865497 0.39033019 0.38964286 166455 0.39327926 0.38865497 0.39033019 177737 0.39390805 0.39327926 0.38865497 167021 0.40910125 0.39390805 0.39327926 132134 0.40960452 0.40910125 0.39390805 169834 0.41436588 0.40960452 0.40910125 130599 0.40267261 0.41436588 0.40960452 156836 0.40386313 0.40267261 0.41436588 119749 0.38264192 0.40386313 0.40267261 148996 0.37410618 0.38264192 0.40386313 147491 0.36555794 0.37410618 0.38264192 147216 0.36027837 0.36555794 0.37410618 153455 0.36115261 0.36027837 0.36555794 112004 0.36159574 0.36115261 0.36027837 158512 0.37550371 0.36159574 0.36115261 104139 0.3755814 0.37550371 0.36159574 102536 0.36730159 0.3755814 0.37550371 93017 0.34984194 0.36730159 0.3755814 91988 0.33663883 0.34984194 0.36730159 123616 0.33938144 0.33663883 0.34984194 134498 0.34123077 0.33938144 0.33663883 149812 0.33684749 0.34123077 0.33938144 110334 0.3308478 0.33684749 0.34123077 136639 0.33034623 0.3308478 0.33684749 102712 0.33510204 0.33034623 0.3308478 112951 0.33237705 0.33510204 0.33034623 107897 0.33231084 0.33237705 0.33510204 73242 0.31787538 0.33231084 0.33237705 72800 0.3092952 0.31787538 0.33231084 78767 0.29168357 0.3092952 0.31787538 114791 0.28820565 0.29168357 0.3092952 109351 0.28974874 0.28820565 0.29168357 122520 0.28958959 0.28974874 0.28820565 137338 0.29251497 0.28958959 0.28974874 132061 0.29066534 0.29251497 0.28958959 130607 0.29069307 0.29066534 0.29251497 118570 0.28705534 0.29069307 0.29066534 95873 0.28627838 0.28705534 0.29069307 103116 0.27134446 0.28627838 0.28705534 98619 0.26992187 0.27134446 0.28627838 104178 0.27095517 0.26992187 0.27134446 123468 0.2700291 0.27095517 0.26992187 99651 0.26934236 0.2700291 0.27095517 120264 0.26769527 0.26934236 0.2700291 122795 0.26945245 0.26769527 0.26934236 108524 0.264689 0.26945245 0.26769527 105760 0.26085714 0.264689 0.26945245 117191 0.2617284 0.26085714 0.264689 122882 0.26163343 0.2617284 0.26085714 93275 0.25925926 0.26163343 0.2617284 99842 0.25952607 0.25925926 0.26163343 83803 0.25386792 0.25952607 0.25925926 61132 0.24483083 0.25386792 0.25952607 118563 0.24808232 0.24483083 0.25386792 106993 0.24967381 0.24808232 0.24483083 118108 0.2464684 0.24967381 0.24808232 99017 0.2403525 0.2464684 0.24967381 99852 0.23851852 0.2403525 0.2464684 112720 0.23471837 0.23851852 0.2403525 113636 0.23597056 0.23471837 0.23851852 118220 0.23568807 0.23597056 0.23471837 128854 0.23824337 0.23568807 0.23597056 123898 0.23540146 0.23824337 0.23568807 100823 0.2116194 0.23540146 0.23824337 115107 0.16636029 0.2116194 0.23540146 90624 0.11767956 0.16636029 0.2116194 132001 0.11239669 0.11767956 0.16636029 157969 0.10995434 0.11239669 0.11767956 169333 0.10073059 0.10995434 0.11239669 144907 0.09197812 0.10073059 0.10995434 169346 0.10054446 0.09197812 0.10073059 144666 0.1068903 0.10054446 0.09197812 158829 0.11077899 0.1068903 0.10054446 127286 0.11221719 0.11077899 0.1068903 120578 0.12464029 0.11221719 0.11077899 129293 0.13862007 0.12464029 0.11221719 122371 0.14157003 0.13862007 0.12464029 115176 0.14702751 0.14157003 0.13862007 142168 0.14960212 0.14702751 0.14157003 153260 0.15251101 0.14960212 0.14702751 173906 0.15615114 0.15251101 0.14960212 178446 0.15795455 0.15615114 0.15251101 155962 0.15208696 0.15795455 0.15615114 168257 0.14926279 0.15208696 0.15795455 149456 0.14835355 0.14926279 0.15208696 136105 0.14263432 0.14835355 0.14926279 141507 0.19360415 0.14263432 0.14835355 152084 0.13103448 0.19360415 0.14263432 145138 0.12223176 0.13103448 0.19360415 146548 0.12134927 0.12223176 0.13103448 173098 0.12502128 0.12134927 0.12223176 165471 0.12440678 0.12502128 0.12134927 152271 0.11831224 0.12440678 0.12502128 163201 0.11243697 0.11831224 0.12440678 157823 0.10918197 0.11243697 0.11831224 166167 0.09916805 0.10918197 0.11243697 154253 0.0957606 0.09916805 0.10918197 170299 0.10240664 0.0957606 0.09916805 166388 0.11486375 0.10240664 0.0957606 141051 0.12203947 0.11486375 0.10240664 160254 0.1270646 0.12203947 0.11486375 164995 0.14077985 0.1270646 0.12203947 195971 0.14515347 0.14077985 0.1270646 182635 0.13916197 0.14515347 0.14077985 189829 0.13609325 0.13916197 0.14515347 209476 0.12800963 0.13609325 0.13916197 189848 0.12912 0.12800963 0.13609325 183746 0.13224522 0.12912 0.12800963 192682 0.13566322 0.13224522 0.12912 169677 0.14052339 0.13566322 0.13224522 201823 0.14795918 0.14052339 0.13566322 172643 0.14679687 0.14795918 0.14052339 202931 0.13791764 0.14679687 0.14795918 175863 0.12428239 0.13791764 0.14679687 222061 0.1130805 0.12428239 0.13791764 199797 0.10646651 0.1130805 0.12428239 214638 0.10674847 0.10646651 0.1130805 200106 0.14870821 0.10674847 0.10646651 166077 0.19314243 0.14870821 0.10674847 160586 0.22531835 0.19314243 0.14870821 158330 0.22055306 0.22531835 0.19314243 141749 0.19245142 0.22055306 0.22531835 170795 0.17072808 0.19245142 0.22055306 153286 0.13642433 0.17072808 0.19245142 163426 0.12407407 0.13642433 0.17072808 172562 0.12122781 0.12407407 0.13642433 197474 0.12219764 0.12122781 0.12407407 189822 0.12058824 0.12219764 0.12122781 188511 0.11857562 0.12058824 0.12219764 207437 0.12298682 0.11857562 0.12058824 192128 0.12492711 0.12298682 0.11857562 175716 0.13078603 0.12492711 0.12298682 159108 0.13105951 0.13078603 0.12492711 175801 0.12037708 0.13105951 0.13078603 186723 0.1076756 0.12037708 0.13105951 154970 0.1040404 0.1076756 0.12037708 172446 0.10394831 0.1040404 0.1076756 185965 0.11111111 0.10394831 0.1040404 195525 0.1198282 0.11111111 0.10394831 193156 0.13031384 0.1198282 0.11111111 212705 0.12953737 0.13031384 0.1198282 201357 0.12796309 0.12953737 0.13031384 189971 0.12639774 0.12796309 0.12953737 216523 0.12849083 0.12639774 0.12796309 193233 0.12415493 0.12849083 0.12639774 191996 0.11430585 0.12415493 0.12849083 211974 0.10869565 0.11430585 0.12415493 175907 0.10978337 0.10869565 0.11430585 206109 0.11483287 0.10978337 0.10869565 220275 0.11590278 0.11483287 0.10978337 211342 0.11588072 0.11590278 0.11483287 222528 0.11128809 0.11588072 0.11590278 229523 0.10360111 0.11128809 0.11588072 204153 0.10020718 0.10360111 0.11128809 206735 0.09903515 0.10020718 0.10360111 223416 0.10013727 0.09903515 0.10020718 228292 0.09410151 0.10013727 0.09903515 203121 0.08367627 0.09410151 0.10013727 205957 0.07961696 0.08367627 0.09410151 176918 0.08241309 0.07961696 0.08367627 219839 0.0798913 0.08241309 0.07961696 217213 0.08717775 0.0798913 0.08241309 216618 0.09525424 0.08717775 0.0798913 248057 0.10256757 0.09525424 0.08717775 245642 0.10842318 0.10256757 0.09525424 242485 0.10718121 0.10842318 0.10256757 260423 0.10040161 0.10718121 0.10842318 221030 0.09899666 0.10040161 0.10718121 229157 0.10227121 0.09899666 0.10040161 220858 0.09819639 0.10227121 0.09899666 212270 0.1001996 0.09819639 0.10227121 195944 0.10291584 0.1001996 0.09819639 239741 0.10422721 0.10291584 0.1001996 212013 0.11033575 0.10422721 0.10291584 240514 0.11432326 0.11033575 0.10422721 241982 0.11003279 0.11432326 0.11033575 245447 0.10170492 0.11003279 0.11432326 240839 0.09954218 0.10170492 0.11003279 244875 0.10078329 0.09954218 0.10170492 226375 0.09921926 0.10078329 0.09954218 231567 0.09830729 0.09921926 0.10078329 235746 0.10306189 0.09830729 0.09921926 238990 0.10641192 0.10306189 0.09830729 198120 0.10393802 0.10641192 0.10306189 201663 0.11117534 0.10393802 0.10641192 238198 0.12328855 0.11117534 0.10393802 261641 0.12068966 0.12328855 0.11117534 253014 0.11461391 0.12068966 0.12328855 275225 0.11566879 0.11461391 0.12068966 250957 0.11856325 0.11566879 0.11461391 260375 0.1265526 0.11856325 0.11566879 250694 0.13524953 0.1265526 0.11856325 216953 0.13480454 0.13524953 0.1265526 247816 0.13638083 0.13480454 0.13524953 224135 0.13739786 0.13638083 0.13480454 211073 0.1283208 0.13739786 0.13638083 245623 0.11725 0.1283208 0.13739786 250947 0.10692884 0.11725 0.1283208 278223 0.1065584 0.10692884 0.11725 254232 0.10511541 0.1065584 0.10692884 266293 0.10224299 0.10511541 0.1065584 280897 0.10541045 0.10224299 0.10511541 274565 0.10378412 0.10541045 0.10224299 280555 0.10959158 0.10378412 0.10541045 252757 0.10681115 0.10959158 0.10378412 250131 0.09950403 0.10681115 0.10959158 271208 0.08855198 0.09950403 0.10681115 230593 0.08042001 0.08855198 0.09950403 263407 0.07324291 0.08042001 0.08855198 289968 0.07243077 0.07324291 0.08042001 282846 0.07248157 0.07243077 0.07324291 271314 0.06822086 0.07248157 0.07243077 289718 0.06605392 0.06822086 0.07248157 300227 0.06456548 0.06605392 0.06822086 259951 0.06717604 0.06456548 0.06605392 263149 0.07109756 0.06717604 0.06456548 267953 0.06579268 0.07109756 0.06717604 252378 0.05723002 0.06579268 0.07109756 280356 0.056056 0.05723002 0.06579268 234298 0.05762918 0.056056 0.05723002 271574 0.06363636 0.05762918 0.056056 262378 0.07749699 0.06363636 0.05762918 289457 0.08784597 0.07749699 0.06363636 278274 0.08736462 0.08784597 0.07749699 288932 0.09664067 0.08736462 0.08784597 283813 0.1070018 0.09664067 0.08736462 267600 0.11727219 0.1070018 0.09664067 267574 0.12342449 0.11727219 0.1070018 254862 0.12507427 0.12342449 0.11727219 248974 0.13541295 0.12507427 0.12342449 256840 0.13809242 0.13541295 0.12507427 250914 0.14805654 0.13809242 0.13541295 279334 0.15426402 0.14805654 0.13809242 286549 0.14249854 0.15426402 0.14805654 302266 0.14157434 0.14249854 0.15426402 298205 0.15533643 0.14157434 0.14249854 300843 0.16047454 0.15533643 0.14157434 312955 0.15387731 0.16047454 0.15533643 275962 0.16712723 0.15387731 0.16047454 299561 0.1641954 0.16712723 0.15387731 260975 0.16278001 0.1641954 0.16712723 274836 0.15172414 0.16278001 0.1641954 284112 0.13243861 0.15172414 0.16278001 247331 0.13566553 0.13243861 0.15172414 298120 0.12911464 0.13566553 0.13243861 306008 0.12244206 0.12911464 0.13566553 306813 0.12746201 0.12244206 0.12911464 288550 0.1297191 0.12746201 0.12244206 301636 0.12580282 0.1297191 0.12746201 293215 0.12473239 0.12580282 0.1297191 270713 0.12910824 0.12473239 0.12580282 311803 0.11187394 0.12910824 0.12473239 281316 0.09582864 0.11187394 0.12910824 281450 0.08749293 0.09582864 0.11187394 295494 0.09198193 0.08749293 0.09582864 246411 0.09325084 0.09198193 0.08749293 267037 0.10777405 0.09325084 0.09198193 296134 0.1253059 0.10777405 0.09325084 296505 0.13209121 0.1253059 0.10777405 270677 0.12979433 0.13209121 0.1253059 290855 0.13176013 0.12979433 0.13209121 296068 0.13602656 0.13176013 0.12979433 272653 0.14082873 0.13602656 0.13176013 315720 0.14478764 0.14082873 0.13602656 286298 0.13342526 0.14478764 0.14082873 284170 0.13349917 0.13342526 0.14478764 273338 0.15277931 0.13349917 0.13342526 250262 0.16586565 0.15277931 0.13349917 294768 0.16498371 0.16586565 0.15277931 318088 0.14151251 0.16498371 0.16586565 319111 0.13106267 0.14151251 0.16498371 312982 0.13881328 0.13106267 0.14151251 335511 0.14545949 0.13881328 0.13106267 319674 0.14929577 0.14545949 0.13881328 316796 0.14271058 0.14929577 0.14545949 329992 0.14205405 0.14271058 0.14929577 291352 0.14384824 0.14205405 0.14271058 314131 0.14742268 0.14384824 0.14205405 309876 0.15426566 0.14742268 0.14384824 288494 0.15665951 0.15426566 0.14742268 329991 0.16360726 0.15665951 0.15426566 311663 0.16489362 0.16360726 0.15665951 317854 0.17525119 0.16489362 0.16360726 344729 0.17785978 0.17525119 0.16489362 324108 0.17624076 0.17785978 0.17525119 333756 0.19282322 0.17624076 0.17785978 297013 0.19757767 0.19282322 0.17624076 313249 0.21917234 0.19757767 0.19282322 329660 0.21565445 0.21917234 0.19757767 320586 0.19159222 0.21565445 0.21917234 325786 0.18495018 0.19159222 0.21565445 293425 0.19254432 0.18495018 0.19159222 324180 0.21355406 0.19254432 0.18495018 315528 0.23011305 0.21355406 0.19254432 319982 0.22139918 0.23011305 0.21355406 327865 0.22832905 0.22139918 0.23011305 312106 0.2511259 0.22832905 0.22139918 329039 0.26909369 0.2511259 0.22832905 277589 0.288833 0.26909369 0.2511259 300884 0.28217871 0.288833 0.26909369 314028 0.26396761 0.28217871 0.288833 314259 0.25299797 0.26396761 0.28217871 303472 0.26122037 0.25299797 0.26396761 290744 0.2710619 0.26122037 0.25299797 313340 0.26186186 0.2710619 0.26122037 294281 0.28114144 0.26186186 0.2710619 325796 0.30637037 0.28114144 0.26186186 329839 0.30616067 0.30637037 0.28114144 322588 0.31906634 0.30616067 0.30637037 336528 0.32432565 0.31906634 0.30616067 316381 0.30754066 0.32432565 0.31906634 308602 0.27487611 0.30754066 0.32432565 299010 0.25915633 0.27487611 0.30754066 293645 0.26679881 0.25915633 0.27487611 320108 0.25805336 0.26679881 0.25915633 252869 0.24918919 0.25805336 0.26679881 324248 0.25803311 0.24918919 0.25805336 304775 0.27711659 0.25803311 0.24918919 320208 0.28552189 0.27711659 0.25803311 321260 0.29246641 0.28552189 0.27711659 310320 0.31473836 0.29246641 0.28552189 319197 0.32809043 0.31473836 0.29246641 297503 0.32858513 0.32809043 0.31473836 316184 0.34700814 0.32858513 0.32809043 303411 0.37892483 0.34700814 0.32858513 300841 0.39409524 0.37892483 0.34700814
Names of X columns:
barrels_purchased defl_price defl_price1 defl_price2
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
First and Seasonal Differences (s)
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