<?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: Using the estimates from PROC LOGISTIC in another data set in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Using-the-estimates-from-PROC-LOGISTIC-in-another-data-set/m-p/575746#M28331</link>
    <description>&lt;P&gt;Tks for support!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Following is the result of a proc print from dataset param (consider VS_LVEF as X in our previous post)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Replicate &amp;nbsp; Variable &amp;nbsp; &amp;nbsp;Estimate&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;Intercept&lt;/TD&gt;&lt;TD&gt;11.5259&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;VS_LVEF&lt;/TD&gt;&lt;TD&gt;-0.2393&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;Intercept&lt;/TD&gt;&lt;TD&gt;11.5259&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;VS_LVEF&lt;/TD&gt;&lt;TD&gt;-0.2393&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;Intercept&lt;/TD&gt;&lt;TD&gt;24.7332&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;VS_LVEF&lt;/TD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lt;TD&gt;Intercept&lt;/TD&gt;&lt;TD&gt;17.5613&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;5&lt;/TD&gt;&lt;TD&gt;VS_LVEF&lt;/TD&gt;&lt;TD&gt;-0.3322&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;5&lt;/TD&gt;&lt;TD&gt;Intercept&lt;/TD&gt;&lt;TD&gt;17.5613&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;5&lt;/TD&gt;&lt;TD&gt;VS_LVEF&lt;/TD&gt;&lt;TD&gt;-0.3322&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the variable Replicate comes from a bootstrap.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As You can see, for Replicate n.1 I have twice a Estimate for the Variable Intercept and twice for VS_LVEF. While I need only 1 Intercept estimate and only 1 VS_LVEF estimate. And so on for the other Replicates...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Furthermore, when I run the suggested code&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;PRE class=" language-sas"&gt;&lt;CODE class="  language-sas"&gt;&lt;SPAN class="token procnames"&gt;data&lt;/SPAN&gt; rocX2&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
    &lt;SPAN class="token keyword"&gt;if&lt;/SPAN&gt; _n_&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token number"&gt;1&lt;/SPAN&gt; &lt;SPAN class="token keyword"&gt;then&lt;/SPAN&gt; &lt;SPAN class="token keyword"&gt;merge&lt;/SPAN&gt; param&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token statement"&gt;where&lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;variable&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token string"&gt;'Intercept'&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;rename&lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;estimate&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;intercept&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;
    param&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token statement"&gt;where&lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;variable&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token string"&gt;'X'&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;rename&lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;estimate&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;beta1&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
	&lt;SPAN class="token keyword"&gt;set&lt;/SPAN&gt; rocX&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
	logit&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;log&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;_prob_&lt;SPAN class="token operator"&gt;/&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token number"&gt;1&lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;-&lt;/SPAN&gt;_prob_&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
	cutoff&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;logit&lt;SPAN class="token operator"&gt;-&lt;/SPAN&gt;intercept&lt;SPAN class="token operator"&gt;/&lt;/SPAN&gt;beta1&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the result is attached to this reply.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Briefly:&lt;/P&gt;&lt;P&gt;1) first 39 obs are ok. Obs from 40 to 79 duplicate the previous obs for Replicate n.1;&lt;/P&gt;&lt;P&gt;2) As You can see, the value for Intercept and Beta are the same for ALL replicates!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Tks a lot!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A&lt;/P&gt;</description>
    <pubDate>Tue, 23 Jul 2019 11:31:01 GMT</pubDate>
    <dc:creator>antor82</dc:creator>
    <dc:date>2019-07-23T11:31:01Z</dc:date>
    <item>
      <title>Using the estimates from PROC LOGISTIC in another data set</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Using-the-estimates-from-PROC-LOGISTIC-in-another-data-set/m-p/575332#M28321</link>
      <description>&lt;P&gt;Hi all&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would like to automatically use a value, derived from an output database, into a new data step.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I explain with an example:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc logistic data=sample plots=none;
model Y(event=1)=X / outroc=rocX;
ods output ParameterEstimates=param;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;/*param DBS has two columns, Variable (in this example named Intercept and X) and Estimate*/&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would like to automatically include the value of Intercept and X, taken from the dbs param, into the following DATA Step&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data rocX2(keep=cutoff prob Sensitivity Specificity Youden);
	set rocX;
	logit=log(_prob_/(1-_prob_));
	cutoff=(logit-/*Intercept*/)//*X*/;
	prob=_prob_;
	Sensitivity=_SENSIT_;
	Specificity=1-_1MSPEC_;
	Youden=_SENSIT_+ (1-_1MSPEC_)-1;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;tsk in advance&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jul 2019 16:04:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Using-the-estimates-from-PROC-LOGISTIC-in-another-data-set/m-p/575332#M28321</guid>
      <dc:creator>antor82</dc:creator>
      <dc:date>2019-07-22T16:04:26Z</dc:date>
    </item>
    <item>
      <title>Re: usa a value from another database</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Using-the-estimates-from-PROC-LOGISTIC-in-another-data-set/m-p/575333#M28322</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data rocX2(keep=cutoff prob Sensitivity Specificity Youden);
    if _n_=1 then set param;
	set rocX;
	logit=log(_prob_/(1-_prob_));
	cutoff=(logit-/*Intercept*/)//*X*/;
	prob=_prob_;
	Sensitivity=_SENSIT_;
	Specificity=1-_1MSPEC_;
	Youden=_SENSIT_+ (1-_1MSPEC_)-1;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 22 Jul 2019 11:56:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Using-the-estimates-from-PROC-LOGISTIC-in-another-data-set/m-p/575333#M28322</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-07-22T11:56:14Z</dc:date>
    </item>
    <item>
      <title>Re: usa a value from another database</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Using-the-estimates-from-PROC-LOGISTIC-in-another-data-set/m-p/575340#M28323</link>
      <description>Thank you &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/10892"&gt;@PaigeMiller&lt;/a&gt;!&lt;BR /&gt;&lt;BR /&gt;What should I change /*Intercept*/ with?&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 22 Jul 2019 12:17:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Using-the-estimates-from-PROC-LOGISTIC-in-another-data-set/m-p/575340#M28323</guid>
      <dc:creator>antor82</dc:creator>
      <dc:date>2019-07-22T12:17:02Z</dc:date>
    </item>
    <item>
      <title>Re: usa a value from another database</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Using-the-estimates-from-PROC-LOGISTIC-in-another-data-set/m-p/575342#M28324</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/178542"&gt;@antor82&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;What should I change /*Intercept*/ with?&lt;BR /&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I don't know, since I don't know what you want to do. I don't know what the formula for CUTOFF is supposed to do.&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jul 2019 12:33:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Using-the-estimates-from-PROC-LOGISTIC-in-another-data-set/m-p/575342#M28324</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-07-22T12:33:06Z</dc:date>
    </item>
    <item>
      <title>Re: usa a value from another database</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Using-the-estimates-from-PROC-LOGISTIC-in-another-data-set/m-p/575362#M28325</link>
      <description>From the first PROC logistic I derived two parameter estimates for the model Y=X, namely Intercept and X.&lt;BR /&gt;&lt;BR /&gt;I need to put the value of Intercept and X into the formula&lt;BR /&gt;cutoff=(logit-valueofintercept)/betaofX&lt;BR /&gt;&lt;BR /&gt;The values of intercept and of beta for X have been saved in&lt;BR /&gt;ods output ParameterEstimates=param&lt;BR /&gt;&lt;BR /&gt;I’ve already done it by hand&lt;BR /&gt;The formula became&lt;BR /&gt;cutoff=(logit-13.043)/-0.537&lt;BR /&gt;&lt;BR /&gt;But I wonder if I could do this automatically&lt;BR /&gt;</description>
      <pubDate>Mon, 22 Jul 2019 13:15:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Using-the-estimates-from-PROC-LOGISTIC-in-another-data-set/m-p/575362#M28325</guid>
      <dc:creator>antor82</dc:creator>
      <dc:date>2019-07-22T13:15:20Z</dc:date>
    </item>
    <item>
      <title>Re: usa a value from another database</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Using-the-estimates-from-PROC-LOGISTIC-in-another-data-set/m-p/575430#M28326</link>
      <description>You likely need to transpose your parameter estimates first - if I recall correctly they come with each estimate on a separate line. Then once you merge them in you'll have them on the same line to do your calculations and can refer to the variables instead of typing out the numbers. &lt;BR /&gt;&lt;BR /&gt;I illustrate this in this code where I show how to verify that the output from logistic regression is correct:&lt;BR /&gt;&lt;A href="https://communities.sas.com/t5/Statistical-Procedures/How-to-determine-logistic-regression-formula-from-estimates/td-p/120780" target="_blank"&gt;https://communities.sas.com/t5/Statistical-Procedures/How-to-determine-logistic-regression-formula-from-estimates/td-p/120780&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;The Neuralgia2 data set is available in the documentation for PROC LOGISTIC so you can get it to run that code if you'd like.</description>
      <pubDate>Mon, 22 Jul 2019 16:02:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Using-the-estimates-from-PROC-LOGISTIC-in-another-data-set/m-p/575430#M28326</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-07-22T16:02:15Z</dc:date>
    </item>
    <item>
      <title>Re: usa a value from another database</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Using-the-estimates-from-PROC-LOGISTIC-in-another-data-set/m-p/575452#M28327</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/178542"&gt;@antor82&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;From the first PROC logistic I derived two parameter estimates for the model Y=X, namely Intercept and X.&lt;BR /&gt;&lt;BR /&gt;I need to put the value of Intercept and X into the formula&lt;BR /&gt;cutoff=(logit-valueofintercept)/betaofX&lt;BR /&gt;&lt;BR /&gt;The values of intercept and of beta for X have been saved in&lt;BR /&gt;ods output ParameterEstimates=param&lt;BR /&gt;&lt;BR /&gt;I’ve already done it by hand&lt;BR /&gt;The formula became&lt;BR /&gt;cutoff=(logit-13.043)/-0.537&lt;BR /&gt;&lt;BR /&gt;But I wonder if I could do this automatically&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data rocX2;
    if _n_=1 then merge param(where=(variable='Intercept') rename=(estimate=intercept))
    param(where=(variable='X') rename=(estimate=beta1));
	set rocX;
	logit=log(_prob_/(1-_prob_));
	cutoff=(logit-intercept/beta1);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 22 Jul 2019 16:45:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Using-the-estimates-from-PROC-LOGISTIC-in-another-data-set/m-p/575452#M28327</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-07-22T16:45:23Z</dc:date>
    </item>
    <item>
      <title>Re: Using the estimates from PROC LOGISTIC in another data set</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Using-the-estimates-from-PROC-LOGISTIC-in-another-data-set/m-p/575502#M28328</link>
      <description>Tks!</description>
      <pubDate>Mon, 22 Jul 2019 17:42:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Using-the-estimates-from-PROC-LOGISTIC-in-another-data-set/m-p/575502#M28328</guid>
      <dc:creator>antor82</dc:creator>
      <dc:date>2019-07-22T17:42:43Z</dc:date>
    </item>
    <item>
      <title>Re: Using the estimates from PROC LOGISTIC in another data set</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Using-the-estimates-from-PROC-LOGISTIC-in-another-data-set/m-p/575709#M28329</link>
      <description>A little problem...&lt;BR /&gt;&lt;BR /&gt;In the dataset param, intercept and X are printed twice (probably because PROC logistic displays twice the parameter estimates...)&lt;BR /&gt;How could I select only one value for intercept and X?&lt;BR /&gt;&lt;BR /&gt;Tks again</description>
      <pubDate>Tue, 23 Jul 2019 09:15:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Using-the-estimates-from-PROC-LOGISTIC-in-another-data-set/m-p/575709#M28329</guid>
      <dc:creator>antor82</dc:creator>
      <dc:date>2019-07-23T09:15:27Z</dc:date>
    </item>
    <item>
      <title>Re: Using the estimates from PROC LOGISTIC in another data set</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Using-the-estimates-from-PROC-LOGISTIC-in-another-data-set/m-p/575728#M28330</link>
      <description>&lt;P&gt;I have no idea what you mean by "printed twice". Show me.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jul 2019 10:36:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Using-the-estimates-from-PROC-LOGISTIC-in-another-data-set/m-p/575728#M28330</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-07-23T10:36:17Z</dc:date>
    </item>
    <item>
      <title>Re: Using the estimates from PROC LOGISTIC in another data set</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Using-the-estimates-from-PROC-LOGISTIC-in-another-data-set/m-p/575746#M28331</link>
      <description>&lt;P&gt;Tks for support!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Following is the result of a proc print from dataset param (consider VS_LVEF as X in our previous post)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Replicate &amp;nbsp; Variable &amp;nbsp; &amp;nbsp;Estimate&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;Intercept&lt;/TD&gt;&lt;TD&gt;11.5259&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;VS_LVEF&lt;/TD&gt;&lt;TD&gt;-0.2393&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;Intercept&lt;/TD&gt;&lt;TD&gt;11.5259&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;VS_LVEF&lt;/TD&gt;&lt;TD&gt;-0.2393&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;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t;/TD&gt;&lt;TD&gt;VS_LVEF&lt;/TD&gt;&lt;TD&gt;-0.5119&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;5&lt;/TD&gt;&lt;TD&gt;Intercept&lt;/TD&gt;&lt;TD&gt;17.5613&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;5&lt;/TD&gt;&lt;TD&gt;VS_LVEF&lt;/TD&gt;&lt;TD&gt;-0.3322&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;5&lt;/TD&gt;&lt;TD&gt;Intercept&lt;/TD&gt;&lt;TD&gt;17.5613&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;5&lt;/TD&gt;&lt;TD&gt;VS_LVEF&lt;/TD&gt;&lt;TD&gt;-0.3322&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the variable Replicate comes from a bootstrap.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As You can see, for Replicate n.1 I have twice a Estimate for the Variable Intercept and twice for VS_LVEF. While I need only 1 Intercept estimate and only 1 VS_LVEF estimate. And so on for the other Replicates...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Furthermore, when I run the suggested code&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;PRE class=" language-sas"&gt;&lt;CODE class="  language-sas"&gt;&lt;SPAN class="token procnames"&gt;data&lt;/SPAN&gt; rocX2&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
    &lt;SPAN class="token keyword"&gt;if&lt;/SPAN&gt; _n_&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token number"&gt;1&lt;/SPAN&gt; &lt;SPAN class="token keyword"&gt;then&lt;/SPAN&gt; &lt;SPAN class="token keyword"&gt;merge&lt;/SPAN&gt; param&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token statement"&gt;where&lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;variable&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token string"&gt;'Intercept'&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;rename&lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;estimate&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;intercept&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;
    param&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token statement"&gt;where&lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;variable&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token string"&gt;'X'&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;rename&lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;estimate&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;beta1&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
	&lt;SPAN class="token keyword"&gt;set&lt;/SPAN&gt; rocX&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
	logit&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;log&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;_prob_&lt;SPAN class="token operator"&gt;/&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token number"&gt;1&lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;-&lt;/SPAN&gt;_prob_&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
	cutoff&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;logit&lt;SPAN class="token operator"&gt;-&lt;/SPAN&gt;intercept&lt;SPAN class="token operator"&gt;/&lt;/SPAN&gt;beta1&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the result is attached to this reply.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Briefly:&lt;/P&gt;&lt;P&gt;1) first 39 obs are ok. Obs from 40 to 79 duplicate the previous obs for Replicate n.1;&lt;/P&gt;&lt;P&gt;2) As You can see, the value for Intercept and Beta are the same for ALL replicates!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Tks a lot!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jul 2019 11:31:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Using-the-estimates-from-PROC-LOGISTIC-in-another-data-set/m-p/575746#M28331</guid>
      <dc:creator>antor82</dc:creator>
      <dc:date>2019-07-23T11:31:01Z</dc:date>
    </item>
    <item>
      <title>Re: Using the estimates from PROC LOGISTIC in another data set</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Using-the-estimates-from-PROC-LOGISTIC-in-another-data-set/m-p/575758#M28332</link>
      <description>&lt;P&gt;Replicate has never been mentioned in this thread before your last post. Please explain.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Whatever code I gave you is not going to work with a Replicate variable.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It seems as if we need to start from scratch, and you need to show me the code (and part of the data) that contains replicate.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jul 2019 12:06:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Using-the-estimates-from-PROC-LOGISTIC-in-another-data-set/m-p/575758#M28332</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-07-23T12:06:35Z</dc:date>
    </item>
    <item>
      <title>Re: Using the estimates from PROC LOGISTIC in another data set</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Using-the-estimates-from-PROC-LOGISTIC-in-another-data-set/m-p/575808#M28333</link>
      <description>&lt;P&gt;I tried to manage this way... and worked&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/*put estimates in a single row per each replicate*/&lt;BR /&gt;/*one column per "intercept", another per "beta"*/&lt;BR /&gt;PROC SORT data=param out=paramsorted;
BY Replicate;
RUN;

PROC TRANSPOSE data=paramsorted 
out=transposed name=Variable;
	BY replicate;
	VAR estimate;
RUN;

data transposed;
set transposed;
	rename COL1=Intercept COL2=Beta;&lt;BR /&gt;        keep replicate intercept beta;
	run;
&lt;BR /&gt;/*remove duplicate data from output dataset (have both Model and X in the _SOURCE_ column)*/	
data rocX2;
set rocX2;
where _SOURCE_='Model';
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Attached is a print of the transposed dataset&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then I performed the desired analysis&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data rocX3 (keep=cutoff Sensitivity Specificity Youden intercept beta replicate);
	merge transposed rocX2;
	by replicate;
	logit=log(_prob_/(1-_prob_));
	cutoff=(logit-intercept)/beta;
	prob=_prob_;
	Sensitivity=_SENSIT_;
	Specificity=1-_1MSPEC_;
	Youden=_SENSIT_+ (1-_1MSPEC_)-1;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;and this worked too.&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;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jul 2019 14:06:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Using-the-estimates-from-PROC-LOGISTIC-in-another-data-set/m-p/575808#M28333</guid>
      <dc:creator>antor82</dc:creator>
      <dc:date>2019-07-23T14:06:38Z</dc:date>
    </item>
  </channel>
</rss>

