<?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: Genmod for APC models - data distribution in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Genmod-for-APC-models-data-distribution/m-p/232554#M12247</link>
    <description />
    <pubDate>Sat, 31 Oct 2015 06:04:27 GMT</pubDate>
    <dc:creator>jeonghyunwoo</dc:creator>
    <dc:date>2015-10-31T06:04:27Z</dc:date>
    <item>
      <title>Genmod for APC models - data distribution</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Genmod-for-APC-models-data-distribution/m-p/203958#M10944</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P class="DPNormln" style="text-indent: 0cm;"&gt;Hello,&lt;/P&gt;&lt;P class="DPNormln" style="text-indent: 0cm;"&gt;I have questions about Age-Period-Cohort models in SAS. &lt;SPAN style="color: #575757; font-family: arial, helvetica, sans-serif; font-size: 13.333333015441895px; font-style: normal; font-weight: normal; text-align: left; text-indent: 0px;"&gt;I used proc genmod for age-specific fertility rates (Births/Exposure Female Population).&amp;nbsp; I need to identify what effects are more important and how they changed fertility rates.The results are risk ratios. Explaining variables are mother’s age, Period (4 periods of 5 years length and 1 period of 4 years) and Cohort. Because of identification problem I made a constraint on Period (and chose that period 2012=reference period 2007.5). I overwrote it in the dataset (you can see it in Excel). &lt;/SPAN&gt;&lt;/P&gt;&lt;P class="DPNormln" style="text-indent: 0cm;"&gt;&lt;/P&gt;&lt;P class="DPNormln" style="text-indent: 0cm;"&gt;The formula of reggression is: ln(r&lt;SUB&gt;ap) = intercept + α&lt;SUB&gt;a + &lt;/SUB&gt;β&lt;SUB&gt;p + &lt;/SUB&gt;γ&lt;SUB&gt;c + &lt;/SUB&gt;ε&amp;nbsp;&amp;nbsp; &lt;/SUB&gt;&lt;SPAN style="text-indent: 0cm; font-size: 10pt; line-height: 1.5em;"&gt;if I use Poisson distribution. But I cannot use Poisson distribution because of overdispersion. So I tried negative binomial distribution. The formula for binomial distribution should then be &lt;/SPAN&gt;&lt;SPAN style="text-indent: 0cm; font-size: 10pt; line-height: 1.5em;"&gt;ln(r&lt;/SPAN&gt;&lt;SUB style="text-indent: 0cm; line-height: 1.5em;"&gt;ap&lt;/SUB&gt;&lt;SPAN style="text-indent: 0cm; font-size: 10pt; line-height: 1.5em;"&gt;/(1-&lt;/SPAN&gt;&lt;SPAN style="text-indent: 0cm; font-size: 10pt; line-height: 1.5em;"&gt;r&lt;/SPAN&gt;&lt;SUB style="text-indent: 0cm; line-height: 1.5em;"&gt;ap)&lt;/SUB&gt;&lt;SUB style="text-indent: 0cm; line-height: 1.5em;"&gt;) = intercept + α&lt;SUB&gt;a + &lt;/SUB&gt;β&lt;SUB&gt;p + &lt;/SUB&gt;γ&lt;SUB&gt;c + &lt;/SUB&gt;ε&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SUB&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em; text-indent: 0cm;"&gt;but I really don't know if and how I should set it in the SAS code. Or is it adjusted?&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="DPNormln" style="text-indent: 0cm;"&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: navy; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;proc&lt;/STRONG&gt; &lt;STRONG style="color: navy; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;genmod&lt;/STRONG&gt; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;data&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;=genmod.input&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;class&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; Age (&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;ref&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: purple; background: white;"&gt;'32.5'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;) Period (&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;ref&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: purple; background: white;"&gt;'2007.5'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;) Cohort (&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;ref&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: purple; background: white;"&gt;'1975'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;) /&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;param&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;=ref;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;model&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; Birth = Age Period Cohort /&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;link&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;=log &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;dist&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;=nb &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;offset&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;=log_Exposure &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;type3&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="DPNormln" style="text-indent: 0cm;"&gt;&lt;STRONG style="color: navy; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;run&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="DPNormln" style="text-indent: 0cm;"&gt;&lt;/P&gt;&lt;P class="DPNormln" style="text-indent: 0cm;"&gt;If I work on the assumption that the code is correct (I mean in part model Birth and offset=) I have another problem. Even though I use negative binomial distribution, data are also overdispersed when all variables are used.&lt;/P&gt;&lt;P class="DPNormln" style="text-indent: 0cm;"&gt;Could you please advise me?&lt;/P&gt;&lt;P class="DPNormln" style="text-indent: 0cm;"&gt;&lt;/P&gt;&lt;P class="DPNormln" style="text-indent: 0cm;"&gt;Thank you very much in advance.&lt;/P&gt;&lt;P class="DPNormln" style="text-indent: 0cm;"&gt;Anna K.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 25 Apr 2015 20:05:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Genmod-for-APC-models-data-distribution/m-p/203958#M10944</guid>
      <dc:creator>krejcia</dc:creator>
      <dc:date>2015-04-25T20:05:56Z</dc:date>
    </item>
    <item>
      <title>Re: Genmod for APC models - data distribution</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Genmod-for-APC-models-data-distribution/m-p/232554#M12247</link>
      <description />
      <pubDate>Sat, 31 Oct 2015 06:04:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Genmod-for-APC-models-data-distribution/m-p/232554#M12247</guid>
      <dc:creator>jeonghyunwoo</dc:creator>
      <dc:date>2015-10-31T06:04:27Z</dc:date>
    </item>
    <item>
      <title>Re: Genmod for APC models - data distribution</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Genmod-for-APC-models-data-distribution/m-p/232666#M12251</link>
      <description>&lt;P&gt;You should not worry about overdispersion in such a model. Poisson regression can be used because the likelihood function (as a function of parameters) is the same as what you would have if data was poisson distributed. But the original data is time-to-event data, and only because of a kind of mathematical luck, the parameters can be estimated by use of Poisson regression. That means, you can make statistical inference about parameters with use of Poisson-regression, but you can not use the statistics about how good your data is Poisson distributed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example, if you have N observations with time to event and you will estimate the intensity, then you put N on the left side (which is of course not Poisson distributed) and the log of the total observation time in offset. It would of course then be meaningless to test how good N is Poisson distributed since it is a fixed number. That example is ofcourse rather extreme, but it illustrate the principle.&lt;/P&gt;</description>
      <pubDate>Sun, 01 Nov 2015 23:11:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Genmod-for-APC-models-data-distribution/m-p/232666#M12251</guid>
      <dc:creator>JacobSimonsen</dc:creator>
      <dc:date>2015-11-01T23:11:40Z</dc:date>
    </item>
    <item>
      <title>Re: Genmod for APC models - data distribution</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Genmod-for-APC-models-data-distribution/m-p/249718#M13132</link>
      <description>&lt;P&gt;There are much bigger problem in this model than overdispersion. As mentioned, overdispersion is not a problem at all.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The estimates from this model will unfortunately be complete meaningless! The problem is that age, period and cohort is linearly dependent. If forexample you want period estimates, then you can not either identify the an intercept or a linear trend. The intercept may not be a problem as you may want to estimate the difference between periods. But the linear trend is a bigger problem.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It is rather hard to solve the problem. What you should do is to make a projection of the column vectors in your design matrix that comes from cohort effect (still assuming you want period estimates). Then projecting these collumns into the orthogonal space to the space spanned by the linear trend. You can then adjust for this "untrended" effect of cohort, and assume that the linear trend is only due to period effect&amp;nbsp;(but not cohort effect)&amp;nbsp;you will get period estimates that are adjusted for age and an "untrended" cohort effect.&lt;/P&gt;
&lt;P&gt;Proc IML may be a big help for you to make all the linear algebra that is neccessary.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;reference: &lt;SPAN&gt;&lt;STRONG&gt;Age-period-cohort models for the Lexis diagram - Reply.&lt;/STRONG&gt;&lt;/SPAN&gt; / &lt;SPAN&gt;Carstensen, Bendix&lt;/SPAN&gt;.&lt;/P&gt;
&lt;P&gt;In: &lt;SPAN&gt;Statistics in Medicine&lt;/SPAN&gt;, Vol. 27, No. 9, 2008, p. 1561-1564&lt;/P&gt;</description>
      <pubDate>Fri, 12 Feb 2016 16:11:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Genmod-for-APC-models-data-distribution/m-p/249718#M13132</guid>
      <dc:creator>JacobSimonsen</dc:creator>
      <dc:date>2016-02-12T16:11:44Z</dc:date>
    </item>
  </channel>
</rss>

