Program and data files for The Effect of Social Security, Health, Demography and Technology on Retirement by Pedro Cavalcanti Ferreira and Marcelo Rodrigues dos Santos Review of Economic Dynamics All files are zipped into program.zip. When unzipped it contains: main.f90 Main program (fortran) mod_globvar.f90 file for variable declarations (fortran) mod_initialize.f90 file for variables initialization (fortran) mod_bellman.f90 file that contains the bellman equations (fortran) mod_solution1.f90 file that solves the household problems (fortran) mod_simulation.f90 file that simulates the decision rules (fortran) mod_utilies.f90 file that contains many functions used in the code (fortran) input files: draws_sim.DAT draws_sol.DAT ef1950.txt ef2000.txt med_cost_age.txt prob_gh_bh.txt prob_gh_gh.txt psurv1950bh.txt psurv1950gh.txt psurv2000bh.txt psurv2000gh.txt There is a variable in the mod_globvar.f90 file called "exper", which can take the following values: 0, 1, 2, 3, 4, 5. Each value is associated with an experiment presented in the paper. Thus, for exper=0 the code runs the benchmark case; for exper=1 the code runs the experiment in which we change the rules of Social Security to those of 1950, while keeping everything else constant; for exper=2 the code runs the experiment in which Medicare is eliminated; for exper=3 it runs the experiment in which we change just the demographic profile;for exper=4 the code runs the experiment in which the age-efficiency profile of the benchmark economy is substituted with that of 1950; finally, for exper=5 the code runs the experiment in which all factors are changed simultaneously. There is a matlab file called "ret_fig.m' which uses the outputs associated with each of the experiments above to generate the figures presented in the paper. We would like to acknowledge that some routines are taken from the Numerical Recipes for Fortran 77 (and possibly modified by us). All errors are ours.