I was trying to draw a standard normal density curve using probnorm function. But instead of curvy it is spiky around zero. So is there any way to do it?
This is the code I used. It only generate the standard normal pdf alone, which is what i want. But you can see it is spiky instead of curvy around zero. Do you know it there better way to do it?
data try;
do z = -5 to 5 by 0.001;
if z gt 0 then pdf = 1- probnorm(z);
else pdf = probnorm(z);
output;
end;
run;
how about it:
[pre]
data normal;
do i=1 to 10000 ;
normal=rand('normal',0,1);
output;
end;
run;
proc univariate data=normal ;
histogram normal/normal;
run;
[/pre]