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.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.
Ready to level-up your skills? Choose your own adventure.