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?
Thank you. I am trying to create a table where the mean and SD will vary as per the input table.
proc iml;
NumWalks = 100;
NumSteps = 52;
Mean = 0.003 (want to pull this value from have for next steps);
SD = 0.03 (want to pull this value from have for next steps);
x = j(NumSteps, NumWalks);
call randseed(1234);
call randgen(x, "Normal", Mean, SD);
y = j(NumSteps, NumWalks);
z = x + y;
do i = 1 to NumWalks;
z[,i] = cuprod(z[,i]);
end;
create t1 from z[colname='COL']; append from z;
quit;
data t2;
WEEK = _N_;
set t1;
run;
Thank you. Got my final result.
Please explain further. Show us examples of the input table(s) and the desired output.
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.
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.