<?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: Wilcoxon Mann-whitney Odds - missing macro in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Wilcoxon-Mann-whitney-Odds-missing-macro/m-p/689476#M209613</link>
    <description>&lt;P&gt;I searched and found this. Does this help?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro WMWodds (_DATASET, _GROUP, _Y);
  ods listing close;

  proc npar1way data = &amp;amp;_dataset. Correct = no;
    class &amp;amp;_GROUP.;
    Var &amp;amp;_Y .;
    ods output WilcoxonScores = WS (keep = Class SumOfScores);
  run;

  proc transpose data = ws out = flag prefix = wscore_;
    var SumOfScores;
    id CLASS;
  run;

  data _NULL_;
    set FLAG;

    if (WSCORE_1&amp;gt; = WSCORE_2) then
      call symput ("_flag", 1);
    else call symput ("_flag",  2);
  run;

  proc logistic data = &amp;amp;_dataset .;
    class &amp;amp;_GROUP.;
    Model &amp;amp;_GROUP. = &amp;amp;_Y .;
    roc;
    ods output ROCAssociation = AUROC;
  run;

  ods listing;

  data WMWODDS;
    set AUROC;

    if (&amp;amp;_FLAG = 1) then
      do WMWOdds = Area / (1-Area);
        SE = StdErr / (1-Area) ** 2;
        LnWMW = log (area / (1-area));
        LnSE = StdErr / (Area * (1-Area))
      end;
    else
      do;
        WMWOdds = (1-Area) / Area;
        SE = StdErr / Area ** 2;
        LnWMW = log ((1-area) / area);
        LnSE = StdErr / (Area * (1-Area)) );
      end;

    z = quantile ("normal", 0.975);
    LowerCI = WMWOdds --z * se;
    UpperCI = WMWOdds + z * se;
    LowerCI_exp = exp (LnWMW --z * lnse);
    UpperCI_exp = exp (LnWMW + z * lnse) if _n_ = 1;
    keep Area StdErr WMWOdds SE LowerCI UpperCI LowerCI_exp UpperCI_exp;
  run;

  title "&amp;amp;_DATASET.";

  proc print noobs;
  run;

%mend;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 07 Oct 2020 08:42:39 GMT</pubDate>
    <dc:creator>ChrisNZ</dc:creator>
    <dc:date>2020-10-07T08:42:39Z</dc:date>
    <item>
      <title>Wilcoxon Mann-whitney Odds - missing macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Wilcoxon-Mann-whitney-Odds-missing-macro/m-p/689469#M209612</link>
      <description>&lt;P&gt;Hello.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to calculate Wilcoxon Mann-Whitney Odds with 95% CI (WMWodds). I have found a website describing have to do these calculations, but the attached macro is no longer available (see&amp;nbsp;&lt;A href="https://support.sas.com/resources/papers/proceedings/proceedings/sugi31/209-31.pdf" target="_blank"&gt;https://support.sas.com/resources/papers/proceedings/proceedings/sugi31/209-31.pdf&lt;/A&gt;). Does anyone know, if WMWodds is built into SAS, or where i can download a macro?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm using SAS 9.4.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Joachim&lt;/P&gt;</description>
      <pubDate>Wed, 07 Oct 2020 07:42:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Wilcoxon-Mann-whitney-Odds-missing-macro/m-p/689469#M209612</guid>
      <dc:creator>Joachim133</dc:creator>
      <dc:date>2020-10-07T07:42:42Z</dc:date>
    </item>
    <item>
      <title>Re: Wilcoxon Mann-whitney Odds - missing macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Wilcoxon-Mann-whitney-Odds-missing-macro/m-p/689476#M209613</link>
      <description>&lt;P&gt;I searched and found this. Does this help?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro WMWodds (_DATASET, _GROUP, _Y);
  ods listing close;

  proc npar1way data = &amp;amp;_dataset. Correct = no;
    class &amp;amp;_GROUP.;
    Var &amp;amp;_Y .;
    ods output WilcoxonScores = WS (keep = Class SumOfScores);
  run;

  proc transpose data = ws out = flag prefix = wscore_;
    var SumOfScores;
    id CLASS;
  run;

  data _NULL_;
    set FLAG;

    if (WSCORE_1&amp;gt; = WSCORE_2) then
      call symput ("_flag", 1);
    else call symput ("_flag",  2);
  run;

  proc logistic data = &amp;amp;_dataset .;
    class &amp;amp;_GROUP.;
    Model &amp;amp;_GROUP. = &amp;amp;_Y .;
    roc;
    ods output ROCAssociation = AUROC;
  run;

  ods listing;

  data WMWODDS;
    set AUROC;

    if (&amp;amp;_FLAG = 1) then
      do WMWOdds = Area / (1-Area);
        SE = StdErr / (1-Area) ** 2;
        LnWMW = log (area / (1-area));
        LnSE = StdErr / (Area * (1-Area))
      end;
    else
      do;
        WMWOdds = (1-Area) / Area;
        SE = StdErr / Area ** 2;
        LnWMW = log ((1-area) / area);
        LnSE = StdErr / (Area * (1-Area)) );
      end;

    z = quantile ("normal", 0.975);
    LowerCI = WMWOdds --z * se;
    UpperCI = WMWOdds + z * se;
    LowerCI_exp = exp (LnWMW --z * lnse);
    UpperCI_exp = exp (LnWMW + z * lnse) if _n_ = 1;
    keep Area StdErr WMWOdds SE LowerCI UpperCI LowerCI_exp UpperCI_exp;
  run;

  title "&amp;amp;_DATASET.";

  proc print noobs;
  run;

%mend;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Oct 2020 08:42:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Wilcoxon-Mann-whitney-Odds-missing-macro/m-p/689476#M209613</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2020-10-07T08:42:39Z</dc:date>
    </item>
    <item>
      <title>Re: Wilcoxon Mann-whitney Odds - missing macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Wilcoxon-Mann-whitney-Odds-missing-macro/m-p/689871#M209761</link>
      <description>&lt;P&gt;Does it?&lt;/P&gt;</description>
      <pubDate>Thu, 08 Oct 2020 05:19:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Wilcoxon-Mann-whitney-Odds-missing-macro/m-p/689871#M209761</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2020-10-08T05:19:32Z</dc:date>
    </item>
    <item>
      <title>Re: Wilcoxon Mann-whitney Odds - missing macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Wilcoxon-Mann-whitney-Odds-missing-macro/m-p/696128#M212565</link>
      <description>&lt;P&gt;Sorry for the late reply!&lt;BR /&gt;Yes for now it seems to work.&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 03 Nov 2020 09:24:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Wilcoxon-Mann-whitney-Odds-missing-macro/m-p/696128#M212565</guid>
      <dc:creator>Joachim133</dc:creator>
      <dc:date>2020-11-03T09:24:30Z</dc:date>
    </item>
    <item>
      <title>Re: Wilcoxon Mann-whitney Odds - missing macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Wilcoxon-Mann-whitney-Odds-missing-macro/m-p/696136#M212571</link>
      <description>Google is your friend &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 03 Nov 2020 10:04:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Wilcoxon-Mann-whitney-Odds-missing-macro/m-p/696136#M212571</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2020-11-03T10:04:35Z</dc:date>
    </item>
  </channel>
</rss>

