<?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: How to write a code for multivariate conditional logistic regression for numeric variables in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-write-a-code-for-multivariate-conditional-logistic/m-p/803001#M39476</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/415643"&gt;@manthan&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Will that help?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;All my variables are numeric and not categorical..&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;It doesn't matter if they are numeric. You put those variable names in the CLASS statement, and they will be treated as categorical.&lt;/P&gt;</description>
    <pubDate>Sun, 20 Mar 2022 18:44:04 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2022-03-20T18:44:04Z</dc:date>
    <item>
      <title>How to write a code for multivariate conditional logistic regression for numeric variables</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-write-a-code-for-multivariate-conditional-logistic/m-p/802980#M39470</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need some help. I am conduting a retrospective study on whether different classes of diabetes meds affect cholesterol. I want to generate a conditional logistic regression to generate the following Adjusted odds ratios:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Odds ratio for Diabetic medication use (y/n) and type of DM med and cholesterol level (high /low)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I currently have the data set up as following variables (I made them all numeric)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Dependant variable: 0 = Normal Cholestrol &amp;nbsp;1= Borderline Cholesterol &amp;nbsp;2= High Cholesterol&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and the Independent variables are : DM med (1/0), different variables columns for each Med e.g. metform (1/0), glyburide (1/0), where 1 is yes and 0 = No. I also have additional independent variables that we need to adjust for like age, GENDER, sepsis .. all are numeric coded as 1/0 and BMI also which is coded as 1/2/3 depedening on how high the BMI is..&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can someone help me write a code for what I want? I am completely lost...&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;</description>
      <pubDate>Sun, 20 Mar 2022 14:29:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-write-a-code-for-multivariate-conditional-logistic/m-p/802980#M39470</guid>
      <dc:creator>manthan</dc:creator>
      <dc:date>2022-03-20T14:29:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a code for multivariate conditional logistic regression for numeric variables</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-write-a-code-for-multivariate-conditional-logistic/m-p/802981#M39471</link>
      <description>&lt;P&gt;You could start with the &lt;A href="https://documentation.sas.com/doc/en/pgmmvacdc/9.4/statug/statug_logistic_toc.htm" target="_self"&gt;documentation&lt;/A&gt; for PROC LOGISTIC.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There is an example that says "Logistic Modeling with Categorical Predictors", seems like exactly what you want.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Age is coded as 0/1?&lt;/P&gt;</description>
      <pubDate>Sun, 20 Mar 2022 14:35:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-write-a-code-for-multivariate-conditional-logistic/m-p/802981#M39471</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-03-20T14:35:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a code for multivariate conditional logistic regression for numeric variables</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-write-a-code-for-multivariate-conditional-logistic/m-p/802986#M39472</link>
      <description>&lt;P&gt;Will that help?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;All my variables are numeric and not categorical..&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I also coded BMI as 1,2,3,4,5 where each number stands for a specific BMI , age is also coded as 0,1,2 where each number is a specific age group.. hence I am asking for numeric variables&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;</description>
      <pubDate>Sun, 20 Mar 2022 15:28:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-write-a-code-for-multivariate-conditional-logistic/m-p/802986#M39472</guid>
      <dc:creator>manthan</dc:creator>
      <dc:date>2022-03-20T15:28:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a code for multivariate conditional logistic regression for numeric variables</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-write-a-code-for-multivariate-conditional-logistic/m-p/802987#M39473</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Conditional logistic regression is an extension of logistic regression that allows one to take into account stratification and matching.&lt;BR /&gt;Do you have something like "Matched Pairs", for example?&lt;BR /&gt;If not, it's a mere classic Logistic Regression with a nominal (use&amp;nbsp;Generalized Logits) or ordinal outcome variable (use C&lt;SPAN&gt;umulative Logit a.o.)&lt;/SPAN&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The internet is full of SAS code examples for (conditional) logistic regression.&lt;BR /&gt;Tip : visit&amp;nbsp;&lt;A href="https://www.lexjansen.com/" target="_blank"&gt;https://www.lexjansen.com/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;and ... enter the search terms you want and then ... search.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Moreover, you want to fit a MULTIPLE logistic regression. MULTIVARIATE makes me think you have several response variables you want to simultaneously model. And the latter is not what you want to do. It's the former (multiple predictors | explanatory inputs).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Good luck,&lt;/P&gt;
&lt;P&gt;Koen&lt;/P&gt;</description>
      <pubDate>Sun, 20 Mar 2022 15:32:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-write-a-code-for-multivariate-conditional-logistic/m-p/802987#M39473</guid>
      <dc:creator>sbxkoenk</dc:creator>
      <dc:date>2022-03-20T15:32:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a code for multivariate conditional logistic regression for numeric variables</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-write-a-code-for-multivariate-conditional-logistic/m-p/802988#M39474</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/415643"&gt;@manthan&lt;/a&gt;&amp;nbsp;wrote:
&lt;P class="1647790416729"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I also coded BMI as 1,2,3,4,5 where each number stands for a specific BMI , age is also coded as 0,1,2 where each number is a specific age group.. hence I am asking for numeric variables&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;That's NOT a good idea if your BMI-classes and | or age classes are not evenly spaced. Moreover&amp;nbsp;1,2,3,4,5 and&amp;nbsp;0,1,2 are not exactly interval-scaled (continuous). The range is very limited.&lt;BR /&gt;You really need to use categorical predictors.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Koen&lt;/P&gt;</description>
      <pubDate>Sun, 20 Mar 2022 15:35:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-write-a-code-for-multivariate-conditional-logistic/m-p/802988#M39474</guid>
      <dc:creator>sbxkoenk</dc:creator>
      <dc:date>2022-03-20T15:35:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a code for multivariate conditional logistic regression for numeric variables</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-write-a-code-for-multivariate-conditional-logistic/m-p/802997#M39475</link>
      <description>&lt;P&gt;&lt;CODE class=" language-sas"&gt;&lt;/CODE&gt;ods graphics on;&lt;/P&gt;
&lt;P&gt;proc logistic data = have plots(only)=(effect oddsratio);&lt;/P&gt;
&lt;P&gt;class cholesterol(ref = '0') metformin(ref = '0') glyburide(ref = '0') gender(ref = 'Female') sepsis(ref='0');&lt;/P&gt;
&lt;P&gt;*categorical variables and ternary outcome (cholesterol) go into the class statement above;&lt;/P&gt;
&lt;P&gt;model cholesterol = age gender metformin gliburide sepsis bmi / clodds=pl orpvalue link=glogit;&lt;/P&gt;
&lt;P&gt;*bmi per your definition is a categorical ordinal variable, listed above as pseudo-continuous (vs. age is a true continuous variable);&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;</description>
      <pubDate>Sun, 20 Mar 2022 18:32:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-write-a-code-for-multivariate-conditional-logistic/m-p/802997#M39475</guid>
      <dc:creator>pink_poodle</dc:creator>
      <dc:date>2022-03-20T18:32:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a code for multivariate conditional logistic regression for numeric variables</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-write-a-code-for-multivariate-conditional-logistic/m-p/803001#M39476</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/415643"&gt;@manthan&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Will that help?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;All my variables are numeric and not categorical..&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;It doesn't matter if they are numeric. You put those variable names in the CLASS statement, and they will be treated as categorical.&lt;/P&gt;</description>
      <pubDate>Sun, 20 Mar 2022 18:44:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-write-a-code-for-multivariate-conditional-logistic/m-p/803001#M39476</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-03-20T18:44:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a code for multivariate conditional logistic regression for numeric variables</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-write-a-code-for-multivariate-conditional-logistic/m-p/803268#M39481</link>
      <description>&lt;P&gt;While it is not something I've researched, I believe that if your goal is to estimate the odds ratios for the variables in the model then you can fit an ordinary logistic model in PROC LOGISTIC and use the reported odds ratios without taking any steps to account for the retrospective sampling. This is the case for the retrospective analysis of binary response data as discussed in&lt;A href="http://support.sas.com/kb/22601" target="_self"&gt; this note&lt;/A&gt; on oversampling. But as noted there, it is likely that the intercepts in the model will be affected by the sampling and thus the computation of predicted probabilities would not proceed as usual. I would encourage you to look further into this issue to verify the validity of this approach.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To complete the discussion of the word "multivariate"... the proper word for a multi-level, categorical variable is multinomial, which is the name of the distribution it follows. A multinomial variable can be either ordinal or nominal. Your description of the response suggests it is ordinal, so my suggestion above would be to fit an ordinary ordinal, multinomial logistic model - also known as a proportional odds model. This is done with exactly the same syntax as if the response were binary, but be sure in the Response Profile table in the results that your response levels are in logical increasing or decreasing order. See &lt;A href="http://support.sas.com/kb/22871" target="_self"&gt;this note&lt;/A&gt; for a description and fitting methods for many types of logistic models.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Mar 2022 02:39:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-write-a-code-for-multivariate-conditional-logistic/m-p/803268#M39481</guid>
      <dc:creator>StatDave</dc:creator>
      <dc:date>2022-03-22T02:39:34Z</dc:date>
    </item>
  </channel>
</rss>

