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?

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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
  • 493 views
  • 0 likes
  • 2 in conversation