this is my data example:
died_c | surv_c | op_pan | op_liv |
1 | 0 | 0 | 0 |
0 | 1 | 0 | 0 |
0 | 1 | 1 | 0 |
0 | 0 | 0 | 0 |
0 | 0 | 0 | 1 |
0 | 0 | 0 | 0 |
1 | 0 | 1 | 0 |
0 | 1 | 0 | 0 |
b) second I would like to divide for all observations op_pan ==1 the total of died_c the total surv_c.
I either tried to use some tab syntax or to create a newvar with the total of died_c/surv_c. Unfortunatly I didn't find a solution.
Your inputs would be very helpful. Thank you in advance.
0 Response to Divide total of varlist through another
Post a Comment