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-2024.png

 

Secure your spot at the must-attend AI and analytics event of 2024: SAS Innovate 2024! Get ready for a jam-packed agenda featuring workshops, super demos, breakout sessions, roundtables, inspiring keynotes and incredible networking events.

 

Register by March 1 to snag the Early Bird rate of just $695! Don't miss out on this exclusive offer. 

 

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.

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
  • 4 replies
  • 165 views
  • 0 likes
  • 3 in conversation