<?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: Model to determine plateau point -- surgery length again, but ignore date in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Model-to-determine-plateau-point-surgery-length-again-but-ignore/m-p/702896#M33972</link>
    <description>&lt;P&gt;Here are the data -- apologize for the simple posting style.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data surgery;&lt;BR /&gt;input surgeryno duration;&lt;BR /&gt;cards;&lt;BR /&gt;1 182&lt;BR /&gt;2 150&lt;BR /&gt;3 223&lt;BR /&gt;4 142&lt;BR /&gt;5 111&lt;BR /&gt;6 164&lt;BR /&gt;7 83&lt;BR /&gt;8 144&lt;BR /&gt;9 162&lt;BR /&gt;10 83&lt;BR /&gt;11 70&lt;BR /&gt;12 114&lt;BR /&gt;13 113&lt;BR /&gt;14 97&lt;BR /&gt;15 83&lt;BR /&gt;16 111&lt;BR /&gt;17 73&lt;BR /&gt;18 87&lt;BR /&gt;19 86&lt;BR /&gt;20 102&lt;BR /&gt;21 124&lt;BR /&gt;22 95&lt;BR /&gt;23 134&lt;BR /&gt;24 121&lt;BR /&gt;25 60&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;proc sgplot data=surgery;&lt;BR /&gt;scatter x=surgeryno y=duration;&lt;BR /&gt;run;&lt;/P&gt;</description>
    <pubDate>Tue, 01 Dec 2020 21:24:34 GMT</pubDate>
    <dc:creator>gbrussell</dc:creator>
    <dc:date>2020-12-01T21:24:34Z</dc:date>
    <item>
      <title>Model to determine plateau point -- surgery length again, but ignore date</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Model-to-determine-plateau-point-surgery-length-again-but-ignore/m-p/702894#M33971</link>
      <description>&lt;P&gt;Hi -- I asked this yesterday, but I want to frame it differently today.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'd like to find the plateau point without date -- just surgery number.&amp;nbsp; The sas file is attached, and the data are simple.&amp;nbsp; 25 surgeries, numbered 1 to 25.&amp;nbsp; I used a pbspline, but it certainly looks like no plateau.&amp;nbsp; If so, that's fine, but I need someone who knows this better than me to say so.&amp;nbsp; I appreciate any help you can lend.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Dec 2020 21:18:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Model-to-determine-plateau-point-surgery-length-again-but-ignore/m-p/702894#M33971</guid>
      <dc:creator>gbrussell</dc:creator>
      <dc:date>2020-12-01T21:18:16Z</dc:date>
    </item>
    <item>
      <title>Re: Model to determine plateau point -- surgery length again, but ignore date</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Model-to-determine-plateau-point-surgery-length-again-but-ignore/m-p/702896#M33972</link>
      <description>&lt;P&gt;Here are the data -- apologize for the simple posting style.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data surgery;&lt;BR /&gt;input surgeryno duration;&lt;BR /&gt;cards;&lt;BR /&gt;1 182&lt;BR /&gt;2 150&lt;BR /&gt;3 223&lt;BR /&gt;4 142&lt;BR /&gt;5 111&lt;BR /&gt;6 164&lt;BR /&gt;7 83&lt;BR /&gt;8 144&lt;BR /&gt;9 162&lt;BR /&gt;10 83&lt;BR /&gt;11 70&lt;BR /&gt;12 114&lt;BR /&gt;13 113&lt;BR /&gt;14 97&lt;BR /&gt;15 83&lt;BR /&gt;16 111&lt;BR /&gt;17 73&lt;BR /&gt;18 87&lt;BR /&gt;19 86&lt;BR /&gt;20 102&lt;BR /&gt;21 124&lt;BR /&gt;22 95&lt;BR /&gt;23 134&lt;BR /&gt;24 121&lt;BR /&gt;25 60&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;proc sgplot data=surgery;&lt;BR /&gt;scatter x=surgeryno y=duration;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Dec 2020 21:24:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Model-to-determine-plateau-point-surgery-length-again-but-ignore/m-p/702896#M33972</guid>
      <dc:creator>gbrussell</dc:creator>
      <dc:date>2020-12-01T21:24:34Z</dc:date>
    </item>
    <item>
      <title>Re: Model to determine plateau point -- surgery length again, but ignore date</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Model-to-determine-plateau-point-surgery-length-again-but-ignore/m-p/702900#M33973</link>
      <description>&lt;P&gt;You're looking for the CDF - the cumulative distribution function to see if there's a plateau. I don't think you have enough data at this point to see it. Usually according to a central limit theorem you'd need about 25 data points but in your case the distribution of the data hasn't stabilized. You'll need more observations to get an answer. You're looking for where the curve plateaus on the CDF graph.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
infile cards dlm='09'x;
  input SurgeryNo date :mmddyy10. duration;
  format date mmddyy10.;
datalines;
1	3/20/2019	182
2	5/16/2019	150
3	5/30/2019	223
4	6/6/2019	142
5	6/11/2019	111
6	7/11/2019	164
7	7/26/2019	83
8	8/22/2019	144
9	8/29/2019	162
10	9/19/2019	83
11	10/10/2019	70
12	10/17/2019	114
13	10/31/2019	113
14	11/7/2019	97
15	11/21/2019	83
16	12/5/2019	111
17	12/5/2019	73
18	12/12/2019	87
19	12/19/2019	86
20	1/9/2020	102
21	1/16/2020	124
22	1/23/2020	95
23	1/30/2020	134
24	3/5/2020	121
25	6/4/2020	60
;

proc univariate data=have;
cdf duration;
histogram duration;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/359085"&gt;@gbrussell&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi -- I asked this yesterday, but I want to frame it differently today.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'd like to find the plateau point without date -- just surgery number.&amp;nbsp; The sas file is attached, and the data are simple.&amp;nbsp; 25 surgeries, numbered 1 to 25.&amp;nbsp; I used a pbspline, but it certainly looks like no plateau.&amp;nbsp; If so, that's fine, but I need someone who knows this better than me to say so.&amp;nbsp; I appreciate any help you can lend.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Dec 2020 21:32:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Model-to-determine-plateau-point-surgery-length-again-but-ignore/m-p/702900#M33973</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2020-12-01T21:32:18Z</dc:date>
    </item>
    <item>
      <title>Re: Model to determine plateau point -- surgery length again, but ignore date</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Model-to-determine-plateau-point-surgery-length-again-but-ignore/m-p/702966#M33974</link>
      <description>&lt;P&gt;Same robust approach as before yields a minimum this time:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc quantreg data=have ci=resampling outest=est;
effect sPoly=poly(surgeryNo/degree=2 standardize=none details);
model duration = sPoly;
output out=preds p=sDuration;
run;

proc sql;
select 
    -surgeryNo / (2*'surgeryNo^2'n) as minDurSurgery "Surgery of minimum duration",
    Intercept + SurgeryNo*calculated minDurSurgery + 
        'surgeryNo^2'n * (calculated minDurSurgery)**2 "Minimum predicted duration"
from est;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="PGStats_0-1606884030645.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/52235i6C3A700FBC59C10A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="PGStats_0-1606884030645.png" alt="PGStats_0-1606884030645.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Dec 2020 04:41:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Model-to-determine-plateau-point-surgery-length-again-but-ignore/m-p/702966#M33974</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2020-12-02T04:41:41Z</dc:date>
    </item>
    <item>
      <title>Re: Model to determine plateau point -- surgery length again, but ignore date</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Model-to-determine-plateau-point-surgery-length-again-but-ignore/m-p/703100#M33980</link>
      <description>&lt;P&gt;Thin plate spline and loess both show a breakpoint at about surgeryNo = 15.&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/462"&gt;@PGStats&lt;/a&gt;&amp;nbsp;method showed a minimum to the quadratic at the same point.&amp;nbsp; To get what I did, simply replace date with SurgeryNo in the code I shared yesterday.&amp;nbsp; Note that the penalized B spline now tries to fit every point and results in a plot that looks like you threw a strand of spaghetti on the table.&amp;nbsp; Also, removing the last surgery has little effect. I have yet to try&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt;&amp;nbsp;'s approach, but will check back in after I give it a whirl.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SteveDenham&lt;/P&gt;</description>
      <pubDate>Wed, 02 Dec 2020 13:31:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Model-to-determine-plateau-point-surgery-length-again-but-ignore/m-p/703100#M33980</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2020-12-02T13:31:59Z</dc:date>
    </item>
    <item>
      <title>Re: Model to determine plateau point -- surgery length again, but ignore date</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Model-to-determine-plateau-point-surgery-length-again-but-ignore/m-p/703126#M33986</link>
      <description>To me, this question is still ambiguous. I don't know whether the physician is interested in what the expected duration of the procedure will be (plateau of time) or how many procedures it takes to become proficient at a task (# of procedures).&lt;BR /&gt;&lt;BR /&gt;My answer is for the first question - what is the expected time most likely. &lt;BR /&gt;Steve's answer is for the second question  - how long does it take to become proficient at a task. &lt;BR /&gt;&lt;BR /&gt;OP, can you clarify which business question the physician is trying to answer? Or are both of these off the mark?&lt;BR /&gt;PS. This is why it's better to explain the logic of your question. Right now we're very much dealing with an XY problem. &lt;BR /&gt;&lt;A href="https://xyproblem.info/" target="_blank"&gt;https://xyproblem.info/&lt;/A&gt;</description>
      <pubDate>Wed, 02 Dec 2020 15:47:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Model-to-determine-plateau-point-surgery-length-again-but-ignore/m-p/703126#M33986</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2020-12-02T15:47:45Z</dc:date>
    </item>
    <item>
      <title>Re: Model to determine plateau point -- surgery length again, but ignore date</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Model-to-determine-plateau-point-surgery-length-again-but-ignore/m-p/703129#M33987</link>
      <description>That's a great question and I apologize for lack of clarity / thoroughness. The question is how many procedures are needed to become proficient. The surgeon was trying to assess how many he needed to do before his times hit a plateau.</description>
      <pubDate>Wed, 02 Dec 2020 15:53:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Model-to-determine-plateau-point-surgery-length-again-but-ignore/m-p/703129#M33987</guid>
      <dc:creator>gbrussell</dc:creator>
      <dc:date>2020-12-02T15:53:11Z</dc:date>
    </item>
    <item>
      <title>Re: Model to determine plateau point -- surgery length again, but ignore date</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Model-to-determine-plateau-point-surgery-length-again-but-ignore/m-p/703137#M33989</link>
      <description>Thank you -- your and Steve's help have been very much appreciated.</description>
      <pubDate>Wed, 02 Dec 2020 16:05:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Model-to-determine-plateau-point-surgery-length-again-but-ignore/m-p/703137#M33989</guid>
      <dc:creator>gbrussell</dc:creator>
      <dc:date>2020-12-02T16:05:29Z</dc:date>
    </item>
    <item>
      <title>Re: Model to determine plateau point -- surgery length again, but ignore date</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Model-to-determine-plateau-point-surgery-length-again-but-ignore/m-p/703139#M33990</link>
      <description>&lt;P&gt;So here is another way, that uses a segmented quadratic model.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Code:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;title 'Quadratic Model with Plateau';
proc nlin data=have;
   parms alpha=100 beta=-1 gamma=0.0033333;

   x0 = -.5*beta / gamma;

   if (surgeryno &amp;lt; x0) then
        mean = alpha + beta*surgeryno  + gamma*surgeryno*surgeryno;
   else mean = alpha + beta*x0 + gamma*x0*x0;
   model duration = mean;

   if _obs_=1 and _iter_ =.  then do;
      plateau =alpha + beta*x0 + gamma*x0*x0;
      put /  x0= plateau=  ;
   end;
   output out=b predicted=yp;
run;

proc sgplot data=b;
scatter x=surgeryno y=duration;
pbspline x=surgeryno y=yp;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Graphic output:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SteveDenham_0-1606924932731.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/52256i085EF6046EDABFB5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SteveDenham_0-1606924932731.png" alt="SteveDenham_0-1606924932731.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;NLIN output:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SteveDenham_1-1606925005450.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/52257i6CBA6712EAAECAC9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SteveDenham_1-1606925005450.png" alt="SteveDenham_1-1606925005450.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SteveDenham_2-1606925045579.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/52258iF8432BBC76F182E1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SteveDenham_2-1606925045579.png" alt="SteveDenham_2-1606925045579.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PUT statement output:&lt;/P&gt;
&lt;P&gt;x0=15.170935313 plateau=97.919504645&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;with some strong caveats then you could say that the plateau of 98 starts at surgery number=15.&amp;nbsp; The caveat here is that the correlations between the parameters in the model are really large, so the calculated x0 value is going to depend on picking out good starting values.&amp;nbsp; Also, the quadratic coefficient (gamma) has confidence bounds that contain 0, implying that it could be removed.&amp;nbsp; If that is the case, there is no plateau, just a consistent decrease.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SteveDenham&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Dec 2020 16:09:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Model-to-determine-plateau-point-surgery-length-again-but-ignore/m-p/703139#M33990</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2020-12-02T16:09:42Z</dc:date>
    </item>
    <item>
      <title>Re: Model to determine plateau point -- surgery length again, but ignore date</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Model-to-determine-plateau-point-surgery-length-again-but-ignore/m-p/703144#M33991</link>
      <description>In reality you would likely also stratify by the complexity of the cases or other variables as required (different clinics may have different equipment, different staff) and would require more data (not just one individual) to make a robust recommendation like this &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 02 Dec 2020 16:14:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Model-to-determine-plateau-point-surgery-length-again-but-ignore/m-p/703144#M33991</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2020-12-02T16:14:59Z</dc:date>
    </item>
    <item>
      <title>Re: Model to determine plateau point -- surgery length again, but ignore date</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Model-to-determine-plateau-point-surgery-length-again-but-ignore/m-p/703149#M33992</link>
      <description>Steve --&lt;BR /&gt;This was my original approach, but I could never decide what were good starting values. Could you share insight into how you narrowed that down? I tried a grid approach and never really found anything that made much sense.&lt;BR /&gt;Thank you again!&lt;BR /&gt;Greg</description>
      <pubDate>Wed, 02 Dec 2020 16:27:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Model-to-determine-plateau-point-surgery-length-again-but-ignore/m-p/703149#M33992</guid>
      <dc:creator>gbrussell</dc:creator>
      <dc:date>2020-12-02T16:27:45Z</dc:date>
    </item>
    <item>
      <title>Re: Model to determine plateau point -- surgery length again, but ignore date</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Model-to-determine-plateau-point-surgery-length-again-but-ignore/m-p/703160#M33994</link>
      <description>&lt;P&gt;Well, I knew that beta had to be negative, and that, based on the spline plots, the join point was around 15.&amp;nbsp; So I just used -1 for beta, and solved for gamma, given x0 was 15.&amp;nbsp; To get alpha, I picked something near the median value of all the points.&amp;nbsp; A little sensitivity analysis on alpha revealed that the final estimates were stable across all the values I tried.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I guess the key is using the plots to get an approximate value for x0, so that the ratio between beta and gamma was about twice that value.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SteveDenham&lt;/P&gt;</description>
      <pubDate>Wed, 02 Dec 2020 17:44:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Model-to-determine-plateau-point-surgery-length-again-but-ignore/m-p/703160#M33994</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2020-12-02T17:44:41Z</dc:date>
    </item>
  </channel>
</rss>

