Dear All, Suppose that I run the code
Code:
sysuse auto, clear
gen d = (rep78 > 2) & !missing(rep78)
i.e., d-=1, if rep78 > 2 (3,4,5) and d=0 if rep78 <= 2 (1,2). My problem is that I want d =. if rep78 = . (missing). Any suggestions (hopefully, in one line)? Thanks.