-
Conditional Density Method
These programs implement the conditional density method I used in this paper to impute missing variables and values in the American Community Survey and extended in my job market paper to correct for measurement error. All programs are for Stata and can be installed by copying the .ado files to a directory on the search path or the working directory. You can also install them from ssc by runningssc install conddens
,ssc install cddens
orssc install cdreg
in Stata. They are preliminary versions, i.e. I have tested them and they work, but some details about the implementation and the way they are run will need to be improved in future versions and the helpfiles need revisions. Please let me know if you have any questions or suggestions. Theconddens
command estimates conditional densities.cddens
uses estimated parameters of a conditional density to consistently estimate a marginal density or distribution in the presence of measurement error and missing data. It can also be used to simulate samples from the conditional density in order to estimate other models (as described in my job market paper) and implements tests of the conditional distribution.cdreg
uses the same method to correct linear regressions. See the help files that are included with the programs for further details.Parameter Estimates: Food Stamps 2008-2010 New York State ACS
-
Fixed Effects
The programs below implement the algorithm to compute estimates of large two-way fixed effects and match effects models that I described in this paper. The matlab program solves the problem directly using the Cholesky-Factorization. Notes on how to run it are provided at the beginning of the file. The Stata Programs implement the iterative solution using the conjugate gradient algorithm, plese see the included helpfile for further details. The programs can also be installed from ssc by runningssc install twfe
in Stata.
Files: Stata Programs Matlab Program
-
Misclassification
This program implements the Probit estimators that are consistent when the dependent variable suffers from misclassification. Bruce Meyer and I used these estimators in this paper. mrprobit.ado can be used to estimate the model proposed in Hausman, Abrevaya and Scot-Morton (1998), the extensions we used (known probabilities of misreporting and allowing these probabilities to vary by cell) and the predicted probabilities estimator. See the helpfile for more details. mrprlik.ado contains the likelihood function for mrprobit.ado and is required to be in the working directory or on the .ado search path. mrprjlik.ado contains the likelihood function for the joint estimators we used. The models can be estimated by making Stata's ml command use it as the likelihood function usingml lf mrprjlik [model specification]
. I hope to provide a helpfile for Stata shortly, if you want to use it and cannot figure out how it works, please let me know. The programs can either be installed by copying the files into a folder on the ado path or from ssc by runningssc install mrprobit
in Stata. Note (2/2/2013):Uploaded a revised version that fixed a problem with Stata 10. See the helpfile for details.Files: mrprobit
-
Other
Just some smaller programs that I wrote for miscellaneous reasons.- twclust - Two-Way Clustering in Stata
Cameron, Gelbach and Miller (2011) describe how to do multi-way clustering and have a program that probably covers more general cases and works better than mine. It did not work well for the large datasets I used for this paper, so I wrote this. The helpfile contains further details.Files: twclust
- .do files to import American Community Survey data into Stata
While NBER provides excellent files to read the CPS into Stata, I did not find any programs that import and label the ACS files provided by the Census Bureau. I'm using the files below to download, unzip, import, label and clean the ACS housing and population files. Further information is provided at the top of the "read_acs_1y.do" file. They are rather simple, but maybe you'll find them useful. I have only used a small subset of the ACS variables and have not checked whether everything else is imported correctly and there probably is a more elegant solution than recycling the 2010 labels. If you find any mistakes or have any improvements, please let me know.Files: ACS Stata files
- twclust - Two-Way Clustering in Stata