<?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: linearity assumption for logistic regression model in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/linearity-assumption-for-logistic-regression-model/m-p/916424#M360967</link>
    <description>&lt;P&gt;For continuous X in a logistic regression, this is suggested in the&lt;A href="https://support.sas.com/kb/30/333.html#linlog" target="_self"&gt; SAS FASTats&lt;/A&gt;:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;A target="_blank" name="linlog"&gt;&lt;/A&gt;Linearity in the logit (or link), testingTo test for nonlinearity in the logit (for logistic models) and more generally for finding a suitable functional form for an independent variable in a generalized linear model (GLM), use the spline smoother on the variable in SAS/STAT PROC GAMPL or SAS Viya PROC GAMMOD. See the example titled "Nonparametric Logistic Regression" in the GAMPL documentation. Also see the ASSESS statement in SAS/STAT PROC GENMOD for assessing the covariate or link function in a GLM or Generalized Estimating Equations (GEE) model.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Also &lt;A href="https://www.lexjansen.com/sesug/2019/SESUG2019_Paper-233_Final_PDF.pdf" target="_blank"&gt;https://www.lexjansen.com/sesug/2019/SESUG2019_Paper-233_Final_PDF.pdf&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://stats.stackexchange.com/questions/169348/how-should-i-check-the-assumption-of-linearity-to-the-logit-for-the-continuous-i/211044#211044" target="_blank" rel="noopener"&gt;https://stats.stackexchange.com/questions/169348/how-should-i-check-the-assumption-of-linearity-to-the-logit-for-the-continuous-i/211044#211044&lt;/A&gt; points to using the Box-Tidwell test.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Checking linearity for categorical predictor makes no sense.&lt;/P&gt;</description>
    <pubDate>Fri, 16 Feb 2024 11:08:33 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2024-02-16T11:08:33Z</dc:date>
    <item>
      <title>linearity assumption for logistic regression model</title>
      <link>https://communities.sas.com/t5/SAS-Programming/linearity-assumption-for-logistic-regression-model/m-p/916401#M360954</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;I am student and doing a project, so I am confused about a linearity assumption of a continuous independent variable which is included in the model.&lt;/P&gt;
&lt;P&gt;My aim is to check the graphs between gestage and estimated probability for genders male and female.&lt;/P&gt;
&lt;P&gt;I need to check when the variable is included as 1) categorical and 2) continuous, if the linearity assumption is met.&lt;/P&gt;
&lt;P&gt;My code is&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN&gt;&lt;STRONG&gt;genmod&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN&gt;data&lt;/SPAN&gt; = SAS.z_final &lt;SPAN&gt;descending&lt;/SPAN&gt;;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;class&lt;/SPAN&gt; gender&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;under_weight&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;QNO;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;model&lt;/SPAN&gt; under_weight = gender gestage /&lt;SPAN&gt;dist&lt;/SPAN&gt;=b &lt;SPAN&gt;link&lt;/SPAN&gt;=logit &lt;SPAN&gt;type1&lt;/SPAN&gt; &lt;SPAN&gt;type3&lt;/SPAN&gt;;&lt;/P&gt;
&lt;P&gt;repeated subject&lt;SPAN&gt; = QNO/ &lt;/SPAN&gt;corr&lt;SPAN&gt;=cs &lt;/SPAN&gt;corrw&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;output out&lt;SPAN&gt; = pain &lt;/SPAN&gt;pred&lt;SPAN&gt;=&lt;/SPAN&gt;p resraw&lt;SPAN&gt;=r;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;My question is how to get the linearity assumptions for the independent variable gestage as continuous and categorical variables for gender(independent categorical variable) male and female?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Feb 2024 04:50:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/linearity-assumption-for-logistic-regression-model/m-p/916401#M360954</guid>
      <dc:creator>stellapersis7</dc:creator>
      <dc:date>2024-02-16T04:50:36Z</dc:date>
    </item>
    <item>
      <title>Re: linearity assumption for logistic regression model</title>
      <link>https://communities.sas.com/t5/SAS-Programming/linearity-assumption-for-logistic-regression-model/m-p/916402#M360955</link>
      <description>Check &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13684"&gt;@Rick_SAS&lt;/a&gt; blogs:&lt;BR /&gt;&lt;A href="https://blogs.sas.com/content/iml/2016/06/22/sas-effectplot-statement.html" target="_blank"&gt;https://blogs.sas.com/content/iml/2016/06/22/sas-effectplot-statement.html&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://blogs.sas.com/content/iml/2019/05/30/visualize-interaction-effects-regression.html" target="_blank"&gt;https://blogs.sas.com/content/iml/2019/05/30/visualize-interaction-effects-regression.html&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://blogs.sas.com/content/iml/2019/02/11/proc-plm-regression-models-sas.html" target="_blank"&gt;https://blogs.sas.com/content/iml/2019/02/11/proc-plm-regression-models-sas.html&lt;/A&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 16 Feb 2024 05:01:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/linearity-assumption-for-logistic-regression-model/m-p/916402#M360955</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2024-02-16T05:01:31Z</dc:date>
    </item>
    <item>
      <title>Re: linearity assumption for logistic regression model</title>
      <link>https://communities.sas.com/t5/SAS-Programming/linearity-assumption-for-logistic-regression-model/m-p/916424#M360967</link>
      <description>&lt;P&gt;For continuous X in a logistic regression, this is suggested in the&lt;A href="https://support.sas.com/kb/30/333.html#linlog" target="_self"&gt; SAS FASTats&lt;/A&gt;:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;A target="_blank" name="linlog"&gt;&lt;/A&gt;Linearity in the logit (or link), testingTo test for nonlinearity in the logit (for logistic models) and more generally for finding a suitable functional form for an independent variable in a generalized linear model (GLM), use the spline smoother on the variable in SAS/STAT PROC GAMPL or SAS Viya PROC GAMMOD. See the example titled "Nonparametric Logistic Regression" in the GAMPL documentation. Also see the ASSESS statement in SAS/STAT PROC GENMOD for assessing the covariate or link function in a GLM or Generalized Estimating Equations (GEE) model.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Also &lt;A href="https://www.lexjansen.com/sesug/2019/SESUG2019_Paper-233_Final_PDF.pdf" target="_blank"&gt;https://www.lexjansen.com/sesug/2019/SESUG2019_Paper-233_Final_PDF.pdf&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://stats.stackexchange.com/questions/169348/how-should-i-check-the-assumption-of-linearity-to-the-logit-for-the-continuous-i/211044#211044" target="_blank" rel="noopener"&gt;https://stats.stackexchange.com/questions/169348/how-should-i-check-the-assumption-of-linearity-to-the-logit-for-the-continuous-i/211044#211044&lt;/A&gt; points to using the Box-Tidwell test.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Checking linearity for categorical predictor makes no sense.&lt;/P&gt;</description>
      <pubDate>Fri, 16 Feb 2024 11:08:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/linearity-assumption-for-logistic-regression-model/m-p/916424#M360967</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2024-02-16T11:08:33Z</dc:date>
    </item>
    <item>
      <title>Re: linearity assumption for logistic regression model</title>
      <link>https://communities.sas.com/t5/SAS-Programming/linearity-assumption-for-logistic-regression-model/m-p/916427#M360968</link>
      <description>Paige,&lt;BR /&gt;Sure. I forgot the "ASSESS statement in PROC GENMOD " .</description>
      <pubDate>Fri, 16 Feb 2024 11:19:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/linearity-assumption-for-logistic-regression-model/m-p/916427#M360968</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2024-02-16T11:19:04Z</dc:date>
    </item>
  </channel>
</rss>

