<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Correlated Random Draws - Student's T distribution in SAS/IML Software and Matrix Computations</title>
    <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Correlated-Random-Draws-Student-s-T-distribution/m-p/484902#M4298</link>
    <description>&lt;P&gt;I am able to create random correlated standard normal draws using PROC IML and feeding it a correlation matrix and a vector of means=0 (see the code below)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;*Create Lower Triangular Correlation Matrix;
DATA Have_Matrix;
INPUT C1 C2 C3 C4;
DATALINES;
1	.7	.2	0
.7	1	.4	.5
.2	.4	1	.3
0	.5	.3	1
;RUN;

*Create a vector of Means=0;
DATA Have_Means (Drop=i);
DO i = 1 TO 4;
	Mean = 0;
	OUTPUT;
END;
RUN;

*Create the Correlated Random Draws;
PROC IML;
USE Have_Matrix;
READ ALL VAR _NUM_ INTO CovMatrix;	*Symmetric Covariance Matrix;
USE Have_Means;
READ all VAR _NUM_ INTO Mean;
N = 1000;							*sample size;
X = RandNormal(N, Mean, CovMatrix);	*1,000 x 4 Correlated Std Normal Draws;
CREATE Want FROM X; APPEND FROM X; CLOSE Want;
QUIT;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;How do I do this using a Student's T distribution? (I believe the above code defaults to Gaussian? I could be wrong about that so please correct me if I am misinterpreting)&lt;/P&gt;</description>
    <pubDate>Tue, 07 Aug 2018 20:30:04 GMT</pubDate>
    <dc:creator>SASaholic629</dc:creator>
    <dc:date>2018-08-07T20:30:04Z</dc:date>
    <item>
      <title>Correlated Random Draws - Student's T distribution</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Correlated-Random-Draws-Student-s-T-distribution/m-p/484902#M4298</link>
      <description>&lt;P&gt;I am able to create random correlated standard normal draws using PROC IML and feeding it a correlation matrix and a vector of means=0 (see the code below)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;*Create Lower Triangular Correlation Matrix;
DATA Have_Matrix;
INPUT C1 C2 C3 C4;
DATALINES;
1	.7	.2	0
.7	1	.4	.5
.2	.4	1	.3
0	.5	.3	1
;RUN;

*Create a vector of Means=0;
DATA Have_Means (Drop=i);
DO i = 1 TO 4;
	Mean = 0;
	OUTPUT;
END;
RUN;

*Create the Correlated Random Draws;
PROC IML;
USE Have_Matrix;
READ ALL VAR _NUM_ INTO CovMatrix;	*Symmetric Covariance Matrix;
USE Have_Means;
READ all VAR _NUM_ INTO Mean;
N = 1000;							*sample size;
X = RandNormal(N, Mean, CovMatrix);	*1,000 x 4 Correlated Std Normal Draws;
CREATE Want FROM X; APPEND FROM X; CLOSE Want;
QUIT;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;How do I do this using a Student's T distribution? (I believe the above code defaults to Gaussian? I could be wrong about that so please correct me if I am misinterpreting)&lt;/P&gt;</description>
      <pubDate>Tue, 07 Aug 2018 20:30:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Correlated-Random-Draws-Student-s-T-distribution/m-p/484902#M4298</guid>
      <dc:creator>SASaholic629</dc:creator>
      <dc:date>2018-08-07T20:30:04Z</dc:date>
    </item>
    <item>
      <title>Re: Correlated Random Draws - Student's T distribution</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Correlated-Random-Draws-Student-s-T-distribution/m-p/485133#M4299</link>
      <description>&lt;P&gt;I remembered there is a RAND function to get it .&lt;/P&gt;
&lt;P&gt;Better post it at IML forum . &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13684"&gt;@Rick_SAS&lt;/a&gt;&amp;nbsp; is there.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Aug 2018 12:57:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Correlated-Random-Draws-Student-s-T-distribution/m-p/485133#M4299</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2018-08-08T12:57:47Z</dc:date>
    </item>
    <item>
      <title>Re: Correlated Random Draws - Student's T distribution</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Correlated-Random-Draws-Student-s-T-distribution/m-p/485141#M4300</link>
      <description>&lt;P&gt;Use &lt;A href="http://go.documentation.sas.com/?docsetId=imlug&amp;amp;docsetTarget=imlug_langref_sect374.htm&amp;amp;docsetVersion=14.3&amp;amp;locale=en" target="_self"&gt;the RANDMVT function&lt;/A&gt; to generate random observations from a multivariate t distribution.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Aug 2018 13:13:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Correlated-Random-Draws-Student-s-T-distribution/m-p/485141#M4300</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2018-08-08T13:13:33Z</dc:date>
    </item>
  </channel>
</rss>

