<?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: Interpreting PROC GENMOD output in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Interpreting-PROC-GENMOD-output/m-p/889243#M44071</link>
    <description>&lt;P&gt;Thanks for responding - it still doesn't appear to work, though.&lt;/P&gt;
&lt;P&gt;Let's take 2020, for example. Logvisits = log(park_visits/1000000), or log(237.064332), which equals an offset of 5.471.&lt;/P&gt;
&lt;P&gt;So the expression yielding the predicted value would be exp(5.471 - 504.867 + 2020*0.2445).&amp;nbsp; This yields 0.004 predicted, 2993 actual.&lt;/P&gt;
&lt;P&gt;I'm doing something wrong but I can't place my finger on it.&lt;/P&gt;
&lt;P&gt;Any help you might provide would be greatly appreciated. Thanks!&lt;/P&gt;</description>
    <pubDate>Mon, 14 Aug 2023 19:39:15 GMT</pubDate>
    <dc:creator>newtriks</dc:creator>
    <dc:date>2023-08-14T19:39:15Z</dc:date>
    <item>
      <title>Interpreting PROC GENMOD output</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Interpreting-PROC-GENMOD-output/m-p/888997#M44038</link>
      <description>&lt;LI-SPOILER&gt;Hello, this may be a stupid question but I'm having trouble interpreting my output.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Code:&amp;nbsp;&lt;BR /&gt;&lt;SPAN&gt;DATA NPS;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;INPUT Year Visits EFG STU;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;YearIndx = Year-2012;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;LogVisits = Log(Visits/1000000);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Event=1; Incident=EFG; Rate=EFG/(Visits/1000000); OUTPUT;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Event=0; Incident=STU; Rate=STU/(Visits/1000000); OUTPUT;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;DATALINES;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2013 273630895 4187 620&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2014 292800082 5498 796&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2015 307247252 6160 1283&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2016 330971689 6753 3196&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2017 330882751 6605 3114&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2018 318211833 6111 3214&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2019 327516619 2820 2976&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2020 237064332 1463 2993&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;;&lt;BR /&gt;PROC GENMOD DATA=BAKER.NPSvisittrendsCOVID plots=all; &lt;BR /&gt;model STU = year / dist=negbin link=log offset=&lt;SPAN&gt;LogVisits &lt;/SPAN&gt;type3;&lt;BR /&gt;RUN;&lt;BR /&gt;&lt;BR /&gt;Maximum likelihood parameter estimates from PROC GENMOD:&lt;BR /&gt;Parameter Estimate Standard Error Wald 95% Confidence Limits Wald Chi-Square Pr&amp;gt;ChiSq&lt;BR /&gt;Intercept -504.867 93.7332 -688.580 -321.153 29.01 &amp;lt;.0001&lt;BR /&gt;Year 0.2445 0.0465 0.1533 0.3356 27.66 &amp;lt;.0001&lt;BR /&gt;Dispersion 0.0737 0.0367 0.0278 0.1955&lt;BR /&gt;&lt;BR /&gt;The way I'm interpreting is this: Exp(-504.867 + Year*0.2445) = STU. This is clearly wrong, because when I calculate that I get nothing close to the STU number. What am I missing??&amp;nbsp; Thanks in advance.&lt;/LI-SPOILER&gt;</description>
      <pubDate>Fri, 11 Aug 2023 21:50:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Interpreting-PROC-GENMOD-output/m-p/888997#M44038</guid>
      <dc:creator>newtriks</dc:creator>
      <dc:date>2023-08-11T21:50:18Z</dc:date>
    </item>
    <item>
      <title>Re: Interpreting PROC GENMOD output</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Interpreting-PROC-GENMOD-output/m-p/889028#M44043</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/413680"&gt;@newtriks&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/413680"&gt;@newtriks&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;DATA=BAKER.NPSvisittrendsCOVID plots=all; &lt;BR /&gt;model STU = year / dist=negbin link=log offset=&lt;SPAN&gt;LogVisits &lt;/SPAN&gt;type3;&lt;BR /&gt;RUN;&lt;BR /&gt;&lt;BR /&gt;Maximum likelihood parameter estimates from PROC GENMOD:&lt;BR /&gt;Parameter Estimate Standard Error Wald 95% Confidence Limits Wald Chi-Square Pr&amp;gt;ChiSq&lt;BR /&gt;Intercept -504.867 93.7332 -688.580 -321.153 29.01 &amp;lt;.0001&lt;BR /&gt;Year 0.2445 0.0465 0.1533 0.3356 27.66 &amp;lt;.0001&lt;BR /&gt;Dispersion 0.0737 0.0367 0.0278 0.1955&lt;BR /&gt;&lt;BR /&gt;The way I'm interpreting is this: Exp(-504.867 + Year*0.2445) = STU. This is clearly wrong, because when I calculate that I get nothing close to the STU number. What am I missing??&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;The offset is missing. Exp(&lt;STRONG&gt;LogVisits&lt;/STRONG&gt; - 504.867 + Year*0.2445) will be closer to STU.&lt;/P&gt;</description>
      <pubDate>Sat, 12 Aug 2023 09:27:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Interpreting-PROC-GENMOD-output/m-p/889028#M44043</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2023-08-12T09:27:39Z</dc:date>
    </item>
    <item>
      <title>Re: Interpreting PROC GENMOD output</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Interpreting-PROC-GENMOD-output/m-p/889243#M44071</link>
      <description>&lt;P&gt;Thanks for responding - it still doesn't appear to work, though.&lt;/P&gt;
&lt;P&gt;Let's take 2020, for example. Logvisits = log(park_visits/1000000), or log(237.064332), which equals an offset of 5.471.&lt;/P&gt;
&lt;P&gt;So the expression yielding the predicted value would be exp(5.471 - 504.867 + 2020*0.2445).&amp;nbsp; This yields 0.004 predicted, 2993 actual.&lt;/P&gt;
&lt;P&gt;I'm doing something wrong but I can't place my finger on it.&lt;/P&gt;
&lt;P&gt;Any help you might provide would be greatly appreciated. Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 14 Aug 2023 19:39:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Interpreting-PROC-GENMOD-output/m-p/889243#M44071</guid>
      <dc:creator>newtriks</dc:creator>
      <dc:date>2023-08-14T19:39:15Z</dc:date>
    </item>
    <item>
      <title>Re: Interpreting PROC GENMOD output</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Interpreting-PROC-GENMOD-output/m-p/889250#M44072</link>
      <description>&lt;P&gt;I don't use Genmod so walk me through what&amp;nbsp; your NPS is doing. I think this may be important as you show us code for NPS, use a different set NPSvisittrendsCOVID. The NPS set you create variables Event and Incident but do not use them anywhere in the Genmod that I see. So are you sure that Genmod code is correct for the shown data set???&amp;nbsp; When I run the given data set with that Genmod the results are not as you show. So something seems a bit off:&lt;/P&gt;
&lt;DIV class="branch"&gt;Different intercept estimate and all the standard errors as a start.&lt;BR /&gt;&lt;A name="IDX4" target="_blank"&gt;&lt;/A&gt;
&lt;DIV&gt;
&lt;DIV align="left"&gt;
&lt;TABLE class="table" summary="Procedure Genmod: Analysis Of Parameter Estimates" cellspacing="0" cellpadding="3"&gt;&lt;COLGROUP&gt; &lt;COL /&gt;&lt;/COLGROUP&gt; &lt;COLGROUP&gt; &lt;COL /&gt; &lt;COL /&gt; &lt;COL /&gt; &lt;COL /&gt; &lt;COL /&gt; &lt;COL /&gt; &lt;COL /&gt;&lt;/COLGROUP&gt;
&lt;THEAD&gt;
&lt;TR&gt;
&lt;TH class="c m header" colspan="8" scope="colgroup"&gt;Analysis Of Maximum Likelihood Parameter Estimates&lt;/TH&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="c m header" scope="col"&gt;Parameter&lt;/TH&gt;
&lt;TH class="c m header" scope="col"&gt;DF&lt;/TH&gt;
&lt;TH class="c m header" scope="col"&gt;Estimate&lt;/TH&gt;
&lt;TH class="c m header" scope="col"&gt;Standard&lt;BR /&gt;Error&lt;/TH&gt;
&lt;TH class="c m header" colspan="2" scope="colgroup"&gt;Wald 95% Confidence Limits&lt;/TH&gt;
&lt;TH class="c m header" scope="col"&gt;Wald Chi-Square&lt;/TH&gt;
&lt;TH class="r m header" scope="col"&gt;Pr&amp;nbsp;&amp;gt;&amp;nbsp;ChiSq&lt;/TH&gt;
&lt;/TR&gt;
&lt;/THEAD&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TH class="l m rowheader" scope="row"&gt;Intercept&lt;/TH&gt;
&lt;TD class="r data"&gt;1&lt;/TD&gt;
&lt;TD class="r data"&gt;-491.051&lt;/TD&gt;
&lt;TD class="r data"&gt;66.2794&lt;/TD&gt;
&lt;TD class="r data"&gt;-620.956&lt;/TD&gt;
&lt;TD class="r data"&gt;-361.146&lt;/TD&gt;
&lt;TD class="r data"&gt;54.89&lt;/TD&gt;
&lt;TD class="r data"&gt;&amp;lt;.0001&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="l m rowheader" scope="row"&gt;Year&lt;/TH&gt;
&lt;TD class="r data"&gt;1&lt;/TD&gt;
&lt;TD class="r data"&gt;0.2445&lt;/TD&gt;
&lt;TD class="r data"&gt;0.0329&lt;/TD&gt;
&lt;TD class="r data"&gt;0.1800&lt;/TD&gt;
&lt;TD class="r data"&gt;0.3089&lt;/TD&gt;
&lt;TD class="r data"&gt;55.31&lt;/TD&gt;
&lt;TD class="r data"&gt;&amp;lt;.0001&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="l m rowheader" scope="row"&gt;Dispersion&lt;/TH&gt;
&lt;TD class="r data"&gt;1&lt;/TD&gt;
&lt;TD class="r data"&gt;0.0737&lt;/TD&gt;
&lt;TD class="r data"&gt;0.0259&lt;/TD&gt;
&lt;TD class="r data"&gt;0.0370&lt;/TD&gt;
&lt;TD class="r data"&gt;0.1469&lt;/TD&gt;
&lt;TD class="r data"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="r data"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It is confusing to introduce terms like your "park_visits" that do not appear in the data. If I have to guess that a variable named "visits" is supposed to be treated as "park_visits" I get very uncomfortable as I have seen just too much data with similar variable&amp;nbsp; names to like that sort of assumption.&lt;/P&gt;</description>
      <pubDate>Mon, 14 Aug 2023 20:06:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Interpreting-PROC-GENMOD-output/m-p/889250#M44072</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2023-08-14T20:06:34Z</dc:date>
    </item>
    <item>
      <title>Re: Interpreting PROC GENMOD output</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Interpreting-PROC-GENMOD-output/m-p/889301#M44075</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/413680"&gt;@newtriks&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Thanks for responding - it still doesn't appear to work, though.&lt;/P&gt;
&lt;P&gt;Let's take 2020, for example. Logvisits = log(park_visits/1000000), or log(237.064332), which equals an offset of 5.471.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;log(237.064332)=5.4&lt;STRONG&gt;68&lt;/STRONG&gt;331...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As&amp;nbsp;&lt;A href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884" target="_blank" rel="noopener"&gt;ballardw&lt;/A&gt;&amp;nbsp;has pointed out already, your intercept estimate -&lt;SPAN&gt;504.867 is not consistent with your data, for which your PROC GENMOD code ([edit:] i.e., applied to dataset &lt;EM&gt;NPS&lt;/EM&gt;) yields -491.051 . The seemingly small relative difference between these numbers has a big impact when the exponential function is applied: The result for 2020 is 4053.48 (same order of magnitude as STU=2993) as opposed to 0.004051... The factor (close to) 1,000,000 (namely exp(504.867-491.051)) between these results suggests that your incorrect intercept is due to a missing division (or multiplication) by 1,000,000 at some point in your calculation.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Aug 2023 09:39:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Interpreting-PROC-GENMOD-output/m-p/889301#M44075</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2023-08-15T09:39:03Z</dc:date>
    </item>
  </channel>
</rss>

