Dear Statalisters,
This might be a foolish question.
I was using
I have non-missing values for both hhi_sic3, hhi_med, but why I get all zero from step 2 for comp_dum. It must be a logical error.
i think i know why I was wrong. Never mind !
Sincerely,
Rochelle
This might be a foolish question.
I was using
Code:
bysort year industry: egen med_hhi=median (hhi_sic3) * generate for each industry year group, the median ratio of hhi_sic3 - which is a industry herfindahl index used to measure competition * step 2 * generate dummy to indicate if a firm's own herfindahl index is below its industry's median ratio gen comp_dum=(hhi_sic3<hhi_med)
i think i know why I was wrong. Never mind !
Sincerely,
Rochelle