<?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 Combing  OR and CI into a single cell in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Combing-OR-and-CI-into-a-single-cell/m-p/848545#M335475</link>
    <description>&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have obtained crude odds ratios and confidence intervals for several variables using prog logistic and ods output. The code for how I obtained these values is below.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ods output GlobalTests(persist=proc)=glt(where=(test=:'L'))&lt;BR /&gt;ParameterEstimates(persist=proc)=est&lt;BR /&gt;OddsRatios(persist=proc)=odr;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc logistic data=newexcel order=formatted;&lt;BR /&gt;class response &amp;amp;Covar;&lt;BR /&gt;format &amp;amp;newformats;&lt;BR /&gt;model Response(ref='Nonresponder')= &amp;amp;Covar ; run;&lt;/P&gt;&lt;P&gt;ods output close;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data odr2;&lt;BR /&gt;set odr;&lt;BR /&gt;informat oddsratioest 8.2 lowerCL 8.2 uppercl 8.2;&lt;BR /&gt;format oddsratioest 8.2 lowerCL 8.2 uppercl 8.2;&lt;BR /&gt;drop _:;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Next, I would to have the odds ratios (OddsRatioEst) and confidence intervals (LowerCL UpperCL) combined into one cell, with a 8.2 format for each value and have them include parentheses and a comma into a single cell to make easier for placement into a different table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Essentially, take the below:&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 2022-12-08 at 9.14.57 AM.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/78192i6EDED8AEC2EA19F6/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2022-12-08 at 9.14.57 AM.png" alt="Screen Shot 2022-12-08 at 9.14.57 AM.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And format it to look like&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sex Female vs Male&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.91 (0.61, 1.35)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ideally, 0.91 (0.61, 1.35) would all be house in a single column.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advanced for any help!&lt;/P&gt;</description>
    <pubDate>Thu, 08 Dec 2022 15:24:39 GMT</pubDate>
    <dc:creator>tofov2</dc:creator>
    <dc:date>2022-12-08T15:24:39Z</dc:date>
    <item>
      <title>Combing  OR and CI into a single cell</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Combing-OR-and-CI-into-a-single-cell/m-p/848545#M335475</link>
      <description>&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have obtained crude odds ratios and confidence intervals for several variables using prog logistic and ods output. The code for how I obtained these values is below.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ods output GlobalTests(persist=proc)=glt(where=(test=:'L'))&lt;BR /&gt;ParameterEstimates(persist=proc)=est&lt;BR /&gt;OddsRatios(persist=proc)=odr;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc logistic data=newexcel order=formatted;&lt;BR /&gt;class response &amp;amp;Covar;&lt;BR /&gt;format &amp;amp;newformats;&lt;BR /&gt;model Response(ref='Nonresponder')= &amp;amp;Covar ; run;&lt;/P&gt;&lt;P&gt;ods output close;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data odr2;&lt;BR /&gt;set odr;&lt;BR /&gt;informat oddsratioest 8.2 lowerCL 8.2 uppercl 8.2;&lt;BR /&gt;format oddsratioest 8.2 lowerCL 8.2 uppercl 8.2;&lt;BR /&gt;drop _:;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Next, I would to have the odds ratios (OddsRatioEst) and confidence intervals (LowerCL UpperCL) combined into one cell, with a 8.2 format for each value and have them include parentheses and a comma into a single cell to make easier for placement into a different table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Essentially, take the below:&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 2022-12-08 at 9.14.57 AM.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/78192i6EDED8AEC2EA19F6/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2022-12-08 at 9.14.57 AM.png" alt="Screen Shot 2022-12-08 at 9.14.57 AM.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And format it to look like&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sex Female vs Male&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.91 (0.61, 1.35)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ideally, 0.91 (0.61, 1.35) would all be house in a single column.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advanced for any help!&lt;/P&gt;</description>
      <pubDate>Thu, 08 Dec 2022 15:24:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Combing-OR-and-CI-into-a-single-cell/m-p/848545#M335475</guid>
      <dc:creator>tofov2</dc:creator>
      <dc:date>2022-12-08T15:24:39Z</dc:date>
    </item>
    <item>
      <title>Re: Combing  OR and CI into a single cell</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Combing-OR-and-CI-into-a-single-cell/m-p/849610#M335873</link>
      <description>&lt;P&gt;Instead of this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data odr2;
   set odr;
   informat oddsratioest 8.2 lowerCL 8.2 uppercl 8.2;
   format oddsratioest 8.2 lowerCL 8.2 uppercl 8.2;
   drop _:;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Try this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data odr2;
	set odr;
	length Odds $50;
	Odds=cat(put(oddsratioest,4.2),' (',catx(', ', put(lowerCL,4.2), put(uppercl,4.2)),')');
	Keep Effect Odds;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;This should produce:&lt;/P&gt;
&lt;TABLE border="1" width="100%"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="7.627118644067797%"&gt;Obs&lt;/TD&gt;
&lt;TD width="70.02118644067797%"&gt;Effect&lt;/TD&gt;
&lt;TD width="22.351694915254235%"&gt;Odds&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="7.627118644067797%"&gt;1&lt;/TD&gt;
&lt;TD width="70.02118644067797%"&gt;Sex Female vs. Male&lt;/TD&gt;
&lt;TD width="22.351694915254235%"&gt;&amp;nbsp;0.91 (0.61, 1.35)&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="7.627118644067797%"&gt;2&lt;/TD&gt;
&lt;TD width="70.02118644067797%"&gt;Active_smoke yes vs no&lt;/TD&gt;
&lt;TD width="22.351694915254235%"&gt;0.88 (0.47, 1.66)&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="7.627118644067797%"&gt;&amp;nbsp;...&lt;/TD&gt;
&lt;TD width="70.02118644067797%"&gt;…&lt;/TD&gt;
&lt;TD width="22.351694915254235%"&gt;...&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="7.627118644067797%"&gt;7&lt;/TD&gt;
&lt;TD width="70.02118644067797%"&gt;CKD yes vs no&lt;/TD&gt;
&lt;TD width="22.351694915254235%"&gt;0.74 (0.46, 1.18)&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Dec 2022 13:00:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Combing-OR-and-CI-into-a-single-cell/m-p/849610#M335873</guid>
      <dc:creator>SASJedi</dc:creator>
      <dc:date>2022-12-14T13:00:54Z</dc:date>
    </item>
  </channel>
</rss>

