<?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: Contrast Line with Multiple Interaction Terms in proc surveylogistic in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Contrast-Line-with-Multiple-Interaction-Terms-in-proc/m-p/904783#M44906</link>
    <description>The most likely reason for the LSMEANS to be non-estimable is that the complexity of your model makes the data too sparse so that they cannot be estimated. Your best bet would be to simplify the model to reduce the sparsity. You can do that by merging together some of the categories in your categorical variables or by removing some terms from your model.</description>
    <pubDate>Tue, 28 Nov 2023 05:17:58 GMT</pubDate>
    <dc:creator>StatDave</dc:creator>
    <dc:date>2023-11-28T05:17:58Z</dc:date>
    <item>
      <title>Contrast Line with Multiple Interaction Terms in proc surveylogistic</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Contrast-Line-with-Multiple-Interaction-Terms-in-proc/m-p/904734#M44899</link>
      <description>&lt;P&gt;Hello, I'm trying to look at ORs for my payer variable (4 levels) for each of the strata for race (6 levels) and pl_nchs (6 levels). In the code below, private is the second level of payer, self is the third. And white and large central are the first levels of race and pl_nchs respectively. But this code is not working (screen shot of my results below). Any ideas on where I'm going wrong? Thank you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc surveylogistic data=c.merge11;&lt;BR /&gt;cluster hosp_ed;&lt;BR /&gt;strata neds_stratum;&lt;BR /&gt;weight discwt;&lt;BR /&gt;class payer race pl_nchs/param=glm;&lt;BR /&gt;model dispo(event='1')=payer race pl_nchs age payer*race payer*pl_nchs;&lt;BR /&gt;contrast 'Odds Ratio for Private v Self, White Race, Large Central'&lt;BR /&gt;payer 0 1 -1 0&lt;BR /&gt;payer*race 01-10 0000 0000 0000 0000 0000&lt;BR /&gt;payer*pl_nchs 01-10 0000 0000 0000 0000 0000/ estimate=exp;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2023-11-27 at 3.49.38 PM.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/90267i3CDBE5860855503E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screen Shot 2023-11-27 at 3.49.38 PM.png" alt="Screen Shot 2023-11-27 at 3.49.38 PM.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;</description>
      <pubDate>Mon, 27 Nov 2023 20:51:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Contrast-Line-with-Multiple-Interaction-Terms-in-proc/m-p/904734#M44899</guid>
      <dc:creator>vancurea</dc:creator>
      <dc:date>2023-11-27T20:51:00Z</dc:date>
    </item>
    <item>
      <title>Re: Contrast Line with Multiple Interaction Terms in proc surveylogistic</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Contrast-Line-with-Multiple-Interaction-Terms-in-proc/m-p/904738#M44900</link>
      <description>&lt;P&gt;As I've said here many times, the ESTIMATE (and CONTRAST) statement never be used whenever simpler statements that don't require correctly writing coefficients can do the job. Most needs, and apparently yours, are simple comparisons that can be handled by statements that are simpler to use like LSMEANS, LSMESTIMATE or SLICE. You can make all pairwise comparisons among your PAYER levels with this statement. If you also want confidence intervals, add the CL option.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;lsmeans payer / diff oddsratio;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 27 Nov 2023 21:26:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Contrast-Line-with-Multiple-Interaction-Terms-in-proc/m-p/904738#M44900</guid>
      <dc:creator>StatDave</dc:creator>
      <dc:date>2023-11-27T21:26:26Z</dc:date>
    </item>
    <item>
      <title>Re: Contrast Line with Multiple Interaction Terms in proc surveylogistic</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Contrast-Line-with-Multiple-Interaction-Terms-in-proc/m-p/904755#M44903</link>
      <description>&lt;P&gt;Thank you for that reply. I tried this code based on your feedback and got the output below. This is only showing one OR, and it doesn't seem to include any stratified ORs, and the CI is crazy. Can you please advise?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc surveylogistic data=c.merge11;&lt;BR /&gt;cluster hosp_ed;&lt;BR /&gt;strata neds_stratum;&lt;BR /&gt;weight discwt;&lt;BR /&gt;class payer race pl_nchs/param=glm;&lt;BR /&gt;model dispo(event='1')=payer|race payer|pl_nchs age;&lt;BR /&gt;lsmeans payer/diff oddsratio cl;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2023-11-27 at 5.43.39 PM.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/90278iF1A9BB415C3739ED/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screen Shot 2023-11-27 at 5.43.39 PM.png" alt="Screen Shot 2023-11-27 at 5.43.39 PM.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Nov 2023 22:46:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Contrast-Line-with-Multiple-Interaction-Terms-in-proc/m-p/904755#M44903</guid>
      <dc:creator>vancurea</dc:creator>
      <dc:date>2023-11-27T22:46:08Z</dc:date>
    </item>
    <item>
      <title>Re: Contrast Line with Multiple Interaction Terms in proc surveylogistic</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Contrast-Line-with-Multiple-Interaction-Terms-in-proc/m-p/904783#M44906</link>
      <description>The most likely reason for the LSMEANS to be non-estimable is that the complexity of your model makes the data too sparse so that they cannot be estimated. Your best bet would be to simplify the model to reduce the sparsity. You can do that by merging together some of the categories in your categorical variables or by removing some terms from your model.</description>
      <pubDate>Tue, 28 Nov 2023 05:17:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Contrast-Line-with-Multiple-Interaction-Terms-in-proc/m-p/904783#M44906</guid>
      <dc:creator>StatDave</dc:creator>
      <dc:date>2023-11-28T05:17:58Z</dc:date>
    </item>
    <item>
      <title>Re: Contrast Line with Multiple Interaction Terms in proc surveylogistic</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Contrast-Line-with-Multiple-Interaction-Terms-in-proc/m-p/904997#M44911</link>
      <description>&lt;P&gt;Thanks for your continued help StatDave. So I tried dropping one of my interaction terms and re-running the model just to see if it would work (included below). And it gives me ORs for payer, but not stratified by race. And it gave me ORs for all the levels of urban and for age, but no OR for race. Why is that?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc surveylogistic data=c.merge11;&lt;BR /&gt;cluster hosp_ed;&lt;BR /&gt;strata neds_stratum;&lt;BR /&gt;weight discwt;&lt;BR /&gt;class payer race pl_nchs/param=glm;&lt;BR /&gt;model dispo(event='1')=payer|race pl_nchs age;&lt;BR /&gt;lsmeans payer/diff oddsratio cl;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Nov 2023 20:58:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Contrast-Line-with-Multiple-Interaction-Terms-in-proc/m-p/904997#M44911</guid>
      <dc:creator>vancurea</dc:creator>
      <dc:date>2023-11-28T20:58:21Z</dc:date>
    </item>
    <item>
      <title>Re: Contrast Line with Multiple Interaction Terms in proc surveylogistic</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Contrast-Line-with-Multiple-Interaction-Terms-in-proc/m-p/905013#M44912</link>
      <description>&lt;P&gt;If you want odds ratios for each payer level in each level of race, then specify payer*race in the LSMEANS statement rather than just payer. Odds ratios are not automatically provided for any variable involved in interaction, so that is why you got odds ratios for age and pl_nchs but not for the race levels. If the payer*race interaction is significant, then just like in an ordinary regression model, that means that the effect of each variable depends on the level of the other. So, typically you would want to get odds ratios among levels of payer separately for each race level, and similarly get odds ratios among levels of race separately for each payer level. Those are all provided by the LSMEANS statement with the interaction as I suggest above. &lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;lsmeans payer*race / diff oddsratio cl;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 28 Nov 2023 21:14:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Contrast-Line-with-Multiple-Interaction-Terms-in-proc/m-p/905013#M44912</guid>
      <dc:creator>StatDave</dc:creator>
      <dc:date>2023-11-28T21:14:57Z</dc:date>
    </item>
    <item>
      <title>Re: Contrast Line with Multiple Interaction Terms in proc surveylogistic</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Contrast-Line-with-Multiple-Interaction-Terms-in-proc/m-p/905164#M44924</link>
      <description>&lt;P&gt;And if you still have non-estimable means, you may have to resort to a "means model" where you fit only the three way interaction in the MODEL statement, and use LSMESTIMATE statements to generate the means and standard errors.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SteveDenham&lt;/P&gt;</description>
      <pubDate>Wed, 29 Nov 2023 14:10:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Contrast-Line-with-Multiple-Interaction-Terms-in-proc/m-p/905164#M44924</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2023-11-29T14:10:25Z</dc:date>
    </item>
  </channel>
</rss>

