New SAS User

Completely new to SAS or trying something new with SAS? Post here for help getting started.
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-white.png

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

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
  • 1808 views
  • 1 like
  • 3 in conversation