- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
data have;
call streaminit(123);
do type='A','B','C','D';
do group='A','B','C','D';
do obs=1 to 20;
x=rand('normal');
y=rand('normal');
output;
end;
end;
end;
run;
data dattrmap;
id='id';
input value $ linecolor $ LINEPATTERN $ LINETHICKNESS MARKERCOLOR $ MARKERSYMBOL :$20.;
cards;
A red solid 4 red circlefilled
B orange dot 6 orange triangleFilled
C yellow dash 8 yellow starfilled
D green longdash 10 green DiamondFilled
;
proc sgpanel data=have dattrmap=dattrmap;
panelby type/novarname ;
reg x=x y=y /group=group markerattrs=(size=12) attrid=id;
run;
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
hello.
I am plotting regressions in SGPANEL:
proc sgpanel data=dataset ;
panelby type ;
reg x=IV y=DV /group=group ;
The variable group has four levels (A B C D), and thus i get four separate regression lines.
I would like to control the the color (red, orange, yellow, green), line type (solid, dot, dash, longdash) and line thickness as well as the type of markers for the observed values and their color (matching the colors of the corresponding line, of course).
I am having a really hard time making that work.
If you have any suggestion, I'd very much appreciate.
Ideally a solution that would work also with SGPANEL.
I used SAS Studio.
Best,
Eman
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
data have;
call streaminit(123);
do type='A','B','C','D';
do group='A','B','C','D';
do obs=1 to 20;
x=rand('normal');
y=rand('normal');
output;
end;
end;
end;
run;
data dattrmap;
id='id';
input value $ linecolor $ LINEPATTERN $ LINETHICKNESS MARKERCOLOR $ MARKERSYMBOL :$20.;
cards;
A red solid 4 red circlefilled
B orange dot 6 orange triangleFilled
C yellow dash 8 yellow starfilled
D green longdash 10 green DiamondFilled
;
proc sgpanel data=have dattrmap=dattrmap;
panelby type/novarname ;
reg x=x y=y /group=group markerattrs=(size=12) attrid=id;
run;
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
hello,
thanks for the reply, and sorry for the late response on my end.
I wanted to have only one group/regression line in each quadrant, so I adjusted the syntax, and it works well!
Thank you
Emanuele