<?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: Graphing Issues with Proc IML -&amp;gt; Proc SGPlot in SAS/IML Software and Matrix Computations</title>
    <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Graphing-Issues-with-Proc-IML-gt-Proc-SGPlot/m-p/957932#M6418</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/472501"&gt;@mattll218&lt;/a&gt;&amp;nbsp;and welcome to the SAS Support Communities!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sorry to hear that your professor didn't help you.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I see a common issue in your two programs regarding the graph: The range of x-values doesn't include the value of interest, i.e., the argument maximizing the log-likelihood function. In the program for HW 1 that x-value is &lt;FONT face="courier new,courier"&gt;p2=-58.7143&lt;/FONT&gt;, whereas your DO loop&lt;/P&gt;
&lt;PRE&gt;do i =1 to 250;
  p2=-100+(i-1)*0.01;
...
end;&lt;/PRE&gt;
&lt;P&gt;covers only the range from &lt;FONT face="courier new,courier"&gt;-100&lt;/FONT&gt; through &lt;FONT face="courier new,courier"&gt;-97.51 (=-100+(250-1)*0.01)&lt;/FONT&gt;. Compare this to the corresponding loop in the code key&lt;/P&gt;
&lt;PRE&gt;do i =1 to 200;
  p2=-68.5+(i*0.1);
...
end;&lt;/PRE&gt;
&lt;P&gt;where the range of &lt;FONT face="courier new,courier"&gt;p2&lt;/FONT&gt; values from &lt;FONT face="courier new,courier"&gt;-68.4&lt;/FONT&gt; through &lt;FONT face="courier new,courier"&gt;-48.5&lt;/FONT&gt; is (almost) centered around &lt;FONT face="courier new,courier"&gt;-58.7143&lt;/FONT&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Similarly, in your program for HW 2 the &lt;FONT face="courier new,courier"&gt;mu&lt;/FONT&gt; range from &lt;FONT face="courier new,courier"&gt;-50&lt;/FONT&gt; through &lt;FONT face="courier new,courier"&gt;-38.02&lt;/FONT&gt; doesn't contain &lt;FONT face="courier new,courier"&gt;124.20&lt;/FONT&gt;, which seems to be the &lt;FONT face="courier new,courier"&gt;mu&lt;/FONT&gt; value of interest according to your REFLINE statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So, in both cases adjust the step size and/or the ending value of the DO loop in order to include the relevant portion of the graph.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope that this resolves the issue because, lacking a SAS/IML license, I can't be of much help regarding the IML code (but other community experts can).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 01 Feb 2025 23:04:34 GMT</pubDate>
    <dc:creator>FreelanceReinh</dc:creator>
    <dc:date>2025-02-01T23:04:34Z</dc:date>
    <item>
      <title>Graphing Issues with Proc IML -&gt; Proc SGPlot</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Graphing-Issues-with-Proc-IML-gt-Proc-SGPlot/m-p/957929#M6417</link>
      <description>&lt;P&gt;Hi all! I am in a course that works strictly with SAS. I am by no means any expert in SAS but I have gotten by previously fairly OK, and I am attempting to get better with the program. I was with a bad professor last semester and got the same professor this semester (I cannot switch out or do another course unfortunately). I have tried to reach out to my professor for help and all I got was a pretty snarky reply that didn't provide me any help or insight, so I am posting here in hopes that I might get some actual help into what I am doing incorrectly in my code. The problem I am having issues with relate to generating a graph that shows the relationship between x variable and the corresponding log-likelihood. When I attempt to generate it, I either get a small, finite line or nothing graphed at all. What should be graphed is a curve (see media image). I have attached the code key to the first assignment, as well as my own code to the 1st and 2nd assignment. The proc sgplot is the last lines of code in each document. Any insight or help at all would be appreciated as I cannot identify what exactly I am doing wrong and I would like to get better!&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mattll218_0-1738445055413.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/104235iA62BF47D62E6BC84/image-size/medium?v=v2&amp;amp;px=400" role="button" title="mattll218_0-1738445055413.png" alt="mattll218_0-1738445055413.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 01 Feb 2025 21:29:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Graphing-Issues-with-Proc-IML-gt-Proc-SGPlot/m-p/957929#M6417</guid>
      <dc:creator>mattll218</dc:creator>
      <dc:date>2025-02-01T21:29:07Z</dc:date>
    </item>
    <item>
      <title>Re: Graphing Issues with Proc IML -&gt; Proc SGPlot</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Graphing-Issues-with-Proc-IML-gt-Proc-SGPlot/m-p/957932#M6418</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/472501"&gt;@mattll218&lt;/a&gt;&amp;nbsp;and welcome to the SAS Support Communities!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sorry to hear that your professor didn't help you.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I see a common issue in your two programs regarding the graph: The range of x-values doesn't include the value of interest, i.e., the argument maximizing the log-likelihood function. In the program for HW 1 that x-value is &lt;FONT face="courier new,courier"&gt;p2=-58.7143&lt;/FONT&gt;, whereas your DO loop&lt;/P&gt;
&lt;PRE&gt;do i =1 to 250;
  p2=-100+(i-1)*0.01;
...
end;&lt;/PRE&gt;
&lt;P&gt;covers only the range from &lt;FONT face="courier new,courier"&gt;-100&lt;/FONT&gt; through &lt;FONT face="courier new,courier"&gt;-97.51 (=-100+(250-1)*0.01)&lt;/FONT&gt;. Compare this to the corresponding loop in the code key&lt;/P&gt;
&lt;PRE&gt;do i =1 to 200;
  p2=-68.5+(i*0.1);
...
end;&lt;/PRE&gt;
&lt;P&gt;where the range of &lt;FONT face="courier new,courier"&gt;p2&lt;/FONT&gt; values from &lt;FONT face="courier new,courier"&gt;-68.4&lt;/FONT&gt; through &lt;FONT face="courier new,courier"&gt;-48.5&lt;/FONT&gt; is (almost) centered around &lt;FONT face="courier new,courier"&gt;-58.7143&lt;/FONT&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Similarly, in your program for HW 2 the &lt;FONT face="courier new,courier"&gt;mu&lt;/FONT&gt; range from &lt;FONT face="courier new,courier"&gt;-50&lt;/FONT&gt; through &lt;FONT face="courier new,courier"&gt;-38.02&lt;/FONT&gt; doesn't contain &lt;FONT face="courier new,courier"&gt;124.20&lt;/FONT&gt;, which seems to be the &lt;FONT face="courier new,courier"&gt;mu&lt;/FONT&gt; value of interest according to your REFLINE statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So, in both cases adjust the step size and/or the ending value of the DO loop in order to include the relevant portion of the graph.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope that this resolves the issue because, lacking a SAS/IML license, I can't be of much help regarding the IML code (but other community experts can).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 01 Feb 2025 23:04:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Graphing-Issues-with-Proc-IML-gt-Proc-SGPlot/m-p/957932#M6418</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2025-02-01T23:04:34Z</dc:date>
    </item>
    <item>
      <title>Re: Graphing Issues with Proc IML -&gt; Proc SGPlot</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Graphing-Issues-with-Proc-IML-gt-Proc-SGPlot/m-p/957934#M6419</link>
      <description>&lt;P&gt;Thank you! This did indeed fix the issue I was facing and now I know what I need to adjust/look for in the future! I appreciate you taking the time to look at the code and respond!&lt;/P&gt;</description>
      <pubDate>Sat, 01 Feb 2025 23:43:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Graphing-Issues-with-Proc-IML-gt-Proc-SGPlot/m-p/957934#M6419</guid>
      <dc:creator>mattll218</dc:creator>
      <dc:date>2025-02-01T23:43:42Z</dc:date>
    </item>
  </channel>
</rss>

