<?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: Marginal Effects for healthcare utilization in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Marginal-Effects-for-healthcare-utilization/m-p/934851#M367571</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/467002"&gt;@Heart_telling&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&lt;SPAN&gt;... stuff deleted ...&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;, but there has something wrong with my code .&amp;nbsp;Could anyone kindly let me know how to fix this? Thank you very much.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;You provided your program code, but you gave us no clue as to how you know something is wrong.&amp;nbsp; For instance, please provide:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;A copy of the sas log, with any notes or errors messages.&lt;BR /&gt;&lt;BR /&gt;&lt;/LI&gt;
&lt;LI&gt;A description of what your code produced, versus what you expected.&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BTW, you don't show a %MEND statement ending the macro definition, and you don't show code actually calling the macro.&lt;/P&gt;
&lt;P&gt;Help us help you.&lt;/P&gt;</description>
    <pubDate>Fri, 05 Jul 2024 20:28:16 GMT</pubDate>
    <dc:creator>mkeintz</dc:creator>
    <dc:date>2024-07-05T20:28:16Z</dc:date>
    <item>
      <title>Marginal Effects for healthcare utilization</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Marginal-Effects-for-healthcare-utilization/m-p/934523#M367489</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I am currently analyzing marginal effect of stage and depression to inpatient costs using Generalized liner model gamma distribution and log link function, but I have encountered some problems.&lt;BR /&gt;&lt;BR /&gt;I saw the SAS sample 63038&amp;nbsp;&lt;STRONG&gt;EXAMPLE 5: Marginal effect in a log-linked gamma model&amp;nbsp;&amp;nbsp;&lt;/STRONG&gt;&lt;/SPAN&gt;and also tried to use lsmeans and estimate to make marginal effect, but there has something wrong with my code .&amp;nbsp;Could anyone kindly let me know how to fix this? Thank you very much.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is my SAS code:&lt;/P&gt;&lt;PRE&gt;%Margins(data     = lifdat,
         class    = stage,
         response = impatient costs,
         dist     = gamma,
         model    = impatient costs depression stage,
         margins  = depression stage,
         options  = cl)&lt;BR /&gt;&lt;BR /&gt;proc genmod data=lifdat;&lt;BR /&gt;class depression (ref='0') stage (ref='4');&lt;BR /&gt;model y = depression age_group / dist=gamma link=log;&lt;BR /&gt;lsmeans depression / ilink cl; &lt;BR /&gt;lsmeans stage / ilink cl;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;proc genmod data=lifdat;&lt;BR /&gt;class depression (ref='0') stage (ref='4');&lt;BR /&gt;model y = depression stage / dist=gamma link=log;&lt;BR /&gt;estimate 'AME of depression' depression 1 / exp cl;&lt;BR /&gt;estimate 'AME of stage 1 vs 4' stage 1 0 0 -1 0 0 0 / exp cl;&lt;BR /&gt;estimate 'AME of stage 2 vs 4' stage 0 1 0 -1 0 0 0 / exp cl;&lt;BR /&gt;estimate 'AME of stage 3 vs 4' stage 0 0 1 -1 0 0 0 / exp cl;&lt;BR /&gt;estimate 'AME of stage 5 vs 4' stage 0 0 0 1 -1 0 0 / exp cl;&lt;BR /&gt;estimate 'AME of stage 6 vs 4' stage 0 0 0 0 1 -1 0 / exp cl;&lt;BR /&gt;estimate 'AME of stage 7 vs 4' stage 0 0 0 0 0 1 -1 / exp cl;&lt;BR /&gt;run;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jul 2024 07:56:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Marginal-Effects-for-healthcare-utilization/m-p/934523#M367489</guid>
      <dc:creator>Heart_telling</dc:creator>
      <dc:date>2024-07-03T07:56:21Z</dc:date>
    </item>
    <item>
      <title>Re: Marginal Effects for healthcare utilization</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Marginal-Effects-for-healthcare-utilization/m-p/934851#M367571</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/467002"&gt;@Heart_telling&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&lt;SPAN&gt;... stuff deleted ...&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;, but there has something wrong with my code .&amp;nbsp;Could anyone kindly let me know how to fix this? Thank you very much.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;You provided your program code, but you gave us no clue as to how you know something is wrong.&amp;nbsp; For instance, please provide:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;A copy of the sas log, with any notes or errors messages.&lt;BR /&gt;&lt;BR /&gt;&lt;/LI&gt;
&lt;LI&gt;A description of what your code produced, versus what you expected.&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BTW, you don't show a %MEND statement ending the macro definition, and you don't show code actually calling the macro.&lt;/P&gt;
&lt;P&gt;Help us help you.&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jul 2024 20:28:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Marginal-Effects-for-healthcare-utilization/m-p/934851#M367571</guid>
      <dc:creator>mkeintz</dc:creator>
      <dc:date>2024-07-05T20:28:16Z</dc:date>
    </item>
    <item>
      <title>Re: Marginal Effects for healthcare utilization</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Marginal-Effects-for-healthcare-utilization/m-p/934853#M367572</link>
      <description>&lt;P&gt;Did you download the %margins macro and store it on your computer and then include it in your program?&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jul 2024 20:50:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Marginal-Effects-for-healthcare-utilization/m-p/934853#M367572</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2024-07-05T20:50:32Z</dc:date>
    </item>
  </channel>
</rss>

