BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
kuuz
Calcite | Level 5

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;

 

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User
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...

View solution in original post

4 REPLIES 4
PGStats
Opal | Level 21

Add option lineattrs=(pattern=shortdash) to the reg statement.

PG
kuuz
Calcite | Level 5
Thank you for the suggestion.So I did run your suggestion in the program below. It changes both lines to short dashes. I want only the blue line to be dashes while maintaining solid line for the red. Thank you again.

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;
Reeza
Super User
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...
kuuz
Calcite | Level 5

@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!! 

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

Register now

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 4 replies
  • 2290 views
  • 1 like
  • 3 in conversation