/* Heteroskedasticty Test The example data contains: pcon: Petroleum Cosumption for state i price : Price per galloin in state i reg : Motor vehicle registrations in the state in thousands pop : Total populations in thousands */ use http://bigblue.depaul.edu/jlee141/econdata/econ375/hetero_gas regr pcon price reg predict ei, resid scatter ei reg hettest, iid /* the Breusch-Pegan Test */ estat imtest, preserve white /* the White Test */ regr pcon price reg, robust /* Use heteroskedasticty correct s.e. */ /* Change variables to per capita */ gen pc_pcon = pcon/pop gen pc_reg = reg/pop regr pc_pcon price pc_reg hettest, iid /* the Breusch-Pegan Test */ estat imtest, preserve white /* the White Test */