Dear SAS users,
I am using SAS Enterprise Guide to look at the relationship between online patient portal use (continuous; X) and age (continuous; Y), and whether this relationship differs by dichotomous variable region (M; categorical; rural or urban).This patient portal data (X) is not normally distributed, so I am trying to fit a loess curve. I would like to overlay 1 loess curve for rural and one curve for urban on the same graph. My data are set up as such:
PortalUse Region Age
3 Rural 45
7 Urban 67
2 Urban 83
etc...
Right now, I have only figured out how to plot separate loess curves (one plot for rural, one for urban) with the following syntax:
ods graphics on;
ods select FitPlot;
proc loess data=LoessData plots=FitPlot;
by region;
model Age = PortalUse / interp=linear
degree=1
select=AICC(presearch);
run;
Is there a way to graph these two loess curves on the same plot? ideally, it would look something like this (with obvious differences in the x and y axes labels):

Thank you in advance for your expertise and time.
Stephanie