Hello mdakkak! I am wondering if the problem is occurring during your IF and IF ELSE statements. For example, it could be possible that you are "overmatching" your data and, as a result, too many observations are being removed. Since you are non-match merging these data sets, you are dealing with gaps in the data sets which is why SAS is listing less observations and indicating that some observations do not exist. I would consider trying to use an IF statement in conjunction with an IF NOT statement in replace of the code that you currently have for the merge. I think the solution is that you need to specify the InDemog and InVitals automatic variables to show up. In addition to this, you would need to manually populate the value for HypRelDeathInd using conditional logic. You can use the keyword "NOT" to call people who don't show up in your dataset and then manually fill in the indicator variable to be 0. I have listed an example for you to look at here: IF InDemog AND InVitals; IF NOT InNDI THEN HypRelDeathInd = 0; Hope that this helps! - James
... View more