- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I have school enrollment data for two periods (1, 2) and whether they received treatment (0,1). The data is attached and the graph that I produced are attached. I wanted to show the treatment effect using the parallel trend. My supervisor wants me to change the control group line (given by the blue to black dots and solid black line for the treatment given by the red). I copied the program from online and played with it until i got it this close. However, I don't know how to do what my supervisor advised me to do. Any help will be welcomed:
proc sgpanel data=work.data1 ;
panelby period /uniscale=row;
title "Early Adoptors vrs late Adoptors Before t=2007";
reg y=avg_overall x=year /group=treatment_status ;
run;
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
https://documentation.sas.com/?docsetId=grstatproc&docsetVersion=9.4&docsetTarget=p0qva1ws6twy5xn0zd...
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Add option lineattrs=(pattern=shortdash) to the reg statement.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
proc sgpanel data=work.final3b1 ;
panelby period /uniscale=row;
title "Early Adoptors vrs late Adoptors Before t=2007";
reg y=avg_overall x=year / lineattrs=(pattern=shortdash) group=treatment_status ;
run;
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
https://documentation.sas.com/?docsetId=grstatproc&docsetVersion=9.4&docsetTarget=p0qva1ws6twy5xn0zd...
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
@Reeza wrote:
Try a STYLEATTRS options instead of lineattrs or list multiple patterns if you have multiple lines, they are applied in order of your groups, alphabetically I believe.
https://documentation.sas.com/?docsetId=grstatproc&docsetVersion=9.4&docsetTarget=p0qva1ws6twy5xn0zd...
Thank you Reeza for the suggestion. It worked!!