<?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 do i run a univariate analysis for this? in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/How-do-i-run-a-univariate-analysis-for-this/m-p/610329#M18079</link>
    <description>Your model has more than one variable but you're saying you want univariate analysis which would imply that your model statement should have only a single variable in the MODEL statement. You have "sex cya sex*csa" which is your full model. &lt;BR /&gt;&lt;BR /&gt;And remember if you do put only a single variable in the model, the other steps, ESTIMATE statements, need to be adjusted accordingly. &lt;BR /&gt;&lt;BR /&gt;One trick that helps to make sure you're doing this correctly is to comment your code with what what you think each line is doing. Then you can easily modify it as you go.</description>
    <pubDate>Sun, 08 Dec 2019 20:00:14 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2019-12-08T20:00:14Z</dc:date>
    <item>
      <title>How do i run a univariate analysis for this?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-do-i-run-a-univariate-analysis-for-this/m-p/610323#M18077</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;so am running a univariate analyses by putting each variable alone in the model.&lt;/P&gt;&lt;P&gt;the outcome is acet;&lt;/P&gt;&lt;P&gt;the dependent variable is sex (coded Men=1 and Women=2)&lt;/P&gt;&lt;P&gt;the independent variables are; csa (coded as 1 or 0) and age (coded which is numeric i.e. 18, 32, 56, 89, etc)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example below; i tried putting only sex in the model but i keep getting error from the SAS log. please any help?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc genmod data=avia88 desc;&lt;BR /&gt;class sex;&lt;BR /&gt;model acet=csa sex*csa/link=logit dist=binomial type3;&lt;BR /&gt;estimate "M:" csa csa*sex 1 -1 0 0/exp;&lt;BR /&gt;estimate "W:" oral_cs csa*sex 0 0 -1 1/exp;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Sun, 08 Dec 2019 19:32:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-do-i-run-a-univariate-analysis-for-this/m-p/610323#M18077</guid>
      <dc:creator>Mystik</dc:creator>
      <dc:date>2019-12-08T19:32:39Z</dc:date>
    </item>
    <item>
      <title>Re: How do i run a univariate analysis for this?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-do-i-run-a-univariate-analysis-for-this/m-p/610326#M18078</link>
      <description>&lt;P&gt;&lt;SPAN&gt;made a mistake in the first one.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;This is it below:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;proc genmod data=avia88 desc;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;class sex;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;model acet=sex csa sex*csa/link=logit dist=binomial type3;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;estimate "M:" csa csa*sex 1 -1 0 0/exp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;estimate "W:" csa csa*sex 0 0 -1 1/exp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;run&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 08 Dec 2019 19:51:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-do-i-run-a-univariate-analysis-for-this/m-p/610326#M18078</guid>
      <dc:creator>Mystik</dc:creator>
      <dc:date>2019-12-08T19:51:46Z</dc:date>
    </item>
    <item>
      <title>Re: How do i run a univariate analysis for this?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-do-i-run-a-univariate-analysis-for-this/m-p/610329#M18079</link>
      <description>Your model has more than one variable but you're saying you want univariate analysis which would imply that your model statement should have only a single variable in the MODEL statement. You have "sex cya sex*csa" which is your full model. &lt;BR /&gt;&lt;BR /&gt;And remember if you do put only a single variable in the model, the other steps, ESTIMATE statements, need to be adjusted accordingly. &lt;BR /&gt;&lt;BR /&gt;One trick that helps to make sure you're doing this correctly is to comment your code with what what you think each line is doing. Then you can easily modify it as you go.</description>
      <pubDate>Sun, 08 Dec 2019 20:00:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-do-i-run-a-univariate-analysis-for-this/m-p/610329#M18079</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-12-08T20:00:14Z</dc:date>
    </item>
    <item>
      <title>Re: How do i run a univariate analysis for this?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-do-i-run-a-univariate-analysis-for-this/m-p/610331#M18080</link>
      <description>&lt;P&gt;Thank you. here is it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;proc genmod data=avia88 desc;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;class sex;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;model acet=sex csa sex*csa/link=logit dist=binomial type3;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;estimate "M:" sex csa csa*sex 1 -1 0 0/exp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;estimate "W:"&amp;nbsp; sex csa csa*sex 0 0 -1 1/exp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;the independent variable is sex.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;adjusting for csa (1,0), age(18, 23, 89 etc) etc...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;but for now i want to do a univariable analyses with each variable one by one in the form of OR 95CI&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 08 Dec 2019 20:16:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-do-i-run-a-univariate-analysis-for-this/m-p/610331#M18080</guid>
      <dc:creator>Mystik</dc:creator>
      <dc:date>2019-12-08T20:16:00Z</dc:date>
    </item>
    <item>
      <title>Re: How do i run a univariate analysis for this?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-do-i-run-a-univariate-analysis-for-this/m-p/610356#M18083</link>
      <description>&lt;P&gt;Univariate means one variable in the model statement.&amp;nbsp;&lt;BR /&gt;You still have multiple variables.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/245559"&gt;@Mystik&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Thank you. here is it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;proc genmod data=avia88 desc;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;class sex;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;model acet=sex csa sex*csa/link=logit dist=binomial type3;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;estimate "M:" sex csa csa*sex 1 -1 0 0/exp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;estimate "W:"&amp;nbsp; sex csa csa*sex 0 0 -1 1/exp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;run;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;the independent variable is sex.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;adjusting for csa (1,0), age(18, 23, 89 etc) etc...&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;but for now i want to do a univariable analyses with each variable one by one in the form of OR 95CI&lt;/SPAN&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Dec 2019 00:16:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-do-i-run-a-univariate-analysis-for-this/m-p/610356#M18083</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-12-09T00:16:39Z</dc:date>
    </item>
    <item>
      <title>Re: How do i run a univariate analysis for this?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-do-i-run-a-univariate-analysis-for-this/m-p/610588#M18123</link>
      <description>&lt;P&gt;Yes i agreed univariate is one variable in the model but remember there is sex in there bcos i wanted to stratify by sex (male vs female) to create a table stratified by sex. As i said earlier, the dependent variable is sex and In this case you have to include sex.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Eventually, i got it all figured out as the problem was coming from the "estimate" side; e.g. -1 1 and -1 1 0 0 for males.&lt;/P&gt;&lt;P&gt;So the sas code below worked perfectly for me now.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;proc genmod data=avia88 desc;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;class sex csa;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;model acet=sex csa sex*csa/link=logit dist=binomial type3;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;estimate "M:" csa&amp;nbsp; -1 1 csa*sex -1 1 0 0/exp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;estimate "W:" csa -1 1 csa*sex 0 0 -1 1/exp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Dec 2019 23:24:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-do-i-run-a-univariate-analysis-for-this/m-p/610588#M18123</guid>
      <dc:creator>Mystik</dc:creator>
      <dc:date>2019-12-09T23:24:50Z</dc:date>
    </item>
    <item>
      <title>Re: How do i run a univariate analysis for this?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-do-i-run-a-univariate-analysis-for-this/m-p/610594#M18127</link>
      <description>This isn’t univariate analysis then.</description>
      <pubDate>Tue, 10 Dec 2019 00:57:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-do-i-run-a-univariate-analysis-for-this/m-p/610594#M18127</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-12-10T00:57:55Z</dc:date>
    </item>
  </channel>
</rss>

