Good evening to everyone,
I am working with firm-level data ( I have not workers microdata) and I have the following data:
1. hours of training per capita for women = h_procap_ben_F = h_training_F / N_participant_F
2. the same for males
I would like to create an indicator which is the ratio between h_procap_ben_F and h_procap_ben_M
The main problem is that when I divide for zero I get missing values. At first, I start thinking of replacing by 1 when the values are the same (eg. 0 and 0) , but I still not completely sure if makes sense (especially for the interpretation).
I would like to create an indicator that took value zero when there is gender balance in training hours. How can I figure out an indicator with this data which collects gender divergences in training hours?
Below are examples when the problem arises.
Many thank in advance for your time
Summaries statistics
I am working with firm-level data ( I have not workers microdata) and I have the following data:
1. hours of training per capita for women = h_procap_ben_F = h_training_F / N_participant_F
2. the same for males
I would like to create an indicator which is the ratio between h_procap_ben_F and h_procap_ben_M
The main problem is that when I divide for zero I get missing values. At first, I start thinking of replacing by 1 when the values are the same (eg. 0 and 0) , but I still not completely sure if makes sense (especially for the interpretation).
I would like to create an indicator that took value zero when there is gender balance in training hours. How can I figure out an indicator with this data which collects gender divergences in training hours?
Below are examples when the problem arises.
Many thank in advance for your time
Code:
* Example generated by -dataex-. For more info, type help dataex clear input float(h_procap_ben_F h_training_F N_participant_F h_procap_ben_M h_training_M N_participant_M ratio) . 0 0 . 0 0 . . 0 0 . 0 0 . . 0 0 . 0 0 . . 0 0 . 0 0 . . 0 0 . 0 0 . . 0 0 . 0 0 . . 0 0 . 0 0 . . 0 0 . 0 0 . . 0 0 . 0 0 . . 0 0 . 0 0 . . 0 0 . 0 0 . . 0 0 61.73585 3272 53 . . 0 0 6.473684 492 76 . . 0 0 . 0 0 . . 0 0 . 0 0 . . 0 0 . 0 0 . . 0 0 . 0 0 . . 0 0 7.142857 100 14 . . 0 0 . 0 0 . . 0 0 . 0 0 . . 0 0 . 0 0 . . 0 0 . 0 0 . . 0 0 . 0 0 . . 0 0 . 0 0 . . 0 0 . 0 0 . . 0 0 . 0 0 . . 0 0 . 0 0 . . 0 0 . 0 0 . . 0 0 . 0 0 . . 0 0 . 0 0 . . 0 0 54 108 2 . 3 3 1 . 0 0 . . 0 0 . 0 0 . . 0 0 . 0 0 . . 0 0 . 0 0 . . 0 0 . 0 0 . . 0 0 . 0 0 . . 0 0 . 0 0 . . 0 0 . 0 0 . . 0 0 . 0 0 . . 0 0 . 0 0 . . 0 0 . 0 0 . . 0 0 . 0 0 . . 0 0 . 0 0 . . 0 0 . 0 0 . . 0 0 . 0 0 . . 0 0 . 0 0 . . 0 0 . 0 0 . . 0 0 . 0 0 . . 0 0 3.4 68 20 . . 0 0 . 0 0 . . 0 0 . 0 0 . . 0 0 . 0 0 . . 0 0 . 0 0 . 32 128 4 . 0 0 . . 0 0 . 0 0 . . 0 0 . 0 0 . . 0 0 . 0 0 . . 0 0 100 6000 60 . . 0 0 62.22222 2800 45 . . 0 0 . 0 0 . . 0 0 . 0 0 . . 0 0 . 0 0 . 80 80 1 . 0 0 . . 0 0 . 0 0 . 120 120 1 . 0 0 . . 0 0 . 0 0 . . 0 0 11.809524 248 21 . . 0 0 . 0 0 . 6.666667 20 3 . 0 0 . . 0 0 . 0 0 . . 0 0 . 0 0 . . 0 0 . 0 0 . 40 40 1 . 0 0 . . 0 0 . 0 0 . . 0 0 . 0 0 . . 0 0 . 0 0 . . 0 0 2.2222223 20 9 . . 0 0 12 744 62 . . 0 0 . 0 0 . . 0 0 . 0 0 . . 0 0 . 0 0 . . 0 0 . 0 0 . . 0 0 . 0 0 . . 0 0 . 0 0 . . 0 0 . 0 0 . . 0 0 . 0 0 . . 0 0 . 0 0 . . 0 0 22.04348 1014 46 . . 0 0 10.56 264 25 . . 0 0 . 0 0 . . 0 0 . 0 0 . . 0 0 . 0 0 . . 0 0 . 0 0 . . 0 0 . 0 0 . . 0 0 . 0 0 . . 0 0 . 0 0 . . 0 0 . 0 0 . . 0 0 . 0 0 . . 0 0 . 0 0 . end
Code:
Variable Obs Mean Std. dev. Min Max h_procap_ben_F 17.620 29,01955 137,3599 ,0000839 14025,39 h_training_F 26.247 1910,504 92061,99 0 1,46e+07 N_participant_F 26.247 55,25988 406,3644 0 34680 h_procap_ben_M 18.814 29,31631 300,6491 -27597,11 22482,89 h_training_M 26.247 1678,723 75299,81 -1,15e+07 1844383 N_participant_M 26.247 77,70225 492,0451 0 36309 ratio 17.133 1,525592 19,58319 -79,33334 1469,125
Comment