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

Hi there,

 

I´m using IML/SAS in SAS Enterprise Guide. 

Is there any solution that allows us to obtain Matrix B after apply retained minimization on Matrix A by row (see below)?

 

Thank you very much!

iml_problem.png

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Rick_SAS
SAS Super FREQ

Use the elementwise minimum operator (><) as explained in this blog post:

 

 

proc iml;
A ={
94 19 89 73 78 33 87 73  8 85 80 43  0,
92 95 69 64 32 11 30 18 11 75 82 48 99,
34 92 58 80 24 68 34 98 87 41 18 34  5};

B = A;
do j = 2 to ncol(A);
   B[,j] = (B[,j-1] >< B[,j]);
end;
print B;

 

View solution in original post

2 REPLIES 2
Rick_SAS
SAS Super FREQ

Use the elementwise minimum operator (><) as explained in this blog post:

 

 

proc iml;
A ={
94 19 89 73 78 33 87 73  8 85 80 43  0,
92 95 69 64 32 11 30 18 11 75 82 48 99,
34 92 58 80 24 68 34 98 87 41 18 34  5};

B = A;
do j = 2 to ncol(A);
   B[,j] = (B[,j-1] >< B[,j]);
end;
print B;

 

PC16
Calcite | Level 5

Thank you 

 

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.

From The DO Loop
Want more? Visit our blog for more articles like these.
Discussion stats
  • 2 replies
  • 803 views
  • 2 likes
  • 2 in conversation