BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Santha
Pyrite | Level 9

set<str> Ports;/* this is a set of Ports*/
set<str> IC; /* this is a set of DCs*/

 

num OutboundLinehaul {IC,DC}; /*This is an array of OutboundLinehaul Costs indexed over IC and DC*/
/*read data into the OutboundLinehaul parameter*/
read data PUBLIC.Outbound_Linehaul into [IC DCCode] OutboundLinehaul=Rate;
print OutboundLinehaul;

 

I get a warning like this. I am not sure if this is going to affect my model or should I do something to fix this. I am not sure what does invalid target indices mean.

WARNING: 18 non-missing values were discarded due to invalid target indices.

IC and DC are all strings by definition. 
the variable Rate is a number

1 ACCEPTED SOLUTION

Accepted Solutions
RobPratt
SAS Super FREQ
That warning means that the data set has some values of IC that are not in the IC index set or some values of DCCode that are not in the DC index set.

View solution in original post

5 REPLIES 5
RobPratt
SAS Super FREQ
That warning means that the data set has some values of IC that are not in the IC index set or some values of DCCode that are not in the DC index set.
Santha
Pyrite | Level 9

Thanks rob again. What you said is spot on. There was one missing DC that I need to take care of. AFter that it was all good. 

Perfect. Thanks

Santha
Pyrite | Level 9

An associated question about this. I have a list of 15 members in my index set. I have a binary variable that I associated with this set. I am having this as binary because i want to set some or all of the sites to be open or closed depending on specific scenario. 

Can I say , %let Build ['xxx']=1; to mean that the binary variable called build for  this particular 'xxx' is assigned 1 meaning it is open and on the same token  %let Build ['yyy']=0; to mean that it is closed? I ran it but everything is assigned to 0. What could fix this?

 

RobPratt
SAS Super FREQ
Use the FIX statement.
Santha
Pyrite | Level 9

Excllent. "FIX" fixed it  perfect 🙂 thank u

sas-innovate-2024.png

 

Time is running out to save with the early bird rate. Register by Friday, March 1 for just $695 - $100 off the standard rate.

 

Check out the agenda and get ready for a jam-packed event featuring workshops, super demos, breakout sessions, roundtables, inspiring keynotes and incredible networking events. 

 

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
  • 5 replies
  • 606 views
  • 2 likes
  • 2 in conversation