[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: RE: Using 2 vars to make 1 in presence of missing
gen c = a
replace c = b if c==.
From: SamL [mailto:email@example.com]
Sent: maandag 18 oktober 2004 6:06
To: Stata Listserve
Subject: st: Using 2 vars to make 1 in presence of missing
I have two variables, a and b, and 1.5 datasets, A and B. All cases in B are in A, but some cases
in A are not in B. I want to merge the two datasets, matching on the id.
Variable a is missing for some cases in A, but the same variable has valid
values for some of those cases in B (as b).
I have tried several approaches. What I want is:
do if (a ne .)
else if (b ne .)
* For searches and help try: