<?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 Re: calculate the location parameter with respect to Chi-Square distribution using RANNOR in SAS/IML Software and Matrix Computations</title>
    <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/calculate-the-location-parameter-with-respect-to-Chi-Square/m-p/402062#M3746</link>
    <description>&lt;P&gt;&lt;EM&gt;&amp;gt;&amp;nbsp;&amp;nbsp;i have to use PROC IML due to the requirement.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I don't understand. What requirement? Is this for a school assignment?&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Sat, 07 Oct 2017 10:47:29 GMT</pubDate>
    <dc:creator>Rick_SAS</dc:creator>
    <dc:date>2017-10-07T10:47:29Z</dc:date>
    <item>
      <title>calculate the location parameter with respect to Chi-Square distribution using RANNOR</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/calculate-the-location-parameter-with-respect-to-Chi-Square/m-p/400843#M3740</link>
      <description>&lt;P&gt;I am a new user of SAS with no basic knowledge. I want to calculate the location parameter with respect to Chi-Square distribution using RANNOR in SAS/IML. However, I don't know how to write the programming. Can you help me?? It is very urgent as I am in my final semester of my postgraduate study. Appreciate your help so much.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Oct 2017 00:03:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/calculate-the-location-parameter-with-respect-to-Chi-Square/m-p/400843#M3740</guid>
      <dc:creator>pingyin93</dc:creator>
      <dc:date>2017-10-04T00:03:37Z</dc:date>
    </item>
    <item>
      <title>Re: calculate the location parameter with respect to Chi-Square distribution using RANNOR</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/calculate-the-location-parameter-with-respect-to-Chi-Square/m-p/400844#M3741</link>
      <description>&lt;P&gt;Your library likely has access to Rick Wicklin's book, Simulating Data with SAS.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can also review his blog here :&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://blogs.sas.com/content/author/rickwicklin/" target="_blank"&gt;https://blogs.sas.com/content/author/rickwicklin/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Oct 2017 00:16:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/calculate-the-location-parameter-with-respect-to-Chi-Square/m-p/400844#M3741</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-10-04T00:16:50Z</dc:date>
    </item>
    <item>
      <title>Re: calculate the location parameter with respect to Chi-Square distribution using RANNOR</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/calculate-the-location-parameter-with-respect-to-Chi-Square/m-p/400855#M3742</link>
      <description>&lt;P&gt;I am using Hodges-Lehmann estimator and want to test under Chi-Square (3df). The attached file is the formula of estimator and the distribution. Below is my programming and there are errors when I run it. May I know which parts should I change?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PROC IML;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;**MATRIX CALLED GSMAT**;&lt;/P&gt;&lt;P&gt;START GBASMOD(Y,GSMAT)&amp;nbsp; GLOBAL (NX,BOBS);&lt;/P&gt;&lt;P&gt;GSMAT = J(&lt;STRONG&gt;2&lt;/STRONG&gt;, BOBS, &lt;STRONG&gt;0&lt;/STRONG&gt;);&lt;/P&gt;&lt;P&gt;F = &lt;STRONG&gt;1&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;M = &lt;STRONG&gt;0&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;DO I = &lt;STRONG&gt;1&lt;/STRONG&gt; TO BOBS;&lt;/P&gt;&lt;P&gt;&amp;nbsp; SAMP = NX[I];&lt;/P&gt;&lt;P&gt;&amp;nbsp; L = M + SAMP;&lt;/P&gt;&lt;P&gt;&amp;nbsp; TEMP = Y[F:L];&lt;/P&gt;&lt;P&gt;&amp;nbsp; **GETTING GROUP MEDIANS**;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; /*GSMAT[1,I] = HL – location estimator*/&lt;/P&gt;&lt;P&gt;H=(SAMP)*(SAMP+&lt;STRONG&gt;1&lt;/STRONG&gt;)/&lt;STRONG&gt;2&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;AVG=J(H,&lt;STRONG&gt;1&lt;/STRONG&gt;,&lt;STRONG&gt;0&lt;/STRONG&gt;);&lt;/P&gt;&lt;P&gt;K=&lt;STRONG&gt;0&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; DO Z=&lt;STRONG&gt;1&lt;/STRONG&gt; TO SAMP;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DO J=&lt;STRONG&gt;1&lt;/STRONG&gt; TO SAMP;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IF Z&amp;lt;=J THEN DO;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; K=K+&lt;STRONG&gt;1&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AVG[K,]=(TEMP[Z]+TEMP[J])/&lt;STRONG&gt;2&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; END;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; END;&lt;/P&gt;&lt;P&gt;GSMAT[&lt;STRONG&gt;1&lt;/STRONG&gt;,I] = MEDIAN(AVG);&lt;/P&gt;&lt;P&gt;END;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;****GENERATE DATA FOR CONDITIONS****;&lt;/P&gt;&lt;P&gt;*PRINT 'NSIM STAT PVAL ';&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;DO K = &lt;STRONG&gt;1&lt;/STRONG&gt; TO 1000000;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IF F = &lt;STRONG&gt;1&lt;/STRONG&gt; THEN TEMP=RANNOR(J(1000000,&lt;STRONG&gt;3,439839383&lt;/STRONG&gt;));&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NX[I] = TEMP[##,];&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; END;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;RUN &amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PRINT 'NSIM STAT PVAL’;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; NAMES1 = {"Estimate"};&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Oct 2017 03:45:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/calculate-the-location-parameter-with-respect-to-Chi-Square/m-p/400855#M3742</guid>
      <dc:creator>pingyin93</dc:creator>
      <dc:date>2017-10-04T03:45:57Z</dc:date>
    </item>
    <item>
      <title>Re: calculate the location parameter with respect to Chi-Square distribution using RANNOR</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/calculate-the-location-parameter-with-respect-to-Chi-Square/m-p/400865#M3743</link>
      <description>&lt;P&gt;I tried with another programming but there are errors. Can anyone help me to identify my mistakes?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;PROC&lt;/STRONG&gt; &lt;STRONG&gt;IML&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;**HODGES-LEHMANN IN CHI-SQUARE DISTRIBUTION**;&lt;/P&gt;&lt;P&gt;SSEED=&lt;STRONG&gt;439839383&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;N=&lt;STRONG&gt;1000000&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;TEMP=RANNOR(J(&lt;STRONG&gt;N&lt;/STRONG&gt;,&lt;STRONG&gt;3&lt;/STRONG&gt;,&lt;STRONG&gt;SSEED&lt;/STRONG&gt;));&lt;/P&gt;&lt;P&gt;YTEMP=TEMP[##&lt;STRONG&gt;2&lt;/STRONG&gt;,+];&lt;/P&gt;&lt;P&gt;Y1=YTEMP[I];&lt;/P&gt;&lt;P&gt;Y2=YTEMP[J];&lt;/P&gt;&lt;P&gt;DO I=&lt;STRONG&gt;1&lt;/STRONG&gt; TO &lt;STRONG&gt;N&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DO J=&lt;STRONG&gt;1&lt;/STRONG&gt; TO &lt;STRONG&gt;N&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AVG=(Y1+Y2)/&lt;STRONG&gt;2&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; HL=MEDIAN(AVG);&amp;nbsp;&lt;/P&gt;&lt;P&gt;END;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;RUN&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PRINT 'RESULTS:';&lt;/P&gt;&lt;P&gt;NAMEHL = {"HL"};&lt;/P&gt;&lt;P&gt;END;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Oct 2017 06:56:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/calculate-the-location-parameter-with-respect-to-Chi-Square/m-p/400865#M3743</guid>
      <dc:creator>pingyin93</dc:creator>
      <dc:date>2017-10-04T06:56:02Z</dc:date>
    </item>
    <item>
      <title>Re: calculate the location parameter with respect to Chi-Square distribution using RANNOR</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/calculate-the-location-parameter-with-respect-to-Chi-Square/m-p/400936#M3744</link>
      <description>&lt;P&gt;You seem to be asking two questions. The first is how to compute the Hodges-Lehmann estimator&amp;nbsp;for a set of data. The second issue is that you seem to be trying to generate random variates from the chi-square distribution with 3 degrees of freedom by using random normal variates.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You don't need to generate normal variates to generate random values from the chi-square distribution. You can generate chi-square values directly from &lt;A href="http://go.documentation.sas.com/?docsetId=imlug&amp;amp;docsetTarget=imlug_langref_sect337.htm&amp;amp;docsetVersion=14.3&amp;amp;locale=en" target="_self"&gt;the RANDGEN function&lt;/A&gt;. I won't pursue this because you don't need random variates to compute the p-value for the H-L test. P-values are computed by using the CDF function to compute probabilities.&amp;nbsp;Read the article &lt;A href="https://blogs.sas.com/content/iml/2011/10/19/four-essential-functions-for-statistical-programmers.html" target="_self"&gt;"Four essential functions for statistical programmers"&lt;/A&gt;&amp;nbsp;to understand the difference between PDF, CDF, quantiles, and random values.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As for computing the H-L estimator, you don't need PROC IML for this. You can &lt;A href="http://support.sas.com/documentation/cdl/en/statug/68162/HTML/default/viewer.htm#statug_npar1way_details19.htm" target="_self"&gt;use the HL option in the PROC NPAR1WAY procedure.&lt;/A&gt;&amp;nbsp;The documentation has &lt;A href="http://support.sas.com/documentation/cdl/en/statug/68162/HTML/default/viewer.htm#statug_npar1way_examples04.htm" target="_self"&gt;an example that shows how to generate the estimate and how to interpret the result.&lt;/A&gt;&amp;nbsp;Follow that example to analyze your data.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Oct 2017 12:50:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/calculate-the-location-parameter-with-respect-to-Chi-Square/m-p/400936#M3744</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2017-10-04T12:50:43Z</dc:date>
    </item>
    <item>
      <title>Re: calculate the location parameter with respect to Chi-Square distribution using RANNOR</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/calculate-the-location-parameter-with-respect-to-Chi-Square/m-p/402053#M3745</link>
      <description>&lt;P&gt;Thank you so much for your reply. However, i have to use PROC IML due to the requirement. I manage to create another programming but i cant get the results from SAS. May i know which part is wrong?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PROC IML;&lt;BR /&gt;START MYFUNC(HL);&lt;BR /&gt;HL=MEDIAN(AVG);&lt;BR /&gt;FINISH;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;SSEED=439839383;&lt;BR /&gt;N=1000000;&lt;BR /&gt;TEMP=RANNOR(J(N,3,SSEED));&lt;BR /&gt;YTEMP=TEMP[,##];&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; /*HODGES-LEHMANN estimator*/&lt;BR /&gt;K=0;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; DO Z=1 TO YTEMP;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DO J=1 TO YTEMP;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IF Z&amp;lt;=J THEN DO;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; K=K+1;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AVG[K,]=(YTEMP[Z]+YTEMP[J])/2;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; END;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; END;&lt;BR /&gt;&lt;BR /&gt;CALL MYFUNC(HL);&lt;BR /&gt;PRINT HL;&lt;/P&gt;</description>
      <pubDate>Sat, 07 Oct 2017 10:19:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/calculate-the-location-parameter-with-respect-to-Chi-Square/m-p/402053#M3745</guid>
      <dc:creator>pingyin93</dc:creator>
      <dc:date>2017-10-07T10:19:59Z</dc:date>
    </item>
    <item>
      <title>Re: calculate the location parameter with respect to Chi-Square distribution using RANNOR</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/calculate-the-location-parameter-with-respect-to-Chi-Square/m-p/402062#M3746</link>
      <description>&lt;P&gt;&lt;EM&gt;&amp;gt;&amp;nbsp;&amp;nbsp;i have to use PROC IML due to the requirement.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I don't understand. What requirement? Is this for a school assignment?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 07 Oct 2017 10:47:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/calculate-the-location-parameter-with-respect-to-Chi-Square/m-p/402062#M3746</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2017-10-07T10:47:29Z</dc:date>
    </item>
    <item>
      <title>Re: calculate the location parameter with respect to Chi-Square distribution using RANNOR</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/calculate-the-location-parameter-with-respect-to-Chi-Square/m-p/402073#M3747</link>
      <description>&lt;P&gt;Dear Sir,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes. It is the requirement of my assignment. Description of my assignment is "the value of &lt;EM&gt;θ&lt;/EM&gt; are determined by calculating &lt;I&gt;θ&lt;/I&gt;&amp;nbsp;with one million observations that were simulated from Chi-Square (3df)".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below are the steps for me to create the programming using PROC IML with N=1000000.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. Generate 3 standard random variates (use RANNOR).&lt;/P&gt;&lt;P&gt;2. Square each variate.&lt;/P&gt;&lt;P&gt;3. Sum all three squared variates.&lt;/P&gt;&lt;P&gt;4. Use Hodges-Lehmann to calculate the value of &lt;EM&gt;θ&lt;/EM&gt;.&lt;/P&gt;</description>
      <pubDate>Sat, 07 Oct 2017 12:31:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/calculate-the-location-parameter-with-respect-to-Chi-Square/m-p/402073#M3747</guid>
      <dc:creator>pingyin93</dc:creator>
      <dc:date>2017-10-07T12:31:33Z</dc:date>
    </item>
    <item>
      <title>Re: calculate the location parameter with respect to Chi-Square distribution using RANNOR</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/calculate-the-location-parameter-with-respect-to-Chi-Square/m-p/402085#M3748</link>
      <description>&lt;P&gt;Here are a few hints on how to get the first program above to run.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Check the number of DO and END statements as these need to balance.&lt;/LI&gt;
&lt;LI&gt;"TO YTEMP" in the&amp;nbsp;DO loops is wrong.&amp;nbsp; IML is expecting a scalar, but you are providing a matrix.&lt;/LI&gt;
&lt;LI&gt;You must create the matrix AVG before you try to assign its elements inside the loop.&lt;/LI&gt;
&lt;/OL&gt;</description>
      <pubDate>Sat, 07 Oct 2017 14:42:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/calculate-the-location-parameter-with-respect-to-Chi-Square/m-p/402085#M3748</guid>
      <dc:creator>IanWakeling</dc:creator>
      <dc:date>2017-10-07T14:42:30Z</dc:date>
    </item>
    <item>
      <title>Re: calculate the location parameter with respect to Chi-Square distribution using RANNOR</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/calculate-the-location-parameter-with-respect-to-Chi-Square/m-p/402242#M3749</link>
      <description>&lt;P&gt;&lt;STRONG&gt;I am sorry to disturb everyone. I am a new user and I have zero knowledge on this software.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;can i do this? i still can't get any results from SAS. &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;PROC&lt;/STRONG&gt; &lt;STRONG&gt;IML&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;START MYFUNC(HL);&lt;/P&gt;&lt;P&gt;HL=MEDIAN(AVG);&lt;/P&gt;&lt;P&gt;FINISH;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;SSEED=&lt;STRONG&gt;439839383&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;N=&lt;STRONG&gt;1000000&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;TEMP=RANNOR(J(N,&lt;STRONG&gt;3&lt;/STRONG&gt;,SSEED));&lt;/P&gt;&lt;P&gt;YTEMP=TEMP[,##];&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; /*HODGES-LEHMANN estimator*/&lt;/P&gt;&lt;P&gt;H=N*(N+&lt;STRONG&gt;1&lt;/STRONG&gt;)/&lt;STRONG&gt;2&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;AVG=J(H,1,0);&lt;/P&gt;&lt;P&gt;K=&lt;STRONG&gt;0&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; DO Z=&lt;STRONG&gt;1&lt;/STRONG&gt; TO N;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DO J=&lt;STRONG&gt;1&lt;/STRONG&gt; TO N;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IF Z&amp;lt;=J THEN DO;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; K=K+&lt;STRONG&gt;1&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AVG[K,]=(YTEMP[Z]+YTEMP[J])/&lt;STRONG&gt;2&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; END;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; END;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;START HL;&lt;/P&gt;&lt;P&gt;CALL MYFUNC(HL);&lt;/P&gt;&lt;P&gt;RUN;&lt;/P&gt;&lt;P&gt;PRINT HL;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Oct 2017 01:02:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/calculate-the-location-parameter-with-respect-to-Chi-Square/m-p/402242#M3749</guid>
      <dc:creator>pingyin93</dc:creator>
      <dc:date>2017-10-09T01:02:51Z</dc:date>
    </item>
    <item>
      <title>Re: calculate the location parameter with respect to Chi-Square distribution using RANNOR</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/calculate-the-location-parameter-with-respect-to-Chi-Square/m-p/402304#M3750</link>
      <description>&lt;P&gt;Yes, it can be done. It sounds ilke&amp;nbsp;you are supposed to compute the test statistic and then&amp;nbsp;estimate the p-value by using a Monte Carlo simulation from the chi-square distribution with 3 DoF. Here are some hints:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Read&amp;nbsp;&lt;A href="https://blogs.sas.com/content/iml/2011/11/02/how-to-compute-p-values-for-a-bootstrap-distribution.html" target="_self"&gt;"How to compute p-values"&lt;/A&gt;&amp;nbsp;to learn how to estimate a p-value when you have a test statistic and N values from the&amp;nbsp; simulated&amp;nbsp;chi-square distribution&lt;/LI&gt;
&lt;LI&gt;The blog at &lt;A href="https://blogs.sas.com/content/iml" target="_blank"&gt;https://blogs.sas.com/content/iml&lt;/A&gt; has many simulation&amp;nbsp;articles. If you go to your favorite search engine and type &lt;EM&gt;keywords &lt;/EM&gt;site:&lt;A href="https://blogs.sas.com/content/iml&amp;nbsp;" target="_blank"&gt;https://blogs.sas.com/content/iml&amp;nbsp;&lt;/A&gt; &amp;nbsp;then your search is restricted to only that site.&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;Here's what you should do:&lt;/P&gt;
&lt;P&gt;A. Figure out how to calculate the H-L statistic for your data. THis is the "test statistic."&lt;/P&gt;
&lt;P&gt;B. You've already generated N random observations from chi-square(3) distribution.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;C. Use the formula&amp;nbsp;in&amp;nbsp;the "How to compute p-values..." article to estimate the p-value for your test statistic.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Good luck.&lt;/P&gt;</description>
      <pubDate>Mon, 09 Oct 2017 10:07:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/calculate-the-location-parameter-with-respect-to-Chi-Square/m-p/402304#M3750</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2017-10-09T10:07:49Z</dc:date>
    </item>
  </channel>
</rss>

