BookmarkSubscribeRSS Feed
shubhodasgupta
Fluorite | Level 6

Hi, I am trying to assign a value to a proc iml input from my datatset.  

proc iml;

NumWalks = 100;

NumSteps = 52;

Mean = 0.003;

SD = 0.03;

 

I want to assign mean and std from dataset of another table 

 

STOCKNAME     MEAN     STD

A                          0.003     0.034

B                          0.006     0.05

 

How can I pull the mean and std value from the other dataset?  

2 REPLIES 2
PaigeMiller
Diamond | Level 26

PROC IML allows you to read values from a data set into a matrix. Example:

https://documentation.sas.com/?cdcId=pgmsascdc&cdcVersion=9.4_3.4&docsetId=imlug&docsetTarget=imlug_...

 

More details

https://documentation.sas.com/?cdcId=pgmsascdc&cdcVersion=9.4_3.4&docsetId=imlug&docsetTarget=imlug_...

 

Although the way you have described the problem, there's no need for PROC IML, when DATA steps ought to get the job done.

--
Paige Miller
shubhodasgupta
Fluorite | Level 6

Thank you.

How will I be able to assign the value of Mean to a specific value from the other dataset?

sas-innovate-wordmark-2025-midnight.png

Register Today!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.


Register now!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 720 views
  • 0 likes
  • 2 in conversation