<?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: How to calculate AUC for multinomial logistic regression with weights in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-calculate-AUC-for-multinomial-logistic-regression-with/m-p/790125#M38739</link>
    <description>&lt;P&gt;Calling&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13684"&gt;@Rick_SAS&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 14 Jan 2022 12:02:33 GMT</pubDate>
    <dc:creator>Ksharp</dc:creator>
    <dc:date>2022-01-14T12:02:33Z</dc:date>
    <item>
      <title>How to calculate AUC for multinomial logistic regression with weights</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-calculate-AUC-for-multinomial-logistic-regression-with/m-p/790050#M38729</link>
      <description>&lt;P&gt;I'm trying to calculate AUCs using predicted values obtained from multinomial logistic regression. However, because in the cohort for prediction there are weights for considering under-sampling, I need to calculate weighted AUCs.&lt;/P&gt;&lt;P&gt;Previously I used the SAS macro %MultAUC (&lt;A href="https://support.sas.com/kb/64/029.html" target="_blank"&gt;https://support.sas.com/kb/64/029.html&lt;/A&gt;) for unweighted AUC, but it doesn't incorporate weights. If someone could help regarding how to add weights in this macro, or any other ways to do so, it'll be greatly appreciated.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jan 2022 18:06:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-calculate-AUC-for-multinomial-logistic-regression-with/m-p/790050#M38729</guid>
      <dc:creator>levender8622</dc:creator>
      <dc:date>2022-01-13T18:06:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate AUC for multinomial logistic regression with weights</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-calculate-AUC-for-multinomial-logistic-regression-with/m-p/790059#M38731</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Are you sure you need the weights?&lt;/P&gt;
&lt;P&gt;AUC will not change if the ranks of the observations remain the same.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For example, in case of a binary target, ... adjusting posterior probabilities for the real (population) priors often means that the probabilities are adjusted downwards (that is if the event was over-sampled or the non-event was under-sampled). However, that does not change the ranking of the observations and therefore , the AUC stays the same!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Give it another thought to be sure you need weights.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Koen&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jan 2022 19:17:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-calculate-AUC-for-multinomial-logistic-regression-with/m-p/790059#M38731</guid>
      <dc:creator>sbxkoenk</dc:creator>
      <dc:date>2022-01-13T19:17:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate AUC for multinomial logistic regression with weights</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-calculate-AUC-for-multinomial-logistic-regression-with/m-p/790125#M38739</link>
      <description>&lt;P&gt;Calling&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13684"&gt;@Rick_SAS&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jan 2022 12:02:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-calculate-AUC-for-multinomial-logistic-regression-with/m-p/790125#M38739</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2022-01-14T12:02:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate AUC for multinomial logistic regression with weights</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-calculate-AUC-for-multinomial-logistic-regression-with/m-p/790127#M38740</link>
      <description>&lt;P&gt;This isn't my area, but if these are survey weights, I believe you can &lt;A href="https://go.documentation.sas.com/doc/en/pgmsascdc/v_021/statug/statug_surveylogistic_overview.htm" target="_self"&gt;use PROC SURVEYLOGISTIC&lt;/A&gt; to perform generalized logit regression, which is the same as multinomial logistic regression. &lt;A href="https://go.documentation.sas.com/doc/en/pgmsascdc/v_021/statug/statug_surveylogistic_examples02.htm" target="_self"&gt;See this doc example.&lt;/A&gt;&amp;nbsp; The doc mentions that &lt;A href="https://go.documentation.sas.com/doc/en/pgmsascdc/v_019/statug/statug_surveylogistic_details40.htm" target="_self"&gt;you can obtain the rank correlation&lt;/A&gt;, including the concordance, c, which for binary response is the area under the ROC curve. Unfortunately, I do not know whether that statistic is applicable for a multinomial response.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jan 2022 12:17:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-calculate-AUC-for-multinomial-logistic-regression-with/m-p/790127#M38740</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2022-01-14T12:17:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate AUC for multinomial logistic regression with weights</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-calculate-AUC-for-multinomial-logistic-regression-with/m-p/790146#M38742</link>
      <description>&lt;P&gt;As Rick notes, if the weights are survey weights, then you can use PROC SURVEYLOGISTIC to fit an appropriate multinomial logistic model. As noted in the macro documentation, if you use the PREDPROBS= option in the OUTPUT statement, you can use the macro in SURVEYLOGISTIC in exactly the same way as in PROC LOGISTIC. Note that there is no need to specify weights in the macro because the weights are accounted for in the fit of the model and adjust the predicted probabilities which are the inputs to the macro. Similarly, if the weights are just importance weights, not from survey sampling, then the weights can be used in the WEIGHT statement in PROC LOGISTIC and the above still applies.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jan 2022 14:53:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-calculate-AUC-for-multinomial-logistic-regression-with/m-p/790146#M38742</guid>
      <dc:creator>StatDave</dc:creator>
      <dc:date>2022-01-14T14:53:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate AUC for multinomial logistic regression with weights</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-calculate-AUC-for-multinomial-logistic-regression-with/m-p/790196#M38743</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13684"&gt;@Rick_SAS&lt;/a&gt;&amp;nbsp;, but somehow for my problem I already have the predicted probabilities for individuals without weights and for some reason I can't get the weighted predicted probabilities (I'm pretty sure what I did was right but I won't elaborate here for make things even more complicated), and this is why I need a way to calculate AUC considering the weights. To make the question simple, I think it eventually leads to a weighted Wilcoxon rank sum test with weight, and I saw some of your relevant posts previously and wondering if you know a way to do so? Thanks again.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jan 2022 17:47:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-calculate-AUC-for-multinomial-logistic-regression-with/m-p/790196#M38743</guid>
      <dc:creator>levender8622</dc:creator>
      <dc:date>2022-01-14T17:47:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate AUC for multinomial logistic regression with weights</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-calculate-AUC-for-multinomial-logistic-regression-with/m-p/790227#M38745</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13633"&gt;@StatDave&lt;/a&gt;&amp;nbsp;, but as I said, I couldn't really add weights in the my model because my analysis involves a training data where there's no weight, and a test data where there are weights. I fit the multinomial regression on training data and try to get predicted values for my test data, and weights could not be incorporated in this case (or could it?). But then I need to get AUC on my test data, and this is why I need to consider weight in calculating AUC, and eventually comes to the question of weighted Wilcoxon rank sum test. Please let me know if this makes sense to you, thank you.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jan 2022 19:36:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-calculate-AUC-for-multinomial-logistic-regression-with/m-p/790227#M38745</guid>
      <dc:creator>levender8622</dc:creator>
      <dc:date>2022-01-14T19:36:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate AUC for multinomial logistic regression with weights</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-calculate-AUC-for-multinomial-logistic-regression-with/m-p/790233#M38748</link>
      <description>The proper way to use the weights is in the model fit. If you used the weights when fitting the model to your training data, then the model parameter estimates are adjusted for the weights and they then produce the desired predicted probabilities for both the training and the test data. So again, there is no reason to further involve the weights in the computations from the macro.</description>
      <pubDate>Fri, 14 Jan 2022 19:57:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-calculate-AUC-for-multinomial-logistic-regression-with/m-p/790233#M38748</guid>
      <dc:creator>StatDave</dc:creator>
      <dc:date>2022-01-14T19:57:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate AUC for multinomial logistic regression with weights</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-calculate-AUC-for-multinomial-logistic-regression-with/m-p/790239#M38749</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Agreeing with&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13633"&gt;@StatDave&lt;/a&gt;&amp;nbsp;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, see here :&lt;/P&gt;
&lt;P&gt;Usage Note 39109: Measures and tests of the discriminatory power of a binary logistic model&lt;BR /&gt;&lt;A href="https://support.sas.com/kb/39/109.html" target="_blank"&gt;https://support.sas.com/kb/39/109.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can indeed calculate the c-statistic (AUC for a binary target) with the&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Wilcoxon rank&lt;/EM&gt;&lt;SPAN&gt;-&lt;/SPAN&gt;&lt;EM&gt;sum test&lt;/EM&gt;&lt;SPAN&gt;&amp;nbsp;or with the&amp;nbsp;&lt;EM&gt;Mann-Whitney&lt;/EM&gt;&amp;nbsp;U&amp;nbsp;&lt;EM&gt;test&lt;/EM&gt;&amp;nbsp;(one of the two, I don't remember exactly)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;, but PROC NPAR1WAY does not have a WEIGHT statement.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Cheers,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Koen&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jan 2022 20:17:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-calculate-AUC-for-multinomial-logistic-regression-with/m-p/790239#M38749</guid>
      <dc:creator>sbxkoenk</dc:creator>
      <dc:date>2022-01-14T20:17:51Z</dc:date>
    </item>
  </channel>
</rss>

