Help using Base SAS procedures

Regression & subgrouping

Reply
N/A
Posts: 0

Regression & subgrouping

Hey everybody,
This is my first post on this forum Smiley Tongue
I have a data set which I want to subgroup based on a character-type variable and then run a regression for each subset.
I will appreciate if anyone can help me in this!
** I tried this "if" statement to creat my new subset but it didn't work as well:
data SUBSET;
set MYDATALIST;
if VARa="abc" then delete;
run;

(VARa is character type)

Thanks folks
Malek
Respected Advisor
Posts: 3,900

Re: Regression & subgrouping

Use by group processing (by ) and the analysis is done for each subgroup, i.e:

proc sort data=MYDATALIST;
by Vara;
run;

PROC..... data=MYDATALIST;
by VARa;
....
run;

HTH
Patrick
N/A
Posts: 0

Re: Regression & subgrouping

This is great!
Thanks a lot Patrick.

Malek
Ask a Question
Discussion stats
  • 2 replies
  • 108 views
  • 0 likes
  • 2 in conversation