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 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 595 views
  • 0 likes
  • 2 in conversation