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!
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
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
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.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!
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.
Select SAS Training centers are offering in-person courses. View upcoming courses for: