Hi All,
Attached is part of my datasets. I want to split the dataset into multiple datasets based on the Group, Product, Condition.
Any suggestions? Thanks!
Why? This isn't recommend usually because there are multiple ways to process data by groups without splitting them up or ways to export the data without first having to create multiple data sets. So explaining what your end goal is will help us provide a better solution.
You do whatever analysis you are planning using the BY statement. Leave everything in one data set.
Yeah, you don't need to do that in SAS. You can use BY to treat each group separately. For example, this will produce a regression model for each origin, entirely separately.
proc sort data=sashelp.cars out=cars;
by origin;
run;
proc reg data=cars;
by origin;
model Mpg_city = weight cylinders msrp;
run;
@bayoote wrote:
Hi, Thanks for your reply. Since I want to do the interpolation for each small group.That's why I need to split the dataset.
Is there a good reason why you want to do this? Generally, it is not advisable.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Select SAS Training centers are offering in-person courses. View upcoming courses for: