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;
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
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.
Ready to level-up your skills? Choose your own adventure.