SAS Error Message: 'Observations omitted due to nonpositive weights'

#1

Hi all,

I am using IHIS 2013. With my first couple data extracts, PROC SURVEYFREQ and other survey procedures worked but then stopped. I have tried closing and reopening SAS and re-downloading my dataset.

Here are examples of the codes I am attempting to run:

proc SURVEYFREQ data=IHISR;

strata STRATA;

cluster PSU;

weight SAMPWEIGHT;

TABLES SEXORIEN;

run ;

proc SURVEYREG data=IHISR ALPHA= .05 ;

strata STRATA;

cluster PSU;

weight SAMPWEIGHT;

CLASS SEXORIEN;

MODEL DISTRESSSCALE = SEXORIEN /SOLUTION;

run ;

Each time, I recieve some variation on the following error messages:

NOTE: Writing HTML Body file: sashtml.htm

NOTE: 114744 observations were omitted due to nonpositive weights.

NOTE: No observations.

NOTE: PROCEDURE SURVEYFREQ used (Total process time):

real time 1.25 seconds

cpu time 0.81 seconds

ERROR: All observations were omitted due to missing values or non-positive weights.

NOTE: The SAS System stopped processing this step because of errors.

NOTE: PROCEDURE SURVEYREG used (Total process time):

real time 1.48 seconds

cpu time 1.39 seconds

What can I do to fix this? I would really like to use IHIS not NHIS if possible.

thank you,

Lila

#2

You have requested a Hierarchical data extract, which means households (rectype=1) are in separate observations than individual respondents (rectype=2). Since STRATA and PSU are household variables, while SAMPWEIGHT and SEXORIEN are person variables, all of your observations will be missing two of the four variables necessary to properly execute your SAS procedure.

You can solve this problem by changing the data structure of your extract back to the default Rectangular format. This will attach household values to person-level observations. As a result, you will be able to run your SAS code without receiving an error message about missing values.

Hope this helps.