Hello everybody,
currently i am studying a do-file and got a bit confused.
For most of the variables, the author of the do-file codes the negative values of the variables as missing (essentially they are all equal to " . ".
But for some of them he replaces them with the value "99" and drops all observations where the dummy for that variable is qual to 1
for example :
And then he runs "drop if sec_4==1"
What are the reasons for that? Why not just let the missing value stay " . "
Thanks in advance
currently i am studying a do-file and got a bit confused.
For most of the variables, the author of the do-file codes the negative values of the variables as missing (essentially they are all equal to " . ".
But for some of them he replaces them with the value "99" and drops all observations where the dummy for that variable is qual to 1
for example :
Code:
replace sec=99 if sec==. tab sec, gen(sec_) Security | Freq. Percent Cum. ----------------------------------------+----------------------------------- [1] high sec| 46,640 10.53 10.53 [2] med sec | 120,017 27.09 37.62 [3] no sec | 161,136 36.37 73.99 99 | 115,228 26.01 100.00 ----------------------------------------+----------------------------------- Total | 443,021 100.00
What are the reasons for that? Why not just let the missing value stay " . "
Thanks in advance
Comment