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: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

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
  • 752 views
  • 0 likes
  • 2 in conversation