Question: Needs help with some SAS coding questions. 1. Try to find SAS macro samplhist() having two input parameters: dist and n. When run, your macro
Needs help with some SAS coding questions.
1. Try to find SAS macro samplhist() having two input parameters: dist and n. When run, your macro should sample n random variables from the specied distribution (either dist = uniform or dist = normal) and draw a histogram. The histogram title should indicate which distribution the sample came from and also the sample size. The macro should also have an error message to the log file when the user species a distribution other than uniform or normal.
2. (Bonus) Suppose the following (5 * 3) data matrix is given: X = {1 2 4, 2 4 6, 4 9 2, 9 2 3, 0 8 6, 5 12 8};
(a) Within PROC IML, compute the (3 * 3) correlation matrix R. Recall that for two variables x = (x1; : : : ; xn) and y = (y1; : : : ; yn), the correlation rxy is defined as

\f
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
