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?