<?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: Warning Message when using Proc Logistic with Offset Option in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Warning-Message-when-using-Proc-Logistic-with-Offset-Option/m-p/679686#M32702</link>
    <description>&lt;P&gt;The note you referenced makes it clear that the WEIGHT option is generally superior to the offset method.&amp;nbsp; I believe that you already have all the ingredients to create a weight variable, since these are included in the calculation of the offset variable 'off' (r sub1 and p sub1).&amp;nbsp; Have you tried that approach?&amp;nbsp; If you get the same sort of error then the problem might be that there is some sort of collinearity or quasi-separation in the &amp;amp;groupvar and &amp;amp;numvar variables.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SteveDenham&lt;/P&gt;</description>
    <pubDate>Thu, 27 Aug 2020 11:50:24 GMT</pubDate>
    <dc:creator>SteveDenham</dc:creator>
    <dc:date>2020-08-27T11:50:24Z</dc:date>
    <item>
      <title>Warning Message when using Proc Logistic with Offset Option</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Warning-Message-when-using-Proc-Logistic-with-Offset-Option/m-p/679637#M32700</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a training set for a binary classification problem that I balanced 50:50 for Responder = 1 or 0 respectively.&amp;nbsp; &amp;nbsp;I have also referred to this &lt;A href="https://support.sas.com/kb/22/601.html" target="_self"&gt;Note (https://support.sas.com/kb/22/601.html)&lt;/A&gt;&amp;nbsp; about including the Offset variable because my data's true proportion is about 10:90 instead of 50:50.&amp;nbsp; The code is below,&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods graphics on;
proc logistic 
	Data = work.train_stdize 
	outmodel=work.mymodel 
	outest=work.mdl_betas 
	namelen=32;
	class &amp;amp;class_var. / param=ref;
	model responder(event='1') = &amp;amp;class_var. &amp;amp;num_var. / stb lackfit ctable pprob=0.5 offset=off;
	score data=work.train_stdize fitstat out=work.trainpred outroc=work.troc;
run;
ods graphics off;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I get the warning message,&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;NOTE: Convergence criterion (GCONV=1E-8) satisfied.
WARNING: The information matrix is singular and thus the convergence is questionable.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;If I exclude the offset=off in the option and rerun the logistic regression code, I don't get this warning message?!&amp;nbsp; I checked all my class and numeric variables and can confirm there are no collinearity.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any ideas on how I can fix this or just ignore the warning message?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Lobbie&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Aug 2020 02:51:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Warning-Message-when-using-Proc-Logistic-with-Offset-Option/m-p/679637#M32700</guid>
      <dc:creator>Lobbie</dc:creator>
      <dc:date>2020-08-27T02:51:24Z</dc:date>
    </item>
    <item>
      <title>Re: Warning Message when using Proc Logistic with Offset Option</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Warning-Message-when-using-Proc-Logistic-with-Offset-Option/m-p/679686#M32702</link>
      <description>&lt;P&gt;The note you referenced makes it clear that the WEIGHT option is generally superior to the offset method.&amp;nbsp; I believe that you already have all the ingredients to create a weight variable, since these are included in the calculation of the offset variable 'off' (r sub1 and p sub1).&amp;nbsp; Have you tried that approach?&amp;nbsp; If you get the same sort of error then the problem might be that there is some sort of collinearity or quasi-separation in the &amp;amp;groupvar and &amp;amp;numvar variables.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SteveDenham&lt;/P&gt;</description>
      <pubDate>Thu, 27 Aug 2020 11:50:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Warning-Message-when-using-Proc-Logistic-with-Offset-Option/m-p/679686#M32702</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2020-08-27T11:50:24Z</dc:date>
    </item>
    <item>
      <title>Re: Warning Message when using Proc Logistic with Offset Option</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Warning-Message-when-using-Proc-Logistic-with-Offset-Option/m-p/679687#M32703</link>
      <description>Try using PEVENT= instead of OFFSET .&lt;BR /&gt;&lt;BR /&gt;proc logistic data=sashelp.class;&lt;BR /&gt;model sex=weight height/pevent=0.2 ctable;&lt;BR /&gt;run;</description>
      <pubDate>Thu, 27 Aug 2020 11:56:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Warning-Message-when-using-Proc-Logistic-with-Offset-Option/m-p/679687#M32703</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2020-08-27T11:56:02Z</dc:date>
    </item>
    <item>
      <title>Re: Warning Message when using Proc Logistic with Offset Option</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Warning-Message-when-using-Proc-Logistic-with-Offset-Option/m-p/679924#M32708</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/18408"&gt;@Ksharp&lt;/a&gt;&amp;nbsp;, I tried using&amp;nbsp;&lt;SPAN&gt;PEVENT= as you suggested.&amp;nbsp; It did not change the values of the intercept and the coefficients.&amp;nbsp; It also did not adjust the predicted probabilities based on prior.&amp;nbsp; It did give me a classification table from 0% to 100% just as the documentation stated.&amp;nbsp; However, it is not what I am after.&amp;nbsp; Thanks.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Aug 2020 00:41:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Warning-Message-when-using-Proc-Logistic-with-Offset-Option/m-p/679924#M32708</guid>
      <dc:creator>Lobbie</dc:creator>
      <dc:date>2020-08-28T00:41:11Z</dc:date>
    </item>
    <item>
      <title>Re: Warning Message when using Proc Logistic with Offset Option</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Warning-Message-when-using-Proc-Logistic-with-Offset-Option/m-p/679926#M32710</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/15363"&gt;@SteveDenham&lt;/a&gt;,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I did try using weight and am still getting the warning message.&amp;nbsp; While I can confirm there is no collinearity, it is possible there are some sort of quasi-separation issue in the Class variables like you suggested. Questions are,&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Why removing the offset or weight option, the warning message goes away?&amp;nbsp; I read somewhere if it is&amp;nbsp;quasi-separation, the model is still ok because only maximum likelihood cannot be computed and we can ignore the warning.&amp;nbsp; I think I am fine with this as long as the model has good AUC, low misclassification, and the differences between these metrics of the train and test sets are not too big e.g. &amp;lt; 5% diff.&lt;/LI&gt;
&lt;LI&gt;I suppose with the use of offset or weight option in Proc Logistic, and to get the adjusted prediction for each observation, I will still have to use&amp;nbsp;priorevent=&amp;amp;pi1 in the score statement? Example below (&amp;amp;pi1 is the prior event value),
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods graphics on;
proc logistic 
	Data = work.train_stdize 
	outmodel=work.mymodel 
	outest=work.mdl_betas 
	namelen=32;
	class &amp;amp;class_var. / param=ref;
	model responder(event='1') = &amp;amp;class_var. &amp;amp;num_var. / stb lackfit ctable pprob=0.5 offset=off;
	score data=work.train_stdize fitstat out=work.trainpred outroc=work.troc priorevent=&amp;amp;pi1;
	score data=work.validate_stdize fitstat out=work.validpred outroc=work.vroc priorevent=&amp;amp;pi1;
	score data=work.osd_stdize fitstat out=work.osdpred outroc=work.oroc priorevent=&amp;amp;pi1;
run;
ods graphics off;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Lobbie&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Aug 2020 01:27:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Warning-Message-when-using-Proc-Logistic-with-Offset-Option/m-p/679926#M32710</guid>
      <dc:creator>Lobbie</dc:creator>
      <dc:date>2020-08-28T01:27:40Z</dc:date>
    </item>
    <item>
      <title>Re: Warning Message when using Proc Logistic with Offset Option</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Warning-Message-when-using-Proc-Logistic-with-Offset-Option/m-p/680018#M32713</link>
      <description>&lt;P&gt;Since the error message still appears using the WEIGHT statement, this has moved beyond my experience.&amp;nbsp; Get with the folks at Tech Support - they should be able to decipher what is going on, and how to get the correction for oversampling done correctly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SteveDenham&lt;/P&gt;</description>
      <pubDate>Fri, 28 Aug 2020 13:22:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Warning-Message-when-using-Proc-Logistic-with-Offset-Option/m-p/680018#M32713</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2020-08-28T13:22:30Z</dc:date>
    </item>
    <item>
      <title>Re: Warning Message when using Proc Logistic with Offset Option</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Warning-Message-when-using-Proc-Logistic-with-Offset-Option/m-p/680581#M32735</link>
      <description>&lt;P&gt;Hi &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/15363"&gt;@SteveDenham&lt;/a&gt;,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I tried again with some modifications to the Class variables with Weight method, and it worked now. I also notice when I used the Offset method, the DF of one of the levels in a categorical variable is 0 or NULL, and this may be the cause of the warning message.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;All good and thanks for your help,&lt;/P&gt;
&lt;P&gt;Lobbie&lt;/P&gt;</description>
      <pubDate>Tue, 01 Sep 2020 00:07:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Warning-Message-when-using-Proc-Logistic-with-Offset-Option/m-p/680581#M32735</guid>
      <dc:creator>Lobbie</dc:creator>
      <dc:date>2020-09-01T00:07:33Z</dc:date>
    </item>
  </channel>
</rss>

