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

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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