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-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

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
  • 779 views
  • 0 likes
  • 2 in conversation