How would you generate 1000 observations from a normal
distribution with a mean of 50 and standard deviation of
20. How would you use PROC CHART to look at the
distribution? Describe the shape of the distribution.
Answer / yuyin
data temp(keep=x);
retain mu 50 std 20 seed 0;
do i=1 to 1000;
x=mu+std*rannor(seed);
output;
end;
run;
proc chart data=temp;
vbar x;
run;
normal distribution with mean =50 and std=20
| Is This Answer Correct ? | 22 Yes | 2 No |
In this question, I rename the numeric variable phone to numphone and then try use phone=put(numphone,comma16.) to store the numeric value numphone as a string value in phone. But I get a warning tha numphone already exists and in the data sat phone doesnt exist and numphone is set to missing. Why? data names_and_more; input Name $20. Phone : comma16. Height & $10. Mixed & $8.; Name = tranwrd(Name,' ',' '); rename phone = numphone; phone = put(numphone,comma16.); datalines; Roger Cody 9,087,821,234 5ft. 10in. 50 1/8 Thomas Jefferson 3,158,488,484 6ft. 1in. 23 1/2 Marco Polo 8,001,234,567 5Ft. 6in. 40 Brian Watson 5,183,551,766 5ft. 10in 89 3/4 Michael DeMarco 4,452,322,233 6ft. 76 1/3 ;
SAS System ?
What can be the size of largest dataset in SAS?
How would you include common or reuse code to be processed along with your statements?
how to change the execute of macro
How to read multiple excel sheets from a single excel file at once????
7 Answers HCL, Verinon Technology Solutions,
Explain input and put function?
Name and describe three SAS functions that you have used, if any?
What is auto call macro and how to create a auto call macro? What is the use of it? How to use it in sas with macros? : sas-macro
how can u import .csv file in to SAS?tell Syntax?
7 Answers CitiGroup, Franklin Templeton,
What is the difference between verification and validation?
Name statements that function at both compile and execution time.