<?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: Different results from PROC MEANS and PROC LOGISITIC for matched data for spline variable in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Different-results-from-PROC-MEANS-and-PROC-LOGISITIC-for-matched/m-p/873486#M345127</link>
    <description>&lt;P&gt;Are you aware that Proc MEANS has &lt;STRONG&gt;5&lt;/STRONG&gt; different definitions of computing quantiles such as P25? And 2 methods? The options QNTLDEF QMETHOD set these. Something to ponder on occasion.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You may want to try running this code:&lt;/P&gt;
&lt;PRE&gt;proc logistic data = Data1;
title "Knotmethod Percentiles";
strata ID;
effect myspline=spline(age/ basis=tpf(noint) NATURALCUBIC details knotmethod=&lt;FONT size="5"&gt;&lt;STRONG&gt;percentiles(3)&lt;/STRONG&gt;&lt;/FONT&gt;);
model cancer(event = '1') = myspline;
run;title;&lt;/PRE&gt;
&lt;P&gt;And then carefully re-read the documentation on Rangefractions and Percentiles for knotmethod.&lt;/P&gt;</description>
    <pubDate>Tue, 02 May 2023 21:21:06 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2023-05-02T21:21:06Z</dc:date>
    <item>
      <title>Different results from PROC MEANS and PROC LOGISITIC for matched data for spline variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Different-results-from-PROC-MEANS-and-PROC-LOGISITIC-for-matched/m-p/873480#M345123</link>
      <description>&lt;P&gt;I am running&amp;nbsp; conditional logit on matched data using spline variable.&amp;nbsp; The percentiles using PROC MEANS do not match the percentiles from the PROC LOGISTIC output for the spline variable.&amp;nbsp; PROC MEANS gives p25, p50 and p75 as 29, 56 and 84.&amp;nbsp; PROC LOGISTIC gives the corrsponding numbers as 26.5,51,75.5.&amp;nbsp; Shouldn't both the numbers match?&amp;nbsp; Given below is code for sample data.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data Data1; input ID cancer gall hyper @@;&lt;BR /&gt;cards;&lt;BR /&gt;1 1 0 0 1 0 0 0 2 1 0 0 2 0 0 0&lt;BR /&gt;3 1 0 1 3 0 0 1 4 1 0 0 4 0 1 0&lt;BR /&gt;5 1 1 0 5 0 0 1 6 1 0 1 6 0 0 0&lt;BR /&gt;7 1 1 0 7 0 0 0 8 1 1 1 8 0 0 1&lt;BR /&gt;9 1 0 0 9 0 0 0 10 1 0 0 10 0 0 0&lt;BR /&gt;11 1 1 0 11 0 0 0 12 1 0 0 12 0 0 1&lt;BR /&gt;13 1 1 0 13 0 0 1 14 1 1 0 14 0 1 0&lt;BR /&gt;15 1 1 0 15 0 0 1 16 1 0 1 16 0 0 0&lt;BR /&gt;17 1 0 0 17 0 1 1 18 1 0 0 18 0 1 1&lt;BR /&gt;19 1 0 0 19 0 0 1 20 1 0 1 20 0 0 0&lt;BR /&gt;21 1 0 0 21 0 1 1 22 1 0 1 22 0 0 1&lt;BR /&gt;23 1 0 1 23 0 0 0 24 1 0 0 24 0 0 0&lt;BR /&gt;25 1 0 0 25 0 0 0 26 1 0 0 26 0 0 1&lt;BR /&gt;27 1 1 0 27 0 0 1 28 1 0 0 28 0 0 1&lt;BR /&gt;29 1 1 0 29 0 0 0 30 1 0 1 30 0 0 0&lt;BR /&gt;31 1 0 1 31 0 0 0 32 1 0 1 32 0 0 0&lt;BR /&gt;33 1 0 1 33 0 0 0 34 1 0 0 34 0 0 0&lt;BR /&gt;35 1 1 1 35 0 1 1 36 1 0 0 36 0 0 1&lt;BR /&gt;37 1 0 1 37 0 0 0 38 1 0 1 38 0 0 1&lt;BR /&gt;39 1 0 1 39 0 0 1 40 1 0 1 40 0 0 0&lt;BR /&gt;41 1 0 0 41 0 0 0 42 1 0 1 42 0 1 0&lt;BR /&gt;43 1 0 0 43 0 0 1 44 1 0 0 44 0 0 0&lt;BR /&gt;45 1 1 0 45 0 0 0 46 1 0 0 46 0 0 0&lt;BR /&gt;47 1 1 1 47 0 0 0 48 1 0 1 48 0 0 0&lt;BR /&gt;49 1 0 0 49 0 0 0 50 1 0 1 50 0 0 1&lt;BR /&gt;51 1 0 0 51 0 0 0 52 1 0 1 52 0 0 1&lt;BR /&gt;53 1 0 1 53 0 0 0 54 1 0 1 54 0 0 0&lt;BR /&gt;55 1 1 0 55 0 0 0 56 1 0 0 56 0 0 0&lt;BR /&gt;57 1 1 1 57 0 1 0 58 1 0 0 58 0 0 0&lt;BR /&gt;59 1 0 0 59 0 0 0 60 1 1 1 60 0 0 0&lt;BR /&gt;61 1 1 0 61 0 1 0 62 1 0 1 62 0 0 0&lt;BR /&gt;63 1 1 0 63 0 0 0&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;DATA data1; SET data1; call streaminit(123); age= ceil( 100*rand("Uniform") ); run;&lt;BR /&gt;proc means n p25 p50 p75 min max;var age;run;&lt;/P&gt;&lt;P&gt;/*conditional logistic regression code defining event of interest*/&lt;BR /&gt;proc logistic data = Data1;&lt;BR /&gt;strata ID;&lt;BR /&gt;effect myspline=spline(age/ basis=tpf(noint) NATURALCUBIC details knotmethod=rangefractions(0.25,0.50,0.75));&lt;BR /&gt;model cancer(event = '1') = myspline;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Tue, 02 May 2023 20:22:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Different-results-from-PROC-MEANS-and-PROC-LOGISITIC-for-matched/m-p/873480#M345123</guid>
      <dc:creator>PamG</dc:creator>
      <dc:date>2023-05-02T20:22:46Z</dc:date>
    </item>
    <item>
      <title>Re: Different results from PROC MEANS and PROC LOGISITIC for matched data for spline variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Different-results-from-PROC-MEANS-and-PROC-LOGISITIC-for-matched/m-p/873486#M345127</link>
      <description>&lt;P&gt;Are you aware that Proc MEANS has &lt;STRONG&gt;5&lt;/STRONG&gt; different definitions of computing quantiles such as P25? And 2 methods? The options QNTLDEF QMETHOD set these. Something to ponder on occasion.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You may want to try running this code:&lt;/P&gt;
&lt;PRE&gt;proc logistic data = Data1;
title "Knotmethod Percentiles";
strata ID;
effect myspline=spline(age/ basis=tpf(noint) NATURALCUBIC details knotmethod=&lt;FONT size="5"&gt;&lt;STRONG&gt;percentiles(3)&lt;/STRONG&gt;&lt;/FONT&gt;);
model cancer(event = '1') = myspline;
run;title;&lt;/PRE&gt;
&lt;P&gt;And then carefully re-read the documentation on Rangefractions and Percentiles for knotmethod.&lt;/P&gt;</description>
      <pubDate>Tue, 02 May 2023 21:21:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Different-results-from-PROC-MEANS-and-PROC-LOGISITIC-for-matched/m-p/873486#M345127</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2023-05-02T21:21:06Z</dc:date>
    </item>
  </channel>
</rss>

