<?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: &amp;quot;param = glm&amp;quot; gave a singular matrix warning while &amp;quot;param = ref&amp;quot; did not in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/quot-param-glm-quot-gave-a-singular-matrix-warning-while-quot/m-p/959626#M48062</link>
    <description>&lt;P&gt;Thank you for the reply! I've used the&amp;nbsp;&lt;SPAN&gt;ITPRINT option, and the gradients seemed to approach zero at the end. I'll try other options you suggested.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 19 Feb 2025 16:25:17 GMT</pubDate>
    <dc:creator>YKH</dc:creator>
    <dc:date>2025-02-19T16:25:17Z</dc:date>
    <item>
      <title>"param = glm" gave a singular matrix warning while "param = ref" did not</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/quot-param-glm-quot-gave-a-singular-matrix-warning-while-quot/m-p/959103#M48040</link>
      <description>&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;FONT size="4"&gt;&lt;SPAN&gt;Hi everyone,&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;FONT size="4"&gt;&lt;SPAN&gt;I'm conducting a multinomial logistic regression model using&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;proc logistic&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;in SAS with around 3.6 million observations, an outcome with 5 levels, and dozens of categorical predictors. I had no issue running both univariate and multivariate models when setting&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;param = ref&lt;/CODE&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;P&gt;&lt;FONT size="4"&gt;However, once I tried&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;param = glm&lt;/CODE&gt;, it started giving the warning message of "The information matrix is singular and thus the convergence is questionable. specifying a larger SINGULAR= value." in multivariate models. After doing some research, I found this message suggesting a multicollinearity issue in the model. I then tried to use only 2 predictors and it still gave the message while the correlation matrix showed no correlation between the two predictors.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="4"&gt;As far as I know, the only difference of&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;param = ref&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;and&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;param = glm&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;is that&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;param = glm&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;uses&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;less-than-full-rank&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;reference coding, meaning that it will create&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;k-1&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;dummy variables given&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;k&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;levels in the categorical predictor. These two parametrization methods should generate the same log-likelihood and estimates given the same reference level. To confirm this, I also compared the result of the two models using only 2 predictors. While&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;param = glm&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;throwing a warning, the result is identical to&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;param = ref&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;(Except a bunch of zeros in the estimates of reference levels for each predictor in&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;param = glm&lt;/CODE&gt;, is it the cause?).&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="4"&gt;My question is, why did the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;param = glm&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;model throwing a warning while&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;param = ref&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;did not. And more importantly, in this situation, should I trust the result of the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;param = ref&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;even though no warning was displayed.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="4"&gt;I appreciate any advice and suggestions. Thank you in advance.&lt;/FONT&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 12 Feb 2025 21:32:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/quot-param-glm-quot-gave-a-singular-matrix-warning-while-quot/m-p/959103#M48040</guid>
      <dc:creator>YKH</dc:creator>
      <dc:date>2025-02-12T21:32:40Z</dc:date>
    </item>
    <item>
      <title>Re: "param = glm" gave a singular matrix warning while "param = ref" did not</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/quot-param-glm-quot-gave-a-singular-matrix-warning-while-quot/m-p/959105#M48041</link>
      <description>&lt;P&gt;Any change in the model, such as parameterization of CLASS effects, changes the optimization, so unexpected differences like this can happen. But to assess the fit from the PARAM=REF fit, you can add the ITPRINT option and examine the vector of gradients. For proper convergence, they should all be quite close to zero. Also examine the standard errors of the parameters - they should not be large, like approaching 100 or even more. If you want more assurance, you could use any of the other procedures that can fit the logistic model such as the GLIMMIX, GENMOD, HPGENSELECT, PROBIT procedures and others which generally don't have identical algorithm code.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Feb 2025 21:54:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/quot-param-glm-quot-gave-a-singular-matrix-warning-while-quot/m-p/959105#M48041</guid>
      <dc:creator>StatDave</dc:creator>
      <dc:date>2025-02-12T21:54:36Z</dc:date>
    </item>
    <item>
      <title>Re: "param = glm" gave a singular matrix warning while "param = ref" did not</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/quot-param-glm-quot-gave-a-singular-matrix-warning-while-quot/m-p/959136#M48045</link>
      <description>&lt;P&gt;You could use different value of Y variable to check which one make such annoying WARNNING message.&lt;/P&gt;
&lt;PRE&gt;model Smoker_NXT&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;(ref='No')&lt;/STRONG&gt;&lt;/FONT&gt; = AgeStartCIGS Age1stIview Sex Race Hispanic Wave|Smoker|ENDSer SmkHistory
Start2SMK  /  noint link=glogit  Singular=1E-7  ;&lt;/PRE&gt;
&lt;PRE&gt;model Smoker_NXT&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;(ref='Yes')&lt;/STRONG&gt;&lt;/FONT&gt; = AgeStartCIGS Age1stIview Sex Race Hispanic Wave|Smoker|ENDSer SmkHistory
Start2SMK  /  noint link=glogit  Singular=1E-7  ;&lt;/PRE&gt;
&lt;PRE&gt;model Smoker_NXT&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;(ref='None')&lt;/STRONG&gt;&lt;/FONT&gt; = AgeStartCIGS Age1stIview Sex Race Hispanic Wave|Smoker|ENDSer SmkHistory
Start2SMK  /  noint link=glogit  Singular=1E-7  ;&lt;/PRE&gt;
&lt;P&gt;......................&lt;/P&gt;</description>
      <pubDate>Thu, 13 Feb 2025 02:13:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/quot-param-glm-quot-gave-a-singular-matrix-warning-while-quot/m-p/959136#M48045</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2025-02-13T02:13:51Z</dc:date>
    </item>
    <item>
      <title>Re: "param = glm" gave a singular matrix warning while "param = ref" did not</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/quot-param-glm-quot-gave-a-singular-matrix-warning-while-quot/m-p/959626#M48062</link>
      <description>&lt;P&gt;Thank you for the reply! I've used the&amp;nbsp;&lt;SPAN&gt;ITPRINT option, and the gradients seemed to approach zero at the end. I'll try other options you suggested.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Feb 2025 16:25:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/quot-param-glm-quot-gave-a-singular-matrix-warning-while-quot/m-p/959626#M48062</guid>
      <dc:creator>YKH</dc:creator>
      <dc:date>2025-02-19T16:25:17Z</dc:date>
    </item>
    <item>
      <title>Re: "param = glm" gave a singular matrix warning while "param = ref" did not</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/quot-param-glm-quot-gave-a-singular-matrix-warning-while-quot/m-p/959629#M48064</link>
      <description>&lt;P&gt;So the reference level also makes the difference? Will definitely try it. Thank you.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Feb 2025 16:26:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/quot-param-glm-quot-gave-a-singular-matrix-warning-while-quot/m-p/959629#M48064</guid>
      <dc:creator>YKH</dc:creator>
      <dc:date>2025-02-19T16:26:49Z</dc:date>
    </item>
  </channel>
</rss>

