<?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: Slice by statement for a continuous variable in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Slice-by-statement-for-a-continuous-variable/m-p/894697#M44331</link>
    <description>Thanks again Koen!</description>
    <pubDate>Sun, 17 Sep 2023 19:51:12 GMT</pubDate>
    <dc:creator>KKIND</dc:creator>
    <dc:date>2023-09-17T19:51:12Z</dc:date>
    <item>
      <title>Slice by statement for a continuous variable</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Slice-by-statement-for-a-continuous-variable/m-p/894639#M44326</link>
      <description>&lt;P&gt;Here is the code I have for categorical independent variables, comparing across all levels of each variable.&lt;/P&gt;
&lt;P&gt;proc logistic data = NEDS.neds_2016_pneumonia_recat;&lt;BR /&gt;class died_visit (ref = "0") pay1recat (ref = "3") hosp_traumarecat (ref = "0") / param = glm;&lt;BR /&gt;model died_visit = pay1recat hosp_traumarecat pay1recat*hosp_traumarecat / link = glogit;&lt;BR /&gt;slice pay1recat*hosp_traumarecat/sliceby(pay1recat='3') diff oddsratio cl;&lt;BR /&gt;slice pay1recat*hosp_traumarecat/sliceby(pay1recat='2') diff oddsratio cl;&lt;BR /&gt;slice pay1recat*hosp_traumarecat/sliceby(pay1recat='1') diff oddsratio cl;&lt;BR /&gt;slice pay1recat*hosp_traumarecat/sliceby(hosp_traumarecat='0') diff oddsratio cl;&lt;BR /&gt;slice pay1recat*hosp_traumarecat/sliceby(hosp_traumarecat='1') diff oddsratio cl;&lt;BR /&gt;slice pay1recat*hosp_traumarecat/sliceby(hosp_traumarecat='2') diff oddsratio cl;&lt;BR /&gt;slice pay1recat*hosp_traumarecat/sliceby(hosp_traumarecat='3') diff oddsratio cl;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;Is the following code okay for a continuous variable such as age?&lt;/P&gt;
&lt;P&gt;slice pay1recat*age/sliceby(pay1recat='3') diff oddsratio cl;&lt;BR /&gt;slice pay1recat*age/sliceby(pay1recat='2') diff oddsratio cl;&lt;BR /&gt;slice pay1recat*age/sliceby(pay1recat='1') diff oddsratio cl;&lt;/P&gt;
&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Sat, 16 Sep 2023 21:09:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Slice-by-statement-for-a-continuous-variable/m-p/894639#M44326</guid>
      <dc:creator>KKIND</dc:creator>
      <dc:date>2023-09-16T21:09:12Z</dc:date>
    </item>
    <item>
      <title>Re: Slice by statement for a continuous variable</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Slice-by-statement-for-a-continuous-variable/m-p/894658#M44327</link>
      <description>&lt;P&gt;Have just moved this to "Statistical Procedures" - board.&lt;/P&gt;</description>
      <pubDate>Sun, 17 Sep 2023 07:18:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Slice-by-statement-for-a-continuous-variable/m-p/894658#M44327</guid>
      <dc:creator>sbxkoenk</dc:creator>
      <dc:date>2023-09-17T07:18:05Z</dc:date>
    </item>
    <item>
      <title>Re: Slice by statement for a continuous variable</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Slice-by-statement-for-a-continuous-variable/m-p/894661#M44328</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/350945"&gt;@KKIND&lt;/a&gt;&amp;nbsp;wrote:
&lt;P&gt;Is the following code okay for a continuous variable such as age?&lt;/P&gt;
&lt;P&gt;slice pay1recat*age/sliceby(pay1recat='3') diff oddsratio cl;&lt;BR /&gt;slice pay1recat*age/sliceby(pay1recat='2') diff oddsratio cl;&lt;BR /&gt;slice pay1recat*age/sliceby(pay1recat='1') diff oddsratio cl;&lt;/P&gt;
&lt;P&gt;Thank you!&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;No.&lt;BR /&gt;You will get an ERROR.&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;ERROR: Only CLASS variables allowed in this effect.&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;See&lt;BR /&gt;&lt;SPAN&gt;SAS/STAT® 15.2 User's Guide&lt;BR /&gt;Shared Concepts and Topics&lt;BR /&gt;SLICE Statement&lt;BR /&gt;&lt;A href="https://go.documentation.sas.com/doc/en/statug/15.2/statug_introcom_sect064.htm" target="_blank"&gt;https://go.documentation.sas.com/doc/en/statug/15.2/statug_introcom_sect064.htm&lt;/A&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;It says :&lt;BR /&gt;&lt;SPAN&gt;"The SLICE statement is similar to the&amp;nbsp;&lt;/SPAN&gt;&lt;A tabindex="0" href="https://go.documentation.sas.com/doc/en/statug/15.2/statug_introcom_sect040.htm" target="_blank"&gt;LSMEANS&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;statement. You use it to perform inferences on model effects that consist entirely of classification variables. With the SLICE statement, these effects must be higher-order effects of at least two classification variables."&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Koen&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 17 Sep 2023 07:24:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Slice-by-statement-for-a-continuous-variable/m-p/894661#M44328</guid>
      <dc:creator>sbxkoenk</dc:creator>
      <dc:date>2023-09-17T07:24:54Z</dc:date>
    </item>
    <item>
      <title>Re: Slice by statement for a continuous variable</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Slice-by-statement-for-a-continuous-variable/m-p/894687#M44329</link>
      <description>&lt;P&gt;You don't need the SLICE statement to assess the effect of AGE at each level of the interacting categorical predictor. You can do that using the ODDSRATIO statement. For example:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;oddsratio age;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;BTW,&amp;nbsp;&lt;A href="http://support.sas.com/kb/67024" target="_self"&gt;this note&lt;/A&gt; discusses assessing the effect of a continuous variable in any generalized linear model. As noted there, particularly in the example of a continuous-categorical interaction in a log-linked model, you can also use the Margins macro. That macro is used to both fit the model and provided the assessment.&lt;/P&gt;</description>
      <pubDate>Sun, 17 Sep 2023 15:15:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Slice-by-statement-for-a-continuous-variable/m-p/894687#M44329</guid>
      <dc:creator>StatDave</dc:creator>
      <dc:date>2023-09-17T15:15:11Z</dc:date>
    </item>
    <item>
      <title>Re: Slice by statement for a continuous variable</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Slice-by-statement-for-a-continuous-variable/m-p/894696#M44330</link>
      <description>Thank you sbxkoenk!</description>
      <pubDate>Sun, 17 Sep 2023 19:49:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Slice-by-statement-for-a-continuous-variable/m-p/894696#M44330</guid>
      <dc:creator>KKIND</dc:creator>
      <dc:date>2023-09-17T19:49:51Z</dc:date>
    </item>
    <item>
      <title>Re: Slice by statement for a continuous variable</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Slice-by-statement-for-a-continuous-variable/m-p/894697#M44331</link>
      <description>Thanks again Koen!</description>
      <pubDate>Sun, 17 Sep 2023 19:51:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Slice-by-statement-for-a-continuous-variable/m-p/894697#M44331</guid>
      <dc:creator>KKIND</dc:creator>
      <dc:date>2023-09-17T19:51:12Z</dc:date>
    </item>
    <item>
      <title>Re: Slice by statement for a continuous variable</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Slice-by-statement-for-a-continuous-variable/m-p/894699#M44332</link>
      <description>Thanks much StatDave!</description>
      <pubDate>Sun, 17 Sep 2023 19:56:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Slice-by-statement-for-a-continuous-variable/m-p/894699#M44332</guid>
      <dc:creator>KKIND</dc:creator>
      <dc:date>2023-09-17T19:56:34Z</dc:date>
    </item>
  </channel>
</rss>

