<?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: Margins macro error with gamma regression in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Margins-macro-error-with-gamma-regression/m-p/669726#M200938</link>
    <description>&lt;P&gt;I have no idea what the &lt;EM&gt;margins&lt;/EM&gt; macro is.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That macro is trying to store too many values in a macro variable.&lt;/P&gt;
&lt;P&gt;If storing this many values is justified (is it?), you need to alter the macro so it does not use a macro variable to pass a list of values.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 15 Jul 2020 21:39:49 GMT</pubDate>
    <dc:creator>ChrisNZ</dc:creator>
    <dc:date>2020-07-15T21:39:49Z</dc:date>
    <item>
      <title>Margins macro error with gamma regression</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Margins-macro-error-with-gamma-regression/m-p/669152#M200696</link>
      <description>&lt;P&gt;Hi, I am using the margins macro with a gamma distribution and a log link to output the average marginal effect of a continuous variable within levels of a categorical variable. When I run the macro, after some time, I get the following error. I believe this error is associated with the continuous variable (var3) in the effect statement because when I take it out the margins run without error for the categorical variable in the margins statement (var2).&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SAS error 2020-07-13 212813.png" style="width: 822px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/47125i0D97A32872C2671D/image-size/large?v=v2&amp;amp;px=999" role="button" title="SAS error 2020-07-13 212813.png" alt="SAS error 2020-07-13 212813.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I use the following code:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%Margins(data = dat,
			response = var1,
			model = var2|var3  var2|var4 var2|var5 var6-var12
			effect = var3,
			margins = var2,
			class = var2 var5 var6 var_id,
			dist = gamma,
			link = log,
			geesubject = var_id,
			geecorr = ind,
			options = diff cl);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jul 2020 13:20:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Margins-macro-error-with-gamma-regression/m-p/669152#M200696</guid>
      <dc:creator>AXR</dc:creator>
      <dc:date>2020-07-14T13:20:35Z</dc:date>
    </item>
    <item>
      <title>Re: Margins macro error with gamma regression</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Margins-macro-error-with-gamma-regression/m-p/669726#M200938</link>
      <description>&lt;P&gt;I have no idea what the &lt;EM&gt;margins&lt;/EM&gt; macro is.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That macro is trying to store too many values in a macro variable.&lt;/P&gt;
&lt;P&gt;If storing this many values is justified (is it?), you need to alter the macro so it does not use a macro variable to pass a list of values.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jul 2020 21:39:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Margins-macro-error-with-gamma-regression/m-p/669726#M200938</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2020-07-15T21:39:49Z</dc:date>
    </item>
    <item>
      <title>Re: Margins macro error with gamma regression</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Margins-macro-error-with-gamma-regression/m-p/669734#M200941</link>
      <description>&lt;P&gt;I suppose it's this macro:&amp;nbsp;&lt;A href="https://support.sas.com/kb/63/038.html" target="_blank" rel="noopener"&gt;https://support.sas.com/kb/63/038.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Try replacing line&lt;/P&gt;
&lt;PRE&gt;%let _version = 1.05;
&lt;/PRE&gt;
&lt;P&gt;with&lt;/P&gt;
&lt;PRE&gt;%let _version = DEBUG;
&lt;/PRE&gt;
&lt;P&gt;to see where the error takes place so you can work there.&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jul 2020 21:36:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Margins-macro-error-with-gamma-regression/m-p/669734#M200941</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2020-07-16T21:36:33Z</dc:date>
    </item>
    <item>
      <title>Re: Margins macro error with gamma regression</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Margins-macro-error-with-gamma-regression/m-p/669893#M201017</link>
      <description>&lt;P&gt;Hi &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/16961"&gt;@ChrisNZ&lt;/a&gt; thanks for your response.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Unfortunately, changing the macro code to DEBUG didn't change anything. I get the same error message.&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jul 2020 14:26:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Margins-macro-error-with-gamma-regression/m-p/669893#M201017</guid>
      <dc:creator>AXR</dc:creator>
      <dc:date>2020-07-16T14:26:55Z</dc:date>
    </item>
    <item>
      <title>Re: Margins macro error with gamma regression</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Margins-macro-error-with-gamma-regression/m-p/669998#M201074</link>
      <description>&lt;P&gt;Read my message again&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;Try replacing ... &lt;STRONG&gt;t&lt;/STRONG&gt;&lt;SPAN style="font-family: inherit;"&gt;&lt;STRONG&gt;o see where the error takes&lt;/STRONG&gt; &lt;STRONG&gt;place&lt;/STRONG&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;You need to change how the macro works. So you need to investigate where the macro variable is used.&lt;/P&gt;
&lt;P&gt;DEBUG will some of the macro's workings and help you do that.&lt;/P&gt;
&lt;P&gt;DEBUG2 will display even more.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jul 2020 21:35:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Margins-macro-error-with-gamma-regression/m-p/669998#M201074</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2020-07-16T21:35:58Z</dc:date>
    </item>
  </channel>
</rss>

