Hi community,
I have a 3 columns of patient details
Weight-height-ratio (WHR) , Age, sex.
I want to visualize an image like
But I get visualization like:
I given the code below
proc sgplot data = reg_55k;
styleattrs datacontrastcolors = (red blue);
scatter x = ageonset y = whr / group = sex;
reg x = ageonset y = whr / group = sex clm clmattrs = (clmfillattrs = (color = lightgrey));
run;
Please kindly guide me to get the exact format like the first visualization.
I also attach the dataset in this post.
Thanks in advance!
Can't see your example data. but what you want is likely something like this without the scatter statement
proc sgplot data=sashelp.class;
reg x=height y=weight / group=sex clm nomarker;
yaxis min=30 max=200;
run;
Can't see your example data. but what you want is likely something like this without the scatter statement
proc sgplot data=sashelp.class;
reg x=height y=weight / group=sex clm nomarker;
yaxis min=30 max=200;
run;
Thank you that worked out very nicely.
How could I implement the 95% interval in this, I tried like (cli clm)
Please gothrough the first image - it have 0.95 intreval values.
When I tried : PArtial output occurs
proc sgplot data=reg_55k;
reg x=ageonset y=whr_ / group=sex clm cli nomarker;
run;
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 25. 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.