STATA do files for estimating various parameters