Mette Ejrnæs and Thomas H. Jørgensen, "Family Planning in a Life Cycle Model with Income Risk", Journal of Applied Econometrics, Vol. 35, No. 5, 2020, pp. 567-586. All files are zipped in ej-files.zip. Because this file contains a mix of text and binary files, Unix and Linux users should be cautious. Simply using "unzip -a" is likely to destroy the binary files. The STATA folder contains all the do-files used to construct the empirical measures from the BHSP. All BHPS data can be downloaded free of charge at https://www.iser.essex.ac.uk/bhps/acquiring-the-data The following Matlab files (in folder programs) produce the structural estimation results reported in the paper. All results are stored in the "Results" folder. main.m: main file. Running this file will run estimation for both educational groups and run the post-estimation files to produce the output. run_estimate.m: estimation file. You can run this file by it's own. run_post_estimation.m: post-estimation production of tables and figures. Loads the estimation results from the run_estimate.m file run_calibration_figs.m: produces calibration figures. Loads the estimation results from the run_estimate.m file est.m: static estimation class used to call all functions to estimate the model prep.m: static class that prepares state space and parameters before estimation. Called from est.setup The following files and folders are used by these Matlab files: mex_solve.mexw64: C++ compiled file solving the model mex_simulate.mexw64: C++ compiled file simulating synthetic data from the model cfuncs: folder containing all C++ mex-files used to compile mex_solve and mex_simulate. MatlabData: containts all BHPS data used in estimation in .txt format logs: contains estimation logs from estimation of the model.