clear capture log close log using final_example, text replace use final_1 * begin analysis /* checklist: 1. sampling probability: create weights 2. influential cases? 3. heteroskedasticity? 4. multicollinearity? 5. missing data? 6. estimate and interpret cofficients (note: real data may be more complex...(explain) 7. iv? */ * your analysis will differ depending on the specific characteristics * of your data. * remember to explain why you do things and how you interpret the output * and the potential consequences of choices you have made and problems you encounter notes des sum gen wgt=1/p * influential cases reg math effort tv gender predict d, cooksd sum d list if d>.3 & d~=. drop if d>.3 & d~=. * heteroskedasticity reg math effort tv gender [w=wgt] estat hettest, rhs estat hettest tv predict ehat, resid gen ehat2=ehat^2 reg ehat2 effort tv gender [w=wgt] gen wgt2=wgt/tv reg math effort tv gender [w=wgt2] estat hettest, rhs capture drop ehat ehat2 predict ehat, resid gen ehat2=ehat^2 reg ehat2 effort tv gender [w=wgt2] reg math effort tv gender [w=wgt2], robust * multicollinearity * substitute current #1 model here reg math effort tv gender [w=wgt2] estat vif ice math effort tv gender using impute [w=wgt2], m(5) replace drop _all use impute * substitute current #1 model here micombine reg math effort tv gender [w=wgt2] * iv? (remember untestable assumptions must be argued theoretically) reg effort rocky predict efforthat micombine reg math efforthat tv gender [w=wgt2] ivreg math (effort=rocky) tv gender [w=wgt] log close