Heterogeneous Diffusion Software

This page provides software for implementing the heterogeneous diffusion model in STATA. The hdiff routine is intended to be user-friendly, flexible, open and transparent. I developed it with the help of David Strang. Your feedback and suggestions are welcomed.

This version (Version 2.1, 2018) reflects input from a number of users. I added support for multi-spell datasets, including data with multiple failures (i.e. repeated events), and expanded the options for event history modeling.

To use the model, download hdiff.ado (the program), hdiff.sthlp (the help file), and hdiff_examples.do (the examples file) to your machine. The easiest way to do that is to right-click on those file names and ‘save link as’, saving the files to either your STATA working directory or personal ado directory. The file hdiff_examples.do provides further instructions and several illustrations of how to use the program. It uses the data file dpb_data_excerpt.dta, covering adoptions of domestic partner benefits by US companies. Two other data files, sp1500_ilox_small.dta and sp1500_matrix_random.dta, demonstrate the use of full-matrix network data for modeling proximity effects.

Slides introducing the model and software can now be found here. When you use hdiff, I recommend inspecting the working_file.dta created by the program, to see what is going on “under the hood” with the diffusion spells and vector variables – hopefully a great advantage!

For a recent example of research using hdiff, see Briscoe, Gupta & Anner (Administrative Science Quarterly, 2015). To learn more about the model, see Strang & Tuma (American Journal of Sociology, 1993) and Greve, Strang & Tuma (Sociological Methodology, 1995).