Professional Documents
Culture Documents
Page 1
Lecture 12 all codes - Printed on 12/19/2023 10:01:44 PM
Plots\exports_bn.png", as(png) replace
54 twoway (scatter gdp_bn fdi_bn)(lfit gdp_bn fdi_bn)
55 graph export "C:\Users\test\Documents\Fall 2023 BAF\BBA 5A\Lecture 11\Scatter
Plots\fdi_bn.png", as(png) replace
56 twoway (scatter gdp_bn netexports)(lfit gdp_bn netexports)
57 graph export "C:\Users\test\Documents\Fall 2023 BAF\BBA 5A\Lecture 11\Scatter
Plots\netexports.png", as(png) replace
58 regress gdp_bn con_bn fdi_bn ge_bn imports_bn exports_bn
59 predict resid, r
60 ssc install jb
61 jb resid
62 histogram resid, normal
63 graph export "C:\Users\test\Documents\Fall 2023 BAF\BBA 5A\Lecture 11\Histograms\resid.png",
as(png) replace
64 estat hettest
65 estat imtest
66 estat dwatson
67 vif
68 log close
69 save "C:\Users\test\Documents\Fall 2023 BAF\BBA 5A\Lecture 11\Pakistandata.dta", replace
70 log using "C:\Users\test\Documents\Fall 2023 BAF\BBA 5A\Lecture 11\results.smcl", append
71 regress lgdp lge dfdi dnetexports
72 predict resid1, r
73 jb resid1
74 histogram resid1, normal
75 graph export "C:\Users\test\Documents\Fall 2023 BAF\BBA 5A\Lecture 11\Histograms\resid1.png"
, as(png) replace
76 estat hettest
77 estat imtest
78 estat dwatson
79 vif
80 regress dlgdp dlge dfdi dnetexports
81 predict resid2, r
82 jb resid2
83 histogram resid2, normal
84 graph export "C:\Users\test\Documents\Fall 2023 BAF\BBA 5A\Lecture 11\Histograms\resid3.png"
, as(png) replace
85 estat hettest
86 estat imtest
87 estat dwatson
88 vif
89 log close
90 ssc install asdoc
91 asdoc regress dlgdp dlge dfdi dnetexports
92 predict resid3, r
93 asdoc jb resid3
94 asdoc estat hettest
95 asdoc estat imtest
96 asdoc estat dwatson
97 asdoc vif
98
Page 2