BookmarkSubscribeRSS Feed
gianni
Calcite | Level 5


Since I got a sample and then calculate the respective desired estimates (total and proporconal)
How to calculate the corresponding design effect (deff)?

2 REPLIES 2
mfisher
Fluorite | Level 6

Proc surveyfreq will calculate the design effect for proportions by using the DEFF option in the TABLES statement.

Mark

gianni
Calcite | Level 5

Hello, thanks for your answer, but

this is my problem, I have a database of lessons presidential, with variables, candidate 1, candidate 2, Total_ votes, Strata.
And what I want is to calculate the estimators of reason, or proportion between a candidate and the total votes, and estimate of the total votes cast, their corresponding variances and their corresponding deff.
My program is as follows:

DATA PREP2006;

RUN;

*STRATIFIED SAMPLING;

PROC SORT DATA=PREP2006 OUT=ORDER_PREP2006; BY STRATA;

RUN;

PROC SURVEYSELECT DATA=ORDER_PREP2006

OUT=WORK.SAMPLING METHOD=SRS N=3;

STRATA STRATA;

RUN;

PROC PRINT DATA=SAMPLING (OBS=10);

RUN;

*proportion between a candidate and the total votes;

PROC SURVEYMEANS DATA=SAMPLING;

    RATIO  CAN21 CAND2 / TOTAL_VOTES ;

RUN;

*ESTIMATED TOTAL VOTES ^T;

PROC SURVEYMEANS DATA=SAMPLING SUM VARSUM STD RANGE NMISS CVSUM CLSUM;

    VAR TOTAL_VOTOS;

    WEIGHT SAMPLINGWEIGHT;

RUN;

*THE FOLLOWING PROC ME BACK THE DEFF, BUT NOT ON THE ESTIMATOR TOTAL OF TOTAL VOTES;


PROC SURVEYFREQ data=SAMPLING;

    TABLE TOTAL_VOTES / DEFF;

    strata ESTRATOS;

RUN;

HOW TO GET the following estimates?

    * estimates of population means and totals

    * estimates of population proportions

    * standard errors

    * confidence limits

    * deff For each ESTIMATOR

    * ratio estimates

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 1699 views
  • 0 likes
  • 2 in conversation