<?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 Adding &amp;quot;no constant&amp;quot; option in proc genmod / translating from STATA to SAS in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Adding-quot-no-constant-quot-option-in-proc-genmod-translating/m-p/849582#M42071</link>
    <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm attempting to "translate" code from STATA to SAS (with a few changes) for a negative binomial regression analysis. However there seems to be one function in STATA where I can't find the equivalent SAS command; the below STATA code contains the option "nocons", which&amp;nbsp;&lt;SPAN&gt;specifies that a categorical variable should be treated as if it has no base, or, in other words, that all levels of the variable is kept in the model.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I would like to do the same in SAS but I can't find a way to do this.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;STATA code:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;nbreg var1 var2#var3, irr nocons exp(var4) vce(cluster var5)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;SAS code (without nocons equivalent):&lt;/P&gt;&lt;P&gt;proc genmod data=data;&lt;/P&gt;&lt;P&gt;class var2 var3 var4 var5;&lt;/P&gt;&lt;P&gt;model var1=var2 var3 var2*var3 / type3 dist=negbin offset=var6;&lt;/P&gt;&lt;P&gt;repeated sub=var4(var5) / type=unstr;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
    <pubDate>Wed, 14 Dec 2022 09:11:46 GMT</pubDate>
    <dc:creator>LineDamsgaard</dc:creator>
    <dc:date>2022-12-14T09:11:46Z</dc:date>
    <item>
      <title>Adding "no constant" option in proc genmod / translating from STATA to SAS</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Adding-quot-no-constant-quot-option-in-proc-genmod-translating/m-p/849582#M42071</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm attempting to "translate" code from STATA to SAS (with a few changes) for a negative binomial regression analysis. However there seems to be one function in STATA where I can't find the equivalent SAS command; the below STATA code contains the option "nocons", which&amp;nbsp;&lt;SPAN&gt;specifies that a categorical variable should be treated as if it has no base, or, in other words, that all levels of the variable is kept in the model.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I would like to do the same in SAS but I can't find a way to do this.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;STATA code:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;nbreg var1 var2#var3, irr nocons exp(var4) vce(cluster var5)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;SAS code (without nocons equivalent):&lt;/P&gt;&lt;P&gt;proc genmod data=data;&lt;/P&gt;&lt;P&gt;class var2 var3 var4 var5;&lt;/P&gt;&lt;P&gt;model var1=var2 var3 var2*var3 / type3 dist=negbin offset=var6;&lt;/P&gt;&lt;P&gt;repeated sub=var4(var5) / type=unstr;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 14 Dec 2022 09:11:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Adding-quot-no-constant-quot-option-in-proc-genmod-translating/m-p/849582#M42071</guid>
      <dc:creator>LineDamsgaard</dc:creator>
      <dc:date>2022-12-14T09:11:46Z</dc:date>
    </item>
    <item>
      <title>Re: Adding "no constant" option in proc genmod / translating from STATA to SAS</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Adding-quot-no-constant-quot-option-in-proc-genmod-translating/m-p/849612#M42072</link>
      <description>&lt;P&gt;Use the NOINT option of the MODEL statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;in other words, that all levels of the variable is kept in the model.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Let me point out that the model fit with the NOINT and the model if you don't use NOINT are identical, the predicted values and fit does not change. So all levels are kept in the model, either way you do it. You are just changing the parameterization of the model, not the model itself. See my explanation &lt;A href="https://communities.sas.com/t5/Statistical-Procedures/Interpreting-Multivariate-Linear-Regression-with-Categorical/m-p/591230#M28913" target="_self"&gt;here&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Dec 2022 13:21:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Adding-quot-no-constant-quot-option-in-proc-genmod-translating/m-p/849612#M42072</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-12-14T13:21:42Z</dc:date>
    </item>
    <item>
      <title>Re: Adding "no constant" option in proc genmod / translating from STATA to SAS</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Adding-quot-no-constant-quot-option-in-proc-genmod-translating/m-p/849739#M42073</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Are you talking about the construction of the design matrix?&lt;/P&gt;
&lt;P&gt;You can specify an&amp;nbsp;&lt;SPAN&gt;overparameterized model by using the&amp;nbsp;&lt;/SPAN&gt;&lt;A tabindex="0" href="https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/statug/statug_genmod_syntax05.htm#statug.genmod.classparam" target="_blank"&gt;PARAM=&lt;/A&gt;&lt;SPAN&gt;GLM option in the CLASS statement.&lt;BR /&gt;A CLASS main effect (an X-variable) with k-levels will then be "translated" to the design matrix as k dummy (0/1) columns.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SAS/STAT 15.2 User's Guide&lt;BR /&gt;The GENMOD Procedure&lt;BR /&gt;Parameterization Used in PROC GENMOD&lt;BR /&gt;&lt;A href="https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/statug/statug_genmod_details12.htm" target="_blank"&gt;https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/statug/statug_genmod_details12.htm&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/statug/statug_genmod_syntax05.htm#statug.genmod.classparam" target="_blank"&gt;https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/statug/statug_genmod_syntax05.htm#statug.genmod.classparam&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PARAM=GLM : Less-than-full-rank reference cell coding&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>Wed, 14 Dec 2022 21:28:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Adding-quot-no-constant-quot-option-in-proc-genmod-translating/m-p/849739#M42073</guid>
      <dc:creator>sbxkoenk</dc:creator>
      <dc:date>2022-12-14T21:28:02Z</dc:date>
    </item>
  </channel>
</rss>

