<?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: Using Macro to find MLE in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Using-Macro-to-find-MLE/m-p/783838#M250033</link>
    <description>&lt;P&gt;Why macros? Here are 2 ways to compute MLE :&lt;/P&gt;
&lt;P&gt;&lt;A href="https://blogs.sas.com/content/iml/2017/06/14/maximum-likelihood-estimates-in-sas.html" target="_blank"&gt;https://blogs.sas.com/content/iml/2017/06/14/maximum-likelihood-estimates-in-sas.html&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 03 Dec 2021 05:01:47 GMT</pubDate>
    <dc:creator>ChrisNZ</dc:creator>
    <dc:date>2021-12-03T05:01:47Z</dc:date>
    <item>
      <title>Using Macro to find MLE</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-Macro-to-find-MLE/m-p/783060#M249641</link>
      <description>&lt;P&gt;The Question:&amp;nbsp;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Create a macro to conduct the following analysis:&lt;/LI&gt;&lt;/OL&gt;&lt;UL&gt;&lt;LI&gt;Depending on the user-specified option, compute one of the following estimators for batting average:&lt;UL&gt;&lt;LI&gt;Maximum Likelihood Estimator (MLE): Pi=xi/n&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;Bayesian Estimator (BE):&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2021-11-29 at 10.20.55 PM.png" style="width: 122px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/66239iB6FC68988C0FEC42/image-dimensions/122x80?v=v2" width="122" height="80" role="button" title="Screen Shot 2021-11-29 at 10.20.55 PM.png" alt="Screen Shot 2021-11-29 at 10.20.55 PM.png" /&gt;&lt;/span&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;i already cleaned the data by using data step:&lt;/P&gt;&lt;P&gt;DATA Q1;&lt;BR /&gt;input&lt;BR /&gt;ID&lt;BR /&gt;Name : $14.&lt;BR /&gt;TeamandLeague : $21.&lt;BR /&gt;BattingAverageFirst45 $&lt;BR /&gt;BattingAverageRemainderSeason $&lt;BR /&gt;AtBatsRemainderSeason ;&lt;BR /&gt;DATALINES;&lt;BR /&gt;1 Clemente (Pitts,NL) .400 .346 367&lt;BR /&gt;2 F.Robinson (Balt,AL) .378 .298 426&lt;BR /&gt;3 F.Howard (Wash,AL) .356 .276 521&lt;BR /&gt;4 Johnstone (Cal,AL) .333 .222 275&lt;BR /&gt;5 Berry (Chi,AL) .311 .273 418&lt;BR /&gt;6 Spencer (Cal,AL) .311 .270 466&lt;BR /&gt;7 Kessinger (Chi,NL) .289 .263 586&lt;BR /&gt;8 L.Alvarado (Bos,AL) .267 .210 138&lt;BR /&gt;9 Santo (Chi,NL) .244 .269 510&lt;BR /&gt;10 Swoboda (NY,NL) .244 .230 200&lt;BR /&gt;11 Unser (Wash,AL) .222 .264 277&lt;BR /&gt;12 Williams (Chi,AL) .222 .256 270&lt;BR /&gt;13 Scott (Bos,AL) .222 .303 435&lt;BR /&gt;14 Petrocelli (Bos,AL) .222 .264 538&lt;BR /&gt;15 E.Rodriguez (KC,AL) .222 .226 186&lt;BR /&gt;16 Campaneris (Oak,AL) .200 .285 558&lt;BR /&gt;17 Munson (NY,AL) .178 .316 408&lt;BR /&gt;18 Alvis (Mil,NL) .156 .200 70&lt;BR /&gt;;&lt;BR /&gt;RUN;&lt;BR /&gt;PROC PRINT data=Q1;&lt;BR /&gt;RUN;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I dont know the conditions im supposed to write if i use the %if %then %else method.&amp;nbsp;&lt;/P&gt;&lt;P&gt;can anyone help me in solving this question?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Nov 2021 03:25:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-Macro-to-find-MLE/m-p/783060#M249641</guid>
      <dc:creator>almaskaa</dc:creator>
      <dc:date>2021-11-30T03:25:56Z</dc:date>
    </item>
    <item>
      <title>Re: Using Macro to find MLE</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-Macro-to-find-MLE/m-p/783838#M250033</link>
      <description>&lt;P&gt;Why macros? Here are 2 ways to compute MLE :&lt;/P&gt;
&lt;P&gt;&lt;A href="https://blogs.sas.com/content/iml/2017/06/14/maximum-likelihood-estimates-in-sas.html" target="_blank"&gt;https://blogs.sas.com/content/iml/2017/06/14/maximum-likelihood-estimates-in-sas.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Dec 2021 05:01:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-Macro-to-find-MLE/m-p/783838#M250033</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2021-12-03T05:01:47Z</dc:date>
    </item>
    <item>
      <title>Re: Using Macro to find MLE</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-Macro-to-find-MLE/m-p/783841#M250035</link>
      <description>&lt;P&gt;The macro language mainly exists to generate sas code, avoiding repetitive work.&lt;/P&gt;</description>
      <pubDate>Fri, 03 Dec 2021 05:49:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-Macro-to-find-MLE/m-p/783841#M250035</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2021-12-03T05:49:49Z</dc:date>
    </item>
  </channel>
</rss>

