BookmarkSubscribeRSS Feed
wutao9999
Obsidian | Level 7

Let's assume we have two data sets:   products_table products {apple, orange, banana}    and subproducts_table  subproducts {apple, banana}.

In the SAS OPTMODEL procedure, we have define the set,

set<string> products_set;

read data products_table into

        products_set = [products];

how do we define a subset of products_set which contains "subproducts {apple, banana}"?

Thank you for the help.

1 REPLY 1
RobPratt
SAS Super FREQ

You would just need a second SET and READ DATA for the other data set:

set<string> subproducts_set;

read data subproducts_table into subproducts_set=[subproducts];

SAS Innovate 2025: Call for Content

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 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

Multiple Linear Regression in SAS

Learn how to run multiple linear regression models with and without interactions, presented by SAS user Alex Chaplin.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 1 reply
  • 886 views
  • 0 likes
  • 2 in conversation