This code below creat a uniform (0,1), how can I modify to creat uniform (0.2, 1)
data t;
do i = 1 to 50;
a=uniform(0);
output;
end;
run;
Did you try it? I think the range will be between .2 and 1
Couldn't you achieve that with: a=.8*uniform(0)+.2;
This wont work, it will give values that are more than 1
Did you try it? I think the range will be between .2 and 1
Yes it works, Thanks
For the general case, see How to generate random numbers in SAS - The DO Loop
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!Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.