Hi ,
I want to drop the variable if the variable there is no value in the column variable or the result is 0 when sum of all values of the variable. I want to drop "sch_pri_no_bicyle" that has no value or as sum_sch_pri_no_bicyle is equal to Zero.
drop sch_pri_no_bicyle if sum_sch_pri_no_bicyle==0
But, it doesn't work.
Please here is sample data set
----------------------- copy starting from the next line -----------------------
------------------ copy up to and including the previous line ------------------
I want to drop the variable if the variable there is no value in the column variable or the result is 0 when sum of all values of the variable. I want to drop "sch_pri_no_bicyle" that has no value or as sum_sch_pri_no_bicyle is equal to Zero.
drop sch_pri_no_bicyle if sum_sch_pri_no_bicyle==0
But, it doesn't work.
Please here is sample data set
----------------------- copy starting from the next line -----------------------
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input int(sch_pri_no_bicyle sch_mid_no_bicyle sch_hig_no_bicyle) float(sum_sch_pri_no_bicyle sum_sch_mid_no_bicyle sum_sch_hig_no_bicyle) . 35 35 0 190 725 . 20 20 0 190 725 . 30 30 0 190 725 . 20 20 0 190 725 . . . 0 190 725 end
Comment