I noticed that sometimes (at least in small, simulated data) there are multiple connected sets of equal size, which causes an error in the following line of the file pruning_unbalanced_v3.m:
firmlst=find(sindex==idx); %firms in connected set
I believe one (arbitrary) solution is to add the following line just before that quoted above:
idx=idx(1); % pick an arbitrary connected set among all tied largest connected sets
I believe the same issue applies to the connected set computed in connected_set.m.
I noticed that sometimes (at least in small, simulated data) there are multiple connected sets of equal size, which causes an error in the following line of the file pruning_unbalanced_v3.m:
firmlst=find(sindex==idx); %firms in connected set
I believe one (arbitrary) solution is to add the following line just before that quoted above:
idx=idx(1); % pick an arbitrary connected set among all tied largest connected sets
I believe the same issue applies to the connected set computed in connected_set.m.
Thanks again for the excellent work! :)