Suppressing Small Sample in SURVEY

Reply
New Contributor
Posts: 2

Suppressing Small Sample in SURVEY

I'm wondering if there's a way to automatically filter output that doesn't meet user-determined suppression rules. I would like to find a way to automatically censor data with fewer than six unweighted responses and/or a relative standard error of 30 percent or more.

 

For example, in the procedure below -- let's say there are only three men below the poverty line in my unweighted sample. I would like to then exclude that value from the table.

 

PROC SURVEYFREQ DATA=mydata;
TABLE gender*income / ROW CL CHISQ;
WEIGHT pop_weight; STRATA region;
TITLE "Analysis of Gender and Income";
RUN;

 

Thanks!

Super User
Posts: 22,555

Re: Suppressing Small Sample in SURVEY

Posted in reply to johnsonemilyk

You can build a custom formats that shows those values as *****?

 

It depends on what you mean by 'filter', would that mean exclude entirely or mask?

 


@johnsonemilyk wrote:

I'm wondering if there's a way to automatically filter output that doesn't meet user-determined suppression rules. I would like to find a way to automatically censor data with fewer than six unweighted responses and/or a relative standard error of 30 percent or more.

 

For example, in the procedure below -- let's say there are only three men below the poverty line in my unweighted sample. I would like to then exclude that value from the table.

 

PROC SURVEYFREQ DATA=mydata;
TABLE gender*income / ROW CL CHISQ;
WEIGHT pop_weight; STRATA region;
TITLE "Analysis of Gender and Income";
RUN;

 

Thanks!


 

New Contributor
Posts: 2

Re: Suppressing Small Sample in SURVEY

Thanks Reeza! A custom format may work. Either excluding entirely or masking should function, though. I'll see about doing a custom format.

Super User
Posts: 12,727

Re: Suppressing Small Sample in SURVEY

Posted in reply to johnsonemilyk

Send the desired output to a dataset using the ODS OUTPUT statement.

 

PROC SURVEYFREQ DATA=mydata;
TABLE gender*income / ROW CL CHISQ;

ods output chisq =gender_income_chi;

ods output crosstabs= gender_income_cross;
WEIGHT pop_weight; STRATA region;
TITLE "Analysis of Gender and Income";
RUN;

 

Would send the results of the CHISQ test to a dataset named gender_income_chi and the counts and such from the crosstab to a set gender_income_cross.

 

Then use any of the reporting procedures and options to display, subset or manipulated the data in the dataset as desired.

Ask a Question
Discussion stats
  • 3 replies
  • 108 views
  • 3 likes
  • 3 in conversation