Hello, I am struggling to replace missing values (.) with 0 for yearly dummy variables. I have attached a part of my data below. I have 25 dummy variables so I didn't want to compute it manually. Please could you let me know if there is an easier way to compute it?
Code:
* Example generated by -dataex-. For more info, type help dataex clear input long h_pid float c_age1 byte(c_age1_dummy1 c_age1_dummy2) 101 . . . 101 . . . 101 . . . 101 . . . 101 . . . 101 . . . 101 . . . 101 . . . 201 . . . 201 . . . 201 . . . 201 . . . 201 . . . 201 . . . 201 . . . 201 . . . 201 . . . 201 . . . 201 . . . 201 . . . 201 . . . 201 . . . 201 . . . 201 . . . 302 . . . 302 . . . 302 . . . 302 . . . 302 . . . 302 . . . 302 . . . 402 . . . 402 . . . 402 . . . 402 . . . 402 . . . 402 . . . 402 . . . 402 . . . 402 . . . 402 . . . 502 15 0 0 504 . . . 602 2 0 0 602 3 0 0 602 4 0 0 602 5 0 0 602 6 0 0 602 7 0 0 602 8 0 0 602 9 0 0 602 10 0 0 602 11 0 0 602 12 0 0 602 13 0 0 602 14 0 0 602 15 0 0 602 16 0 0 602 17 0 0 603 . . . 603 . . . 603 . . . 603 . . . 603 . . . 603 . . . 603 . . . 603 . . . 603 . . . 603 . . . 603 . . . 603 . . . 603 . . . 603 . . . 603 . . . 603 . . . 605 . . . 605 . . . 605 . . . 605 . . . 605 . . . 605 . . . 605 . . . 605 . . . 605 . . . 605 . . . 605 . . . 605 . . . 605 . . . 605 . . . 605 . . . 605 . . . 701 . . . 701 . . . 701 . . . 701 . . . 701 . . . 701 . . . 701 . . . 701 . . . 701 . . . end

Comment