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

Needs help with some SAS coding questions. 1. Try to find SAS

\f

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Mathematics Questions!