<?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 proc glimmix &amp;quot;effect&amp;quot;  Odds Ratio Restricted Cubic Splines in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/proc-glimmix-quot-effect-quot-Odds-Ratio-Restricted-Cubic/m-p/785969#M38553</link>
    <description>&lt;P&gt;&lt;SPAN&gt;I want to generate a spline plot with "proc glimmix-effect", by using "estimate" to obtain odds ratio and the confiden&lt;/SPAN&gt;&lt;SPAN&gt;ce interval, as shown below.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="82aa9690b69cf68aa7be91bc67c5f54.png" style="width: 209px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/66746iF5388A34CF52693C/image-dimensions/209x165?v=v2" width="209" height="165" role="button" title="82aa9690b69cf68aa7be91bc67c5f54.png" alt="82aa9690b69cf68aa7be91bc67c5f54.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Can I use a loop macro and specify a reference (a reference point will set at 5th) in "estimate" statement to realize? Thank you very much!&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The macro is as follows&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;%macro est(ref=, start=, end=, by=);
%Do i = 1 %To %eval(%SysFunc( Ceil( %SysEvalF( ( &amp;amp;End - &amp;amp;Start ) / &amp;amp;By ) ) ) +1) ;
%Let value=%SysEvalF( ( &amp;amp;Start - &amp;amp;By ) + ( &amp;amp;By * &amp;amp;I ) ) ;
estimate "&amp;amp;value." spl [-1, &amp;amp;ref] [1, &amp;amp;value] / exp cl;
%end;
%mend est;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN&gt;The idea comes from&lt;A title="Restricted Cubic Splines question" href="https://communities.sas.com/t5/Statistical-Procedures/Restricted-Cubic-Splines-question/td-p/774103/highlight/false" target="_self"&gt; this post.&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Any help is appreciated!!&lt;span class="lia-unicode-emoji" title=":weary_face:"&gt;😩&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 14 Dec 2021 11:32:20 GMT</pubDate>
    <dc:creator>April2211</dc:creator>
    <dc:date>2021-12-14T11:32:20Z</dc:date>
    <item>
      <title>proc glimmix "effect"  Odds Ratio Restricted Cubic Splines</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/proc-glimmix-quot-effect-quot-Odds-Ratio-Restricted-Cubic/m-p/785969#M38553</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I want to generate a spline plot with "proc glimmix-effect", by using "estimate" to obtain odds ratio and the confiden&lt;/SPAN&gt;&lt;SPAN&gt;ce interval, as shown below.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="82aa9690b69cf68aa7be91bc67c5f54.png" style="width: 209px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/66746iF5388A34CF52693C/image-dimensions/209x165?v=v2" width="209" height="165" role="button" title="82aa9690b69cf68aa7be91bc67c5f54.png" alt="82aa9690b69cf68aa7be91bc67c5f54.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Can I use a loop macro and specify a reference (a reference point will set at 5th) in "estimate" statement to realize? Thank you very much!&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The macro is as follows&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;%macro est(ref=, start=, end=, by=);
%Do i = 1 %To %eval(%SysFunc( Ceil( %SysEvalF( ( &amp;amp;End - &amp;amp;Start ) / &amp;amp;By ) ) ) +1) ;
%Let value=%SysEvalF( ( &amp;amp;Start - &amp;amp;By ) + ( &amp;amp;By * &amp;amp;I ) ) ;
estimate "&amp;amp;value." spl [-1, &amp;amp;ref] [1, &amp;amp;value] / exp cl;
%end;
%mend est;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN&gt;The idea comes from&lt;A title="Restricted Cubic Splines question" href="https://communities.sas.com/t5/Statistical-Procedures/Restricted-Cubic-Splines-question/td-p/774103/highlight/false" target="_self"&gt; this post.&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Any help is appreciated!!&lt;span class="lia-unicode-emoji" title=":weary_face:"&gt;😩&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Dec 2021 11:32:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/proc-glimmix-quot-effect-quot-Odds-Ratio-Restricted-Cubic/m-p/785969#M38553</guid>
      <dc:creator>April2211</dc:creator>
      <dc:date>2021-12-14T11:32:20Z</dc:date>
    </item>
  </channel>
</rss>

