This webpage collects some of the computing stuffs I've written for either my research or study. Please let me know if you have any comments. Note that some of programs are not available right now because I am re-organizing them.


    Stata: Generalized Entropy Mobility Measure

     This program accompanies my on-going project with Essie Maasoumi on dynamic mobility

     in China. The measure is based on Maasoumi and Trede (2001) and Maasoumi and

     Zandvakili (1986, 1990).


     [1]   Program    [gemm.ado]    [gemmgraph.ado]

     [2]   Example Data    [mobility.dta]

     [3]   Help File    [gemm_help.pdf]       avaiable



    Stata: Instrument Variable Quantile Regression

     This program is based on Chernozhukov and Hansen (2006)


     [1]   Program    [ivqreg.ado]


    Stata: Locally Weighted Nonparametric Regressions

     [1]   Program    [lowrex.ado]       avaiable


    Stata: Cross-Validation Bandwidth Selection for Regression Discontinuity

     [1]   Program    [opth.ado]      


    Stata: Econometrics using Mata (Examples)


     [1]   Four Ways of Getting OLS Estimates in Mata    []       avaiable


    Stata: Solving Nonlinear Equations (Examples)


     [1]   Bisection Method    []

     [2]   Function Iteration Method Method    []

     [3]   Newton-Raphson Method (Univariate Case)   []

     [4]   Newton-Raphson Method (Multivariate Case)   []

     [5]   Quasi-Newton Method (Univariate Case)   []

     [6]   Quasi-Newton Method (Multivariate Case)   []



    Stata: Other Programs

     The following programs are intented to facilitate my own research. In most cases, you won't find them



     [1]   Get Date and Time for Programming Use    [getdate.ado]

     [2]   Generate Tables for IV regressions    [myivt2.ado]

     [3]   Generate Tables for OLS regressions    [myolst2.ado]