Tuesday, July 28, 2009

DOMAIN statement of PROC SURVEYLOGISTIC

DOMAIN statement of PROC SURVEYLOGISTIC

In SAS 9.2 there is a DOMAIN statement. Prior to SAS 9.2, there is a
trick to getting the a close approximate analysis might be helpful.

What you can do is to assign a near zero weight to observations that
don't belong to your current domain. The reason that you can not simply
make the weight zero is that the procedure will exclude the observation
with zero weight. For example, if you have a domain gender=male or
female, and if you do

if gender=male then newweight=weight; else newweight=1e-6;

Then you perform the logistic regression using the newweight:

weight newweight;

No comments: