<?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: proc logistic in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/proc-logistic/m-p/671492#M32100</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/3676"&gt;@unnati&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Question:&lt;/P&gt;
&lt;P&gt;I am interested in studying the association between HDL_HI (Y-variable) and AGE_HI (X-variable).&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I think you have x and y reversed (at least according to your description) and age_hi and gender should both be class.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;class gender (param=ref ref='male') age_hi;
model hdl_hi(event='1')= age_hi gender age_hi*gender;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 22 Jul 2020 17:45:50 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2020-07-22T17:45:50Z</dc:date>
    <item>
      <title>proc logistic</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/proc-logistic/m-p/671482#M32098</link>
      <description>&lt;P&gt;Base on following question i would like to know the&amp;nbsp; PROC Logistic code i wrote is correct or not. I am confuse in what variable should be in model statement. is should be age_hi or hgl_hi? and unit statement required or not.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Question:&lt;/P&gt;&lt;P&gt;I am interested in studying the association between HDL_HI (Y-variable) and AGE_HI (X-variable).&lt;/P&gt;&lt;P&gt;For this problem, examine whether GENDER modifies the association between HDL_HI and AGE_HI. In&lt;/P&gt;&lt;P&gt;other words, you need to test the interaction between AGE HI and GENDER. If there is an interaction&lt;/P&gt;&lt;P&gt;between AGE HI and GENDER.&lt;/P&gt;&lt;P&gt;age_hi --&amp;gt; values are 1 or 0&lt;/P&gt;&lt;P&gt;hgl_hi --&amp;gt; values are 1 or 0&lt;/P&gt;&lt;P&gt;As per my understanding i have write following code is it right or not:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ODS graphics on;

PROC LOGISTIC data=chol plots(only)=effect(x=hdl_hi) sliceby=gender)

oddsratio (type=horizontalstat));

class gender (param=ref ref='male');

model age_hi(event='1')= hdl_hi gender hdl_hi*gender;
/*unit - what should unit will be */
oddsratio 'hdl_hi 1 vs 0 for male' hdl_hi/at(gender='male' hdl_hi=1) cl=pl;

oddsratio 'hdl_hi 1 vs 0 for female' hdl_hi/at(gender='female' hdl_hi=1) cl=pl;

run;

ODS graphics off;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jul 2020 17:29:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/proc-logistic/m-p/671482#M32098</guid>
      <dc:creator>unnati</dc:creator>
      <dc:date>2020-07-22T17:29:34Z</dc:date>
    </item>
    <item>
      <title>Re: proc logistic</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/proc-logistic/m-p/671492#M32100</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/3676"&gt;@unnati&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Question:&lt;/P&gt;
&lt;P&gt;I am interested in studying the association between HDL_HI (Y-variable) and AGE_HI (X-variable).&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I think you have x and y reversed (at least according to your description) and age_hi and gender should both be class.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;class gender (param=ref ref='male') age_hi;
model hdl_hi(event='1')= age_hi gender age_hi*gender;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jul 2020 17:45:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/proc-logistic/m-p/671492#M32100</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-07-22T17:45:50Z</dc:date>
    </item>
    <item>
      <title>Re: proc logistic</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/proc-logistic/m-p/671532#M32104</link>
      <description>&lt;P&gt;Regarding the 'unit' question--it enables you to calculate the odds ratio for a change of k units in the continuous variable.&amp;nbsp; Suppose k were 10 (rather than 1) for this example.&amp;nbsp; The first odds ratio statement would give you the odds ratio in males for age, if you increased hdl by 10 units.&amp;nbsp; Since&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/10892"&gt;@PaigeMiller&lt;/a&gt;&amp;nbsp; has pointed out that you likely have your X and Y variables switched, you might want to consider this:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;DS graphics on;

PROC LOGISTIC data=chol plots(only)=effect(x=hdl_hi) sliceby=gender)

oddsratio (type=horizontalstat));

class gender (param=ref ref='male') age_hi(ref='1');

model hdl_hi(event='1')= age_hi gender age_hi*gender;
/*unit - what should unit will be, now since age_hi is categorical you don't need unit or the at= option */
/* I suggest going around oddsratio to SLICE with an oddsratio option 
oddsratio 'hdl_hi 1 vs 0 for male' hdl_hi/at(gender='male' hdl_hi=1) cl=pl;

oddsratio 'hdl_hi 1 vs 0 for female' hdl_hi/at(gender='female' hdl_hi=1) cl=pl;
*/
slice age_hi*gender/sliceby= genderdiff oddsratio cl;
run;

ODS graphics off;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;I hope this helps.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SteveDenham&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jul 2020 18:45:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/proc-logistic/m-p/671532#M32104</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2020-07-22T18:45:53Z</dc:date>
    </item>
    <item>
      <title>Re: proc logistic</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/proc-logistic/m-p/671794#M32115</link>
      <description>Quick question. How did you find out from the question that age_hi is categorical variable. i thought that age_hi will be numeric.</description>
      <pubDate>Thu, 23 Jul 2020 12:34:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/proc-logistic/m-p/671794#M32115</guid>
      <dc:creator>unnati</dc:creator>
      <dc:date>2020-07-23T12:34:19Z</dc:date>
    </item>
    <item>
      <title>Re: proc logistic</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/proc-logistic/m-p/671801#M32116</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/3676"&gt;@unnati&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;Quick question. How did you find out from the question that age_hi is categorical variable. i thought that age_hi will be numeric.&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;This is what you stated in your original message. Yes, I agree that age should be numeric, but that's not what you said.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jul 2020 12:47:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/proc-logistic/m-p/671801#M32116</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-07-23T12:47:28Z</dc:date>
    </item>
    <item>
      <title>Re: proc logistic</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/proc-logistic/m-p/671824#M32118</link>
      <description>&lt;P&gt;Bravo,&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/10892"&gt;@PaigeMiller&lt;/a&gt;&amp;nbsp;.&amp;nbsp; I was going to paste this:&amp;nbsp;&lt;SPAN&gt;&lt;STRONG&gt;age_hi --&amp;gt; values are 1 or 0&lt;/STRONG&gt; from the OP.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;SteveDenham&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jul 2020 14:04:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/proc-logistic/m-p/671824#M32118</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2020-07-23T14:04:38Z</dc:date>
    </item>
    <item>
      <title>Re: proc logistic</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/proc-logistic/m-p/671857#M32121</link>
      <description>&lt;P&gt;As per your suggestion i update proc logistic code as below. I have added oddsratio statement because as per slice statement i wasn't getting oddsratio. By running this i getting attached output. Can you please help to interpret this output. I want to know if there is interaction between age_hi and gender from the output with explanation. how you did you interpret it.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods graphics on;

proc logistic data=chol_new plots(only)=(effect (x=(age_hi) sliceby=gender) 
		oddsratio (type=horizontalstat));
	class gender (param=ref ref="female") age_hi(ref='1');
	model hdl_hi(event='1')= age_hi gender age_hi*gender;
/*     unit age_hi=10;  */
/* 	oddsratio 'age_hi 10 vs 20 for male' age_hi/ cl=pl; */
/* 	oddsratio 'age_hi 10 vs 20 for female' age_hi/ cl=pl; */
	oddsratio 'age_hi for male' age_hi/at(gender='male' ) cl=pl;
	oddsratio 'age_hi for female' age_hi/at(gender='female' ) cl=pl;

slice age_hi*gender/sliceby(gender='female') diff oddsratio cl;
run;

ods graphics off;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 23 Jul 2020 15:19:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/proc-logistic/m-p/671857#M32121</guid>
      <dc:creator>unnati</dc:creator>
      <dc:date>2020-07-23T15:19:42Z</dc:date>
    </item>
    <item>
      <title>Re: proc logistic</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/proc-logistic/m-p/672071#M32131</link>
      <description>&lt;P&gt;First, to make the slice statement work, try:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;slice age_hi*gender/sliceby=gender diff oddsratio cl;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I believe you cannot specify a reference level in the sliceby option.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But you have an interaction - the OR for males is significantly different from that for females.&amp;nbsp; The interpretation is pretty straightforward, the older group of males had a greater incidence of high LDL than the younger group, and exactly the opposite for the females.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SteveDenham&lt;/P&gt;</description>
      <pubDate>Fri, 24 Jul 2020 12:14:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/proc-logistic/m-p/672071#M32131</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2020-07-24T12:14:15Z</dc:date>
    </item>
  </channel>
</rss>

