/* Example for post-estimation tests within the context of a Hedonic Property Value Study */ #delimit; set more off; set logtype text; set mem 100m; set matsize 80; log using c:\klaus\apec64\spring_07\stata\logs\hedonic_tests,replace; use c:\klaus\apec64\spring_07\stata\data\hedonic_example_full; /* Step 1: Run preferred model */ /*******************************/ regress lnadj tsqf bedrms bathrms age garage view firepl porch dist00 dist00sq sewer; /* Step 2: Test for Heteroskedasticity */ /**************************************/ /* rvfplot */ rvfplot, yline(0); /* Breusch-Pagan test */ estat hettest; estat hettest distance; estat hettest distance age; estat hettest distance age garage; /* IM test (~ White's test) */ estat imtest; /* remedy for heteroskedastic variances: run model with robust standard errors */ regress lnadj tsqf bedrms bathrms age garage view firepl porch dist00 dist00sq sewer, robust; /* Step 3: Test for Multicollinearity */ /**************************************/ /* Inspect correlation across explanatory variables */ corr tsqf bedrms bathrms age garage view firepl porch dist00 dist00sq sewer; /* Variance Inflation Factors */ vif; /* drop dist00sq from regression */ regress tsqf bedrms bathrms age garage view firepl porch dist00 sewer, robust; vif; /* Step 4: Test for Omitted Variables */ /* ********************************** */ /*re-run original model */ regress lnadj tsqf bedrms bathrms age garage view firepl porch dist00 dist00sq sewer, robust; /* Ramsey test */ estat ovtest; /* run model with dropped or added regressors and check if remaining coefficients change significantly */ regress lnadj tsqf bedrms bathrms age garage view firepl porch sewer, robust; log close;