BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
hongjie76
Calcite | Level 5
I am using national survey data that include survey weights in the dataset. I'd like to use Proc Genmod to estimate the prevalence ratios (not the odds ratios estimated from PROC SURVEYLOGISTIC), but I am not sure if proc genmod can account for the complex sampling design structure.  Thank you in advance. 
1 ACCEPTED SOLUTION

Accepted Solutions
StatDave
SAS Super FREQ
Read the example in the note I referred to more carefully. Notice that it includes an LSMEANS statement and uses (as required by LSMEANS) the PARAM=GLM option in the CLASS statement. You should probably also read the documentation of the NLMeans macro to understand what it requires.

View solution in original post

4 REPLIES 4
StatDave
SAS Super FREQ

No, GENMOD does not have the variance estimators necessary for proper analysis of survey data. But you don't need GENMOD for this. You can use PROC SURVEYLOGISTIC and then follow by using the NLMeans macro with OPTIONS=RATIO in the same was as shown in this note with PROC LOGISTIC.

hongjie76
Calcite | Level 5

Thank you for your response. I tried to use this SAS syntax but got a warning message. Could you please check if 'ods output coef=coeffs;' and 'store out=ques;' are correct? Thank you again!

proc surveylogistic data=c8_ncsr;
strata sestrat;
cluster seclustr;
weight ncsrwtlg;
class ag4cat (ref=first) sex (ref=last) ed4cat (ref=first) mar3cat (ref=first)
/ param=ref;
model mde (event='Yes')=ag4cat sex ald ed4cat mar3cat;
format ag4cat af. sex sf. ed4cat edf. mar3cat mf. mde yn.;
ods output coef=coeffs;
store out=ques;
run;

WARNING: Output 'coef' was not created. Make sure that the output object name, label, or path is spelled correctly. Also, verify
that the appropriate procedure options are used to produce the requested output object. For example, verify that the
NOPRINT option is not used.
StatDave
SAS Super FREQ
Read the example in the note I referred to more carefully. Notice that it includes an LSMEANS statement and uses (as required by LSMEANS) the PARAM=GLM option in the CLASS statement. You should probably also read the documentation of the NLMeans macro to understand what it requires.

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 4 replies
  • 721 views
  • 0 likes
  • 2 in conversation