<?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: Calculating odds ratios with a univariate analysis in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Calculating-odds-ratios-with-a-univariate-analysis/m-p/508353#M136525</link>
    <description>&lt;P&gt;You fit one model with all 7 of the risk factors. (Of course, there are problems doing this, but that answers your specific question)&lt;/P&gt;</description>
    <pubDate>Mon, 29 Oct 2018 14:30:36 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2018-10-29T14:30:36Z</dc:date>
    <item>
      <title>Calculating odds ratios with a univariate analysis</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Calculating-odds-ratios-with-a-univariate-analysis/m-p/508351#M136524</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have been asked to calculate odds ratios and confidence intervals using Proc Univariate (and then calculate the odds ratio,&amp;nbsp; Pvals, and confidence limits using a multivariate analysis for the variables with significant P-values&amp;nbsp;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Honestly, this whole process of why doesn't make a whole lot of sense to me. Does anyone have any useful resources that would help me understand&amp;nbsp;&amp;nbsp; why I need to calculate univariate before multivariate?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For reference, I have my disease status (1= alive, 0=dead) and then 7 risk factors (2 are continuous and 5 are categorical binary)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;my code looks like:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;libname&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; Hetal &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;"\\tuftsmc\home\hpatel3\SAS Datasets"&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;; &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;logistic&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;data&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=hetal.es_regre &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;desc&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;plots&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;(&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;only&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;)=(effect oddsratio(&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;type&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=horizontalstat)) &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;desc&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;model&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; adv_hf (&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;event&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;"1"&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;)= age_diag ;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've got the multivariate analysis figured out, but am I correct in assuming I would have to do proc logistic 7 times for each risk factor being set to the disease status to get odds ratios for each variable? I've been trying to find any resources on how to do this in SAS, but have had no luck. Any resources or help understanding would be great!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Oct 2018 14:27:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Calculating-odds-ratios-with-a-univariate-analysis/m-p/508351#M136524</guid>
      <dc:creator>hpatel3</dc:creator>
      <dc:date>2018-10-29T14:27:54Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating odds ratios with a univariate analysis</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Calculating-odds-ratios-with-a-univariate-analysis/m-p/508353#M136525</link>
      <description>&lt;P&gt;You fit one model with all 7 of the risk factors. (Of course, there are problems doing this, but that answers your specific question)&lt;/P&gt;</description>
      <pubDate>Mon, 29 Oct 2018 14:30:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Calculating-odds-ratios-with-a-univariate-analysis/m-p/508353#M136525</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2018-10-29T14:30:36Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating odds ratios with a univariate analysis</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Calculating-odds-ratios-with-a-univariate-analysis/m-p/508420#M136550</link>
      <description>&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;Honestly, this whole process of why doesn't make a whole lot of sense to me. Does anyone have any useful resources that would help me understand&amp;nbsp;&amp;nbsp; why I need to calculate univariate before multivariate?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;This is really, really dangerous. You're going to get numbers and have no idea if they're correct or not. I did link you to a fully worked logistic regression example. Did you run through that and understand it?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Let's back up a dozen steps, what is the context of your research? Are you planning to publish this, is it for a journal, or are you doing internal planning and analysis. THIS does matter significantly, because different contexts allows for different&amp;nbsp;methods because the accuracy requirements are significantly&amp;nbsp;different. If for a publication you'll have a peer-reviewed stage and there is much more context. You may want to consult a statistician here. If that's your role, then you need to start deep&amp;nbsp;diving in the analytics process such as EDA, CRISP-DM or whatever model you want to follow.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Why do univariate analysis and exploratory data analysis&amp;nbsp;before multivariate? So you understand the data. That's the primary purpose.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Anscombe quartet is a good example of this. The data has all the same metrics but very different relationships.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://en.wikipedia.org/wiki/Anscombe%27s_quartet" target="_blank"&gt;https://en.wikipedia.org/wiki/Anscombe%27s_quartet&lt;/A&gt;&lt;/SPAN&gt;&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;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&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>Mon, 29 Oct 2018 17:29:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Calculating-odds-ratios-with-a-univariate-analysis/m-p/508420#M136550</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-10-29T17:29:22Z</dc:date>
    </item>
  </channel>
</rss>

