BookmarkSubscribeRSS Feed
anavipalma
Calcite | Level 5

Hello!

 

I am struggling to create a prevalence diabetes graph with confidence intervals using the survey reg procedure (my data has survey weights.  Note= diabetes prevalence can we used as a continuous variable)

 

I am using the following code:

 

ods graphics on;

proc surveyreg data= mydata;

strata strata;

class sex;

model diabetes=sex/ clparm;

weight weight;

run:

thank you for your prompt help, it is much needed!

 

 

4 REPLIES 4
Cynthia_sas
SAS Super FREQ

Hi: The PROC SURVEYREG documentation describes how you use can use ODS GRAPHICS with this procedure: https://go.documentation.sas.com/doc/en/statcdc/14.2/statug/statug_surveyreg_details54.htm
As shown in the documentation, using various statements will cause PROC SURVEYREG to automatically produce graphics. I don't see the PLOTS= option in your code so I wonder whether you might need a PLOTS= option. When I run the example from the doc using the FARMS data (which has both a STRATA and a WEIGHT statement, the default plot that I get is a bubble plot without using the PLOTS= option. This might be a question that is better worked with Tech Support so they can look at your data and your code and help you figure out the correct SURVEYREG syntax for what you want to do..
Cynthia

anavipalma
Calcite | Level 5
Hello !

Thank you Cinthia, would you please paste the code you are referring to? I
checked and I couldn't find it . If someone else has another
suggestion, please let me know!
Cynthia_sas
SAS Super FREQ

Hi:

  The SURVEYREG example 120.4 is the one I used https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.4/statug/statug_surveyreg_examples04.htm and I got a bubble plot as shown in the documentation.

Cynthia

ballardw
Super User

I would like to see some examples of the value of Diabetes.

Surveyreg, like Proc Reg is more designed to have more or less continuous independent and dependent variables. As in predicting how much change the dependent variable is associated with a change in the independent. Sex, especially as a class variable, typically does not have that sort of behavior.

 

If your diabetes variable is actually a 0/1 type coding (or similar) for does not have diabetes/has diabetes then you probably should be looking to SurveyLogistic.

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!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 4 replies
  • 489 views
  • 0 likes
  • 3 in conversation