Skip to content

mpleung/twostep

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This repository contains code used in the paper "Two-Step Estimation of Network-Formation Models with Incomplete Information" by Michael Leung.

NOTE: Line 12 of en_stat.m and line 26 of en_stat_slow.m contain an error. They should both be replaced with

Xg = Xg(:,[4:9 16:size(Xg,2)]); % omit pid, drop, educ

As an aside, the text of the published paper neglects to mention that homophily in age is included in the specification. The numbers in the published paper are incorrect due to this slicing error, which erroneously drops a caste indicator ('caste3' in the code) and replaces it with an education indicator ('educ_oth'). I thank Margherita Comola and Amit Dekel for bringing this to my attention.

The sections below explain some of what you see in this directory. Some of the files described only appear after running main.m. Before using the code, you will need to change [PATH] in main.m, latextables.m, misc.m, and visualizenetwork.r to the actual directory path of this folder.

Prior to running the code, create the following folders in the current directory: 'raw_data', 'directed_adjacency_matrices', 'dMU', 'lendmoney_graphs', and 'results'.

  1. 'raw_data' folder: Obtain data from http://www.stanford.edu/~jacksonm/IndianVillagesDataFiles.zip. After unzipping, put the contents of the folder '2010-0760_Data' directly into this folder.
  2. 'code' folder:
    • Run main.m to generate data, estimate the model, and compute the asymptotic variance.
    • misc.m contains code for creating summary statistics and exporting characteristics for use in visualizenetwork.r
    • visualizenetwork.r generates visual representations of the networks. Its output is saved in 'lendmoney graphs'.
    • latextables.m is used to generate the tables of parameter estimates in the paper.
  3. 'directed_adjacency_matrices' folder: This contains 'lendmoney' and 'rel' csvs generated from drop_notype_all.m in the 'code' folder. It also contains adjacency matrix csvs generated by gendirected.m.
  4. 'dMU' folder: This contains output from dMU.m.
  5. 'lendmoney_graphs' folder: This contains output from visualizenetwork.r.
  6. 'results' folder: This contains output from twostepest.m and avar.m.
  7. other files:
    • X.mat in the root folder is generated by format_covariates.m.
    • ind_char_subset.tab is a custom zip file taken from the microfinance project website http://economics.mit.edu/faculty/eduflo/social. Its columns are pid hhid resp_gend resp_status age religion caste subcaste mothertongue kannada tamil telugu hindi urdu english educ res_time_yrs work_freq work_freq_type shgparticipate savings.

ACKNOWLEDGEMENTS

Data and much of the gendirected.m file used here are taken from data and code used in the following papers.

  • Abhijit Banerjee, Arun Chandrasekhar, Esther Duflo, Matthew O. Jackson (2013) ``The Diffusion of Microfinance,'' Science, 341 (6144)
  • Matthew O. Jackson, Tomas Rodriguez-Barraquer, Xu Tan (2012) ``Social Capital and Social Quilts: Network Patterns of Favor Exchange,'' American Economic Review, 102 (5).

About

Code for 'Two-Step Estimation of Network-Formation Models with Incomplete Information'

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published